Hi Sarfaraj,

I recommend that you use JAXB marshaller / unmarshaller (DataFormat) like
you have done before if you would like to have a better control over what
Jaxb generate. ConvertBodyTo likes its name suggest will convert to a
specific Object the Body retrieved from the Camel exchange but does not
offer additional property like you have with DataFormat.

On Fri, Sep 14, 2012 at 7:45 AM, sarfaraj <[email protected]> wrote:

> I have similar kind of problem.
>
> I also want to remove <?xml version="1.0" encoding="UTF-8"
> standalone="yes"?>  from my message body.
>
> Previously we used JAXB and JAXB has fragment to remove the above tag
>
> <marshal>
>   <jaxb prettyPrint="true" contextPath="XXX.model"      fragment="true" />
> </marshal>
>
> Now we are using <convertBodyTo type="XXX.model.MyClass" /> for String to
> Myclass and <convertBodyTo type="java.lang.String" /> for MyClass to String
> . But we get <?xml version="1.0" encoding="UTF-8" standalone="yes"?> in the
> message.
>
> could someone tell me how to remove that in convertBodyTo ?
>
> /Sarfaraj
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/convertBodyTo-org-w3c-dom-Document-class-fails-tp5029460p5719334.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
Charles Moulliard
Apache Committer / Sr. Pr. Consultant at FuseSource.com
Twitter : @cmoulliard
Blog : http://cmoulliard.blogspot.com

Reply via email to