Because XStream is marshaling it as XML. Why are you using XStream for that. I love XStream and it can do JSON but there are probably easier/better ways to do it.
On Tue, Jun 7, 2016 at 6:08 AM, miri eyni <miri.e...@sapiens.com> wrote: > when i routing from soap to rest and than i marshal the response , i didn't > get the response as a json format. > > <route> > <from > uri="jetty:http://{{fromUrl}}/bankValidation?matchOnUriPrefix=true"/> > <process ref="bankValidationRequestProcessor"/> > <to ref="bankValidationEndpoint"/> > <process ref="bankValidationResponseProcessor"/> > <to uri="dataformat:xstream:marshal" /> > </route> > > > the response contain the string tag,why? > > > <string>{"bankValidationResponse":[{"correct":true,"correctedAccountNumber":"12345678"}]}</string> > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/rest-to-soap-tp5783547.html > Sent from the Camel - Users mailing list archive at Nabble.com. >