Read the java doc of the Exchange You should use hasOut() to test if an OUT message has been set or not.
And make sure you only use IN when aggregating, its the easiest. Just forget all about OUT, its only for advanced use cases and for certain components. On Wed, Sep 15, 2010 at 1:16 PM, alexcpn <[email protected]> wrote: > > I am using getIn() method in the aggregation strategy; It is returning null ; > > So I just printed getOut() just to see whether it is null. This is also null > (as expected). > > System.out.println("Going in aggregate 123i4"); > Message newIn = newExchange.getIn(); > > String oldBody = oldExchange.getIn().getBody(String.class); > String newBody = newIn.getBody(String.class); > > System.out.println("---------------------------"); > System.out.println("New Body "+newBody); > System.out.println("Old Body "+oldBody); > System.out.println("---------------------------"); > ----------------------------- > Output > > > --------------------------- > New Body null > Old Body null > --------------------------- > -- > View this message in context: > http://servicemix.396122.n5.nabble.com/servicemix-3-3-1-and-camel-core-2-3-0-tp1624310p2840452.html > Sent from the ServiceMix - User mailing list archive at Nabble.com. > -- Claus Ibsen Apache Camel Committer Author of Camel in Action: http://www.manning.com/ibsen/ Open Source Integration: http://fusesource.com Blog: http://davsclaus.blogspot.com/ Twitter: http://twitter.com/davsclaus
