You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by js...@apache.org on 2007/03/06 21:35:27 UTC

svn commit: r515289 - in /incubator/tuscany/branches/sca-java-integration: sca/extensions/axis2/samples/ sca/extensions/axis2/samples/helloworld-async-ws/ sca/extensions/axis2/samples/helloworld-async-wsclient/ sca/extensions/axis2/samples/helloworld-o...

Author: jsdelfino
Date: Tue Mar  6 12:35:25 2007
New Revision: 515289

URL: http://svn.apache.org/viewvc?view=rev&rev=515289
Log:
Cleaned up Web Service samples. Moved SCATestCaseRunner from tuscany-test to tuscany-core. Removed dependencies on SCATestCase.

Added:
    incubator/tuscany/branches/sca-java-integration/sca/kernel/core/src/main/java/org/apache/tuscany/core/test/
    incubator/tuscany/branches/sca-java-integration/sca/kernel/core/src/main/java/org/apache/tuscany/core/test/SCATestCaseRunner.java   (with props)
Removed:
    incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-om-wsclient/src/test/resources/META-INF/
    incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-wsclient/src/test/resources/
    incubator/tuscany/branches/sca-java-integration/sca/test/src/main/java/org/apache/tuscany/test/ArtifactFactory.java
    incubator/tuscany/branches/sca-java-integration/sca/test/src/main/java/org/apache/tuscany/test/TestLauncher.java
    incubator/tuscany/branches/sca-java-integration/sca/test/src/main/java/org/apache/tuscany/test/binding/
Modified:
    incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-async-ws/pom.xml
    incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-async-wsclient/pom.xml
    incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-om-ws/pom.xml
    incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-om-ws/src/test/java/helloworld/om/HelloWorldServerTestCase.java
    incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-om-wsclient/pom.xml
    incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-om-wsclient/src/test/java/helloworld/om/HelloWorldClientTestCase.java
    incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-om-wsclient/src/test/java/helloworld/om/HelloWorldServerTestCase.java
    incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-ws/pom.xml
    incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-ws/src/test/java/helloworld/HelloWorldServerTestCase.java
    incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-wsclient/pom.xml
    incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-wsclient/src/test/java/helloworld/HelloWorldClientTestCase.java
    incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-wsclient/src/test/java/helloworld/HelloWorldServerTestCase.java
    incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/pom.xml
    incubator/tuscany/branches/sca-java-integration/testing/sca/itest/bindings/bindingsclient/src/test/java/org/apache/tuscany/sca/itest/WSBindingsClientTestCase.java

Modified: incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-async-ws/pom.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-async-ws/pom.xml?view=diff&rev=515289&r1=515288&r2=515289
==============================================================================
--- incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-async-ws/pom.xml (original)
+++ incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-async-ws/pom.xml Tue Mar  6 12:35:25 2007
@@ -22,115 +22,55 @@
         <groupId>org.apache.tuscany.samples.sca</groupId>
         <artifactId>parent</artifactId>
         <version>0.1-integration-incubating-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
     </parent>
     <modelVersion>4.0.0</modelVersion>
     <artifactId>tuscany-sample-helloworld-async-ws</artifactId>
-    <packaging>war</packaging>
-    <name>Tuscany HelloWorld Web Service Sample</name>
+    <packaging>jar</packaging>
+    <name>Apache Tuscany HelloWorld Web Service Sample</name>
     <description>A sample HelloWorld Async Web Service.</description>
 
-    <properties>
-        <ws.type>axis2</ws.type>
-    </properties>
-
     <dependencies>
         <dependency>
-            <groupId>org.osoa</groupId>
-            <artifactId>sca-api-r1.0</artifactId>
-            <version>0.1-integration-incubating-SNAPSHOT</version>
-            <scope>compile</scope>
-        </dependency>
-        <dependency>
             <groupId>org.apache.tuscany.sca.kernel</groupId>
             <artifactId>tuscany-api</artifactId>
-            <version>${pom.version}</version>
-            <scope>compile</scope> <!-- runtime is need for webapp integration to include jar -->
-        </dependency>
-        
-        <dependency>
-            <groupId>commonj</groupId>
-            <artifactId>sdo-api-r2.1</artifactId>
-            <version>0.1-integration-incubating-SNAPSHOT</version>
             <scope>compile</scope>
-        </dependency>        
+            <version>0.1-integration-incubating-SNAPSHOT</version>
+        </dependency>
         <dependency>
             <groupId>org.apache.tuscany.sca.kernel</groupId>
             <artifactId>tuscany-core</artifactId>
