Thanks!
It works!
Julio
tcort wrote:
>
> Here's what we use for logging client IP addresses in our axis 1.4
> service....
>
> /**
> * Helper method to Log a client's IP address.
> *
> * @param msg
> * the message to log along with the IP or null for no message.
> */
> private void logIP(String msg) {
>
> HttpServletRequest req = null;
> MessageContext context = MessageContext.getCurrentContext();
> req = (HttpServletRequest) context
>
> .getProperty(org.apache.axis.transport.http.HTTPConstants.MC_HTTP_SERVLETREQUEST);
>
> String logMsg = "";
>
> if (req != null) {
> logMsg += req.getRemoteAddr();
> } else {
> logMsg += "0.0.0.0";
> }
>
> if (msg != null) {
> logMsg += " | " + msg;
> }
>
> LOG.info(logMsg);
> }
>
>
> Source:
> http://gateway.svn.sourceforge.net/viewvc/*checkout*/gateway/trunk/sstp-server/src/main/java/net/sf/gateway/sstp/rule/Rule000023.java?revision=1072
>
> | -----Original Message-----
> | From: juliocest [mailto:[EMAIL PROTECTED]
> | Sent: Wednesday, November 14, 2007 3:01 PM
> | To: [email protected]
> | Subject: How to get a URL from a Client when it connects to service
> | provider?
> |
> |
> | Hi,
> |
> | I would like to kwow how can I get the client URL, (for example:
> | http://192.168.2.3) when the client make a invocation to the service in
> a
> | service provider?
> |
> | For example, I have the service called MyService, then when the cliente
> | MyClient make a connection to MyService, I would like to get the
> MyClient
> | IP
> | Address.
> |
> | I would be grateful if someone could explain how to make it.
> |
> | Thanks.
> |
> | Júlio
> |
> | São Carlos - SP - Brazil
> | --
> | View this message in context:
> http://www.nabble.com/How-to-get-a-URL-from-
> | a-Client-when-it-connects-to-service-provider--tf4807674.html#a13755297
> | Sent from the Axis - User mailing list archive at Nabble.com.
> |
> |
> | ---------------------------------------------------------------------
> | To unsubscribe, e-mail: [EMAIL PROTECTED]
> | For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
--
View this message in context:
http://www.nabble.com/How-to-get-a-URL-from-a-Client-when-it-connects-to-service-provider--tf4807674.html#a13767147
Sent from the Axis - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]