Re: Exchange setBody not working with Camel 2.15.2

2015-05-26 Thread geppo
P.S. I've tried different versions of Camel. The bug seems to have been introduced between version 2.14.2 and version 2.15.0 -- View this message in context: http://camel.465427.n5.nabble.com/Exchange-setBody-not-working-with-Camel-2-15-2-tp5767420p5767474.html Sent from the Camel - Users

Re: Exchange setBody not working with Camel 2.15.2

2015-05-26 Thread Claus Ibsen
Hi Use the message translator eip to set a null message. If you work on the exchange directly you likely need more work as its done here https://github.com/apache/camel/blob/master/camel-core/src/main/java/org/apache/camel/processor/SetBodyProcessor.java#L56 On Tue, May 26, 2015 at 1:27 PM,

Re: Exchange setBody not working with Camel 2.15.2

2015-05-26 Thread geppo
Thanks hekonsek for the reply. I'll do it as soon as I can (I need to cleanup the code from all references to my company). I think the problem is on how the new Camel handles the command: exchange.getIn().setBody(null) where: - exchange is DefaultExchange - exchange.getIn() is

Exchange setBody not working with Camel 2.15.2

2015-05-22 Thread geppo
Hi, I'm upgrading some programs from Camel 2.9.3 to 2.15.2 and I'm having all sort of issues. One of them is that I'm filtering out messages with Null body, but the new version of Camel doesn't think that the body is Null. The route is really simple e.g. from(DirectRoutes.MyRoute)

Re: Exchange setBody not working with Camel 2.15.2

2015-05-22 Thread geppo
Also the official API doc says using getIn() is fine: http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/Exchange.html If your Processor is not producing a different Message but only needs to slightly modify the in, you can simply update the in Message returned by getIn().

Re: Exchange setBody not working with Camel 2.15.2

2015-05-22 Thread geppo
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

Re: Exchange setBody not working with Camel 2.15.2

2015-05-22 Thread Henryk Konsek
Hi, Maybe a little Maven example demonstrating the issue? That would encourage us to debug your problem :) . Cheers! pt., 22.05.2015 o 13:33 użytkownik geppo geppore...@gmail.com napisał: Also the official API doc says using getIn() is fine: