Hello Richard,

I've created a Jira https://issues.apache.org/jira/browse/CAMEL-7231 for
your request. I'll try to look into it later this week.

Kind regards,

Richard Kettelerij
http://richardlog.com


On Wed, Feb 19, 2014 at 4:37 PM, richardgroote <richard.gro...@gmail.com>wrote:

> Hello,
>
> The org.apache.camel.component.spring.ws.SpringWebserviceConsumer extract
> headers and properties of the message context. But cannot find anything
> about the attachments. Currently we're using the below processor
> implementation to add the received attachments to the exchange.
>
> Some ideas:
> - Is it possible to integrate below within the SpringWebserviceConsumer
> - Is it a idea to put the below example on the wiki page.
>
>
> public class SoapAttachmentProcessor implements Processor {
>
>         @Override
>         public void process(Exchange exchange) throws Exception {
>                 WebServiceMessage webServiceMessage =
> MessageContextHolder.getMessageContext().getRequest();
>
>                 if (webServiceMessage instanceof MimeMessage) {
>                         Iterator<Attachment> attachmentsIterator =
> ((MimeMessage)
> webServiceMessage).getAttachments();
>                         while (attachmentsIterator.hasNext()) {
>                                 Attachment attachment =
> attachmentsIterator.next();
>
>
> exchange.getIn().addAttachment(attachment.getContentId(),
> attachment.getDataHandler());
>                         }
>                 }
>         }
> }
>
>
>
>
> Kind regards,
>
> Richard
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Spring-WS-Consumer-and-Attachments-tp5747567.html
> Sent from the Camel Development mailing list archive at Nabble.com.
>

Reply via email to