summaryrefslogtreecommitdiffstats
path: root/java/sca/itest/nodes/two-nodes-test/src
diff options
context:
space:
mode:
authorrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2009-06-25 19:39:41 +0000
committerrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2009-06-25 19:39:41 +0000
commit9e8fa7e0c7944554bf12fca6b26b91ffd7b24ba7 (patch)
tree2f4d55d86c25100161d64d6832c8ecb918a71cbc /java/sca/itest/nodes/two-nodes-test/src
parenta2cab5688e3d242ee3b3c090c66351b9e5921a67 (diff)
Configure the base URIs for the bindings
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@788486 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/sca/itest/nodes/two-nodes-test/src')
-rw-r--r--java/sca/itest/nodes/two-nodes-test/src/test/java/itest/ClientNode.java13
-rw-r--r--java/sca/itest/nodes/two-nodes-test/src/test/java/itest/ServiceNode.java10
2 files changed, 16 insertions, 7 deletions
diff --git a/java/sca/itest/nodes/two-nodes-test/src/test/java/itest/ClientNode.java b/java/sca/itest/nodes/two-nodes-test/src/test/java/itest/ClientNode.java
index 1c787261eb..b9d93d1e84 100644
--- a/java/sca/itest/nodes/two-nodes-test/src/test/java/itest/ClientNode.java
+++ b/java/sca/itest/nodes/two-nodes-test/src/test/java/itest/ClientNode.java
@@ -25,6 +25,8 @@ import itest.nodes.Helloworld;
import java.io.File;
+import org.apache.tuscany.sca.assembly.SCABinding;
+import org.apache.tuscany.sca.binding.ws.WebServiceBinding;
import org.apache.tuscany.sca.node.Node;
import org.apache.tuscany.sca.node.NodeFactory;
import org.apache.tuscany.sca.node.configuration.NodeConfiguration;
@@ -38,7 +40,7 @@ import org.oasisopen.sca.client.SCAClientFactory;
/**
* This shows how to test the Calculator service component.
*/
-public class ClientNode{
+public class ClientNode {
private static Node clientNode;
private static TestCaseRunner runner;
@@ -47,10 +49,13 @@ public class ClientNode{
public static void setUpBeforeClass() throws Exception {
runner = new TestCaseRunner(ServiceNode.class);
runner.beforeClass();
- System.setProperty("org.apache.tuscany.sca.contribution.processor.ValidationSchemaExtensionPoint.enabled", "false");
+ System.setProperty("org.apache.tuscany.sca.contribution.processor.ValidationSchemaExtensionPoint.enabled",
+ "false");
NodeFactory factory = NodeFactory.newInstance();
NodeConfiguration conf =
- factory.createNodeConfiguration().setURI("clientNode")
+ factory.createNodeConfiguration().setURI("clientNode").
+ addBinding(SCABinding.TYPE, "http://localhost:8085/sca https://localhost:9085/sca")
+ .addBinding(WebServiceBinding.TYPE, "http://localhost:8086/ws")
.addContribution("client", new File("../helloworld-client/target/classes").toURI().toString());
clientNode = factory.createNode(conf).start();
Thread.sleep(1000);
@@ -82,7 +87,7 @@ public class ClientNode{
if (clientNode != null) {
clientNode.stop();
}
- if(runner!=null) {
+ if (runner != null) {
runner.afterClass();
}
}
diff --git a/java/sca/itest/nodes/two-nodes-test/src/test/java/itest/ServiceNode.java b/java/sca/itest/nodes/two-nodes-test/src/test/java/itest/ServiceNode.java
index ec1d8636aa..4b278d89a2 100644
--- a/java/sca/itest/nodes/two-nodes-test/src/test/java/itest/ServiceNode.java
+++ b/java/sca/itest/nodes/two-nodes-test/src/test/java/itest/ServiceNode.java
@@ -21,6 +21,8 @@ package itest;
import java.io.File;
+import org.apache.tuscany.sca.assembly.SCABinding;
+import org.apache.tuscany.sca.binding.ws.WebServiceBinding;
import org.apache.tuscany.sca.node.Node;
import org.apache.tuscany.sca.node.NodeFactory;
import org.apache.tuscany.sca.node.configuration.NodeConfiguration;
@@ -30,21 +32,23 @@ import org.junit.BeforeClass;
/**
* This shows how to test the Calculator service component.
*/
-public class ServiceNode{
+public class ServiceNode {
private static Node serviceNode;
@BeforeClass
public static void setUpBeforeClass() throws Exception {
- System.setProperty("org.apache.tuscany.sca.contribution.processor.ValidationSchemaExtensionPoint.enabled", "false");
+ System.setProperty("org.apache.tuscany.sca.contribution.processor.ValidationSchemaExtensionPoint.enabled",
+ "false");
NodeFactory factory = NodeFactory.newInstance();
NodeConfiguration conf =
factory.createNodeConfiguration().setURI("serviceNode")
+ .addBinding(SCABinding.TYPE, "http://localhost:8087/sca")
+ .addBinding(WebServiceBinding.TYPE, "http://localhost:8088/ws")
.addContribution("service", new File("../helloworld-service/target/classes").toURI().toString());
serviceNode = factory.createNode(conf).start();
}
-
@AfterClass
public static void tearDownAfterClass() throws Exception {
if (serviceNode != null) {