axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dee...@apache.org
Subject svn commit: r531848 - /webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2/transport/http/SimpleHTTPServer.java
Date Tue, 24 Apr 2007 09:29:10 GMT
Author: deepal
Date: Tue Apr 24 02:29:09 2007
New Revision: 531848

URL: http://svn.apache.org/viewvc?view=rev&rev=531848
Log:
fixing issue AXIS2-2581
 - Michele Mazzucco  please make sure I have done the right thing

Modified:
    webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2/transport/http/SimpleHTTPServer.java

Modified: webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2/transport/http/SimpleHTTPServer.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2/transport/http/SimpleHTTPServer.java?view=diff&rev=531848&r1=531847&r2=531848
==============================================================================
--- webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2/transport/http/SimpleHTTPServer.java
(original)
+++ webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2/transport/http/SimpleHTTPServer.java
Tue Apr 24 02:29:09 2007
@@ -56,6 +56,7 @@
      * Embedded commons http core based server
      */
     SimpleHttpServer embedded = null;
+    private String localAddress;
     int port = -1;
 
     public static int DEFAULT_PORT = 8080;
@@ -257,21 +258,25 @@
             }
         }
         //if the host address is not present
-        String localAddress;
+        String ipAddress;
         if (ip != null) {
-            localAddress = ip;
+            ipAddress = ip;
         } else {
             try {
-                localAddress = HttpUtils.getIpAddress();
+                if(localAddress==null){
+                    localAddress = HttpUtils.getIpAddress();
+                }
                 if (localAddress == null) {
-                    localAddress = "127.0.0.1";
+                    ipAddress = "127.0.0.1";
+                } else {
+                    ipAddress = localAddress;
                 }
             } catch (SocketException e) {
                 throw AxisFault.makeFault(e);
             }
         }
         if (embedded != null) {
-            return new EndpointReference[]{new EndpointReference("http://" + localAddress
+ ":" +
+            return new EndpointReference[]{new EndpointReference("http://" + ipAddress +
":" +
                                                                  (embedded.getPort())
                                                                  + "/" + configurationContext.getServiceContextPath()
+ "/" + serviceName)};
         } else {



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


Mime
View raw message