views:

65

answers:

3

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).

+1  A: 

wsdl.exe is your freind.

Update after comment - is this what you mean?

wsdl /out:[localpath]/myProxyClass.cs http://localhost/WebserviceRoot/WebServiceName.asmx?WSDL
I came across this early on but couldn't get it to work with a stand alone wsdl file. Each example shown points to some http endpoint ... do you know if wsdl.exe can point to a file locally?
Toran Billups
+2  A: 

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.

Travis Heseman
+1  A: 

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

mcauthorn