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/04/24 07:13:17 UTC

svn commit: r531727 - in /incubator/tuscany/java/sca/samples: ./ helloworld-ws/ helloworld-ws/src/main/java/helloworld/ helloworld-ws/src/main/resources/ helloworld-ws/src/test/java/helloworld/ helloworld-wsclient/ helloworld-wsclient/src/main/java/hel...

Author: jsdelfino
Date: Mon Apr 23 22:13:16 2007
New Revision: 531727

URL: http://svn.apache.org/viewvc?view=rev&rev=531727
Log:
Bring up of helloworld-ws and helloworld-wsclient WS binding samples.

Removed:
    incubator/tuscany/java/sca/samples/helloworld-ws/src/main/resources/system.composite
Modified:
    incubator/tuscany/java/sca/samples/helloworld-ws/pom.xml
    incubator/tuscany/java/sca/samples/helloworld-ws/src/main/java/helloworld/HelloWorldServer.java
    incubator/tuscany/java/sca/samples/helloworld-ws/src/main/resources/helloworldws.composite
    incubator/tuscany/java/sca/samples/helloworld-ws/src/test/java/helloworld/HelloWorldServerTestCase.java
    incubator/tuscany/java/sca/samples/helloworld-wsclient/pom.xml
    incubator/tuscany/java/sca/samples/helloworld-wsclient/src/main/java/helloworld/HelloWorldClient.java
    incubator/tuscany/java/sca/samples/helloworld-wsclient/src/main/resources/helloworldwsclient.composite
    incubator/tuscany/java/sca/samples/helloworld-wsclient/src/test/java/helloworld/HelloWorldClientTestCase.java
    incubator/tuscany/java/sca/samples/helloworld-wsclient/src/test/java/helloworld/HelloWorldServerTest.java
    incubator/tuscany/java/sca/samples/pom.xml

Modified: incubator/tuscany/java/sca/samples/helloworld-ws/pom.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/samples/helloworld-ws/pom.xml?view=diff&rev=531727&r1=531726&r2=531727
==============================================================================
--- incubator/tuscany/java/sca/samples/helloworld-ws/pom.xml (original)
+++ incubator/tuscany/java/sca/samples/helloworld-ws/pom.xml Mon Apr 23 22:13:16 2007
@@ -18,49 +18,42 @@
     * under the License.    
 -->
 <project>
+    <modelVersion>4.0.0</modelVersion>
     <parent>
-        <groupId>org.apache.tuscany.sca.extensions.axis2.samples</groupId>
-        <artifactId>parent</artifactId>
-        <version>0.1-integration-incubating-SNAPSHOT</version>
+        <groupId>org.apache.tuscany.sca</groupId>
+        <artifactId>tuscany-samples</artifactId>
+        <version>1.0-incubating-SNAPSHOT</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
-
-    <modelVersion>4.0.0</modelVersion>
     <artifactId>tuscany-sample-helloworld-ws</artifactId>
-    <packaging>jar</packaging>
-    <name>Tuscany HelloWorld Web Service Sample</name>
-    <description>A sample HelloWorld Web Service.</description>
+    <name>Apache Tuscany HelloWorld Web Service Sample</name>
 
     <dependencies>
         <dependency>
-            <groupId>org.apache.tuscany.sca.kernel</groupId>
-            <artifactId>tuscany-api</artifactId>
-            <scope>compile</scope>
-            <version>0.1-integration-incubating-SNAPSHOT</version>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-host-embedded</artifactId>
+            <version>1.0-incubating-SNAPSHOT</version>
         </dependency>
+
         <dependency>
-            <groupId>org.apache.tuscany.sca.kernel</groupId>
-            <artifactId>tuscany-core</artifactId>
-            <version>0.1-integration-incubating-SNAPSHOT</version>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-implementation-java-runtime</artifactId>
+            <version>1.0-incubating-SNAPSHOT</version>
             <scope>runtime</scope>
         </dependency>
+
         <dependency>
-            <groupId>org.apache.tuscany.sca.extensions.axis2</groupId>
-            <artifactId>tuscany-axis2</artifactId>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-binding-ws-axis2</artifactId>
+            <version>1.0-incubating-SNAPSHOT</version>
             <scope>runtime</scope>
-            <version>0.1-integration-incubating-SNAPSHOT</version>
         </dependency>
+
         <dependency>
-            <groupId>org.apache.tuscany.sca.services</groupId>
-            <artifactId>tuscany-http-jetty</artifactId>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-http-tomcat</artifactId>
+            <version>1.0-incubating-SNAPSHOT</version>
             <scope>runtime</scope>
