In RESTful web services written using Jersey, I know I can access path parameters and query string parameters using @PathParam
and @QueryParam
annotaions. But in a web service written by someone else I saw a method like below.
@POST
@Path("/sms/receive")
@Consumes("application/json")
@Produces("application/json")
public Response smsReceive(String jsonBody) {
//Code here...
}
There is no @PathParam
or @QueryParam
annotation before the argument jsonBody.
- Can anybody explaing what this argument means and how to set value for it when calling this service.
- Can I use multiple parameters without annotations?
Thanks.