63 lines
2.2 KiB
C#
63 lines
2.2 KiB
C#
using System.IO;
|
|
using System.ServiceModel;
|
|
using System.ServiceModel.Web;
|
|
|
|
namespace RiaServiceLibrary
|
|
{
|
|
[ServiceContract]
|
|
public interface ISmsService
|
|
{
|
|
|
|
[OperationContract]
|
|
[WebInvoke(Method = "*",
|
|
ResponseFormat = WebMessageFormat.Json,
|
|
BodyStyle = WebMessageBodyStyle.Bare,
|
|
UriTemplate = "GetVerifyCode?content={content}&clientid={clientid}&sign={sign}")]
|
|
Stream GetVerifyCode(string content, string clientid, string sign);
|
|
|
|
[OperationContract]
|
|
[WebInvoke(Method = "*",
|
|
ResponseFormat = WebMessageFormat.Json,
|
|
BodyStyle = WebMessageBodyStyle.Bare,
|
|
UriTemplate = "ConfirmCode?content={content}&clientid={clientid}&sign={sign}")]
|
|
Stream ConfirmVerifyCode(string content, string clientid, string sign);
|
|
|
|
[OperationContract]
|
|
[WebInvoke(Method = "*",
|
|
ResponseFormat = WebMessageFormat.Json,
|
|
BodyStyle = WebMessageBodyStyle.Bare,
|
|
UriTemplate = "SmsMsg?content={content}&clientid={clientid}&sign={sign}")]
|
|
Stream SendMsg(string content, string clientid, string sign);
|
|
|
|
[OperationContract]
|
|
[WebInvoke(Method = "*",
|
|
ResponseFormat = WebMessageFormat.Json,
|
|
BodyStyle = WebMessageBodyStyle.Bare,
|
|
UriTemplate = "RetPwd?content={content}&clientid={clientid}&sign={sign}")]
|
|
string ResetPwd(string content, string clientid, string sign);
|
|
|
|
[OperationContract]
|
|
[WebInvoke(Method = "POST",
|
|
RequestFormat = WebMessageFormat.Json,
|
|
ResponseFormat = WebMessageFormat.Json,
|
|
BodyStyle = WebMessageBodyStyle.Bare,
|
|
UriTemplate = "PutSms")]
|
|
JsonResult PutSms(Input input);
|
|
|
|
[OperationContract]
|
|
[WebInvoke(Method = "POST",
|
|
RequestFormat = WebMessageFormat.Json,
|
|
ResponseFormat = WebMessageFormat.Json,
|
|
BodyStyle = WebMessageBodyStyle.Bare,
|
|
UriTemplate = "PutSms2")]
|
|
JsonResult PutSms2(Input input);
|
|
|
|
}
|
|
public class Input
|
|
{
|
|
public string content { get; set; }
|
|
public string clientid { get; set; }
|
|
public string sign { get; set; }
|
|
}
|
|
}
|