diff options
Diffstat (limited to '')
2 files changed, 23 insertions, 12 deletions
diff --git a/branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/soap12/HelloWorldSOAP12TestCase.java b/branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/soap12/HelloWorldSOAP12TestCase.java index b2ccd7f97d..b8304a0c61 100644 --- a/branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/soap12/HelloWorldSOAP12TestCase.java +++ b/branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/soap12/HelloWorldSOAP12TestCase.java @@ -22,37 +22,42 @@ package org.apache.tuscany.sca.binding.ws.axis2.itests.soap12 ; 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(); } } diff --git a/branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/soap12/QuestionMarkWSDLTestCase.java b/branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/soap12/QuestionMarkWSDLTestCase.java index 8d378565d4..5a75846e9d 100644 --- a/branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/soap12/QuestionMarkWSDLTestCase.java +++ b/branches/sca-equinox/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/soap12/QuestionMarkWSDLTestCase.java @@ -33,7 +33,10 @@ import javax.xml.namespace.QName; 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 @@ import org.apache.tuscany.sca.host.embedded.SCADomain; 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 @@ public class QuestionMarkWSDLTestCase extends TestCase { @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(); } } |