-            <version>0.1-integration-incubating-SNAPSHOT</version>
-        </dependency>
-        <dependency>
-            <groupId>junit</groupId>
-            <artifactId>junit</artifactId>
-            <version>4.2</version>
-            <scope>test</scope>
         </dependency>
     </dependencies>
     

Modified: incubator/tuscany/java/sca/samples/helloworld-ws/src/main/java/helloworld/HelloWorldServer.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/samples/helloworld-ws/src/main/java/helloworld/HelloWorldServer.java?view=diff&rev=531727&r1=531726&r2=531727
==============================================================================
--- incubator/tuscany/java/sca/samples/helloworld-ws/src/main/java/helloworld/HelloWorldServer.java (original)
+++ incubator/tuscany/java/sca/samples/helloworld-ws/src/main/java/helloworld/HelloWorldServer.java Mon Apr 23 22:13:16 2007
@@ -3,7 +3,7 @@
 
 import java.io.IOException;
 
-import org.apache.tuscany.api.SCARuntime;
+import org.apache.tuscany.host.embedded.SCARuntime;
 
 public class HelloWorldServer {
 

Modified: incubator/tuscany/java/sca/samples/helloworld-ws/src/main/resources/helloworldws.composite
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/samples/helloworld-ws/src/main/resources/helloworldws.composite?view=diff&rev=531727&r1=531726&r2=531727
==============================================================================
--- incubator/tuscany/java/sca/samples/helloworld-ws/src/main/resources/helloworldws.composite (original)
+++ incubator/tuscany/java/sca/samples/helloworld-ws/src/main/resources/helloworldws.composite Mon Apr 23 22:13:16 2007
@@ -17,13 +17,14 @@
     * specific language governing permissions and limitations
     * under the License.    
 -->
-<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" xmlns:wsdli="http://www.w3.org/2006/01/wsdl-instance"
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+	targetNamespace="http://helloworld"
+	xmlns:hw="http://helloworld"
     name="helloworldws">
 
-    <service name="HelloWorldWebService">
+    <service name="HelloWorldWebService" promote="HelloWorldServiceComponent">
         <interface.java class="helloworld.HelloWorldService" />
-        <binding.ws wsdlElement="http://helloworld#wsdl.port(HelloWorldService/HelloWorldSoapPort)" wsdlLocation="http://helloworld wsdl/helloworld.wsdl" />
-        <reference>HelloWorldServiceComponent</reference>
+        <binding.ws wsdlElement="http://helloworld#wsdl.port(HelloWorldService/HelloWorldSoapPort)"/>
     </service>
 
     <component name="HelloWorldServiceComponent">

Modified: incubator/tuscany/java/sca/samples/helloworld-ws/src/test/java/helloworld/HelloWorldServerTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/samples/helloworld-ws/src/test/java/helloworld/HelloWorldServerTestCase.java?view=diff&rev=531727&r1=531726&r2=531727
==============================================================================
--- incubator/tuscany/java/sca/samples/helloworld-ws/src/test/java/helloworld/HelloWorldServerTestCase.java (original)
+++ incubator/tuscany/java/sca/samples/helloworld-ws/src/test/java/helloworld/HelloWorldServerTestCase.java Mon Apr 23 22:13:16 2007
@@ -21,12 +21,10 @@
 import java.io.IOException;
 import java.net.Socket;
 
-import org.apache.tuscany.api.SCARuntime;
+import org.apache.tuscany.host.embedded.SCARuntime;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
-
-import junit.framework.TestCase;
 
 public class HelloWorldServerTestCase {
 	

Modified: incubator/tuscany/java/sca/samples/helloworld-wsclient/pom.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/samples/helloworld-wsclient/pom.xml?view=diff&rev=531727&r1=531726&r2=531727
==============================================================================
--- incubator/tuscany/java/sca/samples/helloworld-wsclient/pom.xml (original)
+++ incubator/tuscany/java/sca/samples/helloworld-wsclient/pom.xml Mon Apr 23 22:13:16 2007
@@ -18,56 +18,45 @@
     * under the License.    
 -->
 <project>
+    <modelVersion>4.0.0</modelVersion>
     <parent>
-        <groupId>org.apache.tuscany.sca.extensions.axis2.samples</groupId>
-        <artifactId>parent</artifactId>
-        <version>0.1-integration-incubating-SNAPSHOT</version>
+        <groupId>org.apache.tuscany.sca</groupId>
+        <artifactId>tuscany-samples</artifactId>
+        <version>1.0-incubating-SNAPSHOT</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
-
-    <modelVersion>4.0.0</modelVersion>
     <artifactId>tuscany-sample-helloworld-wsclient</artifactId>
-    <packaging>jar</packaging>
-    <name>Tuscany HelloWorld Web Service Client Sample</name>
-    <description>A sample client for a HelloWorld Web Service.</description>
+    <name>Apache Tuscany HelloWorld Web Service Client Sample</name>
 
     <dependencies>
         <dependency>
-            <groupId>org.apache.tuscany.sca.kernel</groupId>
-            <artifactId>tuscany-api</artifactId>
-            <scope>compile</scope>
-            <version>0.1-integration-incubating-SNAPSHOT</version>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-host-embedded</artifactId>
+            <version>1.0-incubating-SNAPSHOT</version>
         </dependency>
 
         <dependency>
-            <groupId>org.apache.tuscany.sca.kernel</groupId>
-            <artifactId>tuscany-core</artifactId>
-            <version>0.1-integration-incubating-SNAPSHOT</version>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-implementation-java-runtime</artifactId>
+            <version>1.0-incubating-SNAPSHOT</version>
             <scope>runtime</scope>
         </dependency>
 
         <dependency>
-            <groupId>org.apache.tuscany.sca.extensions.axis2</groupId>
-            <artifactId>tuscany-axis2</artifactId>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-binding-ws-axis2</artifactId>
+            <version>1.0-incubating-SNAPSHOT</version>
             <scope>runtime</scope>
-            <version>0.1-integration-incubating-SNAPSHOT</version>
         </dependency>
 
         <dependency>
-            <groupId>org.apache.tuscany.sca.extensions.axis2.samples</groupId>
+            <groupId>org.apache.tuscany.sca</groupId>
             <artifactId>tuscany-sample-helloworld-ws</artifactId>
-            <scope>runtime</scope>
-            <version>0.1-integration-incubating-SNAPSHOT</version>
-        </dependency>
-
-        <dependency>
-            <groupId>junit</groupId>
-            <artifactId>junit</artifactId>
-            <version>4.2</version>
+            <version>1.0-incubating-SNAPSHOT</version>
             <scope>test</scope>
         </dependency>
     </dependencies>
-
+    
     <build>
         <plugins>
             <plugin>
@@ -83,5 +72,4 @@
             </plugin>
         </plugins>
     </build>
-
 </project>

Modified: incubator/tuscany/java/sca/samples/helloworld-wsclient/src/main/java/helloworld/HelloWorldClient.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/samples/helloworld-wsclient/src/main/java/helloworld/HelloWorldClient.java?view=diff&rev=531727&r1=531726&r2=531727
==============================================================================
--- incubator/tuscany/java/sca/samples/helloworld-wsclient/src/main/java/helloworld/HelloWorldClient.java (original)
+++ incubator/tuscany/java/sca/samples/helloworld-wsclient/src/main/java/helloworld/HelloWorldClient.java Mon Apr 23 22:13:16 2007
@@ -18,7 +18,7 @@
  */
 package helloworld;
 
-import org.apache.tuscany.api.SCARuntime;
+import org.apache.tuscany.host.embedded.SCARuntime;
 import org.osoa.sca.CompositeContext;
 import org.osoa.sca.CurrentCompositeContext;
 

Modified: incubator/tuscany/java/sca/samples/helloworld-wsclient/src/main/resources/helloworldwsclient.composite
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/samples/helloworld-wsclient/src/main/resources/helloworldwsclient.composite?view=diff&rev=531727&r1=531726&r2=531727
==============================================================================
--- incubator/tuscany/java/sca/samples/helloworld-wsclient/src/main/resources/helloworldwsclient.composite (original)
+++ incubator/tuscany/java/sca/samples/helloworld-wsclient/src/main/resources/helloworldwsclient.composite Mon Apr 23 22:13:16 2007
@@ -18,20 +18,17 @@
  * under the License.    
 -->
 <composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
-           xmlns:system="http://tuscany.apache.org/xmlns/system/1.0-SNAPSHOT"
-           name="helloworldwsclient">
+	targetNamespace="http://helloworld"
+	xmlns:hw="http://helloworld"
+	name="helloworldwsclient">
     
     <component name="HelloWorldServiceComponent">
       <implementation.java class="helloworld.HelloWorldServiceComponent"/>
-      <reference name="helloWorldService">HelloWorldService</reference>
     </component>
 
-    <reference name="HelloWorldService">
+    <reference name="HelloWorldService" promote="HelloWorldServiceComponent/helloWorldService">
         <interface.java class="helloworld.HelloWorldService" />
-        <!-- interface.wsdl xmlns:wsdli="http://www.w3.org/2006/01/wsdl-instance" 
-            interface="http://helloworld#wsdl.interface(HelloWorld)" 
-            wsdli:wsdlLocation="http://helloworld wsdl/helloworld.wsdl" / -->
-        <binding.ws wsdlElement="http://helloworld#wsdl.port(HelloWorldService/HelloWorldSoapPort)" wsdlLocation="http://helloworld wsdl/helloworld.wsdl" />
+        <binding.ws wsdlElement="http://helloworld#wsdl.port(HelloWorldService/HelloWorldSoapPort)"/>
     </reference>
 
 </composite>

Modified: incubator/tuscany/java/sca/samples/helloworld-wsclient/src/test/java/helloworld/HelloWorldClientTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/samples/helloworld-wsclient/src/test/java/helloworld/HelloWorldClientTestCase.java?view=diff&rev=531727&r1=531726&r2=531727
==============================================================================
--- incubator/tuscany/java/sca/samples/helloworld-wsclient/src/test/java/helloworld/HelloWorldClientTestCase.java (original)
+++ incubator/tuscany/java/sca/samples/helloworld-wsclient/src/test/java/helloworld/HelloWorldClientTestCase.java Mon Apr 23 22:13:16 2007
@@ -20,10 +20,9 @@
 package helloworld;
 
 import junit.framework.Assert;
-import junit.framework.TestCase;
 
-import org.apache.tuscany.api.SCARuntime;
-import org.apache.tuscany.core.test.SCATestCaseRunner;
+import org.apache.tuscany.host.embedded.SCARuntime;
+import org.apache.tuscany.host.embedded.SCATestCaseRunner;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
@@ -41,13 +40,17 @@
 
     @Before
     public void startClient() throws Exception {
-    	SCARuntime.start("helloworldwsclient.composite");
-        
-        CompositeContext compositeContext = CurrentCompositeContext.getContext();
-        helloWorldService = compositeContext.locateService(HelloWorldService.class, "HelloWorldServiceComponent");
-
-        server =  new SCATestCaseRunner(HelloWorldServerTest.class);
-        server.before();
+        try {
+            SCARuntime.start("helloworldwsclient.composite");
+            
+            CompositeContext compositeContext = CurrentCompositeContext.getContext();
+            helloWorldService = compositeContext.locateService(HelloWorldService.class, "HelloWorldServiceComponent");
+    
+            server =  new SCATestCaseRunner(HelloWorldServerTest.class);
+            server.before();
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
     }
     
     @Test

Modified: incubator/tuscany/java/sca/samples/helloworld-wsclient/src/test/java/helloworld/HelloWorldServerTest.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/samples/helloworld-wsclient/src/test/java/helloworld/HelloWorldServerTest.java?view=diff&rev=531727&r1=531726&r2=531727
==============================================================================
--- incubator/tuscany/java/sca/samples/helloworld-wsclient/src/test/java/helloworld/HelloWorldServerTest.java (original)
+++ incubator/tuscany/java/sca/samples/helloworld-wsclient/src/test/java/helloworld/HelloWorldServerTest.java Mon Apr 23 22:13:16 2007
@@ -21,7 +21,7 @@
 import java.io.IOException;
 import java.net.Socket;
 
-import org.apache.tuscany.api.SCARuntime;
+import org.apache.tuscany.host.embedded.SCARuntime;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
@@ -30,7 +30,11 @@
 	
 	@Before
 	public void startServer() throws Exception {
+            try {
 		SCARuntime.start("helloworldws.composite");
+            } catch (Exception e) {
+                e.printStackTrace();
+            }
 	}
 	
 	@Test

Modified: incubator/tuscany/java/sca/samples/pom.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/samples/pom.xml?view=diff&rev=531727&r1=531726&r2=531727
==============================================================================
--- incubator/tuscany/java/sca/samples/pom.xml (original)
+++ incubator/tuscany/java/sca/samples/pom.xml Mon Apr 23 22:13:16 2007
@@ -42,6 +42,8 @@
                 <module>das-service</module>
                 -->
                 <module>databinding-echo</module>
+                <module>helloworld-ws</module>
+                <module>helloworld-wsclient</module>
                 <module>implementation-composite</module>
                 <module>implementation-crud</module>
                 <!--



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