It is often necessary to manually generate a WebService proxy class that requires a sentence to be generated, such as Wsdl.exe/l:cs/out:d:\proxy_updateservice.cs http://localhost:1101/ Updateservice.asmx? wsdl Copy to the Visual Studio 2005 Command Prompt window to execute, and here is another way to do this.
Open Visual Studio 2005 First, choose Menu Tools-External tools to open the External Tools dialog box,
, click the Add button to add a new tool, enter the WSDL generation agent class in the title row, and enterC:\Program Files\Microsoft Visual Studio 8\sdk\v2.0\bin\ in the command line. Wsdl.exe"(Path to the Wsdl.exe file), enter"/l:cs/out:"In the Parameters row, click the Triangle button to the right of the" Initial Catalog "row to select" Item Directory ", tick" use Output Window "and" Prompt for parameters ", and then confirm the save.
Then open the menu "tools" to see a "WSDL Generation proxy class" menu, then select a folder to hold the generated proxy class (must be located and included in the current solution), and then click on the "WSDL Generation Agent Class" menu, pop up the following dialog box
, and then you just need to "/l:cs/out:" After empty one box (must be empty one) and then paste WebService file HTTP address such as http://localhost:4478/UpdateService.asmx? WSDL, click OK to see what happened? Yes, the Output window will show the generated class and its location to see if the folder you selected
, find this path to see if there is a class, and you will find that this class is exactly the same as the class generated by the command line above, and the individual feels it is easier to do so.
A method of automatically generating WebService proxy classes by WSDL