I am trying to build some rest and soap services using camel cxf-rs module. Soap part is fine, in rest part i have one GET and one POST methods with following signature. GET method working fine but POST method(which expects a customer json object ) get HTTP status of 415 with error "No message body reader has been found for class".Can anybody tell what is missing here ?
Rest interface: @WebService @Path("/bookstore") @Consumes("application/json") @Produces("application/json") public interface BookStore { @WebMethod @GET @Path("/{id}") @Consumes("*/*") Book getBook(@PathParam("id") @WebParam(name = "id") Long id) throws Exception; @WebMethod @POST @Path("/books") Book addBook(@WebParam(name = "book") Book book); } PS: Here is the sample curl command: curl -H "Content-Type: application/json" -X POST -d '{"name":"xyz","isbn":"xyz"}' http://localhost:8080/api/servlet/rest/bookstore/books -- View this message in context: http://camel.465427.n5.nabble.com/http-415-error-in-cxf-rest-service-tp5786955.html Sent from the Camel - Users mailing list archive at Nabble.com.