Hi Can you post the stacktrace. And what version of Camel are you using? And what JDK.
On Thu, Jul 5, 2012 at 11:33 AM, dealbitte <rakesh.boc...@hotmail.co.uk> wrote: > Hi, > > I have the following camel route (defined in blueprint) > > > > > > > > > > > > > > In the method "createXML(Exchange exchange)", I create a Document > (org.w3c.dom.Document) and set it as a exchange Body as follows: > > exchange.getIn().setBody(doc); > > Accessing the Document element in the subsequent method "printXML(Exchange > exchange)" via > > Document xmlDoc = (Document) exchange.getIn().getBody(); > > does not work as I get the exception "java.lang.AbstractMethodError" as soon > as I drop a file in the dropBox. But if I change the method signature to > > "printXML(@Body Document xmlDoc)" > > I can retrieve the Document element without any issues. My question would > be, > 1. what is the difference, retrieving the Body via annotation (@Body) and > via "exchange.getIn().getBody()" > 2. If I use @Body annotation, how can access the 'exchange' inside > 'printXML' as I need to set the body of the outgoing message. > > Please share your comments. > > regards, > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/Bean-binding-Body-and-Exchange-tp5715529.html > Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen ----------------- FuseSource Email: cib...@fusesource.com Web: http://fusesource.com Twitter: davsclaus, fusenews Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen