summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--branches/sca-java-1.x/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/TuscanyListingAgent.java3
-rw-r--r--branches/sca-java-1.x/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/QuestionMarkWSDLImportTestCase.java4
-rw-r--r--branches/sca-java-1.x/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/QuestionMarkWSDLIncludeTestCase.java (renamed from branches/sca-java-1.x/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/QuestionMarkWSDLIncludeTestCaseFIXME.java)8
-rw-r--r--branches/sca-java-1.x/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/QuestionMarkWSDLTestCase.java7
-rw-r--r--branches/sca-java-1.x/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/soap12/QuestionMarkWSDLTestCase.java10
5 files changed, 9 insertions, 23 deletions
diff --git a/branches/sca-java-1.x/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/TuscanyListingAgent.java b/branches/sca-java-1.x/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/TuscanyListingAgent.java
index 21fef3e5d8..bde688c9bf 100644
--- a/branches/sca-java-1.x/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/TuscanyListingAgent.java
+++ b/branches/sca-java-1.x/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/TuscanyListingAgent.java
@@ -53,7 +53,6 @@ import org.apache.axis2.description.AxisService;
import org.apache.axis2.description.Parameter;
import org.apache.axis2.description.PolicyInclude;
import org.apache.axis2.transport.http.ListingAgent;
-import org.apache.axis2.transport.http.server.HttpUtils;
import org.apache.axis2.util.ExternalPolicySerializer;
import org.apache.axis2.util.JavaUtils;
import org.apache.axis2.wsdl.WSDLConstants;
@@ -225,7 +224,7 @@ public class TuscanyListingAgent extends ListingAgent {
int wsdlPort = wsdlURIObj.getPort();
String wsdlAddr = wsdlHost + (wsdlPort != -1 ? ":" + Integer.toString(wsdlPort) : "");
URI requestURIObj = new URI(requestURI);
- String ipAddr = HttpUtils.getIpAddress();
+ String ipAddr = requestURIObj.getHost();
int requestPort = requestURIObj.getPort();
String newAddr = ipAddr + (requestPort != -1 ? ":" + Integer.toString(requestPort) : "");
return wsdlURI.replace(wsdlAddr, newAddr);
diff --git a/branches/sca-java-1.x/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/QuestionMarkWSDLImportTestCase.java b/branches/sca-java-1.x/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/QuestionMarkWSDLImportTestCase.java
index b276d8210f..186d2ad746 100644
--- a/branches/sca-java-1.x/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/QuestionMarkWSDLImportTestCase.java
+++ b/branches/sca-java-1.x/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/QuestionMarkWSDLImportTestCase.java
@@ -35,7 +35,6 @@ import javax.xml.namespace.QName;
import junit.framework.TestCase;
-import org.apache.axis2.transport.http.server.HttpUtils;
import org.apache.tuscany.sca.host.embedded.SCADomain;
/**
@@ -69,8 +68,7 @@ public class QuestionMarkWSDLImportTestCase extends TestCase {
Port port = service.getPort("AccountSoapPort");
String endpoint = getEndpoint(port);
- String ip = HttpUtils.getIpAddress();
- assertEquals("http://" + ip + ":8086/AccountService", endpoint);
+ assertEquals("http://localhost:8086/AccountService", endpoint);
}
private String getEndpoint(Port port) {
diff --git a/branches/sca-java-1.x/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/QuestionMarkWSDLIncludeTestCaseFIXME.java b/branches/sca-java-1.x/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/QuestionMarkWSDLIncludeTestCase.java
index 0d10881e7b..c0133a712e 100644
--- a/branches/sca-java-1.x/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/QuestionMarkWSDLIncludeTestCaseFIXME.java
+++ b/branches/sca-java-1.x/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/QuestionMarkWSDLIncludeTestCase.java
@@ -35,17 +35,14 @@ import javax.xml.namespace.QName;
import junit.framework.TestCase;
-import org.apache.axis2.transport.http.server.HttpUtils;
import org.apache.tuscany.sca.host.embedded.SCADomain;
/**
* Test ?wsdl works and that the returned WSDL has the correct endpoint
*
- * ********* Currently broken, see TUSCANY-2942
- *
* @version $Rev: 660340 $ $Date: 2008-05-27 01:08:32 +0100 (Tue, 27 May 2008) $
*/
-public class QuestionMarkWSDLIncludeTestCaseFIXME extends TestCase {
+public class QuestionMarkWSDLIncludeTestCase extends TestCase {
private SCADomain domain;
@@ -71,8 +68,7 @@ public class QuestionMarkWSDLIncludeTestCaseFIXME extends TestCase {
Port port = service.getPort("AccountSoapPort");
String endpoint = getEndpoint(port);
- String ip = HttpUtils.getIpAddress();
- assertEquals("http://" + ip + ":8085/AccountService", endpoint);
+ assertEquals("http://localhost:8085/AccountService", endpoint);
}
private String getEndpoint(Port port) {
diff --git a/branches/sca-java-1.x/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/QuestionMarkWSDLTestCase.java b/branches/sca-java-1.x/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/QuestionMarkWSDLTestCase.java
index 0508f28e11..0ca84a910e 100644
--- a/branches/sca-java-1.x/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/QuestionMarkWSDLTestCase.java
+++ b/branches/sca-java-1.x/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/QuestionMarkWSDLTestCase.java
@@ -35,7 +35,6 @@ import javax.xml.namespace.QName;
import junit.framework.TestCase;
-import org.apache.axis2.transport.http.server.HttpUtils;
import org.apache.tuscany.sca.host.embedded.SCADomain;
/**
@@ -70,8 +69,7 @@ public class QuestionMarkWSDLTestCase extends TestCase {
Port port = service.getPort("HelloWorldSoapPort");
String endpoint = getEndpoint(port);
- String ip = HttpUtils.getIpAddress();
- assertEquals("http://" + ip + ":8085/services/HelloWorldWebService", endpoint);
+ assertEquals("http://localhost:8085/services/HelloWorldWebService", endpoint);
}
/**
@@ -97,8 +95,7 @@ public class QuestionMarkWSDLTestCase extends TestCase {
Port port = service.getPort("HelloWorldPort");
String endpoint = getEndpoint(port);
- String ip = HttpUtils.getIpAddress();
- assertEquals("http://" + ip + ":8085/foo/bar", endpoint);
+ assertEquals("http://localhost:8085/foo/bar", endpoint);
}
protected String getEndpoint(Port port) {
diff --git a/branches/sca-java-1.x/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/soap12/QuestionMarkWSDLTestCase.java b/branches/sca-java-1.x/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/soap12/QuestionMarkWSDLTestCase.java
index 8d378565d4..ee866f77ec 100644
--- a/branches/sca-java-1.x/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/soap12/QuestionMarkWSDLTestCase.java
+++ b/branches/sca-java-1.x/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/soap12/QuestionMarkWSDLTestCase.java
@@ -32,7 +32,6 @@ import javax.xml.namespace.QName;
import junit.framework.TestCase;
-import org.apache.axis2.transport.http.server.HttpUtils;
import org.apache.tuscany.sca.host.embedded.SCADomain;
/**
@@ -61,8 +60,7 @@ public class QuestionMarkWSDLTestCase extends TestCase {
Port port = service.getPort(newGenerator ? "HelloWorldPort" : "HelloWorldSOAP11port_http");
String endpoint = getSOAP11Endpoint(port);
- String ip = HttpUtils.getIpAddress();
- assertEquals("http://" + ip + ":8085/ep1", endpoint);
+ assertEquals("http://localhost:8085/ep1", endpoint);
}
/**
@@ -81,8 +79,7 @@ public class QuestionMarkWSDLTestCase extends TestCase {
Port port = service.getPort(newGenerator ? "HelloWorldPort" : "HelloWorldSOAP11port_http");
String endpoint = getSOAP11Endpoint(port);
- String ip = HttpUtils.getIpAddress();
- assertEquals("http://" + ip + ":8085/ep2", endpoint);
+ assertEquals("http://localhost:8085/ep2", endpoint);
}
/**
@@ -101,8 +98,7 @@ public class QuestionMarkWSDLTestCase extends TestCase {
Port port = service.getPort(newGenerator ? "HelloWorldPort" : "HelloWorldSOAP12port_http");
String endpoint = getSOAP12Endpoint(port);
- String ip = HttpUtils.getIpAddress();
- assertEquals("http://" + ip + ":8085/ep3", endpoint);
+ assertEquals("http://localhost:8085/ep3", endpoint);
}
protected String getSOAP11Endpoint(Port port) {