Tuesday, October 04, 2005

Generating the web service proxy classes without the web service

Our customer, who’s in US, and us, in SL, edits the same code base. This has many a times caused mishaps of all sorts. Today, they had checked in a project file and some source files to the source repository after adding two web references and modifying the code to work with those services. But he hadn’t checked in the generated proxies or the web service descriptors. What’s worse is that we don’t have access to the services! They are hosted in their LAN. So we couldn’t generate the proxy classes either.

That’s why I thought of making this post. If you do not have access to a web service, you still can generate the proxy classes (which mediates the web service and the clients doing all the translation stuff so you could code as if the classes in the web service are in the same solution you work in) if you have the web service descriptor language (wsdl) file which is valid to that service. Use the wsdl.exe to generate the proxy classes and add them to your project. This is adequate to continue coding and compiling the project without trouble. But in my case I don’t have the wsdl either :(