org.apache.axis2.transport.http.server
Class HttpUtils

java.lang.Object
  extended by org.apache.axis2.transport.http.server.HttpUtils

public class HttpUtils
extends java.lang.Object


Method Summary
static java.lang.String getIpAddress()
          Returns the ip address to be used for the replyto epr CAUTION: This will go through all the available network interfaces and will try to return an ip address.
static java.lang.String getIpAddress(AxisConfiguration axisConfiguration)
          First check whether the hostname parameter is there in AxisConfiguration (axis2.xml) , if it is there then this will retun that as the host name , o.w will return the IP address.
static java.lang.String getSoapAction(AxisHttpRequest request)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getSoapAction

public static java.lang.String getSoapAction(AxisHttpRequest request)

getIpAddress

public static java.lang.String getIpAddress()
                                     throws java.net.SocketException
Returns the ip address to be used for the replyto epr CAUTION: This will go through all the available network interfaces and will try to return an ip address. First this will try to get the first IP which is not loopback address (127.0.0.1). If none is found then this will return this will return 127.0.0.1. This will not consider IPv6 addresses.

TODO: - Improve this logic to genaralize it a bit more - Obtain the ip to be used here from the Call API

Returns:
Returns String.
Throws:
java.net.SocketException

getIpAddress

public static java.lang.String getIpAddress(AxisConfiguration axisConfiguration)
                                     throws java.net.SocketException
First check whether the hostname parameter is there in AxisConfiguration (axis2.xml) , if it is there then this will retun that as the host name , o.w will return the IP address.

Throws:
java.net.SocketException


Copyright © 2007 Apache Web Services Project. All Rights Reserved.