summaryrefslogtreecommitdiffstats
path: root/java/sca/itest/nodes
diff options
context:
space:
mode:
Diffstat (limited to 'java/sca/itest/nodes')
-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) {