summaryrefslogtreecommitdiffstats
path: root/branches/sca-java-1.3/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding
diff options
context:
space:
mode:
Diffstat (limited to 'branches/sca-java-1.3/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding')
-rw-r--r--branches/sca-java-1.3/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/QuestionMarkWSDLImportTestCase.java (renamed from branches/sca-java-1.3/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/QuestionMarkWSDLImportTestCaseFIXME.java)16
-rw-r--r--branches/sca-java-1.3/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/QuestionMarkWSDLIncludeTestCase.java (renamed from branches/sca-java-1.3/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/QuestionMarkWSDLIncludeTestCaseFIXME.java)16
-rw-r--r--branches/sca-java-1.3/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/QuestionMarkWSDLTestCase.java10
3 files changed, 33 insertions, 9 deletions
diff --git a/branches/sca-java-1.3/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/QuestionMarkWSDLImportTestCaseFIXME.java b/branches/sca-java-1.3/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/QuestionMarkWSDLImportTestCase.java
index 6ecba4782a..bfccb62cc7 100644
--- a/branches/sca-java-1.3/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/QuestionMarkWSDLImportTestCaseFIXME.java
+++ b/branches/sca-java-1.3/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/QuestionMarkWSDLImportTestCase.java
@@ -19,6 +19,10 @@
package org.apache.tuscany.sca.binding.ws.axis2.itests;
+import java.io.BufferedReader;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.net.URL;
import java.util.List;
import javax.wsdl.Definition;
@@ -39,7 +43,7 @@ import org.apache.tuscany.sca.host.embedded.SCADomain;
*
* @version $Rev$ $Date$
*/
-public class QuestionMarkWSDLImportTestCaseFIXME extends TestCase {
+public class QuestionMarkWSDLImportTestCase extends TestCase {
private SCADomain domain;
@@ -47,13 +51,21 @@ public class QuestionMarkWSDLImportTestCaseFIXME extends TestCase {
* Tests ?wsdl works and returns the correct port endpoint from the WSDL
*/
public void testWSDLImportPortEndpoint() throws Exception {
+ InputStream inp = new URL("http://localhost:8086/AccountService?wsdl").openStream();
+ BufferedReader br = new BufferedReader(new InputStreamReader(inp));
+ String line;
+ while((line = br.readLine()) != null) {
+ System.out.println(line);
+ }
+ br.close();
+
WSDLReader wsdlReader = WSDLFactory.newInstance().newWSDLReader();
wsdlReader.setFeature("javax.wsdl.verbose", false);
wsdlReader.setFeature("javax.wsdl.importDocuments", true);
Definition definition = wsdlReader.readWSDL("http://localhost:8086/AccountService?wsdl");
assertNotNull(definition);
- Service service = definition.getService(new QName("http://account2", "AccountService"));
+ Service service = definition.getService(new QName("http://account2/AccountService/$promoted$.ep1", "AccountService"));
Port port = service.getPort("AccountSoapPort");
String endpoint = getEndpoint(port);
diff --git a/branches/sca-java-1.3/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/QuestionMarkWSDLIncludeTestCaseFIXME.java b/branches/sca-java-1.3/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/QuestionMarkWSDLIncludeTestCase.java
index 6a0ab74135..aa54316660 100644
--- a/branches/sca-java-1.3/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/QuestionMarkWSDLIncludeTestCaseFIXME.java
+++ b/branches/sca-java-1.3/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/QuestionMarkWSDLIncludeTestCase.java
@@ -19,6 +19,10 @@
package org.apache.tuscany.sca.binding.ws.axis2.itests;
+import java.io.BufferedReader;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.net.URL;
import java.util.List;
import javax.wsdl.Definition;
@@ -39,7 +43,7 @@ import org.apache.tuscany.sca.host.embedded.SCADomain;
*
* @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;
@@ -47,13 +51,21 @@ public class QuestionMarkWSDLIncludeTestCaseFIXME extends TestCase {
* Tests ?wsdl works and returns the correct port endpoint from the WSDL
*/
public void testWSDLIncludePortEndpoint() throws Exception {
+ InputStream inp = new URL("http://localhost:8085/AccountService?wsdl").openStream();
+ BufferedReader br = new BufferedReader(new InputStreamReader(inp));
+ String line;
+ while((line = br.readLine()) != null) {
+ System.out.println(line);
+ }
+ br.close();
+
WSDLReader wsdlReader = WSDLFactory.newInstance().newWSDLReader();
wsdlReader.setFeature("javax.wsdl.verbose", false);
wsdlReader.setFeature("javax.wsdl.importDocuments", true);
Definition definition = wsdlReader.readWSDL("http://localhost:8085/AccountService?wsdl");
assertNotNull(definition);
- Service service = definition.getService(new QName("http://accounts", "AccountService"));
+ Service service = definition.getService(new QName("http://accounts/AccountService/$promoted$.ep1", "AccountService"));
Port port = service.getPort("AccountSoapPort");
String endpoint = getEndpoint(port);
diff --git a/branches/sca-java-1.3/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/QuestionMarkWSDLTestCase.java b/branches/sca-java-1.3/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/QuestionMarkWSDLTestCase.java
index 2b62c3b013..ac9da19119 100644
--- a/branches/sca-java-1.3/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/QuestionMarkWSDLTestCase.java
+++ b/branches/sca-java-1.3/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/QuestionMarkWSDLTestCase.java
@@ -45,7 +45,6 @@ import org.apache.tuscany.sca.host.embedded.SCADomain;
*/
public class QuestionMarkWSDLTestCase extends TestCase {
- private static boolean newGenerator = true;
private SCADomain domain;
/**
@@ -59,6 +58,7 @@ public class QuestionMarkWSDLTestCase extends TestCase {
System.out.println(line);
}
br.close();
+
WSDLReader wsdlReader = WSDLFactory.newInstance().newWSDLReader();
wsdlReader.setFeature("javax.wsdl.verbose",false);
wsdlReader.setFeature("javax.wsdl.importDocuments",true);
@@ -85,16 +85,16 @@ public class QuestionMarkWSDLTestCase extends TestCase {
System.out.println(line);
}
br.close();
+
WSDLReader wsdlReader = WSDLFactory.newInstance().newWSDLReader();
wsdlReader.setFeature("javax.wsdl.verbose",false);
wsdlReader.setFeature("javax.wsdl.importDocuments",true);
Definition definition = wsdlReader.readWSDL("http://localhost:8085/foo/bar?wsdl");
assertNotNull(definition);
- Service service = definition.getService(new QName(
- "http://itests.axis2.ws.binding.sca.tuscany.apache.org" + (newGenerator ? "/" : ""),
- newGenerator ? "HelloWorldService" : "HelloWorld"));
- Port port = service.getPort(newGenerator ? "HelloWorldPort" : "HelloWorldSOAP11port_http");
+ Service service = definition.getService(new QName("http://itests.axis2.ws.binding.sca.tuscany.apache.org/",
+ "HelloWorldService"));
+ Port port = service.getPort("HelloWorldPort");
String endpoint = getEndpoint(port);
String ip = HttpUtils.getIpAddress();