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

I am trying to create a client from a WSDL file without using my own visual studio, and did not know what is the best place to start.

The client must take the same file and create the client for the PHP application, and I wanted to prove that the WSDL was valid by creating the client myself (outside the studio).

+3
source share
3 answers

svcutil.exe is a command line tool that ships with the Windows SDK. It creates a WCF client (C # code file plus a configuration file whose elements can be placed in your web.config or app.config).

I am sure that you can pass the UNC path to the WSDL and not the URL.

+3
source

wsdl.exe .

- , ?

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

To use WSDL to use the code module:

wsdl /n:<Namespace> pathtowsdlfile

Then we want to compile the dll with debugging symbols and the given file name.

Using:

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

+1
source

Source: https://habr.com/ru/post/1720197/


All Articles