You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by miri eyni <mi...@sapiens.com> on 2016/06/07 11:08:02 UTC
rest to soap
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.
Re: rest to soap
Posted by Brad Johnson <br...@mediadriver.com>.
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 <mi...@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.
>
Re: rest to soap
Posted by miri eyni <mi...@sapiens.com>.
i found the solution:
i need to change the contectType to json and removing the marshal
--
View this message in context: http://camel.465427.n5.nabble.com/rest-to-soap-tp5783547p5783570.html
Sent from the Camel - Users mailing list archive at Nabble.com.