wsdl /language:C# /namespace:Hello http://localhost/myweb/service.asmx?WSDL
在C:/Program Files/Microsoft Visual Studio 8/SDK/v2.0/Bin目录下会有一个
SecurityWebService.cs文件。
可以把它直接添加到客户中,也可以编译成为DLL文件使用。
客户端
private void button2_Click(object sender, EventArgs e)
{
Hello.SecurityWebService ser = new Hello.SecurityWebService();
Hello.SecurityInfo info = ser.GetSecurityInfo(textBox1.Text);
textBox2.Text = info.CompanyName;
textBox3.Text = info.Price.ToString();
}