/// <summary>
/// Test 的摘要说明
/// </summary>
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[System.ComponentModel.ToolboxItem(false)]
// 若要允许使用 ASP.NET AJAX 从脚本中调用此 Web 服务,请取消注释以下行。
// [System.Web.Script.Services.ScriptService]
public class Test : System.Web.Services.WebService
{ [WebMethod]
public string HelloWorld(string name)
{
HelloWS.HelloWebService hw = new HelloWS.HelloWebService();
try
{
//hw.Timeout = 5000;
return hw.HelloWorld(name);
}
catch (WebException ex)
{
return "状态码:"+((HttpWebResponse)ex.Response).StatusCode+"\n"+"描述:"+ex.Message;
}
}
}