-            <version>${pom.version}</version>
-            <scope>runtime</scope> <!-- runtime is need for webapp integration to include jar -->
-        </dependency>
-        <dependency>
-            <groupId>javax.servlet</groupId>
-            <artifactId>servlet-api</artifactId>
-            <version>2.4</version>
-            <scope>provided</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.tuscany.sca.services.bindings</groupId>
-            <artifactId>axis2</artifactId>
-            <version>${pom.version}</version>
-            <scope>runtime</scope> <!-- runtime is need for webapp integration to include jar -->
-        </dependency>
-        <dependency>
-            <groupId>org.apache.tuscany.sca.services.databinding</groupId>
-            <artifactId>databinding-axiom</artifactId>
-            <version>${pom.version}</version>
-            <scope>runtime</scope> <!-- runtime is need for webapp integration to include jar -->
-        </dependency>        
-        <dependency>
-            <groupId>org.apache.tuscany.sca.services.databinding</groupId>
-            <artifactId>databinding-sdo</artifactId>
-            <version>${pom.version}</version>
-            <scope>runtime</scope> <!-- runtime is need for webapp integration to include jar -->
-        </dependency>                
-        <dependency>
-            <groupId>org.apache.tuscany.sca.runtime.webapp</groupId>
-            <artifactId>webapp-api</artifactId>
-            <version>${pom.version}</version>
-            <scope>runtime</scope> <!-- runtime is need for webapp integration to include jar -->
-        </dependency>
-        <dependency>
-            <groupId>org.apache.tuscany.sca.runtime.webapp</groupId>
-            <artifactId>webapp-host</artifactId>
-            <version>${pom.version}</version>
-            <scope>runtime</scope> <!-- runtime is need for webapp integration to include jar -->
-        </dependency>
-        <dependency>
-          <groupId>org.apache.ws.commons.axiom</groupId>
-          <artifactId>axiom-api</artifactId>
-          <version>SNAPSHOT</version>
-          <scope>compile</scope> 
+            <version>0.1-integration-incubating-SNAPSHOT</version>
+            <scope>runtime</scope>
         </dependency>
         <dependency>
-          <groupId>org.apache.ws.commons.axiom</groupId>
-          <artifactId>axiom-impl</artifactId>
-          <version>SNAPSHOT</version>
-          <scope>runtime</scope>
+            <groupId>org.apache.tuscany.sca.extensions.axis2</groupId>
+            <artifactId>tuscany-axis2</artifactId>
+            <scope>runtime</scope>
+            <version>0.1-integration-incubating-SNAPSHOT</version>
         </dependency>
         <dependency>
-            <groupId>junit</groupId>
-            <artifactId>junit</artifactId>
-            <version>3.8.1</version>
-            <scope>test</scope>
+            <groupId>org.apache.tuscany.sca.services</groupId>
+            <artifactId>tuscany-http-jetty</artifactId>
+            <scope>runtime</scope>
+            <version>0.1-integration-incubating-SNAPSHOT</version>
         </dependency>
-        
     </dependencies>
     
     <build>
-        <finalName>sample-helloworldws-async-0.1-integration-incubating-SNAPSHOT</finalName>
         <plugins>
             <plugin>
-                <groupId>org.apache.tuscany.sca.runtime.webapp</groupId>
-                <artifactId>tuscany-war-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <id>tuscany-war</id>
-                        <goals>
-                            <goal>tuscany-war</goal>
-                        </goals>
-                    </execution>
-                </executions>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-jar-plugin</artifactId>
+                <configuration>
+                    <archive>
+                        <manifest>
+                            <mainClass>helloworld.HelloWorldServer</mainClass>
+                        </manifest>
+                    </archive>
+                </configuration>
             </plugin>
         </plugins>
-    </build>    
+    </build>
+
 </project>

Modified: incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-async-wsclient/pom.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-async-wsclient/pom.xml?view=diff&rev=515289&r1=515288&r2=515289
==============================================================================
--- incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-async-wsclient/pom.xml (original)
+++ incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-async-wsclient/pom.xml Tue Mar  6 12:35:25 2007
@@ -22,73 +22,46 @@
         <groupId>org.apache.tuscany.samples.sca</groupId>
         <artifactId>parent</artifactId>
         <version>0.1-integration-incubating-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
     </parent>
     <modelVersion>4.0.0</modelVersion>
     <artifactId>tuscany-sample-helloworld-async-wsclient</artifactId>
     <packaging>jar</packaging>
-    <name>Tuscany HelloWorld Web Service Async Client Sample</name>
+    <name>Apache Tuscany HelloWorld Web Service Async Client Sample</name>
     <description>A sample client for a HelloWorld Web Service.</description>
