summaryrefslogtreecommitdiffstats
path: root/java
diff options
context:
space:
mode:
Diffstat (limited to 'java')
-rw-r--r--java/sca/stest/sampleTest/pom.xml18
-rw-r--r--java/sca/stest/sampleTest/src/main/resources/Test_ASM_0001.composite1
-rw-r--r--java/sca/stest/sampleTest/src/main/resources/Test_ASM_0101.composite42
-rw-r--r--java/sca/stest/sampleTest/src/test/java/client/BaseJAXWSTest.java11
4 files changed, 69 insertions, 3 deletions
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 @@
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-sca</artifactId>
+ <artifactId>tuscany-stests</artifactId>
<version>2.0-SNAPSHOT</version>
- <relativePath>../../pom.xml</relativePath>
+ <relativePath>../pom.xml</relativePath>
</parent>
<artifactId>stest-sampleTest</artifactId>
<name>Apache Tuscany SCA Specification Sample Testcase</name>
@@ -77,6 +77,20 @@
</dependency>
<dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-binding-ws-xml</artifactId>
+ <version>2.0-SNAPSHOT</version>
+ <scope>runtime</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-binding-ws-axis2</artifactId>
+ <version>2.0-SNAPSHOT</version>
+ <scope>runtime</scope>
+ </dependency>
+
+ <dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.5</version>
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 @@
<implementation.java class="test.ASM_0001_Client"/>
<service name="TestInvocation">
<interface.java interface="test.TestInvocation"/>
+ <binding.sca/>
</service>
<!-- reference name="testRef1" target="TestComponent1/service1" / -->
</component>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ targetNamespace="http://oasis/tests"
+ xmlns:sample="http://oasis/tests"
+ name="TEST_ASM_0101">
+
+ <component name="TestClient">
+ <implementation.java class="test.ASM_0001_Client"/>
+ <service name="TestInvocation">
+ <interface.java interface="test.TestInvocation"/>
+ <binding.sca/>
+ <binding.ws/>
+ </service>
+ <!-- reference name="testRef1" target="TestComponent1/service1" / -->
+ </component>
+
+<!--
+ <component name="TestComponent1">
+ <implementation.java class="test.ASM_0001_Impl1"/>
+ <service name="service1"/>
+ </component>
+-->
+
+</composite>
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;