On Sun, Jan 8, 2012 at 1:44 PM, mgiammarco <mgiamma...@gmail.com> wrote: > Hello, > I am using a stomp client (that usese only Strings) to send a bean to Camel > using ActiveMQ. It marshal the message to a String using xstream. > > Camel receives it as String, it unmarshals (using xstream) it as the correct > Java Bean. Camel process (it is a request-reply queue) and at the end I > marshal it again. > > Unfortunately stomp client cannot process the message because xstream in > Camel produce a byte[] array and not a String as output. > > Why? how can I force it to use a String? >
You can always use the .convertBodyTo(String.class) to force a type conversion. > Thanks, > Mario > > -- > View this message in context: > http://camel.465427.n5.nabble.com/Xstream-marshals-to-byte-array-and-not-String-tp5129211p5129211.html > Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen ----------------- FuseSource Email: cib...@fusesource.com Web: http://fusesource.com Twitter: davsclaus, fusenews Blog: http://davsclaus.blogspot.com/ Author of Camel in Action: http://www.manning.com/ibsen/