[
https://issues.apache.org/jira/browse/CAMEL-9246?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Freeman Fang resolved CAMEL-9246.
---------------------------------
Resolution: Fixed
Fix Version/s: 2.17.0
2.15.5
2.16.2
commit fix
http://git-wip-us.apache.org/repos/asf/camel/commit/b471d78f for camel-2.15.x
http://git-wip-us.apache.org/repos/asf/camel/commit/378344ba for camel-2.16.x
http://git-wip-us.apache.org/repos/asf/camel/commit/ba848035 for master
> camel-cxf proxy with MTOM does not get attachment back when RPC/literal style
> WSDL used
> ---------------------------------------------------------------------------------------
>
> Key: CAMEL-9246
> URL: https://issues.apache.org/jira/browse/CAMEL-9246
> Project: Camel
> Issue Type: Bug
> Components: camel-cxf
> Affects Versions: 2.15.1
> Environment: CXF 3.0.4
> Reporter: Joe Luo
> Assignee: Freeman Fang
> Priority: Minor
> Fix For: 2.16.2, 2.15.5, 2.17.0
>
> Attachments: camel-cxf-ws-mtom.zip
>
>
> I have a camel-cxf proxy test case with MTOM enabled. The WSDL used in the
> project is RPC/Literal style. However, I was unable to get attachment back
> via response. Please take a look at the test case for more detail.
> After some debugging, it looks like that camel-cxf producer did get
> attachment back. However, there were two attachment related parts. One part
> had no attachment (empty) but had correct "Content-ID". The other part did
> contain entire attachment but had a rather different "Content-ID". For
> instance:
> {code}
> 19:30:47,110 | INFO | qtp565617691-367 | IMtomExample |
> 118 - org.apache.cxf.cxf-core - 3.0.4.redhat-620133 | Outbound Message
> ---------------------------
> ID: 63
> Response-Code: 200
> Encoding: UTF-8
> Content-Type: multipart/related; type="application/xop+xml";
> boundary="uuid:f108bc3f-549a-4baa-ab00-757ff837aacf";
> start="<[email protected]>"; start-info="text/xml"
> Headers: {accept-encoding=[gzip,deflate],
> breadcrumbId=[ID-jluomac-52985-1445511717614-11-8], Host=[localhost:7777],
> Server=[Jetty(8.1.15.v20140411)], User-Agent=[Apache-HttpClient/4.1.1 (java
> 1.5)]}
> Payload: --uuid:f108bc3f-549a-4baa-ab00-757ff837aacf
> Content-Type: application/xop+xml; charset=UTF-8; type="text/xml"
> Content-Transfer-Encoding: binary
> Content-ID: <[email protected]>
> <soap:Envelope
> xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><ns1:doMtomResponse
> xmlns:ns1="http://cxf.example.com/"><parameters
> xmlns:ns2="http://cxf.example.com/"><output>soapui-splash.png</output><dataLength>27186</dataLength><data><xop:Include
> xmlns:xop="http://www.w3.org/2004/08/xop/include"
> href="cid:[email protected]"/></data></parameters></ns1:doMtomResponse></soap:Body></soap:Envelope>
> --uuid:f108bc3f-549a-4baa-ab00-757ff837aacf
> Content-Type: image/png
> Content-Transfer-Encoding: binary
> Content-ID: <[email protected]>
> Content-Disposition: attachment;name="soapui-splash.png"
> <-- soapui-splash.png binary attachment starts here -->
> ...
> ...
> <-- soapui-splash.png binary attachment ends here -->
> --uuid:f108bc3f-549a-4baa-ab00-757ff837aacf
> Content-Type: image/png
> Content-Transfer-Encoding: binary
> Content-ID: <[email protected]>
> Content-Disposition: attachment;name="soapui-splash.png"
> <-- no binary attachment here. empty -->
> --uuid:f108bc3f-549a-4baa-ab00-757ff837aacf--
> --------------------------------------
> {code}
> And the response message returned was:
> {code}
> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
> <soap:Body>
> <ns1:doMtomResponse xmlns:ns1="http://cxf.example.com/">
> <parameters xmlns:ns2="http://cxf.example.com/">
> <output>soapui-splash.png</output>
> <dataLength>27186</dataLength>
> <data>
> <xop:Include
> href="cid:[email protected]"
> xmlns:xop="http://www.w3.org/2004/08/xop/include"/>
> </data>
> </parameters>
> </ns1:doMtomResponse>
> </soap:Body>
> </soap:Envelope>
> {code}
> Because the response pointed to the "Content-ID" of
> {code}
> <xop:Include
> href="cid:[email protected]"
> xmlns:xop="http://www.w3.org/2004/08/xop/include"/>
> {code}
> and the parts identified by the "Content-ID:
> <[email protected]>" was actually empty.
> Therefore, client can not get the attachment back.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)