-    <properties>
-        <ws.type>axis2</ws.type>
-    </properties>
 
     <dependencies>
-    
-        <dependency>
-            <groupId>commonj</groupId>
-            <artifactId>sdo-api-r2.1</artifactId>
-            <version>${tuscanyVersion}</version>
-            <scope>compile</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.osoa</groupId>
-            <artifactId>sca-api-r1.0</artifactId>
-            <version>${tuscanyVersion}</version>
-            <scope>compile</scope>
-        </dependency>
         <dependency>
             <groupId>org.apache.tuscany.sca.kernel</groupId>
             <artifactId>tuscany-api</artifactId>
-            <version>${tuscanyVersion}</version>
-            <scope>compile</scope> 
-        </dependency>    
+            <scope>compile</scope>
+            <version>0.1-integration-incubating-SNAPSHOT</version>
+        </dependency>
+
         <dependency>
             <groupId>org.apache.tuscany.sca.kernel</groupId>
             <artifactId>tuscany-core</artifactId>
-            <version>${tuscanyVersion}</version>
-            <scope>provided</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.tuscany.sca.services.bindings</groupId>
-            <artifactId>axis2</artifactId>
-            <version>${tuscanyVersion}</version>
-            <scope>provided</scope>
+            <version>0.1-integration-incubating-SNAPSHOT</version>
+            <scope>runtime</scope>
         </dependency>
 
         <dependency>
-            <groupId>org.apache.tuscany.sca</groupId>
-            <artifactId>tuscany-test</artifactId>
-            <version>${tuscanyVersion}</version>
-            <scope>test</scope>
+            <groupId>org.apache.tuscany.sca.extensions.axis2</groupId>
+            <artifactId>tuscany-axis2</artifactId>
+            <scope>runtime</scope>
+            <version>0.1-integration-incubating-SNAPSHOT</version>
         </dependency>
 
         <dependency>
-            <groupId>org.apache.tuscany.sca.services.databinding</groupId>
-            <artifactId>databinding-sdo</artifactId>
-            <version>${tuscanyVersion}</version>
+            <groupId>org.apache.tuscany.sca.extensions.axis2.samples</groupId>
+            <artifactId>tuscany-sample-helloworld-async-ws</artifactId>
             <scope>test</scope>
+            <version>0.1-integration-incubating-SNAPSHOT</version>
         </dependency>
 
-        <dependency>
-            <groupId>org.apache.tuscany.sca.services.databinding</groupId>
-            <artifactId>databinding-axiom</artifactId>
-            <version>${tuscanyVersion}</version>
-            <scope>test</scope>
-        </dependency>
-                        
     </dependencies>
-    
-     <build>
+
+    <build>
         <plugins>
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
@@ -103,6 +76,5 @@
             </plugin>
         </plugins>
     </build>
-    
-    
+
 </project>

Modified: incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-om-ws/pom.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-om-ws/pom.xml?view=diff&rev=515289&r1=515288&r2=515289
==============================================================================
--- incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-om-ws/pom.xml (original)
+++ incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-om-ws/pom.xml Tue Mar  6 12:35:25 2007
@@ -32,10 +32,39 @@
     <description>A sample HelloWorld Web Service using Axiom OM.</description>
 
     <dependencies>
+        <dependency>
+            <groupId>org.apache.tuscany.sca.kernel</groupId>
+            <artifactId>tuscany-api</artifactId>
+            <scope>compile</scope>
+            <version>0.1-integration-incubating-SNAPSHOT</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.tuscany.sca.kernel</groupId>
+            <artifactId>tuscany-core</artifactId>
+            <version>0.1-integration-incubating-SNAPSHOT</version>
+            <scope>runtime</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.tuscany.sca.extensions.axis2</groupId>
+            <artifactId>tuscany-axis2</artifactId>
+            <scope>runtime</scope>
+            <version>0.1-integration-incubating-SNAPSHOT</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.tuscany.sca.services</groupId>
+            <artifactId>tuscany-http-jetty</artifactId>
+            <scope>runtime</scope>
+            <version>0.1-integration-incubating-SNAPSHOT</version>
+        </dependency>
 
         <dependency>
             <groupId>org.apache.ws.commons.axiom</groupId>
             <artifactId>axiom-api</artifactId>
+            <version>1.2.2</version>
+            <scope>compile</scope>
         </dependency>
 
     </dependencies>

