This content has been marked as final.
Show 3 replies
-
1. Re: How to retrieve client IP address?
julio.vitorino Jul 31, 2006 1:50 PM (in response to stephenlim)In you server side code, put the following code:
import org.apache.axis.MessageContext;
import org.apache.axis.Constants;
...
...
in your webservice method, put:
public void someMethod()
{
MessageContext context = MessageContext.getCurrentContext();
String callerIP = (String)context.getProperty(Constants.MC_REMOTE_ADDR);
system.out.println("CallerIP = " + callerIP);
// Your code goes here...
}
Bye,
Julio. -
2. Re: How to retrieve client IP address?
stephenlim Jul 31, 2006 9:11 PM (in response to stephenlim)Thanks for the reply. The solution here is specifically for Axis web services but now in JBoss version 4.0.4, the Axis web services is replaced by JBoss web services. So the code is not applicable in here. Any other ways?
-
3. Re: How to retrieve client IP address?
sursha Nov 8, 2006 1:38 PM (in response to stephenlim)Did you find a solution for this? Please let me know