I've found a way to fix the issue by using getOut() instead of getIn() i.e.

exchange.getOut().setBody(null);

but I'm not happy:
1) the headers of the message are not exactly the same, so now I will have
to add code to copy the headers
2) I should not need to change the code. Using getIn() should be perfectly
fine as described in the Camel documentation in the section "Consider using
getIn":
http://camel.apache.org/using-getin-or-getout-methods-on-exchange.html

What am I doing wrong?



--
View this message in context: 
http://camel.465427.n5.nabble.com/Exchange-setBody-not-working-with-Camel-2-15-2-tp5767420p5767421.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to