最近做电信的ISAG短信通道,真心伤不起。各种问题层出不穷。电信提供了几个WSDL文件,引用之后是可以调用相关函数,但关键的是只有发送包体(SOAPBODY)的函数,没有包头(SOAPHEADER)的函数,这样不仅发送的报文不完整,而且因为没有包头的一些配置信息, 比如一些业务信息、产品信息等,结果就是根本无法成功提交。实在没法,只能抛弃这些现有的函数,自己组合XML来像目标地址发送报文。。。
<?
xml version="1.0" encoding="UTF-8"
?>
< soapenv:Envelope xmlns:soapenv ="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd ="http://www.w3.org/2001/XMLSchema" xmlns:xsi ="http://www.w3.org/2001/XMLSchema-instance" >
< soapenv:Header >
< ns1:RequestSOAPHeader soapenv:actor ="http://schemas.xmlsoap.org/soap/actor/next" soapenv:mustUnderstand ="0" xmlns:ns1 ="http://www.chinatelecom.com.cn/schema/ctcc/common/v2_1" >
< ns1:spId > spId </ ns1:spId >
< ns1:timeStamp > 时间戳 </ ns1:timeStamp >
< ns1:spPassword > 密钥 </ ns1:spPassword >
< ns1:productId > 产品ID </ ns1:productId >
< ns1:OA > tel:+8618900000000 </ ns1:OA >
< ns1:FA > tel:+8618900000000 </ ns1:FA >
< ns1:multicastMessaging > false </ ns1:multicastMessaging >
</ ns1:RequestSOAPHeader >
</ soapenv:Header >
< soapenv:Body >
< sendSms xmlns ="http://www.chinatelecom.com.cn/schema/ctcc/sms/send/v2_1/local" >
< addresses > tel:+8618900000000 </ addresses >
< senderName > 10658888 </ senderName >
< charging >
< description xmlns ="" > 描述 </ description >
< currency xmlns ="" > 0 </ currency >
< amount xmlns ="" > 1 </ amount >
< code xmlns ="" ></ code >
</ charging >
< message > 短信内容 </ message >
< receiptRequest >
< endpoint xmlns ="" > http://test:8180/isag/services/SmsNotification </ endpoint >
< interfaceName xmlns ="" > notifySmsDeliveryReception </ interfaceName >
< correlator xmlns ="" ></ correlator >
</ receiptRequest >
</ sendSms >
</ soapenv:Body >
</ soapenv:Envelope >
< soapenv:Envelope xmlns:soapenv ="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd ="http://www.w3.org/2001/XMLSchema" xmlns:xsi ="http://www.w3.org/2001/XMLSchema-instance" >
< soapenv:Header >
< ns1:RequestSOAPHeader soapenv:actor ="http://schemas.xmlsoap.org/soap/actor/next" soapenv:mustUnderstand ="0" xmlns:ns1 ="http://www.chinatelecom.com.cn/schema/ctcc/common/v2_1" >
< ns1:spId > spId </ ns1:spId >
< ns1:timeStamp > 时间戳 </ ns1:timeStamp >
< ns1:spPassword > 密钥 </ ns1:spPassword >
< ns1:productId > 产品ID </ ns1:productId >
< ns1:OA > tel:+8618900000000 </ ns1:OA >
< ns1:FA > tel:+8618900000000 </ ns1:FA >
< ns1:multicastMessaging > false </ ns1:multicastMessaging >
</ ns1:RequestSOAPHeader >
</ soapenv:Header >
< soapenv:Body >
< sendSms xmlns ="http://www.chinatelecom.com.cn/schema/ctcc/sms/send/v2_1/local" >
< addresses > tel:+8618900000000 </ addresses >
< senderName > 10658888 </ senderName >
< charging >
< description xmlns ="" > 描述 </ description >
< currency xmlns ="" > 0 </ currency >
< amount xmlns ="" > 1 </ amount >
< code xmlns ="" ></ code >
</ charging >
< message > 短信内容 </ message >
< receiptRequest >
< endpoint xmlns ="" > http://test:8180/isag/services/SmsNotification </ endpoint >
< interfaceName xmlns ="" > notifySmsDeliveryReception </ interfaceName >
< correlator xmlns ="" ></ correlator >
</ receiptRequest >
</ sendSms >
</ soapenv:Body >
</ soapenv:Envelope >
接下来收到服务器的响应是:500错误,应该是包头中的一些配置参数没有定义,必须先申请下来这些正式的参数后传递过去才行。。。于是又开始申请这些东西,前前后后折腾的一两周。终于都弄好了,能正常发送了,也能获取到正确的返回报文了,但手机还是没有收到发送的短信,联系了技术人员,原来是之前申请的业务资料那里需要确认了定购关系才能给用户下发短信。这下好了,一切得重头申请,又回到原点了。
好吧。那就重新申请吧。。。刚刚接到消息,送审失败,被退审了!原因未知,真心伤不起阿!!