开发者

How to generate the client from a WSDL file in .net?

开发者 https://www.devze.com 2022-12-08 09:26 出处:网络
I\'m trying to generate a client from a WSDL file without using visual studio itself and didn\'t know what the best place was to start.

I'm trying to generate a client from a WSDL file without using visual studio itself and didn't know what the best place was to start.

A customer needs to开发者_如何转开发 take this same file and generate a client for a PHP application and I wanted to prove the WSDL was valid by creating a client myself (outside of studio).


svcutil.exe is a commandline tool that comes with the Windows SDK. It creates a WCF client (C# code file plus configuration file, the elements of which can be placed in your web.config or app.config).

I'm fairly sure you can pass a UNC path to a WSDL rather than a URL.


wsdl.exe is your freind.

Update after comment - is this what you mean?

wsdl /out:[localpath]/myProxyClass.cs http://localhost/WebserviceRoot/WebServiceName.asmx?WSDL


To take a WSDL to a code module use:

wsdl /n:<Namespace> pathtowsdlfile

Then we want to compile the dll with debug symbols, and a given filename.

Use:

csc /t:library /debug /out:<DllFileName.dll> pathtosourcefile.cs

0

精彩评论

暂无评论...
验证码 换一张
取 消