Hi Max,

As you use an InOut exchange pattern with the REST component, you must
setup the attribute "beforeConsumer"  --> <onCompletion
mode="BeforeConsumer"> to allow the consumer to write back your body to the
callee

Regards,

On Tue, Sep 30, 2014 at 1:24 PM, Max Bridgewater <max.bridgewa...@gmail.com>
wrote:

> Hi,
>
> I have the following route with Camel 2.14. From what I understand the
> result of the call should be "Replace body". I was expecting that the
> onCompletion would be called at the end of the route to override the
> exchange body, which isn't happening.
>
> Am I missing something?
>
>
>     <camelContext  xmlns="http://camel.apache.org/schema/spring";>
>         <onCompletion>
>             <transform><constant>Replace body</constant></transform>
>         </onCompletion>
>         <restConfiguration component="servlet"/>
>         <route id="post">
>             <from uri="rest://post:/demo"/>
>             <transform>
>                    <simple>${body}</simple>
>                </transform>
>         </route>
>      </camelContext>
>
> Thanks,
> Max.
>



-- 
Charles Moulliard
Apache Committer / Architect @RedHat
Twitter : @cmoulliard | Blog :  http://cmoulliard.github.io

Reply via email to