axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tom909 <>
Subject Re: Tomcat webservice webapp/MessageContext always null
Date Wed, 06 Feb 2008 16:44:05 GMT

I found what the problem was, and perhaps it will save someone the hours it
took me to find the answer.  To make my service implementation class aware
of the MessageContext using getCurrentMessageContext(), I needed to add a
scope parameter to the deploy.wsdd file (scope="application").  Once I added
that, my call to get the MessageContext was successful.  

 <service name="serviceName" provider="java:RPC" style="wrapped"
scope="application" use="literal" >

tom909 wrote:
> Looking for any insight or assistance as to why a web service would return
> a null MessageContext called from within the service method itself.  This
> web service has worked perfectly for some time now deployed to a tomcat
> 5.5 server, within a .war file with all the axis jars embedded. 
> The problem is, I now need to add a new feature where I need to access the
> incoming request URL, and from what I've found the only way to do this is
> with the MessageContext using MessageContext.getCurrentMessageContext() or
> (MessageContext)MessageContext.currentMessageContext.get().  Both of these
> calls return null.  
> I can see the axis log messages flying by in catalina.out when I do
> requests, and like I said the service has been working fine, why wouldn't
> I be able to access the MessageContext in the service method?  I was
> thinking of trying to repackage my .war as an .aar and deploy the service
> again through axis administration but I haven't had any luck (I get class
> not found errors).  Any ideas or help is appreciated.
> Tom

View this message in context:
Sent from the Axis - Dev mailing list archive at

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

View raw message