經過一番辛苦努力,MM7協議重寫成功。協議貌似Soap包但實際上只是HttpPost而已,對於.Net程式員想使用webservice來構造這種複雜的包還真是困難。
從重構中發現原來這麼全國性的多媒體訊息協議也漏洞百出結構混亂,實在匪夷所思。
為給同行人一點協助,把正確的一個多媒體訊息下行包的例子貼出來。
POST /vas HTTP/1.1
Host:211.139.144.200:8081
Content-Type:multipart/related; boundary="--NextPart_0_2817_24856";type="text/xml";start="</tnn-200102/mm7-vasp>"
Content-Transfer-Encoding:8bit
Authorization:Basic ODg4ODg4Og==
SOAPAction:""
MM7APIVersion:V1.5.3_20040621
Connection: Keep-Alive
Content-Length:1454
Mime-Version:1.0
this is a multi-part message in MIME format
----NextPart_0_2817_24856
Content-Type:text/xml;charset="UTF-8"
Content-Transfer-Encoding:8bit
Content-ID:</tnn-200102/mm7-vasp>
<?xml version="1.0" encoding="UTF-8"?><env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"><env:Header><mm7:TransactionID xmlns:mm7="http://www.3gpp.org/ftp/Specs/archive/23_series/23.140/schema/REL-6-MM7-1-0" env:mustUnderstand="1">1000011</mm7:TransactionID></env:Header><env:Body><SubmitReq xmlns="http://www.3gpp.org/ftp/Specs/archive/23_series/23.140/schema/REL-6-MM7-1-0"><MM7Version>6.3.0</MM7Version><SenderIdentification><VASPID>00000</VASPID><VASID>10600000</VASID><SenderAddress>106000000</SenderAddress></SenderIdentification><Recipients><To><Number>13510985753</Number><Number>13902442333</Number></To></Recipients><ServiceCode>4</ServiceCode><DeliveryReport>False</DeliveryReport><Subject>褰╀俊嫻嬭瘯</Subject><ChargedParty>ThirdParty</ChargedParty><ChargedPartyID>13510985755</ChargedPartyID></SubmitReq></env:Body></env:Envelope>
----NextPart_0_2817_24856
Content-Type:multipart/related;start="<START>";type="application/smil";boundary="SubPart_7452684322002_77645"
Content-ID:mmtest
Content-Transfer-Encoding:8bit
--SubPart_7452684322002_77645
Content-Type:text/plain;charset=UTF-8
Content-Transfer-Encoding:8bit
Content-ID:text1.txt
褰╀俊褰╀俊鎴戠埍浣狅紒
--SubPart_7452684322002_77645--
----NextPart_0_2817_24856--
我是用C#重寫mm7協議api,上面的Soap包對於想用其他(非java)語言重寫多媒體訊息api的開發人員是有很大協助的。
多媒體訊息發送測試小程式:
介面2:
提供多媒體訊息C#版用戶端源碼,測試小程式源碼,多媒體訊息網關模擬器,抓包工具,以及C#實現的本地連接埠監聽工具源碼。
本程式不提供免費下載。如有需要請聯絡 小y QQ:271963990 請註明來意。