Hello.

I'm doing first tests of SOAP services with MTOM attachments, using CXF, in
PAYLOAD mode. I thing I've good XSD and WSDL, and have some doubts about
attachments using Camel ?

I've found no clear example of Camel uses, and none using Blueprint DSL.

Here is a copy of the CXF log of the SOAP request with a simple XML request
and a single attached text file.



The Camel body is actually what I expect, retrieving the SOAP payload :



But the Camel attachments (in.getAttachments()) seem a bit strange, with a
name (key) "*Attachment-Request-1.txt*" and its value
"*javax.activation.DataHandler@7902d19e*".

The name of the attachment seems to be the filename of the attached file,
but gives no apparent way to be retrieved from the given XML body element
value : "*<inc:Include xmlns:inc="http://www.w3.org/2004/08/xop/include";
href="cid:498747099018"/>*".

*Question #1*
How can I get the attachment name from the XML element ? In this simple
case, only one attachment is posted. In real cases, several documents may be
associated to the operation. The CID of the attachment should be a more
useless key to get it, no ? Is it a normal CXF/Camel behavior ?

*Question #2*
I've noted that the incoming attachement, if nothing is done is
automatically reused in the response which, in my case, also allows to
return a document. Is it a board effect of the in and out bodies chaining ?
A simple statement like "*exchange.getOut().getAttachments().clear()*" may
solve the problem...

Some examples, in Blueprint DSL if possible, may help a bit.

Any idea or advice ?...

Thanks in advance.

Regards.



--
View this message in context: 
http://servicemix.396122.n5.nabble.com/CXF-MTOM-attachments-Camel-access-tp5723342.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Reply via email to