下面是源代码
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Services;
using LDWebHttp.Comm.log;
using System.Web.Script.Services;
using System.IO;
using System.Text;
using LDWebHttp.JsonHelper;
using System.ServiceModel;
using System.Runtime.Serialization;namespace LDWebHttp
{
/// <summary>
/// 的摘要说明
/// </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 LDWebHttp : WebService
{
//string oldUrl = HttpContext.Current.Request.RawUrl;
//this.Context.RewritePath(oldUrl.Replace("op=", "")); [WebMethod(Description = "HelloWorld通道测试方法")]
public string HelloWorld()
{
return "Hello World";
}
[WebMethod]
public string signSMSData(string SMSBody)
{
string msg="fail";
if (!string.IsNullOrEmpty(SMSBody))
{
//进行数据解析
msg = "ok";
LogTool.Instance().Write("SMSBody=" + SMSBody, msgType.Information);
}
else {
LogTool.Instance().Write("SMSBody=接收到数据为空" + SMSBody, msgType.Information);
}
return msg;
}
[WebMethod]
[ScriptMethod(UseHttpGet = true)]
public string PostSMSPropertyList()
{
string msg = "postfail";
string jsonString = HttpContext.Current.Request["signSMSBody"];
LogTool.Instance().Write("signSMSBody=" + jsonString, msgType.Information);
// var productProperty=string.Empty;
if (jsonString != null)
{
var productProperty = JsonHelper.jsondelpher.JsonDeserialize<MPSMSProperty>(jsonString); // productProperty 成功反序列化成MProductProperty的对象
LogTool.Instance().Write("productProperty=" + productProperty, msgType.Information);
msg="postsuccess";
}
//返回接收成功标识
return msg;
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Services;
using LDWebHttp.Comm.log;
using System.Web.Script.Services;
using System.IO;
using System.Text;
using LDWebHttp.JsonHelper;
using System.ServiceModel;
using System.Runtime.Serialization;namespace LDWebHttp
{
/// <summary>
/// 的摘要说明
/// </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 LDWebHttp : WebService
{
//string oldUrl = HttpContext.Current.Request.RawUrl;
//this.Context.RewritePath(oldUrl.Replace("op=", "")); [WebMethod(Description = "HelloWorld通道测试方法")]
public string HelloWorld()
{
return "Hello World";
}
[WebMethod]
public string signSMSData(string SMSBody)
{
string msg="fail";
if (!string.IsNullOrEmpty(SMSBody))
{
//进行数据解析
msg = "ok";
LogTool.Instance().Write("SMSBody=" + SMSBody, msgType.Information);
}
else {
LogTool.Instance().Write("SMSBody=接收到数据为空" + SMSBody, msgType.Information);
}
return msg;
}
[WebMethod]
[ScriptMethod(UseHttpGet = true)]
public string PostSMSPropertyList()
{
string msg = "postfail";
string jsonString = HttpContext.Current.Request["signSMSBody"];
LogTool.Instance().Write("signSMSBody=" + jsonString, msgType.Information);
// var productProperty=string.Empty;
if (jsonString != null)
{
var productProperty = JsonHelper.jsondelpher.JsonDeserialize<MPSMSProperty>(jsonString); // productProperty 成功反序列化成MProductProperty的对象
LogTool.Instance().Write("productProperty=" + productProperty, msgType.Information);
msg="postsuccess";
}
//返回接收成功标识
return msg;
}
}
}
你自己先搜一下HelloWorld到底哪里使用了