Thanks. Yes, indeed I was looking for the remote client's IP address, not the locathost's. I will try as you described.
Sathija. > That would give you the address of the machine the request is being processed > on. > > You can go about it a couple ways. The simplest is getting to the > HttpServletRequest from the MessageContext and > requesting the remote address. > > e.g. > > String ip = ((HttpServletRequest) > MessageContext.getCurrentContext().getProperty(HTTPConstants.MC_HTTP_SERVLETREQUEST)).getRemoteAddr(); > > - Doug > > -----Original Message----- > From: Martin Gainty [mailto:[EMAIL PROTECTED] > Sent: Wednesday, January 03, 2007 4:18 PM > To: [email protected] > Subject: Re: [Axis2] How to retrieve client's IP address? > > java.net.InetAddress.getLocalHost().getHostAddress(); > > M- > --------------------------------------------------------------------------- > This e-mail message (including attachments, if any) is intended for the use > of the individual or entity to which it is > addressed and may contain information that is privileged, proprietary , > confidential and exempt from disclosure. If > you are not the intended recipient, you are notified that any dissemination, > distribution or copying of this > communication is strictly prohibited. > --------------------------------------------------------------------------- > Le présent message électronique (y compris les pièces qui y sont annexées, le > cas échéant) s'adresse au destinataire > indiqué et peut contenir des renseignements de caractère privé ou > confidentiel. Si vous n'êtes pas le destinataire de > ce document, nous vous signalons qu'il est strictement interdit de le > diffuser, de le distribuer ou de le reproduire. > ----- Original Message ----- > From: "Sathija Pavuluri" <[EMAIL PROTECTED]> > To: <[email protected]> > Sent: Wednesday, January 03, 2007 3:43 PM > Subject: [Axis2] How to retrieve client's IP address? > > >> Hello, >> >> When a web service receives a client call, I'd like to extract the IP >> address of the client from where the call was requested. >> How is this possible using Axis2? >> >> Thanks. >> Sathija. >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
