Thanks, but I am using Axis2.  I have found the follwoing information:

                    MessageContext msgContext = 
MessageContext.getCurrentContext();
                    HttpServletRequest request = (HttpServletRequest) 
msgContext.getProperty                    
                        (HTTPConstants.MC_HTTP_SERVLETREQUEST);
                    String remoteAddr = request.getRemoteAddr();

I guess the problem I have now is where do I make these calls?  Do I put it in 
my service code?

-- Nate

  ----- Original Message ----- 
  From: Betsy Frey 
  To: axis-user@ws.apache.org ; Nate - Hotmail 
  Sent: Monday, March 19, 2007 1:05 PM
  Subject: RE: service request location


  In Axis 1.4, you can use code like this:

              boolean isClientLocal = true;

              MessageContext msgContext = MessageContext.getCurrentContext();

              String remoteIP = 
msgContext.getStrProp(org.apache.axis.Constants.MC_REMOTE_ADDR); 

                  if (!remoteIP.equals("127.0.0.1"))

                  {

                      InetAddress serverAddress = InetAddress.getLocalHost();

                      remoteAddress = InetAddress.getByName(remoteIP);

   

                      // See if the caller's IP address matches that of the 
server.

                      if (!serverAddress.equals(remoteAddress))

                          isClientLocal = false;

                  }

   

   


------------------------------------------------------------------------------

  From: Nate - Hotmail [mailto:[EMAIL PROTECTED] 
  Sent: Monday, March 19, 2007 9:55 AM
  To: axis-user@ws.apache.org
  Subject: service request location

   

  Is there a way to find out where a client is making a request from, ie: 
localhost or somewhere else?

   

   

  Thanks,

   

  Nate

  ********************************************************************** 

  This email and any files transmitted with it are confidential and intended 
solely for the use of the individual or entity to whom they are addressed. Any 
unauthorized review, use, disclosure or distribution is prohibited. If you are 
not the intended recipient, please contact the sender by reply e-mail and 
destroy all copies of the original message. 

Reply via email to