You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by j_h_scheufen <ja...@sungard.com> on 2013/04/20 17:00:20 UTC

Re: JAXB marshal generates byte[] array instead of String

I just discovered the same thing. Using <marshal> with a jaxb data format
produces a byte[] which was not really expected, because the typical use
case <unmarshal> is to have a java.lang.String as input.

I understand that downstream endpoints which expect a java.lang.String can
benefit from Camel's automatic conversion, but if the invoker of the route
expected to get the XML back as a String, you always have to remember to add
<convertBodyTo ...>. You'd wish the jaxb data format had a property to
control the output ...



--
View this message in context: http://camel.465427.n5.nabble.com/JAXB-marshal-generates-byte-array-instead-of-String-tp5715174p5731170.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: JAXB marshal generates byte[] array instead of String

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

I logged a ticket
https://issues.apache.org/jira/browse/CAMEL-6316

On Mon, Apr 22, 2013 at 8:55 AM, Claus Ibsen <cl...@gmail.com> wrote:
> Hi
>
> Fell free to log a ticket for such an improvement. And as usual
> patches is welcome.
>
>
> On Sat, Apr 20, 2013 at 5:00 PM, j_h_scheufen
> <ja...@sungard.com> wrote:
>> I just discovered the same thing. Using <marshal> with a jaxb data format
>> produces a byte[] which was not really expected, because the typical use
>> case <unmarshal> is to have a java.lang.String as input.
>>
>> I understand that downstream endpoints which expect a java.lang.String can
>> benefit from Camel's automatic conversion, but if the invoker of the route
>> expected to get the XML back as a String, you always have to remember to add
>> <convertBodyTo ...>. You'd wish the jaxb data format had a property to
>> control the output ...
>>
>>
>>
>> --
>> View this message in context: http://camel.465427.n5.nabble.com/JAXB-marshal-generates-byte-array-instead-of-String-tp5715174p5731170.html
>> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>
>
> --
> Claus Ibsen
> -----------------
> Red Hat, Inc.
> FuseSource is now part of Red Hat
> Email: cibsen@redhat.com
> Web: http://fusesource.com
> Twitter: davsclaus
> Blog: http://davsclaus.com
> Author of Camel in Action: http://www.manning.com/ibsen



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cibsen@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Re: JAXB marshal generates byte[] array instead of String

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

Fell free to log a ticket for such an improvement. And as usual
patches is welcome.


On Sat, Apr 20, 2013 at 5:00 PM, j_h_scheufen
<ja...@sungard.com> wrote:
> I just discovered the same thing. Using <marshal> with a jaxb data format
> produces a byte[] which was not really expected, because the typical use
> case <unmarshal> is to have a java.lang.String as input.
>
> I understand that downstream endpoints which expect a java.lang.String can
> benefit from Camel's automatic conversion, but if the invoker of the route
> expected to get the XML back as a String, you always have to remember to add
> <convertBodyTo ...>. You'd wish the jaxb data format had a property to
> control the output ...
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/JAXB-marshal-generates-byte-array-instead-of-String-tp5715174p5731170.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cibsen@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen