You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Glen Daniels <gl...@thoughtcraft.com> on 2004/04/01 17:24:28 UTC
Re: AW: AW: AW: MessageContext.getCurrentContext() returnsnull
Hi Tony:
> So, I am back to my original question. Why does
> AxisEngine.getCurrentMessageContext() return null?
It returns null if there isn't a current MessageContext.
When are you calling it? If you're calling it outside the context of an
active invocation, you won't get anything because there is no "current"
MessageContext. If you're on the client side and you've already returned
from the call.invoke() or the stub method call, you won't get anything. The
correct thing to do in those cases is to use call.getMessageContext() or
locator.getCall().getMessageContext(), both of which return the last MC
which was used, even though the interaction is technically over.
--Glen