Hi Dims,

 

I am sorry, I was wrong. It is working now. I can get the object using:

 

HttpServletRequest httpServletRequest = (HttpServletRequest) msgContext.getProperty(HTTPConstants.MC_HTTP_SERVLETREQUEST);

 

I had Axis2 1.0 jar in the deployable directory which Eclipse had not to cleared.

 

Sorry for the trouble.

 

Sanjesh

 


From: Sanjesh Pathak [mailto:[EMAIL PROTECTED]
Sent: Monday, August 07, 2006 8:39 AM
To: [email protected]
Subject: [Axis2] HttpServeltRequest

 

Hi Dims,
 
I am still unable to get HttpServletRequest object. I am downloaded the nightly snapshot from here:
 

http://people.apache.org/dist/axis2/nightly/axis2-std-SNAPSHOT-bin.zip

 
I tried both ways and I am getting null value:
 
HttpServletRequest httpServletRequest = (HttpServletRequest) msgContext.getProperty(HTTPConstants.MC_HTTP_SERVLETREQUEST);
 
HttpServletRequest httpServletRequest = (HttpServletRequest) msgContext. getOperationContext().getProperty(HTTPConstants.MC_HTTP_SERVLETREQUEST);
 
Thanks,
Sanjesh
 
--------------
 
ok deprecated Constants.HTTP_SERVLET_REQUEST and made sure that
HTTPConstants.MC_HTTP_SERVLETREQUEST works.
 
-- dims
 
On 7/30/06, Sanjiva Weerawarana <[EMAIL PROTECTED]> wrote:
> On Mon, 2006-07-17 at 10:00 +0200, heikki wrote:
> > Hi Deepal,
> >
> > yes it works now ! I'm using the nighlty build fom July 16th.
> >
> > To summarize -- the way that you indicated is the *only* way that
> > works, that is to say :
> >
> > - you must use Constants.HTTP_SERVLET_REQUEST (and not
> > HTTPConstants.MC_HTTP_SERVLETREQUEST) ;
> 
> Why do we have both these constants? It seems like a bug to me!
> 
> > - you must use msgCtx.getProperty() (and not
> > msgCtx.getOperationContext().getProperty() )
> >
> > Otherwise the HttpServletRequest won't be found.
> 
> The transport details for a given message context are only available
> from that message context. So if you're processing the incoming message
> then you can look up the transport info from that message context. If
> you're processing the outgoing message (of an IN-OUT MEP) and want the
> servlet context associated with the incoming message, then you need to
> get the incoming MC from the operation context and then ask it for the
> transport info.
> 
> Sanjiva.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
 
 
-- 
Davanum Srinivas : http://www.wso2.net (Oxygen for Web Service Developers)
 
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

 

Reply via email to