camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Siano, Stephan" <>
Subject RE: Apache camel mime-multipart usage and examples?
Date Fri, 08 Apr 2016 12:31:09 GMT

Have you tried PAYLOAD mode?

I don't know which JBOSS FUSE version will contain Camel 2.17 (that one is pretty new). Anyway,
I noticed yesterday that there is a bug in the 2.17.0 MIME-Multipart decoder that will prevent
your multipart from being processed (because the attachment doesn't have a filename). I am
just in the process of fixing that bug...

Best regards

-----Original Message-----
From: [] 
Sent: Freitag, 8. April 2016 09:58
Subject: Re: Apache camel mime-multipart usage and examples?


I am using JBOSS FUSE version  8.1.0.GA which supports maximum camel core version : 2.15.0.

So i would not be able to use 2.17.0.

To your point on CXF-endpoint, yes i am using CXF endpoint to invoke a webservice which provides
SOAP response with attachments. However using Spring XML-DSL I can only invoke webservice
using dataFormat as Message. My configuration looks like below:

<cxf:cxfEndpoint id="uploadFileToUcmEndpoint"
<entry key="dataFormat" value="MESSAGE" />

(1) dataFormat=Message:-  doesnot provides raw response and DOESNOT understand/automatically
process the SOAPEnvelopeResponse + Attachments. hence i have to process it manually somehow.
1 option i found is using mime-multiparts dataformat. but couldnt try ttest because jboss
fuse isnt supporting camel 2.17.0

(2) dataFormat=CXF_MEssage:- This DOES automatic parsing of SOAPEnvelopeREsponse + Attachments.

However i couldnt even get the response from webservice using this dataFormat.  I ended up
with following error using CXF_MEssage:

CXF configuration:
<cxf:cxfEndpoint id="uploadFileToUcmEndpoint"
<entry key="dataFormat" value="CXF_MESSAGE" />

Error with CXF_MESSAGE:
In this above confguration if i change dataformat from Message to CXF_MESSAGE, i am getting
below error:
default-workqueue-1] PhaseInterceptorChain          WARN  Interceptor for {}ErpIntegrationServiceService#{}uploadFileToUcm
has thrown exception, unwinding now
org.apache.cxf.interceptor.Fault: Couldn't find MIME boundary: ------=_Part_3434_428158164.1459969427807
        at org.apache.cxf.interceptor.AttachmentInInterceptor.handleMessage(
        at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(
        at org.apache.cxf.endpoint.ClientImpl.onMessage(
        at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(
        at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream$
        at org.apache.cxf.workqueue.AutomaticWorkQueueImpl$
        at java.util.concurrent.ThreadPoolExecutor.runWorker(
        at java.util.concurrent.ThreadPoolExecutor$
        at org.apache.cxf.workqueue.AutomaticWorkQueueImpl$AWQThreadFactory$

Possible reason that i suspect is:

The webservice responds in MULTIPARTS(SOAPENvelope in 1 part + Attachments in 2nd part) for
which i may have to configure serviceInterfaceStrategy as specified in this link:

Again for this there is no online help/guide how to configure serviceInterfaceStrategy. hence
i cudnt succeed here as well.

I suspect, Had my webservice responded in plain xml with no Multipart content, CXF_MEssage
wud hv worked without the above error.

Problem here is with Multiparts. hence i chose to use raw option(i.e, dataformat=Message).

(3) What next?

-> Can you help with the proper complete example of

- Configuring serviceInterfaceStrategy?

- OR processing Manually the Multiparts response using some apache camel component?

- OR do u know if some version of jboss fuse supports camel core of 2.17.0 so that i can install
that and try use mime-multipart

- OR anything else that u think could help me with a simple requirement: Processing SOAP Multiparts
response using APache CXF or any other APAche camel components

Thanks in advance.


-----Original Message-----


Which camel version are you using? MIME-Multipart is only available starting
Camel 2.17.0.

I am not 100% sure, but your response looks somewhat like SOAP with attachments
or MTOM. If you are using some kind of Camel-CXF endpoint for receiving it, the
endpoint might parse it for you.

Best regards

-----Original Message-----

From: Wadhwani, Ekta V.
Sent: Thursday, April 7, 2016 12:18 PM
Subject: Apache camel mime-multipart usage and examples?

Hi Team,

Jboss Fuse Studio : Version: 8.1.0.GA
Jdk version: 1.8.0_73

Webservice SOAP response is received in multiparts as below:
response : ------=_Part_4706_434840889.1459343688908
Content-Type: application/xop+xml;charset=UTF-8;type="text/xml"
Content-Transfer-Encoding: 8bit
Content-ID: <e0946c95-9d0d-40ba-8416-0528bfcb4aa9>

<?xml version="1.0" encoding="UTF-8" ?>
<env:Envelope xmlns:env=""
xmlns:ns1="" xmlns:ns0=""
xsi:type="ns0:DocumentDetails"><ns0:Content><xop:Include xmlns:xop=""
Content-Transfer-Encoding: binary
Content-ID: <51e0b71c-160b-4921-a8a7-8fe7f87ccc3b>

PK157463.log?XKS?8??W??????jTL?  .. blah blah some binary content

Can i use apache camel mime-multipart to process this soap response

As mentioned in this document, i have included the dependency. however i am not able to declare
this dataFormat in <dataFormats> element.
Can you please help guide with some example using" XML DSL" ? There is no example available




This message is for the designated recipient only and may contain privileged, proprietary,
or otherwise confidential information. If you have received it in error, please notify the
sender immediately and delete the original. Any other use of the e-mail by you is prohibited.
Where allowed by local law, electronic communications with Accenture and its affiliates, including
e-mail and instant messaging (including content), may be scanned by our systems for the purposes
of information security and assessment of internal compliance with Accenture policy.

View raw message