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: [email protected]
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.