[ 
https://issues.apache.org/jira/browse/CAMEL-11898?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16201699#comment-16201699
 ] 

ASF GitHub Bot commented on CAMEL-11898:
----------------------------------------

GitHub user richardgroote opened a pull request:

    https://github.com/apache/camel/pull/2030

    CAMEL-11898: Attachment are not in the response

    

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/richardgroote/camel patch-2

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/camel/pull/2030.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #2030
    
----
commit 808168a6f89d5f3fddca97e45b1671b98bbf5f80
Author: richardgroote <[email protected]>
Date:   2017-10-12T09:33:35Z

    CAMEL-11898: Attachment are not in the response

----


> 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
>             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