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 2008/10/10 02:16:54 UTC

svn commit: r703296 - in /tuscany/branches/sca-equinox/modules: binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/ binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/ binding-ws-axis2/src/test/java/org/...

Author: jsdelfino
Date: Thu Oct  9 17:16:53 2008
New Revision: 703296

URL: http://svn.apache.org/viewvc?rev=703296&view=rev
Log:
Fixed compile errors.

Removed:
    tuscany/branches/sca-equinox/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/TestNode.java
Modified:
    tuscany/branches/sca-equinox/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/AsynchTestCase.java
    tuscany/branches/sca-equinox/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/CallbackTestCase.java
    tuscany/branches/sca-equinox/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/PromotionTestCase.java
    tuscany/branches/sca-equinox/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/SimpleTestCase.java
    tuscany/branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorldNoWSDLTestCase.java
    tuscany/branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorldOMTestCase.java
    tuscany/branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorldTestCase.java
    tuscany/branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorldWSDLMergedTestCase.java
    tuscany/branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/QuestionMarkWSDLImportTestCase.java
    tuscany/branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/QuestionMarkWSDLIncludeTestCase.java
    tuscany/branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/QuestionMarkWSDLTestCase.java
    tuscany/branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/UriPrecedenceTestCase.java
    tuscany/branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/endpoints/AbstractHelloWorldOMTestCase.java
    tuscany/branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/epr/HelloWorldTestCase.java
    tuscany/branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/configparams/AbstractHelloWorldOMTestCase.java
    tuscany/branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/mixed/AbstractHelloWorldOMTestCase.java
    tuscany/branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/wspolicy/AbstractHelloWorldOMTestCase.java
    tuscany/branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/soap12/HelloWorldSOAP12TestCase.java
    tuscany/branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/soap12/QuestionMarkWSDLTestCase.java
    tuscany/branches/sca-equinox/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeImpl.java
    tuscany/branches/sca-equinox/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeUtil.java

