axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jason R. Weiss" <>
Subject JSR181 and null MessageContext.getCurrentMessageContext()
Date Thu, 22 May 2008 21:05:16 GMT
Hi all,

There are a number of posts out on the net about ThreadLocal and  
MessageContext.getCurrentMessageContext().  In particular,  the  
following posts is very clear that the AXIS .jar must be from the  
same class loader or you get a null back from the call:

I am trying to use JSR 181 web services, but I need to get a handle  
to the HttpServletRequest (so that I can get a handle to the result  
of request.getRemoteUser()).  Every time I invoke  
getCurrentMessageContext(), I get a null.  The best that I can figure  
is that since the JSR181 .jar file is in its own unique location, it  
is a different classloader, and thus I'm screwed with the null (per  
Paul's blog from November here: 

#1)  Can anyone confirm that this is indeed the case?

#2)  I assume that MessageContext.getCurrentMessageContext() to get  
the HttpServletRequest is the preferred approach to find getRemoteUser 
(), or am I mistaken here?

In the end, I just need access to getRemoteUser() from my JSR181 web  
service implementation class- any and all ideas welcome.

Thanks all!

Jason Weiss
jasonweiss *AT*  yahoo *DOT* com

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message