请老师指点一下,中国移动的云MAS webservice 接口用狐表该怎么写?
云MAS平台webservice
接 口 文 档
接口定义
1发送短信
1.1业务功能
云MAS提供webservice服务,接收客户端向云MAS平台发送请求,带上相应的请求参数,云MAS平台接收请求,并进行验证,验证通过后进行短信发送。
1.2普通短信发送
<!--[if !supportLists]-->l <!--[endif]-->功能介绍
客户调用webservice服务会即时的下发短信,支持单发和群发。
<!--[if !supportLists]-->l <!--[endif]-->Webservice服务地址
http://112.35.10.201:1999/smsservice?wsdl
<!--[if !supportLists]-->l <!--[endif]-->方法名字
sendSms
<!--[if !supportLists]-->l <!--[endif]-->参数类型及说明
参数名称 | 数据类型 | 说明 |
ecName | string | 集团客户名称 |
apId | string | 用户名 |
secretKey | string | 密码 |
mobiles | string | 手机号码列表 |
content | string | 发送短信内容 |
sign | string | 网关签名编码,必填,签名编码在中国移动集团开通帐号后分配,可以在云MAS网页端管理子系统-SMS接口管理功能中下载。 |
addSerial | string | 扩展码,根据向移动公司申请的通道填写,如果申请的精确匹配通道,则填写空字符串(""),否则添加移动公司允许的扩展码 |
mac | string | 按EcName、apId、secretKey、mobiles(拼起来,中间无空格如1333333333313555555555)、content、sign、addSerial顺序拼接得到的字符串计算md5 |
测试报文:
<?xml version="1.0" encoding="utf-8"?>
<WsSubmitReq>
<apId>apId13</apId>
<secretKey>123</secretKey>
<ecName>ecName测试</ecName>
<mobiles>
<string>13333333333</string>
<string>13333333335</string>
</mobiles>
<content>TEST内容</content>
<sign>mysign</sign>
<addSerial>2134</addSerial>
<mac>6361c763832ad4e5bf21cf6e2543bd78</mac>
</WsSubmitReq>
响应参数:
参数名称 | 数据类型 | 说明 |
success | boolean | true,false |
rspcod | string | 下表是响应码 |
msgGroup | string | 消息组唯一标示(发送消息唯一标示符) |
响应报文格式:
<?xml version="1.0" encoding="utf-8"?>
<SendSmsResponse>
<success>true</success>
<rspcod>success</rspcod>
<msgGroup>0704105311000000100001</msgGroup>
</SendSmsResponse>
响应码:
InvalidMessage | 非法消息,缺少必要参数 |
InvalidUsrOrPwd | 非法用户名或密码 |
IllegalSignId | 无效的签名 |
success | 成功 |
TooManyMobiles | 手机号超出最大上限(5000) |