zoukankan      html  css  js  c++  java
  • WCF: Generate Proxy Class and Configuration file for Client

    1. please keep WCF service running

    2. and two ways to achive this 

      a. add Service Reference (will not introduce this since there're so many resources on internet)

      b. use svcutil.exe to generate

    use svcutil.exe to generate

    a. open visual studio cmd and input commands as below

      - language means which language the code in GeneratedProxy uses. .cs mean c#

      - out means the output file into which the proxy class will be written.

      - config means config file path

      - URL means the wcf service URL from which we can get service metadata to generate client proxy class.

    svcutil.exe /language:cs /out:D:GeneratedProxy.cs /config:D:app.config http://localhost:8000/ServiceModelSamples/service

    b. Check the generated proxy and config file

    GeneratedProxy.cs

     app.config

  • 相关阅读:
    pyVmomi入门
    一个简单的web框架实现
    H3C交换配置PBR最佳实践
    jQuery入门第三
    jQuery入门第二
    JS笔记 入门第四
    JS笔记 入门第三
    JS笔记 入门第二
    day16
    python之路-DAY10
  • 原文地址:https://www.cnblogs.com/ATually/p/7004419.html
Copyright © 2011-2022 走看看