1. in your Asp.net project, right-click> select "add web reference", find the corresponding WebService on the pop-up page, or directly enter the corresponding WebService address. OK, the proxy class is automatically generated, and then WebService is used just like adding a project reference.
2.use the wsdl.exe tool. in the net Command Prompt window, enter the WSDL and press enter to see the Command Format of the WSDL. You can use the WSDL tool to generate the proxy class, and then add the proxy class to the project for use. The latter can also compile it into a DLL
Netizen: Online
You can generate proxy class references.
Open vs.net and create a "Windows application" Program Project, named as client, Add button, text box.
Now you want to use the proxy. Right-click reference on the right, select Add reference, and select Browse. Find webserver. dll under the bin directory under the webserver directory.
Add a reference to system. Web. WebServices, which is included in the list.
In form1.cs, add
Using system. Web. Services;
Using webserver;
Then
Private system. Windows. Forms. Button button1;
Private system. Windows. Forms. textbox textbox1;
Insert
Private webserver. service1 Client
Create a service1 instance. Double-click the button, Code As follows:
Private void button#click (Object sender, system. eventargs E)
{
Client = new service1 ();
String name;
Name = client. Show ("test ");
Textbox1.text = Name;
}
Press F5 to run the project, click the button, and the text box is displayed.
Test