Be aware that getRemoteAddr() may not be the address of the client sending the request but rather a proxy/caching server in between, load balancer, etc. As long as you are OK with it you can get the request like this:

MessageContext context = MessageContext.getCurrentContext();

HttpServletRequest req = (HttpServletRequest)
  context.getProperty(HTTPConstants.MC_HTTP_SERVLETREQUEST);

I hope this helps.

Tim


Alex Chen wrote:
I need to inspect the message in the program, e.g. I want to know there the message comes from by
calling the getRemoteAddr() method of the request.


Flores, Raul wrote:

If you only want to inspect the messages then use a monitor tool.

tcpTrace is excellent for this (thank you simon and matt)


Raul



-----Original Message-----
From: Alex Chen [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 12, 2005 3:39 PM
To: [EMAIL PROTECTED]
Subject: How to get HttpServletRequest from my call


I am using AXIS as my SOAP server.
I use WSDL2Java to generate the code stubs and only need to write the
*Impl.java part..
Since everything else is handled by the AXIS servlet,  I have no handle
of the HTTP request and reply message.  I would like to inspect that in
my code.  How do I get such information?

Any help is appreciated.








Reply via email to