Generally, a WEB Server that has implemented the function will release its own WSDL file for the client to generate a proxy class.
But sometimes it is the first interface definition (WSDL) file between the server and the client, then the server and the client write programs separately, one to provide web services, and the other to use web services.
The following describes how to generate server code from an existing WSDL file in VS2005.
1)use the vs2005 tool wsdl.exe to generate a cs file from the WSDL file:
Use the/serverInterface option (or abbreviated/si) of wsdl.exe to specify the input wsdl file (Note: if other wsdl files are imported into the wsdl file to be converted, all files should be listed, including the xsd files used should also be listed ). The output will be a code file (for example, if the region is a c‑based language, see wsdl.exe instructions in msdn), which contains the interface bound to each wsdl.
Example: Assume that importedSample. wsdl is imported into the ServerInterfaceSample. wsdl file, and Service. xsd is used as the schema file;
Wsdl.exe/si ServerInterfaceSample. wsdl importedSample. wsdl Service. xsd