Modified: tuscany/branches/sca-equinox/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/AsynchTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-equinox/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/AsynchTestCase.java?rev=703296&r1=703295&r2=703296&view=diff
==============================================================================
--- tuscany/branches/sca-equinox/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/AsynchTestCase.java (original)
+++ tuscany/branches/sca-equinox/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/AsynchTestCase.java Thu Oct  9 17:16:53 2008
@@ -23,14 +23,17 @@
 
 import org.apache.tuscany.sca.binding.sca.axis2.helloworld.HelloWorldClient;
 import org.apache.tuscany.sca.binding.sca.axis2.helloworld.impl.HelloWorldClientCallbackOnewayRemoteImpl;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
 import org.junit.AfterClass;
 import org.junit.BeforeClass;
 import org.junit.Test;
 
 public class AsynchTestCase {
     
-    public static TestNode nodeA;
-    public static TestNode nodeB;
+    public static Node nodeG;
+    public static Node nodeH;
 
     @BeforeClass
     public static void init() throws Exception {
@@ -38,11 +41,13 @@
 
         try {
             // create and start domains
-            nodeA = new TestNode("nodeG");
-            nodeB = new TestNode("nodeH");
+            NodeFactory nodeFactory = NodeFactory.newInstance();
+            ClassLoader cl = AsynchTestCase.class.getClassLoader();
+            nodeG = nodeFactory.createNode("HelloWorld.composite", new Contribution("http://calculator", cl.getResource("nodeG").toString()));
+            nodeH = nodeFactory.createNode("HelloWorld.composite", new Contribution("http://calculator", cl.getResource("nodeH").toString()));
 
-            nodeA.start();
-            nodeB.start();
+            nodeG.start();
+            nodeH.start();
 
         } catch (Exception ex) {
             System.err.println("Exception when creating domain " + ex.getMessage());
@@ -53,14 +58,16 @@
 
     @AfterClass
     public static void destroy() throws Exception {
-        nodeA.stop();
-        nodeB.stop();
+        nodeG.stop();
+        nodeG.destroy();
+        nodeH.stop();
+        nodeG.destroy();
     }    
     
     @Test
     public void testHelloWorldAsynch() throws Exception {        
         HelloWorldClient helloWorldClientB;
-        helloWorldClientB = nodeA.getService(HelloWorldClient.class, "AHelloWorldClientCallbackRemote");
+        helloWorldClientB = nodeG.getService(HelloWorldClient.class, "AHelloWorldClientCallbackRemote");
         helloWorldClientB.getGreetings("fred");
         System.out.println("Sleeping ...");
         Thread.sleep(2000);

Modified: tuscany/branches/sca-equinox/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/CallbackTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-equinox/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/CallbackTestCase.java?rev=703296&r1=703295&r2=703296&view=diff
==============================================================================
--- tuscany/branches/sca-equinox/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/CallbackTestCase.java (original)
+++ tuscany/branches/sca-equinox/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/CallbackTestCase.java Thu Oct  9 17:16:53 2008
@@ -21,14 +21,17 @@
 import junit.framework.Assert;
 
 import org.apache.tuscany.sca.binding.sca.axis2.helloworld.HelloWorldClient;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
 import org.junit.AfterClass;
 import org.junit.BeforeClass;
 import org.junit.Test;
 
 public class CallbackTestCase {
     
-    public static TestNode nodeA;
-    public static TestNode nodeB;
+    public static Node nodeE;
+    public static Node nodeF;
 
     @BeforeClass
     public static void init() throws Exception {
@@ -36,11 +39,13 @@
 
         try {
             // create and start domains
-            nodeA = new TestNode("nodeE");
-            nodeB = new TestNode("nodeF");
+            NodeFactory nodeFactory = NodeFactory.newInstance();
+            ClassLoader cl = AsynchTestCase.class.getClassLoader();
+            nodeE = nodeFactory.createNode("HelloWorld.composite", new Contribution("http://calculator", cl.getResource("nodeE").toString()));
+            nodeF = nodeFactory.createNode("HelloWorld.composite", new Contribution("http://calculator", cl.getResource("nodeF").toString()));
 
-            nodeA.start();
-            nodeB.start();
+            nodeE.start();
+            nodeF.start();
 
         } catch (Exception ex) {
             System.err.println("Exception when creating domain " + ex.getMessage());
@@ -51,8 +56,10 @@
 
     @AfterClass
     public static void destroy() throws Exception {
-        nodeA.stop();
-        nodeB.stop();
+        nodeE.stop();
+        nodeE.destroy();
+        nodeF.stop();
+        nodeF.destroy();
     } 
     
     //@Test
@@ -64,14 +71,14 @@
     @Test
     public void testHelloWorldCallbackLocal() throws Exception {  
         HelloWorldClient helloWorldClientB;
-        helloWorldClientB = nodeB.getService(HelloWorldClient.class, "BHelloWorldClientCallbackLocal");
+        helloWorldClientB = nodeF.getService(HelloWorldClient.class, "BHelloWorldClientCallbackLocal");
         Assert.assertEquals("Hello callback fred", helloWorldClientB.getGreetings("fred"));  
     }     
     
     @Test
     public void testHelloWorldCallbackRemote() throws Exception {  
         HelloWorldClient helloWorldClientA;
-        helloWorldClientA = nodeA.getService(HelloWorldClient.class, "AHelloWorldClientCallbackRemote");
+        helloWorldClientA = nodeE.getService(HelloWorldClient.class, "AHelloWorldClientCallbackRemote");
         Assert.assertEquals("Hello callback fred", helloWorldClientA.getGreetings("fred"));
     }    
 }

Modified: tuscany/branches/sca-equinox/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/PromotionTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-equinox/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/PromotionTestCase.java?rev=703296&r1=703295&r2=703296&view=diff
==============================================================================
--- tuscany/branches/sca-equinox/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/PromotionTestCase.java (original)
+++ tuscany/branches/sca-equinox/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/PromotionTestCase.java Thu Oct  9 17:16:53 2008
@@ -21,14 +21,17 @@
 import junit.framework.Assert;
 
 import org.apache.tuscany.sca.binding.sca.axis2.helloworld.HelloWorldClient;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
 import org.junit.AfterClass;
 import org.junit.BeforeClass;
 import org.junit.Test;
 
 public class PromotionTestCase {
     
-    public static TestNode nodeA;
-    public static TestNode nodeB;
+    public static Node nodeC;
+    public static Node nodeD;
 
     @BeforeClass
     public static void init() throws Exception {
@@ -36,11 +39,13 @@
 
         try {
             // create and start domains
-            nodeA = new TestNode("nodeC");
-            nodeB = new TestNode("nodeD");
+            NodeFactory nodeFactory = NodeFactory.newInstance();
+            ClassLoader cl = AsynchTestCase.class.getClassLoader();
+            nodeC = nodeFactory.createNode("HelloWorld.composite", new Contribution("http://calculator", cl.getResource("nodeC").toString()));
+            nodeD = nodeFactory.createNode("HelloWorld.composite", new Contribution("http://calculator", cl.getResource("nodeD").toString()));
 
-            nodeA.start();
-            nodeB.start();
+            nodeC.start();
+            nodeD.start();
 
         } catch (Exception ex) {
             System.err.println("Exception when creating domain " + ex.getMessage());
@@ -51,14 +56,16 @@
 
     @AfterClass
     public static void destroy() throws Exception {
-        nodeA.stop();
-        nodeB.stop();
+        nodeC.stop();
+        nodeC.destroy();
+        nodeD.stop();
+        nodeD.destroy();
     }     
     
     @Test
     public void testHelloWorldPromotion() throws Exception {  
         HelloWorldClient helloWorldClientA;
-        helloWorldClientA = nodeA.getService(HelloWorldClient.class, "AHelloWorldClientRemotePromotion");
+        helloWorldClientA = nodeC.getService(HelloWorldClient.class, "AHelloWorldClientRemotePromotion");
         Assert.assertEquals(helloWorldClientA.getGreetings("fred"), "Hello fred");
 
     }      

Modified: tuscany/branches/sca-equinox/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/SimpleTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-equinox/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/SimpleTestCase.java?rev=703296&r1=703295&r2=703296&view=diff
==============================================================================
--- tuscany/branches/sca-equinox/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/SimpleTestCase.java (original)
+++ tuscany/branches/sca-equinox/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/SimpleTestCase.java Thu Oct  9 17:16:53 2008
@@ -21,6 +21,9 @@
 import junit.framework.Assert;
 
 import org.apache.tuscany.sca.binding.sca.axis2.helloworld.HelloWorldClient;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
 import org.junit.AfterClass;
 import org.junit.BeforeClass;
 import org.junit.Test;
@@ -28,8 +31,8 @@
 
 public class SimpleTestCase {
     
-    public static TestNode nodeA;
-    public static TestNode nodeB;
+    public static Node nodeA;
+    public static Node nodeB;
 
     @BeforeClass
     public static void init() throws Exception {
@@ -37,8 +40,10 @@
 
         try {
             // create and start domains
-            nodeA = new TestNode("nodeA");
-            nodeB = new TestNode("nodeB");
+            NodeFactory nodeFactory = NodeFactory.newInstance();
+            ClassLoader cl = AsynchTestCase.class.getClassLoader();
+            nodeA = nodeFactory.createNode("HelloWorld.composite", new Contribution("http://calculator", cl.getResource("nodeA").toString()));
+            nodeB = nodeFactory.createNode("HelloWorld.composite", new Contribution("http://calculator", cl.getResource("nodeB").toString()));
 
             nodeA.start();
             nodeB.start();
@@ -53,7 +58,9 @@
     @AfterClass
     public static void destroy() throws Exception {
         nodeA.stop();
+        nodeA.destroy();
         nodeB.stop();
+        nodeB.destroy();
     }    
     
     @Test

Modified: tuscany/branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorldNoWSDLTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorldNoWSDLTestCase.java?rev=703296&r1=703295&r2=703296&view=diff
==============================================================================
--- tuscany/branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorldNoWSDLTestCase.java (original)
+++ tuscany/branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorldNoWSDLTestCase.java Thu Oct  9 17:16:53 2008
@@ -21,14 +21,17 @@
 
 import junit.framework.TestCase;
 
-import org.apache.tuscany.sca.host.embedded.SCADomain;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.ContributionLocationHelper;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
 
 public class HelloWorldNoWSDLTestCase extends TestCase {
 
-    private SCADomain domain;
+    private Node node;
 
     public void testHelloWorld() throws Exception {
-        HelloWorld helloWorld = domain.getService(HelloWorld.class, "HelloWorldComponent");
+        HelloWorld helloWorld = node.getService(HelloWorld.class, "HelloWorldComponent");
         assertEquals("Hello petra", helloWorld.getGreetings("petra"));
     }
 
@@ -36,7 +39,7 @@
      * Test a a WS call with a complex type
      */
     public void testEchoFoo() throws Exception {
-        Echo echo = domain.getService(Echo.class, "EchoComponent");
+        Echo echo = node.getService(Echo.class, "EchoComponent");
        
         Foo f = new Foo();
         Bar b1 = new Bar();
@@ -66,12 +69,15 @@
    
     @Override
     protected void setUp() throws Exception {
-        domain = SCADomain.newInstance("org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorldNoWSDL.composite");
+        String contribution = ContributionLocationHelper.getContributionLocation(getClass());
+        node = NodeFactory.newInstance().createNode("org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorldNoWSDL.composite", new Contribution("test", contribution));
+        node.start();
     }
    
     @Override
     protected void tearDown() throws Exception {
-        domain.close();
+        node.stop();
+        node.destroy();
     }
 
 }

Modified: tuscany/branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorldOMTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorldOMTestCase.java?rev=703296&r1=703295&r2=703296&view=diff
==============================================================================
--- tuscany/branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorldOMTestCase.java (original)
+++ tuscany/branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorldOMTestCase.java Thu Oct  9 17:16:53 2008
@@ -26,11 +26,14 @@
 import org.apache.axiom.om.OMElement;
 import org.apache.axiom.om.OMFactory;
 import org.apache.axiom.om.OMText;
-import org.apache.tuscany.sca.host.embedded.SCADomain;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.ContributionLocationHelper;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
 
 public class HelloWorldOMTestCase extends TestCase {
 
-    private SCADomain domain;
+    private Node node;
     private HelloWorldOM helloWorld;
 
     public void testHelloWorld() throws Exception {
@@ -46,13 +49,16 @@
 
     @Override
     protected void setUp() throws Exception {
-        domain = SCADomain.newInstance("org/apache/tuscany/sca/binding/ws/axis2/itests/helloworld-om.composite");
-        helloWorld = domain.getService(HelloWorldOM.class, "HelloWorldComponent");
+        String contribution = ContributionLocationHelper.getContributionLocation(getClass());
+        node = NodeFactory.newInstance().createNode("org/apache/tuscany/sca/binding/ws/axis2/itests/helloworld-om.composite", new Contribution("test", contribution));
+        node.start();
+        helloWorld = node.getService(HelloWorldOM.class, "HelloWorldComponent");
     }
     
     @Override
     protected void tearDown() throws Exception {
-        domain.close();
+        node.stop();
+        node.destroy();
     }
 
 }

Modified: tuscany/branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorldTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorldTestCase.java?rev=703296&r1=703295&r2=703296&view=diff
==============================================================================
--- tuscany/branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorldTestCase.java (original)
+++ tuscany/branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorldTestCase.java Thu Oct  9 17:16:53 2008
@@ -21,11 +21,14 @@
 
 import junit.framework.TestCase;
 
-import org.apache.tuscany.sca.host.embedded.SCADomain;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.ContributionLocationHelper;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
 
 public class HelloWorldTestCase extends TestCase {
 
-    private SCADomain domain;
+    private Node node;
     private HelloWorld helloWorld;
 
     public void testCalculator() throws Exception {
@@ -34,13 +37,15 @@
 
     @Override
     protected void setUp() throws Exception {
-        domain = SCADomain.newInstance("org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorld.composite");
-        helloWorld = domain.getService(HelloWorld.class, "HelloWorldComponent");
+        String contribution = ContributionLocationHelper.getContributionLocation(getClass());
+        node = NodeFactory.newInstance().createNode("org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorld.composite", new Contribution("test", contribution));
+        helloWorld = node.getService(HelloWorld.class, "HelloWorldComponent");
     }
     
     @Override
     protected void tearDown() throws Exception {
-        domain.close();
+        node.stop();
+        node.destroy();
     }
 
 }

Modified: tuscany/branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorldWSDLMergedTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorldWSDLMergedTestCase.java?rev=703296&r1=703295&r2=703296&view=diff
==============================================================================
--- tuscany/branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorldWSDLMergedTestCase.java (original)
+++ tuscany/branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorldWSDLMergedTestCase.java Thu Oct  9 17:16:53 2008
@@ -26,11 +26,14 @@
 import org.apache.axiom.om.OMElement;
 import org.apache.axiom.om.OMFactory;
 import org.apache.axiom.om.OMText;
-import org.apache.tuscany.sca.host.embedded.SCADomain;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.ContributionLocationHelper;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
 
 public class HelloWorldWSDLMergedTestCase extends TestCase {
 
-    private SCADomain domain;
+    private Node node;
     private HelloWorldOM helloWorld;
 
     public void testHelloWorld() throws Exception {
@@ -46,13 +49,15 @@
 
     @Override
     protected void setUp() throws Exception {
-        domain = SCADomain.newInstance("org/apache/tuscany/sca/binding/ws/axis2/itests/helloworld-om-merged.composite");
-        helloWorld = domain.getService(HelloWorldOM.class, "HelloWorldWSDLMergedComponent");
+        String contribution = ContributionLocationHelper.getContributionLocation(getClass());
+        node = NodeFactory.newInstance().createNode("org/apache/tuscany/sca/binding/ws/axis2/itests/helloworld-om-merged.composite", new Contribution("test", contribution));
+        helloWorld = node.getService(HelloWorldOM.class, "HelloWorldWSDLMergedComponent");
     }
     
     @Override
     protected void tearDown() throws Exception {
-        domain.close();
+        node.stop();
+        node.destroy();
     }
 
 }

Modified: tuscany/branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/QuestionMarkWSDLImportTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/QuestionMarkWSDLImportTestCase.java?rev=703296&r1=703295&r2=703296&view=diff
==============================================================================
--- tuscany/branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/QuestionMarkWSDLImportTestCase.java (original)
+++ tuscany/branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/QuestionMarkWSDLImportTestCase.java Thu Oct  9 17:16:53 2008
@@ -36,7 +36,10 @@
 import junit.framework.TestCase;
 
 import org.apache.axis2.transport.http.server.HttpUtils;
-import org.apache.tuscany.sca.host.embedded.SCADomain;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.ContributionLocationHelper;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
 
 /**
  * Test ?wsdl works and that the returned WSDL has the correct endpoint
@@ -45,7 +48,7 @@
  */
 public class QuestionMarkWSDLImportTestCase extends TestCase {
 
-    private SCADomain domain;
+    private Node node;
 
     /**
      * Tests ?wsdl works and returns the correct port endpoint from the WSDL
@@ -85,12 +88,15 @@
 
     @Override
     protected void setUp() throws Exception {
-        domain = SCADomain.newInstance("org/apache/tuscany/sca/binding/ws/axis2/itests/questionmark-wsdl-import.composite");
+        String contribution = ContributionLocationHelper.getContributionLocation(getClass());
+        node = NodeFactory.newInstance().createNode("org/apache/tuscany/sca/binding/ws/axis2/itests/questionmark-wsdl-import.composite", new Contribution("test", contribution));
+        node.start();
     }
 
     @Override
     protected void tearDown() throws Exception {
-        domain.close();
+        node.stop();
+        node.destroy();
     }
 
 }

Modified: tuscany/branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/QuestionMarkWSDLIncludeTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/QuestionMarkWSDLIncludeTestCase.java?rev=703296&r1=703295&r2=703296&view=diff
==============================================================================
--- tuscany/branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/QuestionMarkWSDLIncludeTestCase.java (original)
+++ tuscany/branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/QuestionMarkWSDLIncludeTestCase.java Thu Oct  9 17:16:53 2008
@@ -36,7 +36,10 @@
 import junit.framework.TestCase;
 
 import org.apache.axis2.transport.http.server.HttpUtils;
-import org.apache.tuscany.sca.host.embedded.SCADomain;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.ContributionLocationHelper;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
 
 /**
  * Test ?wsdl works and that the returned WSDL has the correct endpoint
@@ -45,7 +48,7 @@
  */
 public class QuestionMarkWSDLIncludeTestCase extends TestCase {
 
-    private SCADomain domain;
+    private Node node;
 
     /**
      * Tests ?wsdl works and returns the correct port endpoint from the WSDL
@@ -85,12 +88,15 @@
 
     @Override
     protected void setUp() throws Exception {
-        domain = SCADomain.newInstance("org/apache/tuscany/sca/binding/ws/axis2/itests/questionmark-wsdl-include.composite");
+        String contribution = ContributionLocationHelper.getContributionLocation(getClass());
+        node = NodeFactory.newInstance().createNode("org/apache/tuscany/sca/binding/ws/axis2/itests/questionmark-wsdl-include.composite", new Contribution("test", contribution));
+        node.start();
     }
 
     @Override
     protected void tearDown() throws Exception {
-        domain.close();
+        node.stop();
+        node.destroy();
     }
 
 }

Modified: tuscany/branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/QuestionMarkWSDLTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/QuestionMarkWSDLTestCase.java?rev=703296&r1=703295&r2=703296&view=diff
==============================================================================
--- tuscany/branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/QuestionMarkWSDLTestCase.java (original)
+++ tuscany/branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/QuestionMarkWSDLTestCase.java Thu Oct  9 17:16:53 2008
@@ -36,7 +36,10 @@
 import junit.framework.TestCase;
 
 import org.apache.axis2.transport.http.server.HttpUtils;
-import org.apache.tuscany.sca.host.embedded.SCADomain;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.ContributionLocationHelper;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
 
 /**
  * Test ?wsdl works and that the returned WSDL has the correct endpoint
@@ -45,7 +48,7 @@
  */
 public class QuestionMarkWSDLTestCase extends TestCase {
 
-    private SCADomain domain;
+    private Node node;
 
     /**
      * Tests ?wsdl works and returns the correct port endpoint from the WSDL
@@ -113,12 +116,15 @@
 
     @Override
     protected void setUp() throws Exception {
-        domain = SCADomain.newInstance("org/apache/tuscany/sca/binding/ws/axis2/itests/questionmark-wsdl.composite");
+        String contribution = ContributionLocationHelper.getContributionLocation(getClass());
+        node = NodeFactory.newInstance().createNode("org/apache/tuscany/sca/binding/ws/axis2/itests/questionmark-wsdl.composite", new Contribution("test", contribution));
+        node.start();
     }
 
     @Override
     protected void tearDown() throws Exception {
-        domain.close();
+        node.stop();
+        node.destroy();
     }
 
 }

Modified: tuscany/branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/UriPrecedenceTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/UriPrecedenceTestCase.java?rev=703296&r1=703295&r2=703296&view=diff
==============================================================================
--- tuscany/branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/UriPrecedenceTestCase.java (original)
+++ tuscany/branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/UriPrecedenceTestCase.java Thu Oct  9 17:16:53 2008
@@ -26,7 +26,10 @@
 import org.apache.axiom.om.OMElement;
 import org.apache.axiom.om.OMFactory;
 import org.apache.axiom.om.OMText;
-import org.apache.tuscany.sca.host.embedded.SCADomain;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.ContributionLocationHelper;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
 import org.osoa.sca.ServiceRuntimeException;
 
 /**
@@ -37,7 +40,7 @@
  */
 public class UriPrecedenceTestCase extends TestCase {
 
-    private SCADomain domain;
+    private Node node;
     private HelloWorldOM helloWorld;
 
     public void testUriPrecedence() throws Exception {
@@ -57,12 +60,15 @@
 
     @Override
     protected void setUp() throws Exception {
-        domain = SCADomain.newInstance("org/apache/tuscany/sca/binding/ws/axis2/itests/helloworld-prec.composite");
-        helloWorld = domain.getService(HelloWorldOM.class, "HelloWorldComponent");
+        String contribution = ContributionLocationHelper.getContributionLocation(getClass());
+        node = NodeFactory.newInstance().createNode("org/apache/tuscany/sca/binding/ws/axis2/itests/helloworld-prec.composite", new Contribution("test", contribution));
+        node.start();
+        helloWorld = node.getService(HelloWorldOM.class, "HelloWorldComponent");
     }
     
     @Override
     protected void tearDown() throws Exception {
-        domain.close();
+        node.stop();
+        node.destroy();
     }
 }

Modified: tuscany/branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/endpoints/AbstractHelloWorldOMTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/endpoints/AbstractHelloWorldOMTestCase.java?rev=703296&r1=703295&r2=703296&view=diff
==============================================================================
--- tuscany/branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/endpoints/AbstractHelloWorldOMTestCase.java (original)
+++ tuscany/branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/endpoints/AbstractHelloWorldOMTestCase.java Thu Oct  9 17:16:53 2008
@@ -27,11 +27,14 @@
 import org.apache.axiom.om.OMFactory;
 import org.apache.axiom.om.OMText;
 import org.apache.tuscany.sca.binding.ws.axis2.itests.HelloWorldOM;
-import org.apache.tuscany.sca.host.embedded.SCADomain;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.ContributionLocationHelper;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
 
 public abstract class AbstractHelloWorldOMTestCase extends TestCase {
 
-    private SCADomain domain;
+    private Node node;
     private HelloWorldOM helloWorld;
 
     public void testCalculator() throws Exception {
@@ -47,13 +50,16 @@
 
     @Override
     protected void setUp() throws Exception {
-        domain = SCADomain.newInstance(getCompositeName());
-        helloWorld = domain.getService(HelloWorldOM.class, "HelloWorldComponent");
+        String contribution = ContributionLocationHelper.getContributionLocation(getClass());
+        node = NodeFactory.newInstance().createNode(getCompositeName(), new Contribution("test", contribution));
+        node.start();
+        helloWorld = node.getService(HelloWorldOM.class, "HelloWorldComponent");
     }
     
     @Override
     protected void tearDown() throws Exception {
-        domain.close();
+        node.stop();
+        node.destroy();
     }
     
     protected String getCompositeName() {

Modified: tuscany/branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/epr/HelloWorldTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/epr/HelloWorldTestCase.java?rev=703296&r1=703295&r2=703296&view=diff
==============================================================================
--- tuscany/branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/epr/HelloWorldTestCase.java (original)
+++ tuscany/branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/epr/HelloWorldTestCase.java Thu Oct  9 17:16:53 2008
@@ -22,11 +22,14 @@
 import junit.framework.TestCase;
 
 import org.apache.tuscany.sca.binding.ws.axis2.itests.HelloWorld;
-import org.apache.tuscany.sca.host.embedded.SCADomain;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.ContributionLocationHelper;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
 
 public class HelloWorldTestCase extends TestCase {
 
-    private SCADomain domain;
+    private Node node;
     private HelloWorld helloWorld;
 
     public void testCalculator() throws Exception {
@@ -35,13 +38,16 @@
 
     @Override
     protected void setUp() throws Exception {
-        domain = SCADomain.newInstance("org/apache/tuscany/sca/binding/ws/axis2/itests/epr/HelloWorld.composite");
-        helloWorld = domain.getService(HelloWorld.class, "HelloWorldComponent");
+        String contribution = ContributionLocationHelper.getContributionLocation(getClass());
+        node = NodeFactory.newInstance().createNode("org/apache/tuscany/sca/binding/ws/axis2/itests/epr/HelloWorld.composite", new Contribution("test", contribution));
+        node.start();
+        helloWorld = node.getService(HelloWorld.class, "HelloWorldComponent");
     }
     
     @Override
     protected void tearDown() throws Exception {
-        domain.close();
+        node.stop();
+        node.destroy();
     }
 
 }

Modified: tuscany/branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/configparams/AbstractHelloWorldOMTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/configparams/AbstractHelloWorldOMTestCase.java?rev=703296&r1=703295&r2=703296&view=diff
==============================================================================
--- tuscany/branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/configparams/AbstractHelloWorldOMTestCase.java (original)
+++ tuscany/branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/configparams/AbstractHelloWorldOMTestCase.java Thu Oct  9 17:16:53 2008
@@ -27,11 +27,14 @@
 import org.apache.axiom.om.OMFactory;
 import org.apache.axiom.om.OMText;
 import org.apache.tuscany.sca.binding.ws.axis2.itests.HelloWorldOM;
-import org.apache.tuscany.sca.host.embedded.SCADomain;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.ContributionLocationHelper;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
 
 public abstract class AbstractHelloWorldOMTestCase extends TestCase {
 
-    private SCADomain domain;
+    private Node node;
     private HelloWorldOM helloWorld;
 
     public void testHelloWorld() throws Exception {
@@ -47,13 +50,16 @@
 
     @Override
     protected void setUp() throws Exception {
-        domain = SCADomain.newInstance(getCompositeName());
-        helloWorld = domain.getService(HelloWorldOM.class, "HelloWorldComponent");
+        String contribution = ContributionLocationHelper.getContributionLocation(getClass());
+        node = NodeFactory.newInstance().createNode(getCompositeName(), new Contribution("test", contribution));
+        node.start();
+        helloWorld = node.getService(HelloWorldOM.class, "HelloWorldComponent");
     }
     
     @Override
     protected void tearDown() throws Exception {
-        domain.close();
+        node.stop();
+        node.destroy();
     }
     
     protected String getCompositeName() {

Modified: tuscany/branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/mixed/AbstractHelloWorldOMTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/mixed/AbstractHelloWorldOMTestCase.java?rev=703296&r1=703295&r2=703296&view=diff
==============================================================================
--- tuscany/branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/mixed/AbstractHelloWorldOMTestCase.java (original)
+++ tuscany/branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/mixed/AbstractHelloWorldOMTestCase.java Thu Oct  9 17:16:53 2008
@@ -26,14 +26,17 @@
 import org.apache.axiom.om.OMFactory;
 import org.apache.axiom.om.OMText;
 import org.apache.tuscany.sca.binding.ws.axis2.itests.HelloWorldOM;
-import org.apache.tuscany.sca.host.embedded.SCADomain;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.ContributionLocationHelper;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
 
 public abstract class AbstractHelloWorldOMTestCase {
 
-    private SCADomain domain;
+    private Node node;
     private HelloWorldOM helloWorld;
 
     @Test
@@ -50,13 +53,16 @@
 
     @Before
     public void setUp() throws Exception {
-        domain = SCADomain.newInstance(getCompositeName());
-        helloWorld = domain.getService(HelloWorldOM.class, "HelloWorldComponent");
+        String contribution = ContributionLocationHelper.getContributionLocation(getClass());
+        node = NodeFactory.newInstance().createNode(getCompositeName(), new Contribution("test", contribution));
+        node.start();
+        helloWorld = node.getService(HelloWorldOM.class, "HelloWorldComponent");
     }
     
     @After
     public void tearDown() throws Exception {
-        domain.close();
+        node.stop();
+        node.destroy();
     }
     
     protected String getCompositeName() {

Modified: tuscany/branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/wspolicy/AbstractHelloWorldOMTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/wspolicy/AbstractHelloWorldOMTestCase.java?rev=703296&r1=703295&r2=703296&view=diff
==============================================================================
--- tuscany/branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/wspolicy/AbstractHelloWorldOMTestCase.java (original)
+++ tuscany/branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/wspolicy/AbstractHelloWorldOMTestCase.java Thu Oct  9 17:16:53 2008
@@ -27,11 +27,14 @@
 import org.apache.axiom.om.OMFactory;
 import org.apache.axiom.om.OMText;
 import org.apache.tuscany.sca.binding.ws.axis2.itests.HelloWorldOM;
-import org.apache.tuscany.sca.host.embedded.SCADomain;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.ContributionLocationHelper;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
 
 public abstract class AbstractHelloWorldOMTestCase extends TestCase {
 
-    private SCADomain domain;
+    private Node node;
     private HelloWorldOM helloWorld;
 
     public void testHelloWorld() throws Exception {
@@ -47,13 +50,16 @@
 
     @Override
     protected void setUp() throws Exception {
-        domain = SCADomain.newInstance(getCompositeName());
-        helloWorld = domain.getService(HelloWorldOM.class, "HelloWorldComponent");
+        String contribution = ContributionLocationHelper.getContributionLocation(getClass());
+        node = NodeFactory.newInstance().createNode(getCompositeName(), new Contribution("test", contribution));
+        node.start();
+        helloWorld = node.getService(HelloWorldOM.class, "HelloWorldComponent");
     }
     
     @Override
     protected void tearDown() throws Exception {
-        domain.close();
+        node.stop();
+        node.destroy();
     }
     
     protected String getCompositeName() {

Modified: tuscany/branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/soap12/HelloWorldSOAP12TestCase.java
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/soap12/HelloWorldSOAP12TestCase.java?rev=703296&r1=703295&r2=703296&view=diff
==============================================================================
--- tuscany/branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/soap12/HelloWorldSOAP12TestCase.java (original)
+++ tuscany/branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/soap12/HelloWorldSOAP12TestCase.java Thu Oct  9 17:16:53 2008
@@ -22,37 +22,42 @@
 import junit.framework.TestCase;
 
 import org.apache.tuscany.sca.binding.ws.axis2.itests.HelloWorld;
-import org.apache.tuscany.sca.host.embedded.SCADomain;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.ContributionLocationHelper;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
 
 public class HelloWorldSOAP12TestCase extends TestCase {
 
-    private SCADomain domain;
+    private Node node;
 
     public void testHelloWorld() throws Exception {
-        HelloWorld helloWorld = domain.getService(HelloWorld.class, "HelloWorldClient");
+        HelloWorld helloWorld = node.getService(HelloWorld.class, "HelloWorldClient");
         assertEquals("Hello petra", helloWorld.getGreetings("petra"));
     }
     public void testHelloWorldSOAP() throws Exception {
-        HelloWorld helloWorld = domain.getService(HelloWorld.class, "HelloWorldClientSOAP");
+        HelloWorld helloWorld = node.getService(HelloWorld.class, "HelloWorldClientSOAP");
         assertEquals("Hello petra", helloWorld.getGreetings("petra"));
     }
     public void testHelloWorldSOAP11() throws Exception {
-        HelloWorld helloWorld = domain.getService(HelloWorld.class, "HelloWorldClientSOAP11");
+        HelloWorld helloWorld = node.getService(HelloWorld.class, "HelloWorldClientSOAP11");
         assertEquals("Hello petra", helloWorld.getGreetings("petra"));
     }
     public void testHelloWorldSOAP12() throws Exception {
-        HelloWorld helloWorld = domain.getService(HelloWorld.class, "HelloWorldClientSOAP12");
+        HelloWorld helloWorld = node.getService(HelloWorld.class, "HelloWorldClientSOAP12");
         assertEquals("Hello petra", helloWorld.getGreetings("petra"));
     }
 
     @Override
     protected void setUp() throws Exception {
-        domain = SCADomain.newInstance("org/apache/tuscany/sca/binding/ws/axis2/itests/soap12/HelloWorldSOAP12.composite");
+        String contribution = ContributionLocationHelper.getContributionLocation(getClass());
+        node = NodeFactory.newInstance().createNode("org/apache/tuscany/sca/binding/ws/axis2/itests/soap12/HelloWorldSOAP12.composite", new Contribution("test", contribution));
     }
    
     @Override
     protected void tearDown() throws Exception {
-        domain.close();
+        node.stop();
+        node.destroy();
     }
 
 }

Modified: tuscany/branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/soap12/QuestionMarkWSDLTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/soap12/QuestionMarkWSDLTestCase.java?rev=703296&r1=703295&r2=703296&view=diff
==============================================================================
--- tuscany/branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/soap12/QuestionMarkWSDLTestCase.java (original)
+++ tuscany/branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/soap12/QuestionMarkWSDLTestCase.java Thu Oct  9 17:16:53 2008
@@ -33,7 +33,10 @@
 import junit.framework.TestCase;
 
 import org.apache.axis2.transport.http.server.HttpUtils;
-import org.apache.tuscany.sca.host.embedded.SCADomain;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.ContributionLocationHelper;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
 
 /**
  * Test ?wsdl works and that the returned WSDL has the correct endpoint
@@ -43,7 +46,7 @@
 public class QuestionMarkWSDLTestCase extends TestCase {
 
     private static boolean newGenerator = true;
-    private SCADomain domain;
+    private Node node;
 
     /**
      * Tests ?wsdl returns a soap 1.1 port by default
@@ -127,12 +130,15 @@
 
     @Override
     protected void setUp() throws Exception {
-        domain = SCADomain.newInstance("org/apache/tuscany/sca/binding/ws/axis2/itests/soap12/questionmark-wsdl.composite");
+        String contribution = ContributionLocationHelper.getContributionLocation(getClass());
+        node = NodeFactory.newInstance().createNode("org/apache/tuscany/sca/binding/ws/axis2/itests/soap12/questionmark-wsdl.composite", new Contribution("test", contribution));
+        node.start();
     }
 
     @Override
     protected void tearDown() throws Exception {
-        domain.close();
+        node.stop();
+        node.destroy();
     }
 
 }

Modified: tuscany/branches/sca-equinox/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeImpl.java
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-equinox/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeImpl.java?rev=703296&r1=703295&r2=703296&view=diff
==============================================================================
--- tuscany/branches/sca-equinox/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeImpl.java (original)
+++ tuscany/branches/sca-equinox/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeImpl.java Thu Oct  9 17:16:53 2008
@@ -20,6 +20,7 @@
 package org.apache.tuscany.sca.node.impl;
 
 import static java.lang.System.currentTimeMillis;
+import static org.apache.tuscany.sca.definitions.util.SCADefinitionsUtil.aggregateSCADefinitions;
 import static org.apache.tuscany.sca.node.impl.NodeUtil.contribution;
 import static org.apache.tuscany.sca.node.impl.NodeUtil.createURI;
 
@@ -53,9 +54,11 @@
 import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessorExtensionPoint;
 import org.apache.tuscany.sca.contribution.processor.URLArtifactProcessor;
 import org.apache.tuscany.sca.contribution.processor.URLArtifactProcessorExtensionPoint;
+import org.apache.tuscany.sca.contribution.resolver.DefaultModelResolver;
 import org.apache.tuscany.sca.contribution.resolver.ExtensibleModelResolver;
 import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
 import org.apache.tuscany.sca.contribution.resolver.ModelResolverExtensionPoint;
+import org.apache.tuscany.sca.contribution.service.ContributionResolveException;
 import org.apache.tuscany.sca.core.DefaultExtensionPointRegistry;
 import org.apache.tuscany.sca.core.ExtensionPointRegistry;
 import org.apache.tuscany.sca.core.FactoryExtensionPoint;
@@ -69,6 +72,7 @@
 import org.apache.tuscany.sca.core.invocation.ProxyFactory;
 import org.apache.tuscany.sca.core.invocation.ProxyFactoryExtensionPoint;
 import org.apache.tuscany.sca.definitions.SCADefinitions;
+import org.apache.tuscany.sca.definitions.impl.SCADefinitionsImpl;
 import org.apache.tuscany.sca.implementation.node.ConfiguredNodeImplementation;
 import org.apache.tuscany.sca.implementation.node.NodeImplementationFactory;
 import org.apache.tuscany.sca.monitor.Monitor;
@@ -77,6 +81,12 @@
 import org.apache.tuscany.sca.monitor.Problem.Severity;
 import org.apache.tuscany.sca.node.Client;
 import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.policy.Intent;
+import org.apache.tuscany.sca.policy.IntentAttachPointType;
+import org.apache.tuscany.sca.policy.PolicySet;
+import org.apache.tuscany.sca.provider.SCADefinitionsProvider;
+import org.apache.tuscany.sca.provider.SCADefinitionsProviderException;
+import org.apache.tuscany.sca.provider.SCADefinitionsProviderExtensionPoint;
 import org.apache.tuscany.sca.runtime.RuntimeComponent;
 import org.apache.tuscany.sca.runtime.RuntimeComponentContext;
 import org.apache.tuscany.sca.work.WorkScheduler;
@@ -120,6 +130,7 @@
     private List<ModuleActivator> moduleActivators = new ArrayList<ModuleActivator>();
     private CompositeActivator compositeActivator;
     private WorkScheduler workScheduler;
+    private SCADefinitions systemDefinitions;
 
     /** 
      * Constructs a new SCA node.
@@ -308,9 +319,47 @@
         compositeActivator = utilities.getUtility(CompositeActivator.class);
 
         workScheduler = utilities.getUtility(WorkScheduler.class);
-        
-        // Load the definitions.xml
-        //loadSCADefinitions();
+
+        // This is not right, the aggregate algorithm is not right, adding policies to
+        // a resolver like that is not correct as these policies won't be seen by the resolvers
+        // used by the contributions, and we shouldn't have to use the doc processor to do
+        // the resolution, so commenting out for now as it's not critical to get working in
+        // the Equinox environment initially
+        
+//        // Load the system definitions.xml
+//        SCADefinitionsProviderExtensionPoint definitionsProviders = extensionPoints.getExtensionPoint(SCADefinitionsProviderExtensionPoint.class);
+//        systemDefinitions = new SCADefinitionsImpl();
+//        try {
+//            for (SCADefinitionsProvider definitionsProvider : definitionsProviders.getSCADefinitionsProviders()) {
+//                aggregateSCADefinitions(definitionsProvider.getSCADefinition(), systemDefinitions);
+//            }
+//        } catch (SCADefinitionsProviderException e) {
+//            throw new IllegalStateException(e);
+//        }
+//
+//        // Configure a resolver for the system definitions
+//        ModelResolver definitionsResolver = new DefaultModelResolver();
+//        for (Intent intent : systemDefinitions.getPolicyIntents()) {
+//            definitionsResolver.addModel(intent);
+//        }
+//        for (PolicySet policySet : systemDefinitions.getPolicySets()) {
+//            definitionsResolver.addModel(policySet);
+//        }
+//        for (IntentAttachPointType bindingType : systemDefinitions.getBindingTypes()) {
+//            definitionsResolver.addModel(bindingType);
+//        }
+//        for (IntentAttachPointType implementationType : systemDefinitions.getImplementationTypes()) {
+//            definitionsResolver.addModel(implementationType);
+//        }
+//
+//        // Now that all system sca definitions have been read, let's resolve them
+//        URLArtifactProcessorExtensionPoint documentProcessors = extensionPoints.getExtensionPoint(URLArtifactProcessorExtensionPoint.class);
+//        URLArtifactProcessor<SCADefinitions> definitionsProcessor = documentProcessors.getProcessor(SCADefinitions.class);
+//        try {
+//            definitionsProcessor.resolve(systemDefinitions, definitionsResolver);
+//        } catch (ContributionResolveException e) {
+//            throw new IllegalStateException(e);
+//        }
 
         if (logger.isLoggable(Level.FINE)) {
             long end = currentTimeMillis();
@@ -388,10 +437,10 @@
         }
 
         // Build an aggregated SCA definitions model
-        SCADefinitions definitions = null;
+        SCADefinitions definitions = systemDefinitions;
         //definitions = new SCADefinitionsImpl();
         //for (SCADefinitions definition : ((List<SCADefinitions>)policyDefinitions)) {
-        //    SCADefinitionsUtil.aggregateSCADefinitions(definition, aggregatedDefinitions);
+        //    SCADefinitionsUtil.aggregateSCADefinitions(definition, definitions);
         //}
         
         // Build the composite and wire the components included in it
@@ -407,7 +456,7 @@
         // Include the node composite in the top-level composite 
         tempComposite.getIncludes().add(composite);
 
-        // set the top level composite on the composite activator as 
+        // Set the top level composite on the composite activator as 
         // logic in callable reference resolution relies on this being 
         // available
         compositeActivator.setDomainComposite(tempComposite);

Modified: tuscany/branches/sca-equinox/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeUtil.java
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-equinox/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeUtil.java?rev=703296&r1=703295&r2=703296&view=diff
==============================================================================
--- tuscany/branches/sca-equinox/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeUtil.java (original)
+++ tuscany/branches/sca-equinox/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeUtil.java Thu Oct  9 17:16:53 2008
@@ -19,22 +19,11 @@
 
 package org.apache.tuscany.sca.node.impl;
 
-import java.io.IOException;
 import java.net.URI;
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-import java.util.logging.Level;
 import java.util.logging.Logger;
 
 import org.apache.tuscany.sca.contribution.Contribution;
 import org.apache.tuscany.sca.contribution.ContributionFactory;
-import org.apache.tuscany.sca.core.ExtensionPointRegistry;
-import org.apache.tuscany.sca.core.ModuleActivator;
-import org.apache.tuscany.sca.core.assembly.ActivationException;
-import org.apache.tuscany.sca.extensibility.ServiceDeclaration;
-import org.apache.tuscany.sca.extensibility.ServiceDiscovery;
 
 /**
  * NodeUtil
@@ -64,48 +53,4 @@
         return URI.create(uri);
     }
 
-//    private void loadSCADefinitions() throws ActivationException {
-//        try {
-//            URLArtifactProcessorExtensionPoint documentProcessors =
-//                registry.getExtensionPoint(URLArtifactProcessorExtensionPoint.class);
-//            URLArtifactProcessor<SCADefinitions> definitionsProcessor =
-//                documentProcessors.getProcessor(SCADefinitions.class);
-//            SCADefinitionsProviderExtensionPoint scaDefnProviders =
-//                registry.getExtensionPoint(SCADefinitionsProviderExtensionPoint.class);
-//
-//            SCADefinitions systemSCADefinitions = new SCADefinitionsImpl();
-//            SCADefinitions aSCADefn = null;
-//            for (SCADefinitionsProvider aProvider : scaDefnProviders.getSCADefinitionsProviders()) {
-//                aSCADefn = aProvider.getSCADefinition();
-//                SCADefinitionsUtil.aggregateSCADefinitions(aSCADefn, systemSCADefinitions);
-//            }
-//
-//            policyDefinitions.add(systemSCADefinitions);
-//
-//            //we cannot expect that providers will add the intents and policysets into the resolver
-//            //so we do this here explicitly
-//            for (Intent intent : systemSCADefinitions.getPolicyIntents()) {
-//                policyDefinitionsResolver.addModel(intent);
-//            }
-//
-//            for (PolicySet policySet : systemSCADefinitions.getPolicySets()) {
-//                policyDefinitionsResolver.addModel(policySet);
-//            }
-//
-//            for (IntentAttachPointType attachPoinType : systemSCADefinitions.getBindingTypes()) {
-//                policyDefinitionsResolver.addModel(attachPoinType);
-//            }
-//
-//            for (IntentAttachPointType attachPoinType : systemSCADefinitions.getImplementationTypes()) {
-//                policyDefinitionsResolver.addModel(attachPoinType);
-//            }
-//
-//            //now that all system sca definitions have been read, lets resolve them right away
-//            definitionsProcessor.resolve(systemSCADefinitions, policyDefinitionsResolver);
-//            
-//        } catch (Exception e) {
-//            throw new ActivationException(e);
-//        }
-//    }
-
 }