camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From VinothKR <>
Subject Re: Camel Http Component
Date Mon, 18 Apr 2016 21:12:43 GMT
I have solved the mentioned issue using http component and Rest @RequestBody,

<marshal ref="jsonObjectRef"/> 
<setHeader headerName="Content-Type">
<constant>application/json; charset=UTF-8</constant>
<convertBodyTo type="java.lang.String"/>
<to uri="http:localhost:8080/service"/>

*My service will be like,*
@RequestMapping(value="/service",consumes="application/json", method =
{RequestMethod.POST, RequestMethod.GET})
public @ResponseBody String basicRule(@RequestBody MYVO myVO)

I am able to pass the request data without encoding issue. 
I'm not sure if this is a better way to do it, if someone feels there is a
better approach please advise.


View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message