-
1. Re: Configuring the Jaxb marshaller?
davsclaus Jun 28, 2011 2:22 AM (in response to jamie3_james.archibald)Can you google about JAXB as I guess it have some options to control the output. Then we may have to add a way in the Camel JaxbDataFormat to configure those options as well.
-
2. Re: Configuring the Jaxb marshaller?
jamie3_james.archibald Jun 28, 2011 12:07 PM (in response to davsclaus)The properties are set on the Marshaller as follows:
Marshaller mar = ...
mar.setProperty(..,...)
I am pretty sure (correct me if I am wrong) that camel lazily creates the marshaller, or when the camel route is started, not allowing the developer to access the marshaller before the route is created.
Maybe to support setting JAXB properties (on lazy init) they could be passed via the camel route:
.from("direct:input")
.setHeader(Marshaller.JAXB_FRAGMENT, constant(Boolean.True)) // don't add xml declaration
.marshal(jaxb)
.to("direct:output)
-
3. Re: Configuring the Jaxb marshaller?
njiang Jun 28, 2011 11:07 PM (in response to jamie3_james.archibald)Camel create new marshaller in the marshal method to be thread safe.
I just create a JIRA[1] for this feature.