If I correctly understand you are trying to invoke your WebService via a GET
request and not a "usual" "SOAP Client", isn't it?
I gave a look at the code of the org.apache.axis.transport.http.AxisServlet
and there I found that when the Servlet receives a POST request (line 869)
it creates a MessageContext and fills it with lots of properties:

/* Save some HTTP specific info in the bag in case someone needs it */
/********************************************************************/
msgContext.setProperty(Constants.MC_JWS_CLASSDIR, jwsClassDir);
msgContext.setProperty(Constants.MC_HOME_DIR, getHomeDir());
msgContext.setProperty(Constants.MC_RELATIVE_PATH, req.getServletPath());
msgContext.setProperty(HTTPConstants.MC_HTTP_SERVLET, this );
msgContext.setProperty(HTTPConstants.MC_HTTP_SERVLETREQUEST, req );
msgContext.setProperty(HTTPConstants.MC_HTTP_SERVLETRESPONSE, res );
msgContext.setProperty(HTTPConstants.MC_HTTP_SERVLETLOCATION,
getWebInfPath() );
msgContext.setProperty(HTTPConstants.MC_HTTP_SERVLETPATHINFO,
req.getPathInfo() );
msgContext.setProperty(HTTPConstants.HEADER_AUTHORIZATION,
req.getHeader(HTTPConstants.HEADER_AUTHORIZATION));
msgContext.setProperty(Constants.MC_REMOTE_ADDR, req.getRemoteAddr());

However, when it receives a GET request (line 1110) it also creates a
MessageContext but fills it with other properties:

// Place various useful servlet-related objects in
// the MessageContext object being delivered to the
// plugin.

msgContext.setProperty (MessageContext.TRANS_URL, url);
msgContext.setProperty (HTTPConstants.PLUGIN_SERVICE_NAME, serviceName);
msgContext.setProperty (HTTPConstants.PLUGIN_NAME, handlerName);
msgContext.setProperty (HTTPConstants.PLUGIN_IS_DEVELOPMENT, new Boolean
(isDevelopment()));
msgContext.setProperty (HTTPConstants.PLUGIN_ENABLE_LIST, new Boolean
(enableList));
msgContext.setProperty (HTTPConstants.PLUGIN_ENGINE, engine);
msgContext.setProperty (HTTPConstants.PLUGIN_WRITER, writer);
msgContext.setProperty (HTTPConstants.PLUGIN_LOG, log);
msgContext.setProperty (HTTPConstants.PLUGIN_EXCEPTION_LOG, exceptionLog);

... and the request is not part of it.
Honestly I don't understand why different properties are added for these two
different invocations.
You could try to also add the request in the message context:

msgContext.setProperty(HTTPConstants.MC_HTTP_SERVLETREQUEST, req );

and see if than work...

Regards,
Patrick
 

> -----Original Message-----
> From: Luca Manganelli [mailto:[EMAIL PROTECTED] 
> Sent: Dienstag, 19. Oktober 2004 14:01
> To: [EMAIL PROTECTED]
> Subject: Re: Obtaining the client hostname inside *BindingImpl.java
> 
> Patrick Herber wrote:
> 
> >Nop...
> >I've only found that:
> >
> >"Note that the request will be null if the message came in over a 
> >different transport."
> >
> >See:
> >http://nagoya.apache.org/wiki/apachewiki.cgi?AxisProjectPages
/HttpReque
> >st
> >
> >Good luck and Regards,
> >Patrick
> >  
> >
> But I use SOAP over HTTP (or I think), by typing:
> 
> http://axis-server-host:8080/axis/services/service?method=test
> 
> in my browser.
> And it doesn't work again.
> Why?
> 
> 

Reply via email to