while \'playing around\' with Camel using Spring DSL, I came across the following problem. Suppose the expected message flow looks like this:
you can set store data in the Exchange properties or message headers like this...
.setHeader("ID", XPathBuilder.xpath("/order/@id", String.class))
.setProperty("ID", XPathBuilder.xpath("/order/@id", String.class))
and then retrieve them in a bean/processor from the Exchange like this...
String propId = (String) exchange.getProperty("ID");
String headerId = (String) exchange.getIn().getHeader("ID"); }