You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by ykoer <yu...@gmail.com> on 2013/12/02 21:37:41 UTC
unmarshal CDATA sections
Hi,
is there a way to umarshal XML with CDATA sections and back using jaxb in
camel routes?
This is my XML:
<Error><Payload></Payload></Error>
I created a test route to unmarshal and marshal in series:
DataFormat jaxbError = new JaxbDataFormat("error.model");
from("direct:error")
.unmarshal(jaxbError)
.log("${body}")
.marshal(jaxbError)
.to("mock:error");
Btw I'm creating my model objects with xjc from a schema file.
Thanks in advance
Yusuf
--
View this message in context: http://camel.465427.n5.nabble.com/unmarshal-CDATA-sections-tp5744209.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: unmarshal CDATA sections
Posted by Henrique Viecili <vi...@gmail.com>.
Unfortunately no, not with the standard jaxb implementation. You'll have to
use custom plugin and adapters if you want to use CDATA sections in your
xml marshaling/unmarshaling
Henrique Viecili
On Tue, Dec 3, 2013 at 7:37 AM, ykoer <yu...@gmail.com> wrote:
> Hi,
>
> is there a way to umarshal XML with CDATA sections and back using jaxb in
> camel routes?
>
> This is my XML:
> <Error><Payload></Payload></Error>
>
> I created a test route to unmarshal and marshal in series:
>
> DataFormat jaxbError = new JaxbDataFormat("error.model");
>
> from("direct:error")
> .unmarshal(jaxbError)
> .log("${body}")
> .marshal(jaxbError)
> .to("mock:error");
>
> Btw I'm creating my model objects with xjc from a schema file.
>
> Thanks in advance
> Yusuf
>
>
>
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/unmarshal-CDATA-sections-tp5744209.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>