cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sergey Beryozkin <sberyoz...@gmail.com>
Subject Re: How to Add a Multipart-Related Child Attachment?
Date Mon, 16 Sep 2013 20:07:44 GMT
I'll need something like this implemented for multipart/form-data 
payloads too, I'll have a look when I get a chance.
I guess we'd need to have CXF Attachment object to have a list of 
Attachment properties so Attachment serialization will become recursive, 
that would be a start.
If you can get to doing a patch then it would be welcome

Cheers, Sergey


On 16/09/13 16:53, Jeff Thorn wrote:
> Hello Group,
>
> I am trying to figure out how to add a child "multipart/related" attachment
> as a sub attachment to the root attachment of a Message. Essentially what I
> need to do is add an Attachment to a parent Attachment. The Web Service I
> need to integrate with requires a SOAP Message with the following format:
>
> POST
> Content-Type: multipart/related; start="root"; boundary="-----part1"
>
> ------part1
> Content-Type: text/xml
> Content-Id: root
> <soap:Envelope>.......< /soap:Envelope>
>
> ------part1
> Content-Type: multipart/related; start="text-content";
> boundary="------part2"
> Content-Id: subattachment
>
> ------part2
> Content-Type: text/plain
> Content-Id: text-content
>
> This is the text part of the message.
>
> ------part2
> Content-Type: image/png
> Content-Id: image-content
> Content-Transfer-Encoding: base64
>
> [base 64 binary data....]
>
> ------part2
> ------part1
>
> I can figure out how to add attachments to the CXF Message using the
> setAttachments() method. However, I cannot see how to add an Attachment to
> an Attachment, as described in the sample above. Is this possible?
>
> Thanks,
> Jeff
>

Mime
View raw message