@Override
protected RouteBuilder createRouteBuilder() throws Exception {
return new RouteBuilder() {
public void configure() throws Exception {
JaxbDataFormat dataFormat = new JaxbDataFormat("org.apache.camel.foo.bar");
dataFormat.setIgnoreJAXBElement(false);
JaxbDataFormat filterEnabledFormat = new JaxbDataFormat("org.apache.camel.foo.bar");
filterEnabledFormat.setFilterNonXmlChars(true);
JaxbDataFormat customWriterFormat = new JaxbDataFormat("org.apache.camel.foo.bar");
customWriterFormat.setXmlStreamWriterWrapper(new TestXmlStreamWriter());
JaxbDataFormat customWriterAndFilterFormat = new JaxbDataFormat("org.apache.camel.foo.bar");
customWriterAndFilterFormat.setFilterNonXmlChars(true);
customWriterAndFilterFormat.setXmlStreamWriterWrapper(new TestXmlStreamWriter());
from("direct:getJAXBElementValue")
.unmarshal(new JaxbDataFormat("org.apache.camel.foo.bar"))
.to("mock:result");
from("direct:getJAXBElement")
.unmarshal(dataFormat)
.to("mock:result");