using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Services;
using System.Xml.Serialization;
namespace GSMarketSys.WS
{
///
/// MsgSend 的摘要说明
///
[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 MsgSend : System.Web.Services.WebService
{
public MsgSend()
{
//如果使用设计的组件,请取消注释以下行
//InitializeComponent();
}
///
///
///
///
///
[XmlInclude(typeof(MsgHead))]
[XmlInclude(typeof(MsgContent))]
[XmlInclude(typeof(MsgResult))]
//[XmlInclude(typeof(ResultType))]
[WebMethod]
public MsgResult SMSent(MsgHead head, MsgContent content)
{
MsgResult loRetVal = new MsgResult();
loRetVal.desc = "ok";
return loRetVal;
}
[XmlInclude(typeof(MsgRecordQuery))]
[XmlInclude(typeof(MessageRecord))]
[WebMethod]
public MsgRecordQuery SMSentQuery(string timebegin, string timeend, int resultType)
{
MsgRecordQuery loRetVal = new MsgRecordQuery();
loRetVal.result = 1;
loRetVal.desc = "success";
loRetVal.msgRecords = new List();
MessageRecord loRow1 = new MessageRecord();
loRetVal.msgRecords.Add(loRow1);
loRow1 = new MessageRecord();
loRetVal.msgRecords.Add(loRow1);
return loRetVal;
}
}
///
/// 消息头文件
///
[Serializable]
public class MsgHead
{
///
/// 编码
///
public string code;
///
/// 发生人
///
public string SendMan;
///
/// 系统名称
///
public string SysName;
///
/// 接收者号码
///
public string[] MobileNums;
///
/// 指定的发送时间 ,小于等于当前时间则立刻发送
///
public DateTime SendTime;
///
/// 发送次数
///
public int Times;
///
/// 用户ID
///
public string userid;
///
/// 用户密码
///
public string userpwd;
///
/// 接口访问许可密钥
///
public string InterfaceAuditKey;
}
///
/// 消息主题信息
///
[Serializable]
public class MsgContent
{
///
/// 标题
///
public string title;
///
/// 内容
///
public string content;
}
///
/// 返回结果
///
[Serializable]
public class MsgResult
{
///
/// 返回值 1 成功 0 失败 -1 系统异常
///
public int result;
///
/// 服务器发送的时间
///
public DateTime sendTime;
///
/// 发送耗时,单位毫秒
///
public int spendTimes;
///
/// 返回结果的描述信息
///
public string desc;
}
[Serializable]
public class MsgRecordQuery
{
///
/// 1 为成功 0 为失败 -1 系统异常
///
public int result;
///
/// 对result具体信息的描述
///
public string desc;
///
/// 返回的结果集
///
public List msgRecords;
}
[Serializable]
public class MessageRecord
{
///
/// 编码
///
public string encoding;
///
/// 发送者
///
public string SendMan;
///
/// 系统名称
///
public string SysName;
///
/// 接收者号码
///
public string[] MobileNums;
///
/// 指定的发送时间 ,小于等于当前时间则立刻发送
///
public DateTime SendTime;
///
/// 发送次数
///
public int Times;
///
/// 用户ID
///
public string userid;
///
/// 返回值 1 成功 0 失败 -1 系统异常
///
public int result;
///
/// 服务器发送的时间
///
public DateTime sendTime;
///
/// 发送耗时,单位毫秒
///
public int spendTimes;
///
/// 返回结果的描述信息
///
public string desc;
}
}