[ 
https://issues.apache.org/jira/browse/CAMEL-11898?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Claus Ibsen resolved CAMEL-11898.
---------------------------------
    Resolution: Fixed
      Assignee: Claus Ibsen

Thanks for the PR

> camel-spring-ws - Attachments are lost
> --------------------------------------
>
>                 Key: CAMEL-11898
>                 URL: https://issues.apache.org/jira/browse/CAMEL-11898
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-spring-ws
>    Affects Versions: 2.19.3
>            Reporter: Richard Groote
>            Assignee: Claus Ibsen
>             Fix For: 2.19.4, 2.20.1, 2.21.0
>
>
> The below scenario is failing in 2.19.3 and was working 2.14.0.
> May be we're doing something wrong but i cannot find out where the problem is 
> originated.
> Any help would be appreciated 
> *Some debug information*
> * I've debugged the code in 2.14.0 and 2.19.3 in the 'old' 
> ConvertBodyProcessor the out was put back on the DefaultMessage
> * In the SpringWebserviceConsumer (2.19.3) there is no out message after the 
> processor. The in message is present including the attachments.
> * In the BasicMessageFilter#filterConsumer(2.19.3) the out is read without 
> checking hasOut(). I think the solution is to look if there is out available, 
> when not available using the in message
> *Scenario*
> * Sending a request to a soap service in this case the spring-ws component
> * A bean is responsible for retrieving some information and attachments
> * The soap response no longer contains the attachment
>  
> *Below is part of spring configuration*
> <camel:from 
> uri="spring-ws:uri:/contextPath/soapServices?endpointMapping=#endpointMapping"/>
> <camel:to uri="bean:someBean?method=onMessage('myMethod')" />
> <camel:convertBodyTo type="java.lang.String"/>
> *Snippet of the bean*
> {code:java}
> exchange.getOut().copyFrom(exchange.getIn());
> exchange.getOut().setHeader(Exchange.CHARSET_NAME, 
> CamelConstants.DEFAULT_CHARACTER_SET);
> exchange.getOut().setBody(response.getResponse());
> exchange.getOut().addAttachment(id, attachment.getAttachment());
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to