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 Sanjesh Pathak <sa...@soapknox.com> on 2006/08/07 15:38:37 UTC

[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 <sa...@opensource.lk> 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: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
> 
> 
 
 
-- 
Davanum Srinivas : http://www.wso2.net (Oxygen for Web Service Developers)
 
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
 

RE: [Axis2] HttpServeltRequest

Posted by Sanjesh Pathak <sa...@soapknox.com>.
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:sanjesh@soapknox.com] 
Sent: Monday, August 07, 2006 8:39 AM
To: axis-user@ws.apache.org
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 <sa...@opensource.lk> 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: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
> 
> 
 
 
-- 
Davanum Srinivas : http://www.wso2.net (Oxygen for Web Service Developers)
 
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org