Hi all, I'm attempting to use a sub-route via the sendTo expression to act as a filter (this involves a callout to a web-service), however I run into a problem in that the sendTo callout overwrites the original exchange body. For example, ... .choice() .when(sendTo("direct:someFilterService").isEqualTo("false")) .log("the body is now false, rather than the original body") .otherwise() .log("the body is now true, rather than the original body'") .end()
I've worked around this by using .setProperty("OriginalBody",body()) and replacing it after the filtering however this isn't terribly elegant. I also realize that it's possible to use a Processor and some kind of producer template but I'd like to avoid adding Java code. So, is it possible for the sendTo expression to return a new exchange purely for evaluation? Thanks, David -- View this message in context: http://camel.465427.n5.nabble.com/Choice-sendTo-and-overwriting-exchange-body-tp5734867.html Sent from the Camel - Users mailing list archive at Nabble.com.