camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Richard Kettelerij <richardkettele...@gmail.com>
Subject Re: Spring WS Consumer and Attachments
Date Fri, 21 Feb 2014 06:40:22 GMT
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.groote@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.
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message