axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chinth...@apache.org
Subject svn commit: r267221 - /webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/SimpleHTTPServer.java
Date Fri, 02 Sep 2005 15:19:17 GMT
Author: chinthaka
Date: Fri Sep  2 08:19:01 2005
New Revision: 267221

URL: http://svn.apache.org/viewcvs?rev=267221&view=rev
Log:
- trying to fix a replyTo problem.

Modified:
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/SimpleHTTPServer.java

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/SimpleHTTPServer.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/SimpleHTTPServer.java?rev=267221&r1=267220&r2=267221&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/SimpleHTTPServer.java
(original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/SimpleHTTPServer.java
Fri Sep  2 08:19:01 2005
@@ -28,6 +28,8 @@
 
 import java.io.File;
 import java.io.IOException;
+import java.net.InetAddress;
+import java.net.UnknownHostException;
 
 /**
  * This is a simple implementation of an HTTP server for processing
@@ -185,8 +187,14 @@
      *
      * @see org.apache.axis2.transport.TransportListener#replyToEPR(java.lang.String)
      */
-    public EndpointReference replyToEPR(String serviceName) {
-        return new EndpointReference("http://127.0.0.1:" + (embedded.getLocalPort()) +
+    public EndpointReference replyToEPR(String serviceName) throws AxisFault {
+        String hostAddress = null;
+        try {
+            hostAddress = InetAddress.getLocalHost().getHostAddress();
+        } catch (UnknownHostException e) {
+            throw new AxisFault(e);
+        }
+        return new EndpointReference("http://"+ hostAddress + ":" + (embedded.getLocalPort())
+
                 "/axis2/services/" +
                 serviceName);
     }



Mime
View raw message