A search "java web service session object" has reached our site.
Unfortunately, we cannot help to the original searcher but a next one might find this info usefull.
To get http session in the web service you should add a field to your class that will be populated with request context.
@WebService public class MyService { @WebMethod public int method(String value) { MessageContext messageContext = context.getMessageContext(); HttpServletRequest request = (HttpServletRequest)messageContext.get(MessageContext.SERVLET_REQUEST); HttpSession session = request.getSession(); // go ahead. } // A web service context. @Resource private WebServiceContext context; }
Remember Me
a@href@title, b, blockquote@cite, em, i, strike, strong, sub, super, u