You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "indika priyantha kumara (JIRA)" <ji...@apache.org> on 2006/11/06 06:31:37 UTC

[jira] Created: (AXIS2-1610) Need to get client IP address on server side

Need to get client IP address on server side
--------------------------------------------

                 Key: AXIS2-1610
                 URL: http://issues.apache.org/jira/browse/AXIS2-1610
             Project: Apache Axis 2.0 (Axis2)
          Issue Type: New Feature
            Reporter: indika priyantha kumara


hi all

In my application i need to get client IP address on server side. It is need to possible this  in both of SimpleHttpServer and Axis2  web-app distributions. Please can someone do this?
   
     Thanks Lots
      Regards
      Indika

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Commented: (AXIS2-1610) Need to get client IP address on server side

Posted by "Michael Berkowitz (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/AXIS2-1610?page=comments#action_12448175 ] 
            
Michael Berkowitz commented on AXIS2-1610:
------------------------------------------

I'm currently using Axis 1.4, and this works under that:

    protected String get_client_ip() {
        MessageContext context = MessageContext.getCurrentContext();

        if (context == null)
            client_ip = "127.0.0.1";
        else
            client_ip = (String) context.getProperty(org.apache.axis.Constants.MC_REMOTE_ADDR);

        return client_ip;
    }

If it doesn't work under Axis2, please let me know.  That might be cause for concern.

> Need to get client IP address on server side
> --------------------------------------------
>
>                 Key: AXIS2-1610
>                 URL: http://issues.apache.org/jira/browse/AXIS2-1610
>             Project: Apache Axis 2.0 (Axis2)
>          Issue Type: New Feature
>            Reporter: indika priyantha kumara
>
> hi all
> In my application i need to get client IP address on server side. It is need to possible this  in both of SimpleHttpServer and Axis2  web-app distributions. Please can someone do this?
>    
>      Thanks Lots
>       Regards
>       Indika

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Updated: (AXIS2-1610) Need to get client IP address on server side

Posted by "Davanum Srinivas (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-1610?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Davanum Srinivas updated AXIS2-1610:
------------------------------------

    Assignee: Sanka Samaranayake

> Need to get client IP address on server side
> --------------------------------------------
>
>                 Key: AXIS2-1610
>                 URL: https://issues.apache.org/jira/browse/AXIS2-1610
>             Project: Axis 2.0 (Axis2)
>          Issue Type: New Feature
>            Reporter: indika priyantha kumara
>         Assigned To: Sanka Samaranayake
>
> hi all
> In my application i need to get client IP address on server side. It is need to possible this  in both of SimpleHttpServer and Axis2  web-app distributions. Please can someone do this?
>    
>      Thanks Lots
>       Regards
>       Indika

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Resolved: (AXIS2-1610) Need to get client IP address on server side

Posted by "Sanka Samaranayake (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-1610?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sanka Samaranayake resolved AXIS2-1610.
---------------------------------------

    Resolution: Fixed


Fixed in the latest codebase.

You can use the following code to get the remote client address

----------------------------------------------------------------------------------------------------------

String remoteClientAddress = messageContext.getProperty(MessageContext.REMOTE_ADDR);

-----------------------------------------------------------------------------------------------------------

Thanks,
Sanka

> Need to get client IP address on server side
> --------------------------------------------
>
>                 Key: AXIS2-1610
>                 URL: https://issues.apache.org/jira/browse/AXIS2-1610
>             Project: Axis 2.0 (Axis2)
>          Issue Type: New Feature
>            Reporter: indika priyantha kumara
>         Assigned To: Sanka Samaranayake
>
> hi all
> In my application i need to get client IP address on server side. It is need to possible this  in both of SimpleHttpServer and Axis2  web-app distributions. Please can someone do this?
>    
>      Thanks Lots
>       Regards
>       Indika

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org