I've used xstream w/o the need to define any mappings (like Jaxb requires,
etc).  Basically, just use xstream's fromXML()/toXML() methods to marshal
from String/Java bean in your processor methods as needed.  You can also
define your own custom type converter classes using the
convertBodyTo(MyConverter.class), etc...to encapsulate this better...

XStream xstream = new XStream(new DomDriver());
...
String bodyXML = (String) exchange.getIn().getBody(String.class);
MyClass myClass = (MyClass) xstream.fromXML(bodyXML);
...
exchange.getIn().setBody(xstream.toXML(myClass);



-----
Ben O'Day
IT Consultant -http://benoday.blogspot.com

--
View this message in context: 
http://camel.465427.n5.nabble.com/Using-camel-with-xstream-tp4245747p4246551.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to