Web service Server Auto-creation Using WSDL
If you ever work with web services between different parties for any B2B transfer you will likely come across situations when first party will generate all the WSDL and the second party will have to take those WSDL and generate a Web Service Server that conforms to that. When you are using custom namespaces it becomes very messy to go through WSDL manually and determine what methods needs to be exposed by you Web Service. In such condition it becomes vital to be able to auto generate Web Service Server using the WSDL.
The easiest way to accomplish this using .NET Framework 1.1 is using WSDL.exe!
When you create a Web Service client using Visual Studio by adding a web reference, it essentially calls the WSDL.exe to generate the client class. But if you whish to generate the Web Service Server using existing WSDL, you will have to use the command line WSDL.exe directly since Visual Studio does not gives any such options.
Following are step by step instructions:
1) Open up .Net Command Prompt: Start>programs>Microsoft Visual Studio .Net 2003>Visual Studio .NET tools>Visual Studio .NET 2003 Command Prompt.
2) Type in: Wsdl /Server [WSDL file Name]
Going through above steps will save lots of time as opposed to if you have to reverse engineer a WSDL to generate you own Web Service which will conform to any clients generated by that WSDL file.
Hope this tip will be helpful to you!
Happy Coding!
-Goldie.
