You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by "Matta, Geethamadhurima " <ge...@citi.com> on 2011/06/30 21:34:43 UTC
Identify IP address of the source request
Hi,
I am using Axis2 1.5.1.
We need to authenticate if the request coming to Axis2 server is from a valid source.
Can we identify using the ip address of the source.
Is there any way to get the ip address of the source from the request?
Regards,
Geeta Madhurima
Desk: (212) 723 2505
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
For additional commands, e-mail: java-user-help@axis.apache.org
RE: Identify IP address of the source request
Posted by "Matta, Geethamadhurima " <ge...@citi.com>.
Thanks Tony. It worked. I had placed this code in init().
Hence, it was not working.
________________________________
From: Tony HEDOUX [mailto:hedouxt@hotmail.com]
Sent: 01 July 2011 19:04
To: java-user@axis.apache.org
Subject: RE: Identify IP address of the source request
Hi,
You should try the same syntax but in your calling method (not in the init() ).
package myWebService;
import org.apache.axis2.context.MessageContext;
public class MyService {
public String giveYourIp(){
MessageContext msgCtx = MessageContext.getCurrentMessageContext();
return (String)msgCtx.getProperty(MessageContext.REMOTE_ADDR);
}
}
Tony.
________________________________
From: geethamadhurima.matta@citi.com
To: java-user@axis.apache.org
Date: Fri, 1 Jul 2011 17:45:26 +0100
Subject: RE: Identify IP address of the source request
Nadir,
How to get msgContext obj.
I am using:
MessageContext msgCtx = MessageContext.getCurrentMessageContext();
But msgCtx is null.
________________________________
From: Nadir Amra [mailto:amra@us.ibm.com]
Sent: 30 June 2011 21:59
To: java-user@axis.apache.org
Cc: 'java-user@axis.apache.org'
Subject: RE: Identify IP address of the source request
How about trying something like:
(String)msgContext.getProperty(MessageContext.REMOTE_ADDR);
Nadir Amra
Integrated Web Services for IBM i Operating System
Internet: amra@us.ibm.com
"Matta, Geethamadhurima " <ge...@citi.com> wrote on 06/30/2011 03:52:58 PM:
> From: "Matta, Geethamadhurima " <ge...@citi.com>
> To: "'java-user@axis.apache.org'" <ja...@axis.apache.org>
> Date: 06/30/2011 03:53 PM
> Subject: RE: Identify IP address of the source request
>
> Deepal,
>
> Following is the code:
> ---------------------------
> public void init(ServiceContext serviceContext) {
> System.out.println("Initializing the service context");
> MessageContext msgCtx =
> MessageContext.getCurrentMessageContext();
> if (msgCtx != null)
> {
> String remoteAddress =(String)
> msgCtx.getProperty("REMOTE_ADDR");
> System.out.println("remoteAddress - " +
> remoteAddress);
> }
> }
> ---------------------------
>
> msgCtx is coming as null.
>
>
>
> Regards,
> Geeta Madhurima
> Desk: (212) 723 2505
> -----Original Message-----
> From: Deepal Jayasinghe [mailto:deepalk@gmail.com]
> Sent: 30 June 2011 20:41
> To: java-user@axis.apache.org
> Subject: Re: Identify IP address of the source request
>
> You can get the remote IP address of the client corresponding to the
> current message as follows; String remoteAddress =
> String)msgCtx.getProperty("REMOTE_ADDR"):
>
> Deepal
>
> On Thu, Jun 30, 2011 at 3:34 PM, Matta, Geethamadhurima
> <ge...@citi.com> wrote:
> > Hi,
> >
> > I am using Axis2 1.5.1.
> >
> > We need to authenticate if the request coming to Axis2 server is
> from a valid source.
> > Can we identify using the ip address of the source.
> > Is there any way to get the ip address of the source from the request?
> >
> > Regards,
> > Geeta Madhurima
> > Desk: (212) 723 2505
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
> > For additional commands, e-mail: java-user-help@axis.apache.org
> >
> >
>
>
>
> --
> http://blogs.deepal.org<http://blogs.deepal.org/>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
> For additional commands, e-mail: java-user-help@axis.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
> For additional commands, e-mail: java-user-help@axis.apache.org
>
RE: Identify IP address of the source request
Posted by Tony HEDOUX <he...@hotmail.com>.
Hi,
You should try the same syntax but in your calling method (not in the init() ).
package myWebService;
import org.apache.axis2.context.MessageContext;
public class MyService {
public String giveYourIp(){
MessageContext msgCtx = MessageContext.getCurrentMessageContext();
return (String)msgCtx.getProperty(MessageContext.REMOTE_ADDR);
}
}
Tony.
From: geethamadhurima.matta@citi.com
To: java-user@axis.apache.org
Date: Fri, 1 Jul 2011 17:45:26 +0100
Subject: RE: Identify IP address of the source request
Nadir,
How to get msgContext obj.
I am
using:
MessageContext msgCtx =
MessageContext.getCurrentMessageContext();
But msgCtx is null.
From: Nadir Amra [mailto:amra@us.ibm.com]
Sent: 30 June 2011 21:59
To:
java-user@axis.apache.org
Cc:
'java-user@axis.apache.org'
Subject: RE: Identify IP address of the
source request
How about trying something like:
(String)msgContext.getProperty(MessageContext.REMOTE_ADDR);
Nadir Amra
Integrated Web Services for
IBM i Operating System
Internet: amra@us.ibm.com
"Matta, Geethamadhurima " <ge...@citi.com> wrote on
06/30/2011 03:52:58 PM:
> From: "Matta, Geethamadhurima "
<ge...@citi.com>
> To:
"'java-user@axis.apache.org'" <ja...@axis.apache.org>
> Date: 06/30/2011 03:53 PM
> Subject: RE: Identify IP address of the source request
>
> Deepal,
>
> Following is the
code:
> ---------------------------
> public void
init(ServiceContext serviceContext) {
>
System.out.println("Initializing the service
context");
>
MessageContext msgCtx =
>
MessageContext.getCurrentMessageContext();
>
if (msgCtx != null)
>
{
>
String remoteAddress
=(String)
> msgCtx.getProperty("REMOTE_ADDR");
>
System.out.println("remoteAddress - " +
> remoteAddress);
>
}
>
}
> ---------------------------
>
> msgCtx is coming
as null.
>
>
>
> Regards,
> Geeta
Madhurima
> Desk: (212) 723 2505
> -----Original
Message-----
> From: Deepal Jayasinghe [mailto:deepalk@gmail.com]
> Sent:
30 June 2011 20:41
> To: java-user@axis.apache.org
> Subject: Re:
Identify IP address of the source request
>
> You can get the
remote IP address of the client corresponding to the
> current message as
follows; String remoteAddress =
>
String)msgCtx.getProperty("REMOTE_ADDR"):
>
> Deepal
>
> On Thu, Jun 30, 2011 at 3:34 PM, Matta, Geethamadhurima
>
<ge...@citi.com> wrote:
> > Hi,
>
>
> > I am using Axis2 1.5.1.
> >
> > We need to
authenticate if the request coming to Axis2 server is
> from a valid
source.
> > Can we identify using the ip address of the source.
>
> Is there any way to get the ip address of the source from the
request?
> >
> > Regards,
> > Geeta Madhurima
>
> Desk: (212) 723 2505
> >
> >
---------------------------------------------------------------------
>
> To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
> >
For additional commands, e-mail: java-user-help@axis.apache.org
>
>
> >
>
>
>
> --
> http://blogs.deepal.org
>
>
---------------------------------------------------------------------
> To
unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
> For
additional commands, e-mail: java-user-help@axis.apache.org
>
>
>
---------------------------------------------------------------------
> To
unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
> For
additional commands, e-mail: java-user-help@axis.apache.org
>
RE: Identify IP address of the source request
Posted by "Matta, Geethamadhurima " <ge...@citi.com>.
Nadir,
How to get msgContext obj.
I am using:
MessageContext msgCtx = MessageContext.getCurrentMessageContext();
But msgCtx is null.
________________________________
From: Nadir Amra [mailto:amra@us.ibm.com]
Sent: 30 June 2011 21:59
To: java-user@axis.apache.org
Cc: 'java-user@axis.apache.org'
Subject: RE: Identify IP address of the source request
How about trying something like:
(String)msgContext.getProperty(MessageContext.REMOTE_ADDR);
Nadir Amra
Integrated Web Services for IBM i Operating System
Internet: amra@us.ibm.com
"Matta, Geethamadhurima " <ge...@citi.com> wrote on 06/30/2011 03:52:58 PM:
> From: "Matta, Geethamadhurima " <ge...@citi.com>
> To: "'java-user@axis.apache.org'" <ja...@axis.apache.org>
> Date: 06/30/2011 03:53 PM
> Subject: RE: Identify IP address of the source request
>
> Deepal,
>
> Following is the code:
> ---------------------------
> public void init(ServiceContext serviceContext) {
> System.out.println("Initializing the service context");
> MessageContext msgCtx =
> MessageContext.getCurrentMessageContext();
> if (msgCtx != null)
> {
> String remoteAddress =(String)
> msgCtx.getProperty("REMOTE_ADDR");
> System.out.println("remoteAddress - " +
> remoteAddress);
> }
> }
> ---------------------------
>
> msgCtx is coming as null.
>
>
>
> Regards,
> Geeta Madhurima
> Desk: (212) 723 2505
> -----Original Message-----
> From: Deepal Jayasinghe [mailto:deepalk@gmail.com]
> Sent: 30 June 2011 20:41
> To: java-user@axis.apache.org
> Subject: Re: Identify IP address of the source request
>
> You can get the remote IP address of the client corresponding to the
> current message as follows; String remoteAddress =
> String)msgCtx.getProperty("REMOTE_ADDR"):
>
> Deepal
>
> On Thu, Jun 30, 2011 at 3:34 PM, Matta, Geethamadhurima
> <ge...@citi.com> wrote:
> > Hi,
> >
> > I am using Axis2 1.5.1.
> >
> > We need to authenticate if the request coming to Axis2 server is
> from a valid source.
> > Can we identify using the ip address of the source.
> > Is there any way to get the ip address of the source from the request?
> >
> > Regards,
> > Geeta Madhurima
> > Desk: (212) 723 2505
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
> > For additional commands, e-mail: java-user-help@axis.apache.org
> >
> >
>
>
>
> --
> http://blogs.deepal.org<http://blogs.deepal.org/>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
> For additional commands, e-mail: java-user-help@axis.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
> For additional commands, e-mail: java-user-help@axis.apache.org
>
RE: Identify IP address of the source request
Posted by Nadir Amra <am...@us.ibm.com>.
How about trying something like:
(String)msgContext.getProperty(MessageContext.REMOTE_ADDR);
Nadir Amra
Integrated Web Services for IBM i Operating System
Internet: amra@us.ibm.com
"Matta, Geethamadhurima " <ge...@citi.com> wrote on
06/30/2011 03:52:58 PM:
> From: "Matta, Geethamadhurima " <ge...@citi.com>
> To: "'java-user@axis.apache.org'" <ja...@axis.apache.org>
> Date: 06/30/2011 03:53 PM
> Subject: RE: Identify IP address of the source request
>
> Deepal,
>
> Following is the code:
> ---------------------------
> public void init(ServiceContext serviceContext) {
> System.out.println("Initializing the service context");
> MessageContext msgCtx =
> MessageContext.getCurrentMessageContext();
> if (msgCtx != null)
> {
> String remoteAddress =(String)
> msgCtx.getProperty("REMOTE_ADDR");
> System.out.println("remoteAddress - " +
> remoteAddress);
> }
> }
> ---------------------------
>
> msgCtx is coming as null.
>
>
>
> Regards,
> Geeta Madhurima
> Desk: (212) 723 2505
> -----Original Message-----
> From: Deepal Jayasinghe [mailto:deepalk@gmail.com]
> Sent: 30 June 2011 20:41
> To: java-user@axis.apache.org
> Subject: Re: Identify IP address of the source request
>
> You can get the remote IP address of the client corresponding to the
> current message as follows; String remoteAddress =
> String)msgCtx.getProperty("REMOTE_ADDR"):
>
> Deepal
>
> On Thu, Jun 30, 2011 at 3:34 PM, Matta, Geethamadhurima
> <ge...@citi.com> wrote:
> > Hi,
> >
> > I am using Axis2 1.5.1.
> >
> > We need to authenticate if the request coming to Axis2 server is
> from a valid source.
> > Can we identify using the ip address of the source.
> > Is there any way to get the ip address of the source from the request?
> >
> > Regards,
> > Geeta Madhurima
> > Desk: (212) 723 2505
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
> > For additional commands, e-mail: java-user-help@axis.apache.org
> >
> >
>
>
>
> --
> http://blogs.deepal.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
> For additional commands, e-mail: java-user-help@axis.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
> For additional commands, e-mail: java-user-help@axis.apache.org
>
Re: Identify IP address of the source request
Posted by Deepal jayasinghe <de...@gmail.com>.
> A little more detail:
>
> The message context is set as a thread-local variable in the thread
> executing Servlet.service(ServletRequest,ServletResponse) or its
> specializations. A request must have been received.
We set the thread local variable just before we call the service, to be
exact inside the MessageReceiver.
Thanks.
Deepal
> Even if the servlet is being constructed on each request, Servlet.init
> may be called before the MsgContext is established as thread-local
> variable, or possibly it might be called on a different thread from
> Servlet.service().
>
> Jeff
>
> On Fri, Jul 1, 2011 at 7:04 PM, Afkham Azeez <af...@gmail.com> wrote:
>> The MessageContext is set as a thread local variable when a request is
>> received. In fact, for a msg context to be created, either a message should
>> be received or sent. A valid msg context will be accessible in your
>> operation implementation methods.
>>
>> On Jul 1, 2011 2:23 AM, "Matta, Geethamadhurima"
>> <ge...@citi.com> wrote:
>>> Deepal,
>>>
>>> Following is the code:
>>> ---------------------------
>>> public void init(ServiceContext serviceContext) {
>>> System.out.println("Initializing the service context");
>>> MessageContext msgCtx = MessageContext.getCurrentMessageContext();
>>> if (msgCtx != null)
>>> {
>>> String remoteAddress =(String)msgCtx.getProperty("REMOTE_ADDR");
>>> System.out.println("remoteAddress - " + remoteAddress);
>>> }
>>> }
>>> ---------------------------
>>>
>>> msgCtx is coming as null.
>>>
>>>
>>>
>>> Regards,
>>> Geeta Madhurima
>>> Desk: (212) 723 2505
>>> -----Original Message-----
>>> From: Deepal Jayasinghe [mailto:deepalk@gmail.com]
>>> Sent: 30 June 2011 20:41
>>> To: java-user@axis.apache.org
>>> Subject: Re: Identify IP address of the source request
>>>
>>> You can get the remote IP address of the client corresponding to the
>>> current message as follows; String remoteAddress =
>>> String)msgCtx.getProperty("REMOTE_ADDR"):
>>>
>>> Deepal
>>>
>>> On Thu, Jun 30, 2011 at 3:34 PM, Matta, Geethamadhurima
>>> <ge...@citi.com> wrote:
>>>> Hi,
>>>>
>>>> I am using Axis2 1.5.1.
>>>>
>>>> We need to authenticate if the request coming to Axis2 server is from a
>>>> valid source.
>>>> Can we identify using the ip address of the source.
>>>> Is there any way to get the ip address of the source from the request?
>>>>
>>>> Regards,
>>>> Geeta Madhurima
>>>> Desk: (212) 723 2505
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
>>>> For additional commands, e-mail: java-user-help@axis.apache.org
>>>>
>>>>
>>>
>>>
>>> --
>>> http://blogs.deepal.org
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
>>> For additional commands, e-mail: java-user-help@axis.apache.org
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
>>> For additional commands, e-mail: java-user-help@axis.apache.org
>>>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
> For additional commands, e-mail: java-user-help@axis.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
For additional commands, e-mail: java-user-help@axis.apache.org
Re: Identify IP address of the source request
Posted by Jeff Greif <jg...@alumni.princeton.edu>.
A little more detail:
The message context is set as a thread-local variable in the thread
executing Servlet.service(ServletRequest,ServletResponse) or its
specializations. A request must have been received.
Even if the servlet is being constructed on each request, Servlet.init
may be called before the MsgContext is established as thread-local
variable, or possibly it might be called on a different thread from
Servlet.service().
Jeff
On Fri, Jul 1, 2011 at 7:04 PM, Afkham Azeez <af...@gmail.com> wrote:
> The MessageContext is set as a thread local variable when a request is
> received. In fact, for a msg context to be created, either a message should
> be received or sent. A valid msg context will be accessible in your
> operation implementation methods.
>
> On Jul 1, 2011 2:23 AM, "Matta, Geethamadhurima"
> <ge...@citi.com> wrote:
>> Deepal,
>>
>> Following is the code:
>> ---------------------------
>> public void init(ServiceContext serviceContext) {
>> System.out.println("Initializing the service context");
>> MessageContext msgCtx = MessageContext.getCurrentMessageContext();
>> if (msgCtx != null)
>> {
>> String remoteAddress =(String)msgCtx.getProperty("REMOTE_ADDR");
>> System.out.println("remoteAddress - " + remoteAddress);
>> }
>> }
>> ---------------------------
>>
>> msgCtx is coming as null.
>>
>>
>>
>> Regards,
>> Geeta Madhurima
>> Desk: (212) 723 2505
>> -----Original Message-----
>> From: Deepal Jayasinghe [mailto:deepalk@gmail.com]
>> Sent: 30 June 2011 20:41
>> To: java-user@axis.apache.org
>> Subject: Re: Identify IP address of the source request
>>
>> You can get the remote IP address of the client corresponding to the
>> current message as follows; String remoteAddress =
>> String)msgCtx.getProperty("REMOTE_ADDR"):
>>
>> Deepal
>>
>> On Thu, Jun 30, 2011 at 3:34 PM, Matta, Geethamadhurima
>> <ge...@citi.com> wrote:
>>> Hi,
>>>
>>> I am using Axis2 1.5.1.
>>>
>>> We need to authenticate if the request coming to Axis2 server is from a
>>> valid source.
>>> Can we identify using the ip address of the source.
>>> Is there any way to get the ip address of the source from the request?
>>>
>>> Regards,
>>> Geeta Madhurima
>>> Desk: (212) 723 2505
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
>>> For additional commands, e-mail: java-user-help@axis.apache.org
>>>
>>>
>>
>>
>>
>> --
>> http://blogs.deepal.org
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
>> For additional commands, e-mail: java-user-help@axis.apache.org
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
>> For additional commands, e-mail: java-user-help@axis.apache.org
>>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
For additional commands, e-mail: java-user-help@axis.apache.org
RE: Identify IP address of the source request
Posted by Afkham Azeez <af...@gmail.com>.
The MessageContext is set as a thread local variable when a request is
received. In fact, for a msg context to be created, either a message should
be received or sent. A valid msg context will be accessible in your
operation implementation methods.
On Jul 1, 2011 2:23 AM, "Matta, Geethamadhurima" <
geethamadhurima.matta@citi.com> wrote:
> Deepal,
>
> Following is the code:
> ---------------------------
> public void init(ServiceContext serviceContext) {
> System.out.println("Initializing the service context");
> MessageContext msgCtx = MessageContext.getCurrentMessageContext();
> if (msgCtx != null)
> {
> String remoteAddress =(String)msgCtx.getProperty("REMOTE_ADDR");
> System.out.println("remoteAddress - " + remoteAddress);
> }
> }
> ---------------------------
>
> msgCtx is coming as null.
>
>
>
> Regards,
> Geeta Madhurima
> Desk: (212) 723 2505
> -----Original Message-----
> From: Deepal Jayasinghe [mailto:deepalk@gmail.com]
> Sent: 30 June 2011 20:41
> To: java-user@axis.apache.org
> Subject: Re: Identify IP address of the source request
>
> You can get the remote IP address of the client corresponding to the
current message as follows; String remoteAddress =
> String)msgCtx.getProperty("REMOTE_ADDR"):
>
> Deepal
>
> On Thu, Jun 30, 2011 at 3:34 PM, Matta, Geethamadhurima <
geethamadhurima.matta@citi.com> wrote:
>> Hi,
>>
>> I am using Axis2 1.5.1.
>>
>> We need to authenticate if the request coming to Axis2 server is from a
valid source.
>> Can we identify using the ip address of the source.
>> Is there any way to get the ip address of the source from the request?
>>
>> Regards,
>> Geeta Madhurima
>> Desk: (212) 723 2505
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
>> For additional commands, e-mail: java-user-help@axis.apache.org
>>
>>
>
>
>
> --
> http://blogs.deepal.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
> For additional commands, e-mail: java-user-help@axis.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
> For additional commands, e-mail: java-user-help@axis.apache.org
>
RE: Identify IP address of the source request
Posted by "Matta, Geethamadhurima " <ge...@citi.com>.
Deepal,
Following is the code:
---------------------------
public void init(ServiceContext serviceContext) {
System.out.println("Initializing the service context");
MessageContext msgCtx = MessageContext.getCurrentMessageContext();
if (msgCtx != null)
{
String remoteAddress =(String)msgCtx.getProperty("REMOTE_ADDR");
System.out.println("remoteAddress - " + remoteAddress);
}
}
---------------------------
msgCtx is coming as null.
Regards,
Geeta Madhurima
Desk: (212) 723 2505
-----Original Message-----
From: Deepal Jayasinghe [mailto:deepalk@gmail.com]
Sent: 30 June 2011 20:41
To: java-user@axis.apache.org
Subject: Re: Identify IP address of the source request
You can get the remote IP address of the client corresponding to the current message as follows; String remoteAddress =
String)msgCtx.getProperty("REMOTE_ADDR"):
Deepal
On Thu, Jun 30, 2011 at 3:34 PM, Matta, Geethamadhurima <ge...@citi.com> wrote:
> Hi,
>
> I am using Axis2 1.5.1.
>
> We need to authenticate if the request coming to Axis2 server is from a valid source.
> Can we identify using the ip address of the source.
> Is there any way to get the ip address of the source from the request?
>
> Regards,
> Geeta Madhurima
> Desk: (212) 723 2505
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
> For additional commands, e-mail: java-user-help@axis.apache.org
>
>
--
http://blogs.deepal.org
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
For additional commands, e-mail: java-user-help@axis.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
For additional commands, e-mail: java-user-help@axis.apache.org
Re: Identify IP address of the source request
Posted by Deepal Jayasinghe <de...@gmail.com>.
You can get the remote IP address of the client corresponding to the
current message as follows; String remoteAddress =
String)msgCtx.getProperty("REMOTE_ADDR"):
Deepal
On Thu, Jun 30, 2011 at 3:34 PM, Matta, Geethamadhurima
<ge...@citi.com> wrote:
> Hi,
>
> I am using Axis2 1.5.1.
>
> We need to authenticate if the request coming to Axis2 server is from a valid source.
> Can we identify using the ip address of the source.
> Is there any way to get the ip address of the source from the request?
>
> Regards,
> Geeta Madhurima
> Desk: (212) 723 2505
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
> For additional commands, e-mail: java-user-help@axis.apache.org
>
>
--
http://blogs.deepal.org
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
For additional commands, e-mail: java-user-help@axis.apache.org