camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sayed_india <>
Subject Unable to send the POST parameters value for REST Service
Date Sun, 19 Oct 2014 16:42:38 GMT
Following the sample code below works perfectly fine for REST GET method,
But the POST method always inserts the null record,

Can any one please suggest me in case of any change required.

Route Builder:

public void configure() throws Exception {
                     .to("sql:SELECT * from company where id = :#id")
                     .to("sql:INSERT INTO company(name, symbol) VALUES
(:#name, :#symbol)")
                     .to("sql:select * from company")
                     .to("sql:UPDATE company SET name = :#name, symbol =
:#symbol where id = :#id")
                    .to("sql:DELETE FROM company where id = :#id")
              .marshal().json(JsonLibrary.Jackson);//uncomment for JSON

public interface CompanyService {
   public String getCompany(@PathParam("id") String id);

   public String getCompanies();

   public String updateCompany(@PathParam("id") String id);
   public String deleteCompany(@PathParam("id") String id);
   //public String createCompany(String data);
public String createCompany(@PathParam("name") String
name,@PathParam("symbol") String symbol);

Note:ID is auto generated.

Request an early response.


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

View raw message