Hi,
I had previously used mtom with xfire binding because the support for
returning mtom enabled data was not present in version 3.0. I now use
servicemix 3.0.1 and tried using the jsr181 support for mtom. But the
response is quite different from what I get with xfire binding.

xfire binding request/response:

------=_Part_0_31386432.1171474031267
Content-Type: application/xop+xml; charset=UTF-8; type="text/xml"
Content-Transfer-Encoding: 8bit
Content-ID: <[EMAIL PROTECTED]>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:xsd="http://www.w3.org/2001/XMLSchema";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><soap:Body><GetDocumentContents
xmlns="http://services.genome.sterling.com/";><documentId>09012be880008732</documentId><user>hiyer</user></GetDocumentContents></soap:Body></soap:Envelope>
------=_Part_0_31386432.1171474031267--

0

==== Response ====
HTTP/1.1 100 Continue

HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
X-Powered-By: Servlet 2.4; JBoss-4.0.3SP1 (build: CVSTag=JBoss_4_0_3_SP1
date=200510231054)/Tomcat-5.5
Content-Type: multipart/related; type="application/xop+xml";
start="<[EMAIL PROTECTED]>"; start-info="text/xml";   
boundary="----=_Part_774_11876400.1171474031879"
Transfer-Encoding: chunked
Date: Wed, 14 Feb 2007 17:27:11 GMT

2e5

------=_Part_774_11876400.1171474031879
Content-Type: application/xop+xml; charset=UTF-8; type="text/xml"
Content-Transfer-Encoding: 8bit
Content-ID: <[EMAIL PROTECTED]>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:xsd="http://www.w3.org/2001/XMLSchema";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><soap:Body><GetDocumentContentsResponse
xmlns="http://services.genome.sterling.com/documentmanagementservice/1.0";><out
xmlns:ns1="http://www.w3.org/2004/11/xmlmime";
ns1:mimeType="image/tiff"><Include
xmlns="http://www.w3.org/2004/08/xop/include";
href="cid:117147403187931051050979740@http://www.w3.org/2001/XMLSchema";
/></out></GetDocumentContentsResponse></soap:Body></soap:Envelope>
2000

------=_Part_774_11876400.1171474031879
Content-Type: image/tiff
Content-Transfer-Encoding: binary
Content-ID: <[EMAIL PROTECTED]://www.w3.org/2001/XMLSchema>



>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
With jsr181 mtom enabled request/response:

Content-Type: application/xop+xml; charset=UTF-8; type="text/xml"
Content-Transfer-Encoding: 8bit
Content-ID: <[EMAIL PROTECTED]>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:xsd="http://www.w3.org/2001/XMLSchema";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><soap:Body><GetDocumentContents
xmlns="http://services.genome.sterling.com/";><documentId>09012be880008732</documentId><user>hiyer</user></GetDocumentContents></soap:Body></soap:Envelope>
------=_Part_0_31386432.1171473429810--

0

==== Response ====
HTTP/1.1 100 Continue

HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
X-Powered-By: Servlet 2.4; JBoss-4.0.4.GA (build: CVSTag=JBoss_4_0_4_GA
date=200605151000)/Tomcat-5.5
Content-Type: multipart/related; type="text/xml"; start="<soap-request>";   
boundary="----=_Part_0_8666844.1171473438981"
Transfer-Encoding: chunked
Date: Wed, 14 Feb 2007 17:17:19 GMT

277
------=_Part_0_8666844.1171473438981
Content-Type: text/xml; charset=us-ascii
Content-Transfer-Encoding: 7bit
Content-ID: <soap-request>

<?xml version='1.0' encoding='UTF-8'?><soap:Envelope
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";><soap:Body><GetDocumentContentsResponse
xmlns="http://services.genome.sterling.com/documentmanagementservice/1.0";><out
xmlns:ns1="http://www.w3.org/2004/11/xmlmime";
ns1:mimeType="image/tiff"><Include
xmlns="http://www.w3.org/2004/08/xop/include";
href="cid:11714734389502501741002@http://www.w3.org/2001/XMLSchema";
/></out></GetDocumentContentsResponse></soap:Body></soap:Envelope>
2000

------=_Part_0_8666844.1171473438981
Content-Type: image/tiff
Content-Transfer-Encoding: base64
Content-ID: <[EMAIL PROTECTED]://www.w3.org/2001/XMLSchema>

As you can see the jsr181 is doing a 7-bit byte64 encoding while xfire does
a 8-bit binary encoding. As a result my xfire client (which is mtom enabled)
is not correctly parsing the response. The file being transferred was 131KB
with xfire binding but I get 168 KB with jsr181 due to the encoding.
Please help. 

Cheers,
Hari.
-- 
View this message in context: 
http://www.nabble.com/MTOM-response-with-jsr181-tf3229784s12049.html#a8973911
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Reply via email to