tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From antel...@apache.org
Subject svn commit: r824617 - /tuscany/java/sca/modules/binding-sca-axis2-runtime/src/main/java/org/apache/tuscany/sca/binding/sca/axis2/impl/Axis2SCAServiceBindingProvider.java
Date Tue, 13 Oct 2009 07:09:42 GMT
Author: antelder
Date: Tue Oct 13 07:09:41 2009
New Revision: 824617

URL: http://svn.apache.org/viewvc?rev=824617&view=rev
Log:
Fix remote sca binding to use the correct host name

Modified:
    tuscany/java/sca/modules/binding-sca-axis2-runtime/src/main/java/org/apache/tuscany/sca/binding/sca/axis2/impl/Axis2SCAServiceBindingProvider.java

Modified: tuscany/java/sca/modules/binding-sca-axis2-runtime/src/main/java/org/apache/tuscany/sca/binding/sca/axis2/impl/Axis2SCAServiceBindingProvider.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/binding-sca-axis2-runtime/src/main/java/org/apache/tuscany/sca/binding/sca/axis2/impl/Axis2SCAServiceBindingProvider.java?rev=824617&r1=824616&r2=824617&view=diff
==============================================================================
--- tuscany/java/sca/modules/binding-sca-axis2-runtime/src/main/java/org/apache/tuscany/sca/binding/sca/axis2/impl/Axis2SCAServiceBindingProvider.java
(original)
+++ tuscany/java/sca/modules/binding-sca-axis2-runtime/src/main/java/org/apache/tuscany/sca/binding/sca/axis2/impl/Axis2SCAServiceBindingProvider.java
Tue Oct 13 07:09:41 2009
@@ -20,8 +20,10 @@
 package org.apache.tuscany.sca.binding.sca.axis2.impl;
 
 import java.io.IOException;
+import java.net.InetAddress;
 import java.net.ServerSocket;
 import java.net.URI;
+import java.net.UnknownHostException;
 import java.util.logging.Logger;
 
 import org.apache.axiom.om.OMElement;
@@ -82,7 +84,12 @@
         URI uri = URI.create(binding.getURI());
         if (!uri.isAbsolute()) {
             int port = 8085;
-            String host = "localhost";
+            String host;
+            try {
+                host = InetAddress.getLocalHost().getHostName();
+            } catch (UnknownHostException e) {
+                host = "localhost";
+            }
             ServerSocket socket;
             try {
                 socket = new ServerSocket(0);



Mime
View raw message