1 using System; 2 using System.Net; 3 using System.IO; 4 using System.CodeDom; 5 using Microsoft.CSharp; 6 using System.CodeDom.Compiler; 7 using System.Web.Services.Description; 8 using System.Web.Services.Protocols; 9 10 namespace HB.Common 11 { 12 /* 调用方式 13 * string url = "http://www.webservicex.net/globalweather.asmx" ; 14 * string[] args = new string[2] ; 15 * args[0] = "Hangzhou"; 16 * args[1] = "China" ; 17 * object result = WebServiceHelper.InvokeWebService(url ,"GetWeather" ,args) ; 18 * Response.Write(result.ToString()); 19 */ 20 public class WebServiceHelper 21 { 22 InvokeWebService116 }117} 118