Generally, to manually generate a WebService proxy class, you need to generate a statement, such as wsdl.exe/L: CS/out: D: \ proxy_updateservice.cs http: // localhost: 1101/UpdateService. asmx? Copy the WSDL file to the Visual Studio 2005 Command Prompt window for execution. Here we will introduce another method.
Open Visual Studio 2005, select "Tools"-"external tools", open the external tools dialog box, and click "add" to add a new tool, then, enter "WSDL generation proxy class" in the "title" line and "C: \ Program Files \ Microsoft Visual Studio 8 \ SDK \ V2.0 \ bin \ wsdl.exe "(path of the wsdl.exe file), input"/L: CS/out: "in the" parameter "line :", click the triangle button on the right of the "Initial directory" line and select "item directory", select "use output window" and "prompt input parameter", and then confirm to save.
Open the menu "tool" and you will see an additional "WSDL generate proxy class" menu. In this case, select a folder for storing the generated proxy classes (which must be included in the current solution ), click the "WSDL generate proxy class" menu, and the following dialog box is displayed. Then, you only need to enter a space (one space is required) after "/L: CS/out) paste the HTTP address of the WebService file, such as http: // localhost: 4478/UpdateService. asmx? WSDL. Click "OK" to see what happened? Yes, the output window will show a generated class and its storage location, to see if it is the folder you selected, find this path to see if there is a class, you will find that this class is exactly the same as the class generated using the command line above. I personally think this operation is simpler.