1

I am developing a stand alone web service, which doesn't need to be running inside a web container.

It looks very similar to this:

http://weblogs.java.net/blog/ramapulavarthi/archive/2006/06/maintaining_ses.html

I also found the following:

How can I access the ServletContext from within a JAX-WS web service?

I enabled the session management from the client with this:

((BindingProvider) webInterface).getRequestContext().put(BindingProvider.SESSION_MAINTAIN_PROPERTY, true);

on the server side, I was able to get the message context:

MessageContext mc = wsContext.getMessageContext();

But when I trying to get:

Object c = mc.get(MessageContext.SERVLET_REQUEST);

The object c is always null.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.