I have a webservice set up using CXF, JAX-RS and Spring. I have the following method:
@GET
@Path("/getPayload")
@Produces("application/XML")
public Response makePayload(){
Payload payload = new Payload();
payload.setUsersOnline(new Long(200));
return Response.ok().entity(payload).build();
}
How can I get access to the HttpRequest
object in my makePayload()
?
Will a call to this method generate a Session, and if so, can I get a handle to it and will that session be persistent for all subsequent requests from the same client?