I am making a soap request which is returning the following:
HTTP/1.1 200 OK
Content-Length: 7048
Content-Type: multipart/related; type="application/xop+xml";start="<http://tempuri.org/0>";boundary="uuid:dc2ee0dc-fd91-40ef-949d-2c1b02108e23+id=4";start-info="text/xml"
Server: Microsoft-HTTPAPI/2.0
MIME-Version: 1.0
Date: Tue, 25 Oct 2011 12:56:17 GMT
--uuid:dc2ee0dc-fd91-40ef-949d-2c1b02108e23+id=4
Content-ID: <http://tempuri.org/0>
Content-Transfer-Encoding: 8bit
Content-Type: application/xop+xml;charset=utf-8;type="text/xml"
<s:Envelope details />
Everything is good except that the section
--uuid:dc2ee0dc-fd91-40ef-949d-2c1b02108e23+id=4
Content-ID: <http://tempuri.org/0>
Content-Transfer-Encoding: 8bit
Content-Type: application/xop+xml;charset=utf-8;type="text/xml"
Is being considered part of the body which it throwing off xml parsing. I'm wondering what this uuid information id and why is it coming down as part of the body rather than the header? (Along with the content-id, content-transfer-encoding and content-type?)
Figured it out based on Ladislav Mrnka
s MTOM comment. In my app.config I changed:
<binding name="BindingName" messageEncoding="Mtom" maxReceivedMessageSize="1006710886">
To
<binding name="BindingName" messageEncoding="Text" maxReceivedMessageSize="1006710886">
This is important for anyone running ksoap2 as it will not process the mtom message and will throw an xml parsing exception.