我有一个使用 ADB 绑定创建的axis2 客户端。此axis2 客户端与WCF Web 服务通信,以MTOM 模式向其发送XML 附件。生成的 SOAP 请求是:
POST http://xyz/mtom HTTP/1.1
MIME-Version: 1.0
Content-Type: multipart/related;
type="application/xop+xml";
start="<http://tempuri.org/0>";
boundary="uuid:0daa5c61-46d2-4fe1-9944-097b897367b4+id=1";
start-info="application/soap+xml";
action="http://blahblah/SendData"
Host: myserver.org
Content-Length: 22648
Expect: 100-continue
Accept-Encoding: gzip, deflate
Connection: Keep-Alive
--uuid:0daa5c61-46d2-4fe1-9944-097b897367b4+id=1
Content-ID: <http://tempuri.org/0>
如何将 Content-Transfer-Encoding: binary( 下面) 设置为 Content-Transfer-Encoding: 8bit?
Content-Transfer-Encoding: binary
Content-Type: application/xop+xml;charset=utf-8;type="application/soap+xml"
<s:Envelope><s:Body><SendData>...</SendData></s:Body></s:Envelope>
--uuid:0daa5c61-46d2-4fe1-9944-097b897367b4+id=1
Content-ID: <http://tempuri.org/1/634789954872318389>
Content-Transfer-Encoding: binary
Content-Type: application/octet-stream
Serialized payload here
--uuid:0daa5c61-46d2-4fe1-9944-097b897367b4+id=1--
另外,我猜一个 mime_boundary 用于主肥皂信封,第二个 mime_boundary 用于附件