From 1623bce81d34a7500b27ad604d8e72055fd3002f Mon Sep 17 00:00:00 2001 From: edwardsmj Date: Wed, 10 Dec 2008 13:29:12 +0000 Subject: Added a JAX-WS client and a related server side testcase git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@725276 13f79535-47bb-0310-9956-ffa450edef68 --- java/sca/stest/sampleTest/pom.xml | 18 ++++++++-- .../src/main/resources/Test_ASM_0001.composite | 1 + .../src/main/resources/Test_ASM_0101.composite | 42 ++++++++++++++++++++++ .../src/test/java/client/BaseJAXWSTest.java | 11 +++++- 4 files changed, 69 insertions(+), 3 deletions(-) create mode 100644 java/sca/stest/sampleTest/src/main/resources/Test_ASM_0101.composite (limited to 'java/sca') diff --git a/java/sca/stest/sampleTest/pom.xml b/java/sca/stest/sampleTest/pom.xml index 2e396d9ff7..6b405ff519 100644 --- a/java/sca/stest/sampleTest/pom.xml +++ b/java/sca/stest/sampleTest/pom.xml @@ -21,9 +21,9 @@ 4.0.0 org.apache.tuscany.sca - tuscany-sca + tuscany-stests 2.0-SNAPSHOT - ../../pom.xml + ../pom.xml stest-sampleTest Apache Tuscany SCA Specification Sample Testcase @@ -76,6 +76,20 @@ runtime + + org.apache.tuscany.sca + tuscany-binding-ws-xml + 2.0-SNAPSHOT + runtime + + + + org.apache.tuscany.sca + tuscany-binding-ws-axis2 + 2.0-SNAPSHOT + runtime + + junit junit diff --git a/java/sca/stest/sampleTest/src/main/resources/Test_ASM_0001.composite b/java/sca/stest/sampleTest/src/main/resources/Test_ASM_0001.composite index ac9bb3ea00..a23a333013 100644 --- a/java/sca/stest/sampleTest/src/main/resources/Test_ASM_0001.composite +++ b/java/sca/stest/sampleTest/src/main/resources/Test_ASM_0001.composite @@ -26,6 +26,7 @@ + diff --git a/java/sca/stest/sampleTest/src/main/resources/Test_ASM_0101.composite b/java/sca/stest/sampleTest/src/main/resources/Test_ASM_0101.composite new file mode 100644 index 0000000000..c6a44392b4 --- /dev/null +++ b/java/sca/stest/sampleTest/src/main/resources/Test_ASM_0101.composite @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + diff --git a/java/sca/stest/sampleTest/src/test/java/client/BaseJAXWSTest.java b/java/sca/stest/sampleTest/src/test/java/client/BaseJAXWSTest.java index cedf2e1992..d95421ac08 100644 --- a/java/sca/stest/sampleTest/src/test/java/client/BaseJAXWSTest.java +++ b/java/sca/stest/sampleTest/src/test/java/client/BaseJAXWSTest.java @@ -29,6 +29,9 @@ import org.junit.Before; import org.junit.Test; import org.osoa.sca.annotations.Reference; +import javax.xml.ws.Service; +import javax.xml.namespace.QName; + import test.ASM_0001_Client; import test.TestInvocation; @@ -71,6 +74,12 @@ public class BaseJAXWSTest { } public String invokeTest( String input ) { + //Web service invocation + QName serviceName = new QName("http://localhost:8080", "TestInvocation"); + javax.xml.ws.Service webService = Service.create(serviceName); + TestInvocation wsProxy = (TestInvocation) webService.getPort(testConfiguration.getServiceInterface()); + String output = wsProxy.invokeTest(input); + System.out.println("web service invoked - output = " + output); TestInvocation service = (TestInvocation) getService( testConfiguration.getServiceInterface(), testConfiguration.getTestServiceName() ); @@ -112,7 +121,7 @@ public class BaseJAXWSTest { config.testName = "ASM_0001"; config.input = "request"; config.output = config.testName + " " + config.input + " invoked ok"; - config.composite = "Test_ASM_0001.composite"; + config.composite = "Test_ASM_0101.composite"; config.testServiceName = "TestClient"; config.testClass = ASM_0001_Client.class; config.serviceInterface = TestInvocation.class; -- cgit v1.2.3