Modified: incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-om-ws/src/test/java/helloworld/om/HelloWorldServerTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-om-ws/src/test/java/helloworld/om/HelloWorldServerTestCase.java?view=diff&rev=515289&r1=515288&r2=515289
==============================================================================
--- incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-om-ws/src/test/java/helloworld/om/HelloWorldServerTestCase.java (original)
+++ incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-om-ws/src/test/java/helloworld/om/HelloWorldServerTestCase.java Tue Mar  6 12:35:25 2007
@@ -21,14 +21,15 @@
 import java.io.IOException;
 import java.net.Socket;
 
-import org.apache.tuscany.test.SCATestCase;
+import org.apache.tuscany.api.SCAContainer;
 
-public class HelloWorldServerTestCase extends SCATestCase {
+import junit.framework.TestCase;
+
+public class HelloWorldServerTestCase extends TestCase {
 	
 	@Override
 	protected void setUp() throws Exception {
-		setApplicationSCDL("helloworldws-om.composite");
-		super.setUp();
+		SCAContainer.start("helloworldws-om.composite");
 	}
 	
 	public void testPing() throws IOException {
@@ -37,7 +38,7 @@
 	
 	@Override
 	protected void tearDown() throws Exception {
-		super.tearDown();
+		SCAContainer.stop();
 	}
 
 }

Modified: incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-om-wsclient/pom.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-om-wsclient/pom.xml?view=diff&rev=515289&r1=515288&r2=515289
==============================================================================
--- incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-om-wsclient/pom.xml (original)
+++ incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-om-wsclient/pom.xml Tue Mar  6 12:35:25 2007
@@ -33,8 +33,31 @@
 
     <dependencies>
         <dependency>
+            <groupId>org.apache.tuscany.sca.kernel</groupId>
+            <artifactId>tuscany-api</artifactId>
+            <scope>compile</scope>
+            <version>0.1-integration-incubating-SNAPSHOT</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.tuscany.sca.kernel</groupId>
+            <artifactId>tuscany-core</artifactId>
+            <version>0.1-integration-incubating-SNAPSHOT</version>
+            <scope>runtime</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.tuscany.sca.extensions.axis2</groupId>
+            <artifactId>tuscany-axis2</artifactId>
+            <scope>runtime</scope>
+            <version>0.1-integration-incubating-SNAPSHOT</version>
+        </dependency>
+
+        <dependency>
             <groupId>org.apache.ws.commons.axiom</groupId>
             <artifactId>axiom-api</artifactId>
+            <version>1.2.2</version>
+            <scope>compile</scope>
         </dependency>
 
         <dependency>

Modified: incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-om-wsclient/src/test/java/helloworld/om/HelloWorldClientTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-om-wsclient/src/test/java/helloworld/om/HelloWorldClientTestCase.java?view=diff&rev=515289&r1=515288&r2=515289
==============================================================================
--- incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-om-wsclient/src/test/java/helloworld/om/HelloWorldClientTestCase.java (original)
+++ incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-om-wsclient/src/test/java/helloworld/om/HelloWorldClientTestCase.java Tue Mar  6 12:35:25 2007
@@ -19,22 +19,22 @@
 
 package helloworld.om;
 
-import helloworld.om.HelloWorldService;
 import junit.framework.Assert;
+import junit.framework.TestCase;
 
 import org.apache.axiom.om.OMAbstractFactory;
 import org.apache.axiom.om.OMElement;
 import org.apache.axiom.om.OMFactory;
 import org.apache.axiom.om.OMText;
-import org.apache.tuscany.test.SCATestCase;
-import org.apache.tuscany.test.SCATestCaseRunner;
+import org.apache.tuscany.api.SCAContainer;
+import org.apache.tuscany.core.test.SCATestCaseRunner;
 import org.osoa.sca.CompositeContext;
 import org.osoa.sca.CurrentCompositeContext;
 
 /**
  * Test case for helloworld web service client
  */
-public class HelloWorldClientTestCase extends SCATestCase {
+public class HelloWorldClientTestCase extends TestCase {
 
     private HelloWorldService helloWorldService;
 
@@ -42,8 +42,7 @@
 
     @Override
     protected void setUp() throws Exception {
-    	setApplicationSCDL("helloworldwsclient-om.composite");
-        super.setUp();
+    	SCAContainer.start("helloworldwsclient-om.composite");
 
         CompositeContext compositeContext = CurrentCompositeContext.getContext();
         helloWorldService = compositeContext.locateService(HelloWorldService.class, "HelloWorldServiceComponent");
@@ -65,8 +64,8 @@
 
     @Override
     protected void tearDown() throws Exception {
-        super.tearDown();
         server.tearDown();
+        SCAContainer.stop();
     }
 
 }

Modified: incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-om-wsclient/src/test/java/helloworld/om/HelloWorldServerTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-om-wsclient/src/test/java/helloworld/om/HelloWorldServerTestCase.java?view=diff&rev=515289&r1=515288&r2=515289
==============================================================================
--- incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-om-wsclient/src/test/java/helloworld/om/HelloWorldServerTestCase.java (original)
+++ incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-om-wsclient/src/test/java/helloworld/om/HelloWorldServerTestCase.java Tue Mar  6 12:35:25 2007
@@ -21,14 +21,15 @@
 import java.io.IOException;
 import java.net.Socket;
 
-import org.apache.tuscany.test.SCATestCase;
+import junit.framework.TestCase;
 
-public class HelloWorldServerTestCase extends SCATestCase {
+import org.apache.tuscany.api.SCAContainer;
+
+public class HelloWorldServerTestCase extends TestCase {
 	
 	@Override
 	protected void setUp() throws Exception {
-		setApplicationSCDL("helloworldws-om.composite");
-		super.setUp();
+		SCAContainer.start("helloworldws-om.composite");
 	}
 	
 	public void testPing() throws IOException {
@@ -37,7 +38,7 @@
 	
 	@Override
 	protected void tearDown() throws Exception {
-		super.tearDown();
+		SCAContainer.stop();
 	}
 
 }

Modified: incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-ws/pom.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-ws/pom.xml?view=diff&rev=515289&r1=515288&r2=515289
==============================================================================
--- incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-ws/pom.xml (original)
+++ incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-ws/pom.xml Tue Mar  6 12:35:25 2007
@@ -31,6 +31,33 @@
     <name>Tuscany HelloWorld Web Service Sample</name>
     <description>A sample HelloWorld Web Service.</description>
 
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.tuscany.sca.kernel</groupId>
+            <artifactId>tuscany-api</artifactId>
+            <scope>compile</scope>
+            <version>0.1-integration-incubating-SNAPSHOT</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.tuscany.sca.kernel</groupId>
+            <artifactId>tuscany-core</artifactId>
+            <version>0.1-integration-incubating-SNAPSHOT</version>
+            <scope>runtime</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.tuscany.sca.extensions.axis2</groupId>
+            <artifactId>tuscany-axis2</artifactId>
+            <scope>runtime</scope>
+            <version>0.1-integration-incubating-SNAPSHOT</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.tuscany.sca.services</groupId>
+            <artifactId>tuscany-http-jetty</artifactId>
+            <scope>runtime</scope>
+            <version>0.1-integration-incubating-SNAPSHOT</version>
+        </dependency>
+    </dependencies>
+    
     <build>
         <plugins>
             <plugin>

Modified: incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-ws/src/test/java/helloworld/HelloWorldServerTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-ws/src/test/java/helloworld/HelloWorldServerTestCase.java?view=diff&rev=515289&r1=515288&r2=515289
==============================================================================
--- incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-ws/src/test/java/helloworld/HelloWorldServerTestCase.java (original)
+++ incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-ws/src/test/java/helloworld/HelloWorldServerTestCase.java Tue Mar  6 12:35:25 2007
@@ -21,14 +21,15 @@
 import java.io.IOException;
 import java.net.Socket;
 
-import org.apache.tuscany.test.SCATestCase;
+import org.apache.tuscany.api.SCAContainer;
 
-public class HelloWorldServerTestCase extends SCATestCase {
+import junit.framework.TestCase;
+
+public class HelloWorldServerTestCase extends TestCase {
 	
 	@Override
 	protected void setUp() throws Exception {
-		setApplicationSCDL("helloworldws.composite");
-		super.setUp();
+		SCAContainer.start("helloworldws.composite");
 	}
 	
 	public void testPing() throws IOException {
@@ -37,7 +38,7 @@
 	
 	@Override
 	protected void tearDown() throws Exception {
-		super.tearDown();
+		SCAContainer.stop();
 	}
 
 }

Modified: incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-wsclient/pom.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-wsclient/pom.xml?view=diff&rev=515289&r1=515288&r2=515289
==============================================================================
--- incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-wsclient/pom.xml (original)
+++ incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-wsclient/pom.xml Tue Mar  6 12:35:25 2007
@@ -32,6 +32,26 @@
     <description>A sample client for a HelloWorld Web Service.</description>
 
     <dependencies>
+        <dependency>
+            <groupId>org.apache.tuscany.sca.kernel</groupId>
+            <artifactId>tuscany-api</artifactId>
+            <scope>compile</scope>
+            <version>0.1-integration-incubating-SNAPSHOT</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.tuscany.sca.kernel</groupId>
+            <artifactId>tuscany-core</artifactId>
+            <version>0.1-integration-incubating-SNAPSHOT</version>
+            <scope>runtime</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.tuscany.sca.extensions.axis2</groupId>
+            <artifactId>tuscany-axis2</artifactId>
+            <scope>runtime</scope>
+            <version>0.1-integration-incubating-SNAPSHOT</version>
+        </dependency>
 
         <dependency>
             <groupId>org.apache.tuscany.sca.extensions.axis2.samples</groupId>
@@ -55,20 +75,6 @@
                     </archive>
                 </configuration>
             </plugin>
-                <plugin>
-                    <groupId>org.apache.maven.plugins</groupId>
-                    <artifactId>maven-surefire-plugin</artifactId>
-                    <version>2.2</version>
-                    <configuration>
-                        <includes>
-                            <include>**/*TestCase.java</include>
-                        </includes>
-                        <reportFormat>brief</reportFormat>
-                        <useFile>false</useFile>
-                        <forkMode>never</forkMode>
-                        <argLine>-ea</argLine>
-                    </configuration>
-                </plugin>
         </plugins>
     </build>
 

Modified: incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-wsclient/src/test/java/helloworld/HelloWorldClientTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-wsclient/src/test/java/helloworld/HelloWorldClientTestCase.java?view=diff&rev=515289&r1=515288&r2=515289
==============================================================================
--- incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-wsclient/src/test/java/helloworld/HelloWorldClientTestCase.java (original)
+++ incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-wsclient/src/test/java/helloworld/HelloWorldClientTestCase.java Tue Mar  6 12:35:25 2007
@@ -20,16 +20,17 @@
 package helloworld;
 
 import junit.framework.Assert;
+import junit.framework.TestCase;
 
-import org.apache.tuscany.test.SCATestCase;
-import org.apache.tuscany.test.SCATestCaseRunner;
+import org.apache.tuscany.api.SCAContainer;
+import org.apache.tuscany.core.test.SCATestCaseRunner;
 import org.osoa.sca.CompositeContext;
 import org.osoa.sca.CurrentCompositeContext;
 
 /**
  * Test case for helloworld web service client 
  */
-public class HelloWorldClientTestCase extends SCATestCase {
+public class HelloWorldClientTestCase extends TestCase {
 
     private HelloWorldService helloWorldService;
     
@@ -37,8 +38,7 @@
 
     @Override
     protected void setUp() throws Exception {
-    	setApplicationSCDL("helloworldwsclient.composite");
-        super.setUp();
+    	SCAContainer.start("helloworldwsclient.composite");
         
         CompositeContext compositeContext = CurrentCompositeContext.getContext();
         helloWorldService = compositeContext.locateService(HelloWorldService.class, "HelloWorldServiceComponent");
@@ -47,10 +47,6 @@
         server.setUp();
     }
     
-//    public void testPingServer() {
-//    	server.run("testPing");
-//    }
-
     public void testWSClient() throws Exception {
         String msg = helloWorldService.getGreetings("Smith");
         Assert.assertEquals("Hello Smith", msg);
@@ -58,8 +54,8 @@
     
     @Override
     protected void tearDown() throws Exception {
-    	super.tearDown();
     	server.tearDown();
+    	SCAContainer.stop();
     }
 
 }

Modified: incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-wsclient/src/test/java/helloworld/HelloWorldServerTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-wsclient/src/test/java/helloworld/HelloWorldServerTestCase.java?view=diff&rev=515289&r1=515288&r2=515289
==============================================================================
--- incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-wsclient/src/test/java/helloworld/HelloWorldServerTestCase.java (original)
+++ incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/helloworld-wsclient/src/test/java/helloworld/HelloWorldServerTestCase.java Tue Mar  6 12:35:25 2007
@@ -21,14 +21,15 @@
 import java.io.IOException;
 import java.net.Socket;
 
-import org.apache.tuscany.test.SCATestCase;
+import org.apache.tuscany.api.SCAContainer;
 
-public class HelloWorldServerTestCase extends SCATestCase {
+import junit.framework.TestCase;
+
+public class HelloWorldServerTestCase extends TestCase {
 	
 	@Override
 	protected void setUp() throws Exception {
-		setApplicationSCDL("helloworldws.composite");
-		super.setUp();
+		SCAContainer.start("helloworldws.composite");
 	}
 	
 	public void testPing() throws IOException {
@@ -37,7 +38,7 @@
 	
 	@Override
 	protected void tearDown() throws Exception {
-		super.tearDown();
+		SCAContainer.stop();
 	}
 
 }

Modified: incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/pom.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/pom.xml?view=diff&rev=515289&r1=515288&r2=515289
==============================================================================
--- incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/pom.xml (original)
+++ incubator/tuscany/branches/sca-java-integration/sca/extensions/axis2/samples/pom.xml Tue Mar  6 12:35:25 2007
@@ -78,6 +78,8 @@
               <module>helloworld-wsclient</module>
               <module>helloworld-om-ws</module>
               <module>helloworld-om-wsclient</module>
+              <module>helloworld-async-ws</module>
+              <module>helloworld-async-wsclient</module>
             </modules>
         </profile>
 
@@ -88,57 +90,12 @@
               <module>helloworld-wsclient</module>
               <module>helloworld-om-ws</module>
               <module>helloworld-om-wsclient</module>
+              <module>helloworld-async-ws</module>
+              <module>helloworld-async-wsclient</module>
           </modules>
         </profile>
 
       </profiles>
-
-    <modules>
-    </modules>
-
-    <dependencyManagement>
-        <dependencies>
-            <dependency>
-                <groupId>org.apache.tuscany.sca.services</groupId>
-                <artifactId>tuscany-http-jetty</artifactId>
-                <scope>test</scope>
-                <version>0.1-integration-incubating-SNAPSHOT</version>
-            </dependency>        
-        </dependencies>
-    </dependencyManagement>
-
-    <dependencies>
-        <dependency>
-            <groupId>org.apache.tuscany.sca.kernel</groupId>
-            <artifactId>tuscany-api</artifactId>
-            <scope>compile</scope>
-            <version>0.1-integration-incubating-SNAPSHOT</version>
-        </dependency>        
-        <dependency>
-            <groupId>org.apache.tuscany.sca.kernel</groupId>
-            <artifactId>tuscany-core</artifactId>
-            <version>0.1-integration-incubating-SNAPSHOT</version>
-            <scope>runtime</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.tuscany.sca.extensions.axis2</groupId>
-            <artifactId>tuscany-axis2</artifactId>
-            <scope>runtime</scope>
-            <version>0.1-integration-incubating-SNAPSHOT</version>
-        </dependency>        
-        <dependency>
-            <groupId>org.apache.tuscany.sca.services</groupId>
-            <artifactId>tuscany-http-jetty</artifactId>
-            <scope>runtime</scope>
-            <version>0.1-integration-incubating-SNAPSHOT</version>
-        </dependency>        
-        <dependency>
-            <groupId>org.apache.tuscany.sca</groupId>
-            <artifactId>tuscany-test</artifactId>
-            <version>0.1-integration-incubating-SNAPSHOT</version>
-            <scope>test</scope>
-        </dependency>
-    </dependencies>
 
     <build>
         <plugins>

Added: incubator/tuscany/branches/sca-java-integration/sca/kernel/core/src/main/java/org/apache/tuscany/core/test/SCATestCaseRunner.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-integration/sca/kernel/core/src/main/java/org/apache/tuscany/core/test/SCATestCaseRunner.java?view=auto&rev=515289
==============================================================================
--- incubator/tuscany/branches/sca-java-integration/sca/kernel/core/src/main/java/org/apache/tuscany/core/test/SCATestCaseRunner.java (added)
+++ incubator/tuscany/branches/sca-java-integration/sca/kernel/core/src/main/java/org/apache/tuscany/core/test/SCATestCaseRunner.java Tue Mar  6 12:35:25 2007
@@ -0,0 +1,144 @@
+/*
+ * 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.    
+ */
+package org.apache.tuscany.core.test;
+
+import java.lang.reflect.Constructor;
+import java.lang.reflect.Method;
+import java.net.URL;
+import java.net.URLClassLoader;
+
+/**
+ * A helper class that can be used to run an SCA JUnit test case. The test case
+ * will run in an isolated class loader.
+ * 
+ * @version $Rev$ $Date$
+ */
+public class SCATestCaseRunner {
+
+    private ClassLoader classLoader;
+    private Class testSuiteClass;
+    private Object testSuite;
+    private Class testResultClass;
+    private Class testCaseClass;
+    private Object testCase;
+
+    /**
+     * Constructs a new TestCase runner.
+     * 
+     * @param testClass
+     */
+    public SCATestCaseRunner(Class testClass) {
+        try {
+            classLoader = (URLClassLoader)testClass.getClassLoader();
+            if (classLoader instanceof URLClassLoader) {
+                URL[] urls = ((URLClassLoader)classLoader).getURLs();
+                classLoader = new URLClassLoader(urls, classLoader.getParent());
+            } else {
+                classLoader = new URLClassLoader(new URL[0], classLoader);
+            }
+
+            ClassLoader tccl = Thread.currentThread().getContextClassLoader();
+            try {
+                Thread.currentThread().setContextClassLoader(classLoader);
+
+                testCaseClass = Class.forName(testClass.getName(), true, classLoader);
+                testCase = testCaseClass.newInstance();
+
+                testSuiteClass = Class.forName("junit.framework.TestSuite", true, classLoader);
+                Constructor testSuiteConstructor = testSuiteClass.getConstructor(Class.class);
+                testSuite = testSuiteConstructor.newInstance(testCaseClass);
+
+                testResultClass = Class.forName("junit.framework.TestResult", true, classLoader);
+
+            } finally {
+                Thread.currentThread().setContextClassLoader(tccl);
+            }
+        } catch (Exception e) {
+            throw new RuntimeException(e);
+        }
+    }
+
+    /**
+     * Run the test case
+     */
+    public void run() {
+        ClassLoader tccl = Thread.currentThread().getContextClassLoader();
+        try {
+            Thread.currentThread().setContextClassLoader(classLoader);
+            Object testResult = testResultClass.newInstance();
+            Method runMethod = testSuiteClass.getMethod("run", testResultClass);
+            runMethod.invoke(testSuite, testResult);
+        } catch (Exception e) {
+            throw new RuntimeException(e);
+        } finally {
+            Thread.currentThread().setContextClassLoader(tccl);
+        }
+    }
+
+    /**
+     * Invoke the setUp method
+     */
+    public void setUp() {
+        ClassLoader tccl = Thread.currentThread().getContextClassLoader();
+        try {
+            Thread.currentThread().setContextClassLoader(classLoader);
+            Method setUpMethod = testCaseClass.getDeclaredMethod("setUp");
+            setUpMethod.setAccessible(true);
+            setUpMethod.invoke(testCase);
+        } catch (Exception e) {
+            throw new RuntimeException(e);
+        } finally {
+            Thread.currentThread().setContextClassLoader(tccl);
+        }
+    }
+
+    /**
+     * Invoke the tearDown method
+     */
+    public void tearDown() {
+        ClassLoader tccl = Thread.currentThread().getContextClassLoader();
+        try {
+            Thread.currentThread().setContextClassLoader(classLoader);
+            Method tearDownMethod = testCaseClass.getDeclaredMethod("tearDown");
+            tearDownMethod.setAccessible(true);
+            tearDownMethod.invoke(testCase);
+        } catch (Exception e) {
+            throw new RuntimeException(e);
+        } finally {
+            Thread.currentThread().setContextClassLoader(tccl);
+        }
+    }
+
+    /**
+     * Invoke the specified test method.
+     */
+    public void run(String methodName) {
+        ClassLoader tccl = Thread.currentThread().getContextClassLoader();
+        try {
+            Thread.currentThread().setContextClassLoader(classLoader);
+            Method testMethod = testCaseClass.getMethod(methodName);
+            testMethod.invoke(testCase);
+        } catch (Exception e) {
+            throw new RuntimeException(e);
+        } finally {
+            Thread.currentThread().setContextClassLoader(tccl);
+        }
+    }
+
+}

Propchange: incubator/tuscany/branches/sca-java-integration/sca/kernel/core/src/main/java/org/apache/tuscany/core/test/SCATestCaseRunner.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/branches/sca-java-integration/sca/kernel/core/src/main/java/org/apache/tuscany/core/test/SCATestCaseRunner.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: incubator/tuscany/branches/sca-java-integration/testing/sca/itest/bindings/bindingsclient/src/test/java/org/apache/tuscany/sca/itest/WSBindingsClientTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-integration/testing/sca/itest/bindings/bindingsclient/src/test/java/org/apache/tuscany/sca/itest/WSBindingsClientTestCase.java?view=diff&rev=515289&r1=515288&r2=515289
==============================================================================
--- incubator/tuscany/branches/sca-java-integration/testing/sca/itest/bindings/bindingsclient/src/test/java/org/apache/tuscany/sca/itest/WSBindingsClientTestCase.java (original)
+++ incubator/tuscany/branches/sca-java-integration/testing/sca/itest/bindings/bindingsclient/src/test/java/org/apache/tuscany/sca/itest/WSBindingsClientTestCase.java Tue Mar  6 12:35:25 2007
@@ -21,9 +21,9 @@
 
 import java.lang.reflect.UndeclaredThrowableException;
 
+import org.apache.tuscany.core.test.SCATestCaseRunner;
 import org.apache.tuscany.sca.util.SCATestUtilityServerTestCase;
 import org.apache.tuscany.test.SCATestCase;
-import org.apache.tuscany.test.SCATestCaseRunner;
 import org.osoa.sca.CompositeContext;
 import org.osoa.sca.CurrentCompositeContext;
 



---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org