diff options
author | antelder <antelder@13f79535-47bb-0310-9956-ffa450edef68> | 2009-11-25 11:12:03 +0000 |
---|---|---|
committer | antelder <antelder@13f79535-47bb-0310-9956-ffa450edef68> | 2009-11-25 11:12:03 +0000 |
commit | 82aa0cfbd6f8ff0e2c73015cc1e1d03fffd48808 (patch) | |
tree | 374c32ff5abc3b2224cd33528ffaf8a7461a7302 /sca-java-2.x/trunk/itest/nodes/two-nodes-test/src/test/java | |
parent | de5197c39ffbdaec890debe429faf1c07212e338 (diff) |
Remove SCAClient as its not in the latest spec and update all the places it was used to use SCAClientFactory.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@884043 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/itest/nodes/two-nodes-test/src/test/java')
-rw-r--r-- | sca-java-2.x/trunk/itest/nodes/two-nodes-test/src/test/java/itest/ClientNode.java | 7 | ||||
-rw-r--r-- | sca-java-2.x/trunk/itest/nodes/two-nodes-test/src/test/java/itest/TwoNodesTestCase.java | 7 |
2 files changed, 8 insertions, 6 deletions
diff --git a/sca-java-2.x/trunk/itest/nodes/two-nodes-test/src/test/java/itest/ClientNode.java b/sca-java-2.x/trunk/itest/nodes/two-nodes-test/src/test/java/itest/ClientNode.java index 5f9453a5d6..0b8e2229a2 100644 --- a/sca-java-2.x/trunk/itest/nodes/two-nodes-test/src/test/java/itest/ClientNode.java +++ b/sca-java-2.x/trunk/itest/nodes/two-nodes-test/src/test/java/itest/ClientNode.java @@ -24,6 +24,7 @@ import static org.junit.Assert.assertNotNull; import itest.nodes.Helloworld; import java.io.File; +import java.net.URI; import javax.xml.namespace.QName; @@ -34,7 +35,7 @@ import org.junit.AfterClass; import org.junit.BeforeClass; import org.junit.Ignore; import org.junit.Test; -import org.oasisopen.sca.client.SCAClient; +import org.oasisopen.sca.client.SCAClientFactory; /** * This shows how to test the Calculator service component. @@ -71,11 +72,11 @@ public class ClientNode { @Test @Ignore("SCAClient needs to leverage the EndpointRegistry to invoke services that are not hosted on the local node") public void testCalculatorClientAPI() throws Exception { - Helloworld service = SCAClient.getService(Helloworld.class, "HelloworldService"); + Helloworld service = SCAClientFactory.newInstance(URI.create("http://tuscany.apache.org/sca/1.1/domains/default")).getService(Helloworld.class, "HelloworldService"); assertNotNull(service); assertEquals("Hello Petra", service.sayHello("Petra")); - Helloworld client = SCAClient.getService(Helloworld.class, "HelloworldClient"); + Helloworld client = SCAClientFactory.newInstance(URI.create("http://tuscany.apache.org/sca/1.1/domains/default")).getService(Helloworld.class, "HelloworldClient"); assertNotNull(client); assertEquals("Hi Hello Petra", client.sayHello("Petra")); } diff --git a/sca-java-2.x/trunk/itest/nodes/two-nodes-test/src/test/java/itest/TwoNodesTestCase.java b/sca-java-2.x/trunk/itest/nodes/two-nodes-test/src/test/java/itest/TwoNodesTestCase.java index 769aad1940..4c33a39619 100644 --- a/sca-java-2.x/trunk/itest/nodes/two-nodes-test/src/test/java/itest/TwoNodesTestCase.java +++ b/sca-java-2.x/trunk/itest/nodes/two-nodes-test/src/test/java/itest/TwoNodesTestCase.java @@ -24,6 +24,7 @@ import static org.junit.Assert.assertNotNull; import itest.nodes.Helloworld; import java.io.File; +import java.net.URI; import org.apache.tuscany.sca.node.Node; import org.apache.tuscany.sca.node.NodeFactory; @@ -31,7 +32,7 @@ import org.apache.tuscany.sca.node.configuration.NodeConfiguration; import org.junit.AfterClass; import org.junit.BeforeClass; import org.junit.Test; -import org.oasisopen.sca.client.SCAClient; +import org.oasisopen.sca.client.SCAClientFactory; /** * This shows how to test the Calculator service component. @@ -84,11 +85,11 @@ public class TwoNodesTestCase { @Test public void testCalculatorClientAPI() throws Exception { - Helloworld service = SCAClient.getService(Helloworld.class, "HelloworldService"); + Helloworld service = SCAClientFactory.newInstance(URI.create("http://tuscany.apache.org/sca/1.1/domains/default")).getService(Helloworld.class, "HelloworldService"); assertNotNull(service); assertEquals("Hello Petra", service.sayHello("Petra")); - Helloworld client = SCAClient.getService(Helloworld.class, "HelloworldClient"); + Helloworld client = SCAClientFactory.newInstance(URI.create("http://tuscany.apache.org/sca/1.1/domains/default")).getService(Helloworld.class, "HelloworldClient"); assertNotNull(client); assertEquals("Hi Hello Petra", client.sayHello("Petra")); } |