You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by ed...@apache.org on 2008/12/10 14:29:13 UTC

svn commit: r725276 - in /tuscany/java/sca/stest/sampleTest: pom.xml src/main/resources/Test_ASM_0001.composite src/main/resources/Test_ASM_0101.composite src/test/java/client/BaseJAXWSTest.java

Author: edwardsmj
Date: Wed Dec 10 05:29:12 2008
New Revision: 725276

URL: http://svn.apache.org/viewvc?rev=725276&view=rev
Log:
Added a JAX-WS client and a related server side testcase

Added:
    tuscany/java/sca/stest/sampleTest/src/main/resources/Test_ASM_0101.composite
Modified:
    tuscany/java/sca/stest/sampleTest/pom.xml
    tuscany/java/sca/stest/sampleTest/src/main/resources/Test_ASM_0001.composite
    tuscany/java/sca/stest/sampleTest/src/test/java/client/BaseJAXWSTest.java

Modified: tuscany/java/sca/stest/sampleTest/pom.xml
URL: http://svn.apache.org/viewvc/tuscany/java/sca/stest/sampleTest/pom.xml?rev=725276&r1=725275&r2=725276&view=diff
==============================================================================
--- tuscany/java/sca/stest/sampleTest/pom.xml (original)
+++ tuscany/java/sca/stest/sampleTest/pom.xml Wed Dec 10 05:29:12 2008
@@ -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>

Modified: tuscany/java/sca/stest/sampleTest/src/main/resources/Test_ASM_0001.composite
URL: http://svn.apache.org/viewvc/tuscany/java/sca/stest/sampleTest/src/main/resources/Test_ASM_0001.composite?rev=725276&r1=725275&r2=725276&view=diff
==============================================================================
--- tuscany/java/sca/stest/sampleTest/src/main/resources/Test_ASM_0001.composite (original)
+++ tuscany/java/sca/stest/sampleTest/src/main/resources/Test_ASM_0001.composite Wed Dec 10 05:29:12 2008
@@ -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>

Added: tuscany/java/sca/stest/sampleTest/src/main/resources/Test_ASM_0101.composite
URL: http://svn.apache.org/viewvc/tuscany/java/sca/stest/sampleTest/src/main/resources/Test_ASM_0101.composite?rev=725276&view=auto
==============================================================================
--- tuscany/java/sca/stest/sampleTest/src/main/resources/Test_ASM_0101.composite (added)
+++ tuscany/java/sca/stest/sampleTest/src/main/resources/Test_ASM_0101.composite Wed Dec 10 05:29:12 2008
@@ -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>

Modified: tuscany/java/sca/stest/sampleTest/src/test/java/client/BaseJAXWSTest.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/stest/sampleTest/src/test/java/client/BaseJAXWSTest.java?rev=725276&r1=725275&r2=725276&view=diff
==============================================================================
--- tuscany/java/sca/stest/sampleTest/src/test/java/client/BaseJAXWSTest.java (original)
+++ tuscany/java/sca/stest/sampleTest/src/test/java/client/BaseJAXWSTest.java Wed Dec 10 05:29:12 2008
@@ -29,6 +29,9 @@
 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 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 @@
     	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;