WCF: Generate Proxy Class and Configuration file for Client

Posted m苗子

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了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

 

以上是关于WCF: Generate Proxy Class and Configuration file for Client的主要内容,如果未能解决你的问题,请参考以下文章

Powershell用Proxy执行WCF服务

按照Web Service方式调用WCF服务的问题

EndpointDispatcher 错误处的 WCF ContractFilter 不匹配

Android Studio couldn‘t generate bytecode view, no .class file found

Android Studio couldn‘t generate bytecode view, no .class file found

在 WCF 错误中创建 MS-Word 2003?