上一篇文章是關於 CMPP3.0 的 C# 實現,我為了測試其中的 PROVISION 接口,利用了 System.Net.HttpWebRequest 類將《MISC系統短信SP接入指南-接口改造分冊》文檔中的示例 xml 發送到了 WEB 服務,並從 WEB 服務返回了對應的 Resp 包(也是一段 XML),下面就將代碼貼出來:
1、SyncOrderRelationReq 包的 XML 內容:
<SOAP-ENV:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.XMLsoap.org/soap/encoding/">
<SOAP-ENV:Header>
<TransactionID XMLns="http://www.monternet.com/dsmp/schemas/">00110318384464</TransactionID>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<SyncOrderRelationReq XMLns="http://www.monternet.com/dsmp/schemas/">
<Version>1.5.0</Version>
<MsgType>SyncOrderRelationReq</MsgType>
<Send_Address>
<DeviceType>0</DeviceType>
<DeviceID>0011</DeviceID>
</Send_Address>
<Dest_Address>
<DeviceType>400</DeviceType>
<DeviceID>0</DeviceID>
</Dest_Address>
<FeeUser_ID>
<UserIDType>1</UserIDType>
<MSISDN>13456781234</MSISDN>
<PseudoCode></PseudoCode>
</FeeUser_ID>
<DestUser_ID>
<UserIDType>1</UserIDType>
<MSISDN>13456781234</MSISDN>
<PseudoCode></PseudoCode>
</DestUser_ID>
<LinkID>SP</LinkID>
<ActionID>1</ActionID>
<ActionReasonID>1</ActionReasonID>
<SPID>419000</SPID>
<SPServiceID>-YYXXYYXX</SPServiceID>
<AccessMode>3</AccessMode>
<FeatureStr>MTA2NjIxNDQgREE=</FeatureStr>
</SyncOrderRelationReq>
</SOAP-ENV:Body>
< /SOAP-ENV:Envelope>