Q: How do I get access to the { { { HttpServletRequest } } } that called my service?
A: Get this from the message context, as shown in { { { EchoHeaders.jws } } }:
private HttpServletRequest getRequest() {
MessageContext context = MessageContext.getCurrentContext();
HttpServletRequest req = (HttpServletRequest) context.getProperty(HTTPConstants.MC_HTTP_SERVLETREQUEST);
return req;
} Note that the request will be null if the message came in over a different transport.
Hard coding your entire webapp to only support SOAP over HTTP may be very short-sighted.