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.