Hi,
I want to know is it possible to get both @Body and @PathParam values using fuse camel route cxf.
Sample Code:
@Path("/callapi") public class CallAPI { @POST @Path("/sendmessage/{url}") @Produces(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON) public void sendMessage(@Body String request, @PathParam("url") String url) { System.out.println("-------------------"); System.out.println("Request: " + request); System.out.println("URL: " + url); } }
The problem I am having is I am only able to get first parameter. In above case I am able to get only @Body and @PathParam is null.
If I do as below:
public void sendMessage(@PathParam("url") String url, @Body String request)
Then I am able to only get @PathParam value but @Body is null here.
Any help, how can I get both values ?
Just to be sure you are developing a pure CXF JAX-RS application (no Camel) and those annotations are from JAX-RS ?
And what version of JBoss Fuse do you use?