summaryrefslogtreecommitdiffstats
path: root/sca-java-1.x/branches/sca-java-1.0/modules/node-impl/src/test
diff options
context:
space:
mode:
authorlresende <lresende@13f79535-47bb-0310-9956-ffa450edef68>2009-11-11 23:07:07 +0000
committerlresende <lresende@13f79535-47bb-0310-9956-ffa450edef68>2009-11-11 23:07:07 +0000
commit5559ef5edbf8d3616f7a4b497b2a459b0ee4082b (patch)
tree424dfa28917e6204d4fd24e4328d274f8d2d14d0 /sca-java-1.x/branches/sca-java-1.0/modules/node-impl/src/test
parent3dd7e2c4da9c80b8182a2d04dc129a67aa7910df (diff)
Moving 1.x branches
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@835122 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-1.x/branches/sca-java-1.0/modules/node-impl/src/test')
-rw-r--r--sca-java-1.x/branches/sca-java-1.0/modules/node-impl/src/test/java/calculator/AddService.java31
-rw-r--r--sca-java-1.x/branches/sca-java-1.0/modules/node-impl/src/test/java/calculator/AddServiceImpl.java31
-rw-r--r--sca-java-1.x/branches/sca-java-1.0/modules/node-impl/src/test/java/calculator/CalculatorService.java35
-rw-r--r--sca-java-1.x/branches/sca-java-1.0/modules/node-impl/src/test/java/calculator/CalculatorServiceImpl.java74
-rw-r--r--sca-java-1.x/branches/sca-java-1.0/modules/node-impl/src/test/java/calculator/DivideService.java28
-rw-r--r--sca-java-1.x/branches/sca-java-1.0/modules/node-impl/src/test/java/calculator/DivideServiceImpl.java30
-rw-r--r--sca-java-1.x/branches/sca-java-1.0/modules/node-impl/src/test/java/calculator/MultiplyService.java28
-rw-r--r--sca-java-1.x/branches/sca-java-1.0/modules/node-impl/src/test/java/calculator/MultiplyServiceImpl.java30
-rw-r--r--sca-java-1.x/branches/sca-java-1.0/modules/node-impl/src/test/java/calculator/SubtractService.java31
-rw-r--r--sca-java-1.x/branches/sca-java-1.0/modules/node-impl/src/test/java/calculator/SubtractServiceImpl.java31
-rw-r--r--sca-java-1.x/branches/sca-java-1.0/modules/node-impl/src/test/java/org/apache/tuscany/sca/node/impl/InMemoryTestCase.java102
-rw-r--r--sca-java-1.x/branches/sca-java-1.0/modules/node-impl/src/test/resources/nodeA/Calculator.composite41
-rw-r--r--sca-java-1.x/branches/sca-java-1.0/modules/node-impl/src/test/resources/nodeA/META-INF/sca-contribution.xml24
-rw-r--r--sca-java-1.x/branches/sca-java-1.0/modules/node-impl/src/test/resources/nodeA/wsdl/add.wsdl88
-rw-r--r--sca-java-1.x/branches/sca-java-1.0/modules/node-impl/src/test/resources/nodeA/wsdl/multiply.wsdl81
-rw-r--r--sca-java-1.x/branches/sca-java-1.0/modules/node-impl/src/test/resources/nodeA/wsdl/subtract.wsdl87
-rw-r--r--sca-java-1.x/branches/sca-java-1.0/modules/node-impl/src/test/resources/nodeB/Calculator.composite45
-rw-r--r--sca-java-1.x/branches/sca-java-1.0/modules/node-impl/src/test/resources/nodeB/META-INF/sca-contribution.xml24
-rw-r--r--sca-java-1.x/branches/sca-java-1.0/modules/node-impl/src/test/resources/nodeC/Calculator.composite32
-rw-r--r--sca-java-1.x/branches/sca-java-1.0/modules/node-impl/src/test/resources/nodeC/META-INF/sca-contribution.xml24
20 files changed, 897 insertions, 0 deletions
diff --git a/sca-java-1.x/branches/sca-java-1.0/modules/node-impl/src/test/java/calculator/AddService.java b/sca-java-1.x/branches/sca-java-1.0/modules/node-impl/src/test/java/calculator/AddService.java
new file mode 100644
index 0000000000..797ebb4024
--- /dev/null
+++ b/sca-java-1.x/branches/sca-java-1.0/modules/node-impl/src/test/java/calculator/AddService.java
@@ -0,0 +1,31 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package calculator;
+
+import org.osoa.sca.annotations.Remotable;
+
+/**
+ * The Add service interface
+ */
+@Remotable
+public interface AddService {
+
+ double add(double n1, double n2);
+
+}
diff --git a/sca-java-1.x/branches/sca-java-1.0/modules/node-impl/src/test/java/calculator/AddServiceImpl.java b/sca-java-1.x/branches/sca-java-1.0/modules/node-impl/src/test/java/calculator/AddServiceImpl.java
new file mode 100644
index 0000000000..1a63d4ff77
--- /dev/null
+++ b/sca-java-1.x/branches/sca-java-1.0/modules/node-impl/src/test/java/calculator/AddServiceImpl.java
@@ -0,0 +1,31 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package calculator;
+
+/**
+ * An implementation of the Add service
+ */
+public class AddServiceImpl implements AddService {
+
+ public double add(double n1, double n2) {
+ System.out.println("AddService - add " + n1 + " and " + n2);
+ return n1 + n2;
+ }
+
+}
diff --git a/sca-java-1.x/branches/sca-java-1.0/modules/node-impl/src/test/java/calculator/CalculatorService.java b/sca-java-1.x/branches/sca-java-1.0/modules/node-impl/src/test/java/calculator/CalculatorService.java
new file mode 100644
index 0000000000..ad87375529
--- /dev/null
+++ b/sca-java-1.x/branches/sca-java-1.0/modules/node-impl/src/test/java/calculator/CalculatorService.java
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package calculator;
+
+
+/**
+ * The Calculator service interface.
+ */
+public interface CalculatorService {
+
+ double add(double n1, double n2);
+
+ double subtract(double n1, double n2);
+
+ double multiply(double n1, double n2);
+
+ double divide(double n1, double n2);
+
+}
diff --git a/sca-java-1.x/branches/sca-java-1.0/modules/node-impl/src/test/java/calculator/CalculatorServiceImpl.java b/sca-java-1.x/branches/sca-java-1.0/modules/node-impl/src/test/java/calculator/CalculatorServiceImpl.java
new file mode 100644
index 0000000000..8ee640ed6b
--- /dev/null
+++ b/sca-java-1.x/branches/sca-java-1.0/modules/node-impl/src/test/java/calculator/CalculatorServiceImpl.java
@@ -0,0 +1,74 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package calculator;
+
+import org.osoa.sca.annotations.Reference;
+
+
+/**
+ * An implementation of the Calculator service.
+ */
+public class CalculatorServiceImpl implements CalculatorService {
+
+ private AddService addService;
+ private SubtractService subtractService;
+ private MultiplyService multiplyService;
+ private DivideService divideService;
+
+ @Reference
+ public void setAddService(AddService addService) {
+ this.addService = addService;
+ }
+
+ @Reference
+ public void setSubtractService(SubtractService subtractService) {
+ this.subtractService = subtractService;
+ }
+
+ @Reference
+ public void setMultiplyService(MultiplyService multiplyService) {
+ this.multiplyService = multiplyService;
+ }
+
+ @Reference
+ public void setDivideService(DivideService divideService) {
+ this.divideService = divideService;
+ }
+
+ public double add(double n1, double n2) {
+ System.out.println("CalculatorService - add " + n1 + " and " + n2);
+ return addService.add(n1, n2);
+ }
+
+ public double subtract(double n1, double n2) {
+ System.out.println("CalculatorService - subtract " + n1 + " and " + n2);
+ return subtractService.subtract(n1, n2);
+ }
+
+ public double multiply(double n1, double n2) {
+ System.out.println("CalculatorService - multiply " + n1 + " and " + n2);
+ return multiplyService.multiply(n1, n2);
+ }
+
+ public double divide(double n1, double n2) {
+ System.out.println("CalculatorService - divide " + n1 + " and " + n2);
+ return divideService.divide(n1, n2);
+ }
+
+}
diff --git a/sca-java-1.x/branches/sca-java-1.0/modules/node-impl/src/test/java/calculator/DivideService.java b/sca-java-1.x/branches/sca-java-1.0/modules/node-impl/src/test/java/calculator/DivideService.java
new file mode 100644
index 0000000000..ef6a8b375b
--- /dev/null
+++ b/sca-java-1.x/branches/sca-java-1.0/modules/node-impl/src/test/java/calculator/DivideService.java
@@ -0,0 +1,28 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package calculator;
+
+/**
+ * The divide service interface
+ */
+public interface DivideService {
+
+ double divide(double n1, double n2);
+
+}
diff --git a/sca-java-1.x/branches/sca-java-1.0/modules/node-impl/src/test/java/calculator/DivideServiceImpl.java b/sca-java-1.x/branches/sca-java-1.0/modules/node-impl/src/test/java/calculator/DivideServiceImpl.java
new file mode 100644
index 0000000000..8c33862f6d
--- /dev/null
+++ b/sca-java-1.x/branches/sca-java-1.0/modules/node-impl/src/test/java/calculator/DivideServiceImpl.java
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package calculator;
+
+/**
+ * An implementation of the Divide service.
+ */
+public class DivideServiceImpl implements DivideService {
+
+ public double divide(double n1, double n2) {
+ return n1 / n2;
+ }
+
+}
diff --git a/sca-java-1.x/branches/sca-java-1.0/modules/node-impl/src/test/java/calculator/MultiplyService.java b/sca-java-1.x/branches/sca-java-1.0/modules/node-impl/src/test/java/calculator/MultiplyService.java
new file mode 100644
index 0000000000..db568cc762
--- /dev/null
+++ b/sca-java-1.x/branches/sca-java-1.0/modules/node-impl/src/test/java/calculator/MultiplyService.java
@@ -0,0 +1,28 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package calculator;
+
+/**
+ * The interface for the multiply service
+ */
+public interface MultiplyService {
+
+ double multiply(double n1, double n2);
+
+}
diff --git a/sca-java-1.x/branches/sca-java-1.0/modules/node-impl/src/test/java/calculator/MultiplyServiceImpl.java b/sca-java-1.x/branches/sca-java-1.0/modules/node-impl/src/test/java/calculator/MultiplyServiceImpl.java
new file mode 100644
index 0000000000..c7fbc73c00
--- /dev/null
+++ b/sca-java-1.x/branches/sca-java-1.0/modules/node-impl/src/test/java/calculator/MultiplyServiceImpl.java
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package calculator;
+
+/**
+ * An implementation of the Multiply service.
+ */
+public class MultiplyServiceImpl implements MultiplyService {
+
+ public double multiply(double n1, double n2) {
+ return n1 * n2;
+ }
+
+}
diff --git a/sca-java-1.x/branches/sca-java-1.0/modules/node-impl/src/test/java/calculator/SubtractService.java b/sca-java-1.x/branches/sca-java-1.0/modules/node-impl/src/test/java/calculator/SubtractService.java
new file mode 100644
index 0000000000..615320e670
--- /dev/null
+++ b/sca-java-1.x/branches/sca-java-1.0/modules/node-impl/src/test/java/calculator/SubtractService.java
@@ -0,0 +1,31 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package calculator;
+
+import org.osoa.sca.annotations.Remotable;
+
+/**
+ * The interface for the multiply service
+ */
+@Remotable
+public interface SubtractService {
+
+ double subtract(double n1, double n2);
+
+}
diff --git a/sca-java-1.x/branches/sca-java-1.0/modules/node-impl/src/test/java/calculator/SubtractServiceImpl.java b/sca-java-1.x/branches/sca-java-1.0/modules/node-impl/src/test/java/calculator/SubtractServiceImpl.java
new file mode 100644
index 0000000000..abf2777c7d
--- /dev/null
+++ b/sca-java-1.x/branches/sca-java-1.0/modules/node-impl/src/test/java/calculator/SubtractServiceImpl.java
@@ -0,0 +1,31 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package calculator;
+
+/**
+ * An implementation of the subtract service.
+ */
+public class SubtractServiceImpl implements SubtractService {
+
+ public double subtract(double n1, double n2) {
+ System.out.println("SubtractService - subtract " + n1 + " and " + n2);
+ return n1 - n2;
+ }
+
+}
diff --git a/sca-java-1.x/branches/sca-java-1.0/modules/node-impl/src/test/java/org/apache/tuscany/sca/node/impl/InMemoryTestCase.java b/sca-java-1.x/branches/sca-java-1.0/modules/node-impl/src/test/java/org/apache/tuscany/sca/node/impl/InMemoryTestCase.java
new file mode 100644
index 0000000000..6af687f95d
--- /dev/null
+++ b/sca-java-1.x/branches/sca-java-1.0/modules/node-impl/src/test/java/org/apache/tuscany/sca/node/impl/InMemoryTestCase.java
@@ -0,0 +1,102 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.node.impl;
+
+
+import junit.framework.Assert;
+
+import org.apache.tuscany.sca.domain.SCADomain;
+import org.apache.tuscany.sca.node.impl.SCANodeImpl;
+import org.apache.tuscany.sca.node.impl.SCANodeUtil;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+import calculator.CalculatorService;
+
+/**
+ * Runs a distributed domain in a single VM by using and in memory
+ * implementation of the distributed domain
+ */
+public class InMemoryTestCase {
+
+ private static String DEFAULT_DOMAIN_URI = "http://localhost:8877";
+
+ private static SCADomain registry;
+ private static SCADomain domainNodeA;
+ private static SCADomain domainNodeB;
+ private static SCADomain domainNodeC;
+ private static CalculatorService calculatorServiceA;
+ private static CalculatorService calculatorServiceB;
+
+ @BeforeClass
+ public static void init() throws Exception {
+
+ try {
+ System.out.println("Setting up domain registry");
+
+ registry = SCADomain.newInstance("domain.composite");
+
+ System.out.println("Setting up calculator ");
+
+ // Create the domain representation
+ domainNodeA = SCADomain.newInstance(DEFAULT_DOMAIN_URI, "nodeA", null, "nodeA/Calculator.composite");
+
+ // Create the domain representation
+ domainNodeB = SCADomain.newInstance(DEFAULT_DOMAIN_URI, "nodeB", null, "nodeB/Calculator.composite");
+
+ // create the node that runs the
+ // subtract component
+ domainNodeC = SCADomain.newInstance(DEFAULT_DOMAIN_URI, "nodeC", null, "nodeC/Calculator.composite");
+
+ // get a reference to the calculator service from domainA
+ // which will be running this component
+ calculatorServiceA = domainNodeA.getService(CalculatorService.class, "CalculatorServiceComponent");
+ calculatorServiceB = domainNodeB.getService(CalculatorService.class, "CalculatorServiceComponent");
+
+ } catch(Exception ex){
+ System.err.println(ex.toString());
+ }
+
+ }
+
+ @AfterClass
+ public static void destroy() throws Exception {
+ // stop the nodes and hence the domains they contain
+ domainNodeA.close();
+ domainNodeB.close();
+ domainNodeC.close();
+ }
+
+ @Test
+ public void testCalculator() throws Exception {
+
+ // Calculate
+ Assert.assertEquals(calculatorServiceA.add(3, 2), 5.0);
+ Assert.assertEquals(calculatorServiceA.subtract(3, 2), 1.0);
+ Assert.assertEquals(calculatorServiceA.multiply(3, 2), 6.0);
+ Assert.assertEquals(calculatorServiceA.divide(3, 2), 1.5);
+ Assert.assertEquals(calculatorServiceB.add(3, 2), 5.0);
+ Assert.assertEquals(calculatorServiceB.subtract(3, 2), 1.0);
+ Assert.assertEquals(calculatorServiceB.multiply(3, 2), 6.0);
+ Assert.assertEquals(calculatorServiceB.divide(3, 2), 1.5);
+
+ }
+}
diff --git a/sca-java-1.x/branches/sca-java-1.0/modules/node-impl/src/test/resources/nodeA/Calculator.composite b/sca-java-1.x/branches/sca-java-1.0/modules/node-impl/src/test/resources/nodeA/Calculator.composite
new file mode 100644
index 0000000000..138a9c5652
--- /dev/null
+++ b/sca-java-1.x/branches/sca-java-1.0/modules/node-impl/src/test/resources/nodeA/Calculator.composite
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ targetNamespace="http://sample"
+ xmlns:sample="http://sample"
+ name="Calculator">
+
+ <component name="CalculatorServiceComponent">
+ <implementation.java class="calculator.CalculatorServiceImpl"/>
+ <reference name="addService" target="AddServiceComponent" />
+ <reference name="subtractService" target="SubtractServiceComponent" />
+ <reference name="multiplyService" target="MultiplyServiceComponent"/>
+ <reference name="divideService" target="DivideServiceComponent" />
+ </component>
+
+ <component name="MultiplyServiceComponent">
+ <implementation.java class="calculator.MultiplyServiceImpl" />
+ </component>
+
+ <component name="DivideServiceComponent">
+ <implementation.java class="calculator.DivideServiceImpl" />
+ </component>
+
+</composite>
diff --git a/sca-java-1.x/branches/sca-java-1.0/modules/node-impl/src/test/resources/nodeA/META-INF/sca-contribution.xml b/sca-java-1.x/branches/sca-java-1.0/modules/node-impl/src/test/resources/nodeA/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..3f9ed8024b
--- /dev/null
+++ b/sca-java-1.x/branches/sca-java-1.0/modules/node-impl/src/test/resources/nodeA/META-INF/sca-contribution.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<contribution xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ targetNamespace="http://sample"
+ xmlns:sample="http://sample">
+ <deployable composite="sample:Calculator"/>
+</contribution> \ No newline at end of file
diff --git a/sca-java-1.x/branches/sca-java-1.0/modules/node-impl/src/test/resources/nodeA/wsdl/add.wsdl b/sca-java-1.x/branches/sca-java-1.0/modules/node-impl/src/test/resources/nodeA/wsdl/add.wsdl
new file mode 100644
index 0000000000..5dda2c214e
--- /dev/null
+++ b/sca-java-1.x/branches/sca-java-1.0/modules/node-impl/src/test/resources/nodeA/wsdl/add.wsdl
@@ -0,0 +1,88 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<wsdl:definitions targetNamespace="http://calculator/add"
+ xmlns:tns="http://calculator/add"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ name="add">
+
+ <wsdl:types>
+ <schema elementFormDefault="qualified"
+ targetNamespace="http://calculator/add"
+ xmlns="http://www.w3.org/2001/XMLSchema">
+
+ <element name="add">
+ <complexType>
+ <sequence>
+ <element name="n1" type="xsd:double"/>
+ <element name="n2" type="xsd:double"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ <element name="addResponse">
+ <complexType>
+ <sequence>
+ <element name="response" type="xsd:double"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ </schema>
+ </wsdl:types>
+
+ <wsdl:message name="addRequest">
+ <wsdl:part element="tns:add" name="parameters"/>
+ </wsdl:message>
+
+ <wsdl:message name="addResponse">
+ <wsdl:part element="tns:addResponse" name="parameters"/>
+ </wsdl:message>
+
+ <wsdl:portType name="Add">
+ <wsdl:operation name="add">
+ <wsdl:input message="tns:addRequest" name="addRequest"/>
+ <wsdl:output message="tns:addResponse" name="addResponse"/>
+ </wsdl:operation>
+ </wsdl:portType>
+
+ <wsdl:binding name="AddSoapBinding" type="tns:Add">
+ <wsdlsoap:binding style="document"
+ transport="http://schemas.xmlsoap.org/soap/http"/>
+ <wsdl:operation name="add">
+ <wsdlsoap:operation soapAction=""/>
+ <wsdl:input name="addRequest">
+ <wsdlsoap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output name="addResponse">
+ <wsdlsoap:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+
+ <wsdl:service name="AddService">
+ <wsdl:port binding="tns:AddSoapBinding" name="AddSoapPort">
+ <!--wsdlsoap:address location="http://localhost:8085/sample-calculator-webapp-ws/services/AddService"/-->
+ <wsdlsoap:address location="http://localhost:8085/AddServiceComponent"/>
+ </wsdl:port>
+ </wsdl:service>
+
+</wsdl:definitions>
diff --git a/sca-java-1.x/branches/sca-java-1.0/modules/node-impl/src/test/resources/nodeA/wsdl/multiply.wsdl b/sca-java-1.x/branches/sca-java-1.0/modules/node-impl/src/test/resources/nodeA/wsdl/multiply.wsdl
new file mode 100644
index 0000000000..81033cc9ec
--- /dev/null
+++ b/sca-java-1.x/branches/sca-java-1.0/modules/node-impl/src/test/resources/nodeA/wsdl/multiply.wsdl
@@ -0,0 +1,81 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<wsdl:definitions targetNamespace="http://calculator/multiply"
+ xmlns:tns="http://calculator/multiply"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ name="multiply">
+
+ <wsdl:types>
+ <schema elementFormDefault="qualified"
+ targetNamespace="http://calculator/multiply"
+ xmlns="http://www.w3.org/2001/XMLSchema">
+
+ <element name="multiply">
+ <complexType>
+ <sequence>
+ <element name="n1" type="xsd:double"/>
+ <element name="n2" type="xsd:double"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ <element name="multiplyResponse">
+ <complexType>
+ <sequence>
+ <element name="response" type="xsd:double"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ </schema>
+ </wsdl:types>
+
+ <wsdl:message name="multiplyRequest">
+ <wsdl:part element="tns:multiply" name="parameters"/>
+ </wsdl:message>
+
+ <wsdl:message name="multiplyResponse">
+ <wsdl:part element="tns:multiplyResponse" name="parameters"/>
+ </wsdl:message>
+
+ <wsdl:portType name="Multiply">
+ <wsdl:operation name="multiply">
+ <wsdl:input message="tns:multiplyRequest" name="multiplyRequest"/>
+ <wsdl:output message="tns:multiplyResponse" name="multiplyResponse"/>
+ </wsdl:operation>
+ </wsdl:portType>
+
+ <wsdl:binding name="MultiplySoapBinding" type="tns:Multiply">
+ <wsdlsoap:binding style="document"
+ transport="http://schemas.xmlsoap.org/soap/http"/>
+ <wsdl:operation name="multiply">
+ <wsdlsoap:operation soapAction=""/>
+ <wsdl:input name="multiplyRequest">
+ <wsdlsoap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output name="multiplyResponse">
+ <wsdlsoap:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+
+</wsdl:definitions>
diff --git a/sca-java-1.x/branches/sca-java-1.0/modules/node-impl/src/test/resources/nodeA/wsdl/subtract.wsdl b/sca-java-1.x/branches/sca-java-1.0/modules/node-impl/src/test/resources/nodeA/wsdl/subtract.wsdl
new file mode 100644
index 0000000000..ed015d31c2
--- /dev/null
+++ b/sca-java-1.x/branches/sca-java-1.0/modules/node-impl/src/test/resources/nodeA/wsdl/subtract.wsdl
@@ -0,0 +1,87 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<wsdl:definitions targetNamespace="http://calculator/subtract"
+ xmlns:tns="http://calculator/subtract"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ name="subtract">
+
+ <wsdl:types>
+ <schema elementFormDefault="qualified"
+ targetNamespace="http://calculator/subtract"
+ xmlns="http://www.w3.org/2001/XMLSchema">
+
+ <element name="subtract">
+ <complexType>
+ <sequence>
+ <element name="n1" type="xsd:double"/>
+ <element name="n2" type="xsd:double"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ <element name="subtractResponse">
+ <complexType>
+ <sequence>
+ <element name="response" type="xsd:double"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ </schema>
+ </wsdl:types>
+
+ <wsdl:message name="subtractRequest">
+ <wsdl:part element="tns:subtract" name="parameters"/>
+ </wsdl:message>
+
+ <wsdl:message name="subtractResponse">
+ <wsdl:part element="tns:subtractResponse" name="parameters"/>
+ </wsdl:message>
+
+ <wsdl:portType name="Subtract">
+ <wsdl:operation name="subtract">
+ <wsdl:input message="tns:subtractRequest" name="subtractRequest"/>
+ <wsdl:output message="tns:subtractResponse" name="subtractResponse"/>
+ </wsdl:operation>
+ </wsdl:portType>
+
+ <wsdl:binding name="SubtractSoapBinding" type="tns:Subtract">
+ <wsdlsoap:binding style="document"
+ transport="http://schemas.xmlsoap.org/soap/http"/>
+ <wsdl:operation name="subtract">
+ <wsdlsoap:operation soapAction=""/>
+ <wsdl:input name="subtractRequest">
+ <wsdlsoap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output name="subtractResponse">
+ <wsdlsoap:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+
+ <wsdl:service name="SubtractService">
+ <wsdl:port binding="tns:SubtractSoapBinding" name="SubtractSoapPort">
+ <wsdlsoap:address location="http://localhost:8088/SubtractServiceComponent"/>
+ </wsdl:port>
+ </wsdl:service>
+
+</wsdl:definitions>
diff --git a/sca-java-1.x/branches/sca-java-1.0/modules/node-impl/src/test/resources/nodeB/Calculator.composite b/sca-java-1.x/branches/sca-java-1.0/modules/node-impl/src/test/resources/nodeB/Calculator.composite
new file mode 100644
index 0000000000..08abaf40ce
--- /dev/null
+++ b/sca-java-1.x/branches/sca-java-1.0/modules/node-impl/src/test/resources/nodeB/Calculator.composite
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ targetNamespace="http://sample"
+ xmlns:sample="http://sample"
+ name="Calculator">
+
+ <component name="CalculatorServiceComponent">
+ <implementation.java class="calculator.CalculatorServiceImpl"/>
+ <reference name="addService" target="AddServiceComponent" />
+ <reference name="subtractService" target="SubtractServiceComponent" />
+ <reference name="multiplyService" target="MultiplyServiceComponent"/>
+ <reference name="divideService" target="DivideServiceComponent" />
+ </component>
+
+ <component name="MultiplyServiceComponent">
+ <implementation.java class="calculator.MultiplyServiceImpl" />
+ </component>
+
+ <component name="DivideServiceComponent">
+ <implementation.java class="calculator.DivideServiceImpl" />
+ </component>
+
+ <component name="AddServiceComponent">
+ <implementation.java class="calculator.AddServiceImpl" />
+ </component>
+
+</composite>
diff --git a/sca-java-1.x/branches/sca-java-1.0/modules/node-impl/src/test/resources/nodeB/META-INF/sca-contribution.xml b/sca-java-1.x/branches/sca-java-1.0/modules/node-impl/src/test/resources/nodeB/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..3f9ed8024b
--- /dev/null
+++ b/sca-java-1.x/branches/sca-java-1.0/modules/node-impl/src/test/resources/nodeB/META-INF/sca-contribution.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<contribution xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ targetNamespace="http://sample"
+ xmlns:sample="http://sample">
+ <deployable composite="sample:Calculator"/>
+</contribution> \ No newline at end of file
diff --git a/sca-java-1.x/branches/sca-java-1.0/modules/node-impl/src/test/resources/nodeC/Calculator.composite b/sca-java-1.x/branches/sca-java-1.0/modules/node-impl/src/test/resources/nodeC/Calculator.composite
new file mode 100644
index 0000000000..4ef4c5ddb6
--- /dev/null
+++ b/sca-java-1.x/branches/sca-java-1.0/modules/node-impl/src/test/resources/nodeC/Calculator.composite
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ targetNamespace="http://sample"
+ xmlns:sample="http://sample"
+ name="Calculator">
+
+ <component name="SubtractServiceComponent">
+ <implementation.java class="calculator.SubtractServiceImpl" />
+ <service name="SubtractService">
+ <binding.sca uri="http://localhost:8086/SubtractServiceComponent"/>
+ </service>
+ </component>
+
+</composite>
diff --git a/sca-java-1.x/branches/sca-java-1.0/modules/node-impl/src/test/resources/nodeC/META-INF/sca-contribution.xml b/sca-java-1.x/branches/sca-java-1.0/modules/node-impl/src/test/resources/nodeC/META-INF/sca-contribution.xml
new file mode 100644
index 0000000000..3f9ed8024b
--- /dev/null
+++ b/sca-java-1.x/branches/sca-java-1.0/modules/node-impl/src/test/resources/nodeC/META-INF/sca-contribution.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<contribution xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ targetNamespace="http://sample"
+ xmlns:sample="http://sample">
+ <deployable composite="sample:Calculator"/>
+</contribution> \ No newline at end of file