camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sayed_india <>
Subject calling a REST Service POST method with parameters from another REST Service
Date Thu, 23 Oct 2014 11:35:51 GMT
I need to call a REST service POST method with parameters from Another REST
service GET method using the partial response data as the input for the POST
method as described below, please share the working code sample:
For Example
http://localhost:8080/employee-- this REST service has a get method that
returns JSON object(ID:124,Name:Test,Design:SE)

And  I have another REST service with POST method that takes some


public String createDept(@FormParam("empID") String
empID,@FormParam("deptID") String deptID,@FormParam("deptName") String

<from uri="cxfrs:http://localhost:8080/employee">
<to uri="sql:select * from Employee"> //returns the above JSON
//how to get the data from response and store to some header that can be
used as parameter to next service???

//Need to call another service with POST method(http://localhost:8090/dept)
that takes ID from the earlier response 
<setHeader headerName="CamelCxfRsUsingHttpAPI">
//How to set the parameter ???
<to uri="cxfrs:http://locahost:8090/dept"/>

Please help me in completing the service call integration.


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

View raw message