Re: [Axis2C] Get peer ip addresswith Apache server

2008-01-19 Thread Senaka Fernando
Hi Mougey, Samisa, and Dumindu,

 On Jan 19, 2008 12:53 AM, Senaka Fernando [EMAIL PROTECTED] wrote:
  Sébastien Mougey wrote:
  How can I get this address with Apache server ? Is it possible ?
 
 
  I think it should be possible, however, I need to look into the code
 to
  give you a definite answer. I will have a look and let you know.

 Yes, indeed it is possible. We need to use ap_get_remote_host().
 However,
 I'm not quite sure what other methods, data are required to call this
 method, and how we could access them. Looking into that.


 ap_get_remote_host() tries to lookup the remote server's DNS name.
 Only if that fails will it return the ip address. You can however get
 the ip address of the remote host at the axis2_handler as follows:

 char* remote_ip = req-connection-remote_ip;

Okay, I think we can go ahead with this. The method
axis2_apache2_worker_process_request() has access to the above data as
well as the msg_ctx, and therefore, it can be made available, as in the
simple axis server.

Regards,
Senaka



 Regards,
 Dumindu.

 --
 Dumindu Pallewela
 http://blog.dumindu.com
 GPG ID: 0x9E131672

 WSO2 | Oxygenating the Web Service Platform | http://wso2.com



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [Axis2C] Get peer ip addresswith Apache server

2008-01-18 Thread Sébastien Mougey
How can I get this address with Apache server ? Is it possible ?

Thank you

 
 Yes, It is not implemented with httpd module as of now.
 
 Samisa...

 Sébastien Mougey wrote:
 Hello
 
 I'm trying to get the peer ip address with :
 axis2_msg_ctx_get_property( msg_ctx, env, AXIS2_SVR_PEER_IP_ADDR );
 and i doesn't work.
 
 Reading http_worker.c source, it seems to work only with the simple axis
 server. Is it true ?
   



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [Axis2C] Get peer ip addresswith Apache server

2008-01-18 Thread Samisa Abeysinghe

Sébastien Mougey wrote:

Hello

I'm trying to get the peer ip address with :
axis2_msg_ctx_get_property( msg_ctx, env, AXIS2_SVR_PEER_IP_ADDR );
and i doesn't work.

Reading http_worker.c source, it seems to work only with the simple axis
server. Is it true ?
  


Yes, It is not implemented with httpd module as of now.

Samisa...


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [Axis2C] Get peer ip addresswith Apache server

2008-01-18 Thread Samisa Abeysinghe

Sébastien Mougey wrote:

How can I get this address with Apache server ? Is it possible ?
  


I think it should be possible, however, I need to look into the code to 
give you a definite answer. I will have a look and let you know.


Thanks,
Samisa...


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [Axis2C] Get peer ip addresswith Apache server

2008-01-18 Thread Senaka Fernando
 Sébastien Mougey wrote:
 How can I get this address with Apache server ? Is it possible ?


 I think it should be possible, however, I need to look into the code to
 give you a definite answer. I will have a look and let you know.

Yes, indeed it is possible. We need to use ap_get_remote_host(). However,
I'm not quite sure what other methods, data are required to call this
method, and how we could access them. Looking into that.

Regards,
Senaka


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [Axis2C] Get peer ip addresswith Apache server

2008-01-18 Thread Dumindu Pallewela
On Jan 19, 2008 12:53 AM, Senaka Fernando [EMAIL PROTECTED] wrote:
  Sébastien Mougey wrote:
  How can I get this address with Apache server ? Is it possible ?
 
 
  I think it should be possible, however, I need to look into the code to
  give you a definite answer. I will have a look and let you know.

 Yes, indeed it is possible. We need to use ap_get_remote_host(). However,
 I'm not quite sure what other methods, data are required to call this
 method, and how we could access them. Looking into that.


ap_get_remote_host() tries to lookup the remote server's DNS name.
Only if that fails will it return the ip address. You can however get
the ip address of the remote host at the axis2_handler as follows:

char* remote_ip = req-connection-remote_ip;


Regards,
Dumindu.

-- 
Dumindu Pallewela
http://blog.dumindu.com
GPG ID: 0x9E131672

WSO2 | Oxygenating the Web Service Platform | http://wso2.com