soap - how can I parse http post content included well formed XML and binary data? -
i receiving mobile originated mms web app http post. when receive content includes raw information, formed xml , binary formatted data (i.e. image).
i want fetch xml can parse , binary data content convert image.
following content sample:
------=_part_121809_1523072928.1286496211187 content-type: text/xml content-id: <soap-start> <?xml version="1.0" encoding="utf-8" standalone="yes"?><ns1:envelope xmlns:ns1="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns3="http://www.3gpp.org/ftp/specs/archive/23_series/23.140/schema/rel-6-mm7-1-4"><ns1:header><ns3:transactionid ns1:mustunderstand="1">gw0110l-m1007n6-m200331g0-snsrpn</ns3:transactionid></ns1:header><ns1:body><ns3:deliverreq><ns3:mm7version>6.8.0</ns3:mm7version><ns3:linkedid>gw0110l-m1007n6-m200331g0-snsrpn</ns3:linkedid><ns3:sender><ns3:number>+16123060744/type=plmn</ns3:number></ns3:sender><ns3:recipients><ns3:to><ns3:number displayonly="false">466466</ns3:number></ns3:to></ns3:recipients><ns3:timestamp>2010-10-08t00:03:29.897z</ns3:timestamp><ns3:priority>normal</ns3:priority><ns3:subject>new message</ns3:subject><ns3:uacapabilities uaprof="mf:304~model:sphm320zss"/><ns3:content allowadaptations="true" href="cid:default.cid"/></ns3:deliverreq></ns1:body></ns1:envelope> ------=_part_121809_1523072928.1286496211187 content-type: multipart/mixed; boundary="----=_part_121810_281628656.1286496211187" content-id: <default.cid> ------=_part_121810_281628656.1286496211187 content-type: application/smil content-transfer-encoding: 7bit content-id: <<applicationsmil_1.smil>> <smil> <head> <layout> <root-layout height="160" width="160"/> <region height="120" id="image" left="0" top="0" width="160"/> <region height="40" id="text" left="0" top="120" width="160"/> </layout> </head> <body> <par dur="5s"> <img region="image" src="imagejpeg_2.jpg"/> </par> </body> </smil> ------=_part_121810_281628656.1286496211187 content-type: image/jpeg content-transfer-encoding: binary content-id: <<imagejpeg_2.jpg>> ÿØÿà�jfif������ÿÛ�c� $4á%ñ&'()*56789:cdefghijstuvwxyzcdefghijstuvwxyz‚ƒ„…†‡ˆ‰Š’“”•–—˜™š¢£¤¥¦§¨©ª²³´µ¶·¸¹ºÂÃÄÅÆÇÈÉÊÒÓÔÕÖ×ØÙÚâãäåæçèéêòóôõö÷øùúÿÚ���?�ýø¢Š(�¢Š(�¢Š(�¢Š(�¢Š(�¢Š(�¢Š(�¢Š(�¢Š(�¢Š(�¢Š(�¢Š(�¢Š(�¢Š(�¢Š(�¢Š(�¢Š(�¢Š(�¢Š(�¢Š(�¢Š(�¢Š(�¢Š(�¢Š(�¢Š(�¢Š(�¢Š(�¢Š(�¢Š(�¢Š(�¢Š(yÕmt?êšÞ h³Óí$ºœ¢å¶d¥›‚×à/Æß|Ô¾6èz^kÚ<º¬ú„Ïwföþg÷q7§È¿süîl¯è ä¢Ù²kl÷qÈ|·t? ÷·nþþ>5k:ý¶<m¦7†µ_ÚørÊ{k;û òÁ½÷¶ç‹z?ÈŸ'Ï÷6r¾gˆ ±‘£7›],—^ŸvæÊo~ÿ�Ò<¾Ú?�ëšÏµ»)tÛ ="‚Ù,¦kt“æÛ±þ÷ëÄ.´[ï‚·3ÛßÜ[yß\¬%¹ß.ç•+Ôl5ÏÚþÌþ0ׯ-m~Ó¨^3[e,?Åüü_ü¹[ßø"ßaðm„Ž›s~×>dßdº»~_üzº£r¤å÷sÙëoŘtåå哳í`Ô¬e‡ÅÞÒî5›¯ô]ÛÝ?t»v|¿í|ÔË?r_ø“v‹Ä>
the information platform/framework you're going use purpose missing in question.
if you're using java, try lib: http://jmmslib.sourceforge.net/
Comments
Post a Comment