summaryrefslogtreecommitdiffstats
path: root/java/sca/itest/implementation-spring/src
diff options
context:
space:
mode:
Diffstat (limited to 'java/sca/itest/implementation-spring/src')
-rw-r--r--java/sca/itest/implementation-spring/src/main/resources/context/multiple/MultipleContext.composite4
-rw-r--r--java/sca/itest/implementation-spring/src/main/resources/implementation/policies/ImplementationPolicies.composite11
-rw-r--r--java/sca/itest/implementation-spring/src/main/resources/spring/annotations/Calculator.composite4
-rw-r--r--java/sca/itest/implementation-spring/src/test/java/context/multiple/StockQuoteServer.java2
-rw-r--r--java/sca/itest/implementation-spring/src/test/java/implementation/policies/CalculatorClient.java2
-rw-r--r--java/sca/itest/implementation-spring/src/test/java/org/apache/tuscany/sca/itest/spring/AbstractSCATestCase.java7
-rw-r--r--java/sca/itest/implementation-spring/src/test/java/spring/annotations/CalculatorClient.java2
7 files changed, 16 insertions, 16 deletions
diff --git a/java/sca/itest/implementation-spring/src/main/resources/context/multiple/MultipleContext.composite b/java/sca/itest/implementation-spring/src/main/resources/context/multiple/MultipleContext.composite
index a416244258..15c0c39f51 100644
--- a/java/sca/itest/implementation-spring/src/main/resources/context/multiple/MultipleContext.composite
+++ b/java/sca/itest/implementation-spring/src/main/resources/context/multiple/MultipleContext.composite
@@ -19,8 +19,8 @@
-->
<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200903"
- targetNamespace="http://multiplecontext"
- xmlns:hw="http://multiplecontext"
+ targetNamespace="http://stockquote"
+ xmlns:hw="http://stockquote"
name="MultipleContext">
<service name="StockQuoteService" promote="StockQuoteServiceComponent">
diff --git a/java/sca/itest/implementation-spring/src/main/resources/implementation/policies/ImplementationPolicies.composite b/java/sca/itest/implementation-spring/src/main/resources/implementation/policies/ImplementationPolicies.composite
index 3eefec80cf..28b62dfeb9 100644
--- a/java/sca/itest/implementation-spring/src/main/resources/implementation/policies/ImplementationPolicies.composite
+++ b/java/sca/itest/implementation-spring/src/main/resources/implementation/policies/ImplementationPolicies.composite
@@ -18,16 +18,13 @@
* under the License.
-->
<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
- targetNamespace="http://implementationpolicies"
- xmlns:sample="http://implementationpolicies"
- name="ImplementationPolicies"
+ targetNamespace="http://sample"
+ xmlns:sample="http://sample"
+ name="Calculator"
xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1">
<component name="CalculatorServiceComponent">
- <implementation.spring location="META-INF/sca/implementation-policies/CalculatorService-context.xml">
- <operation name="divide" requires="tuscany:logging"/>
- <operation name="subtract" requires="tuscany:logging"/>
- </implementation.spring>
+ <implementation.spring location="META-INF/sca/implementation-policies/CalculatorService-context.xml"/>
<reference name="addService" target="AddServiceComponent" />
<reference name="subtractService" target="SubtractServiceComponent" />
<reference name="multiplyService" target="MultiplyServiceComponent" />
diff --git a/java/sca/itest/implementation-spring/src/main/resources/spring/annotations/Calculator.composite b/java/sca/itest/implementation-spring/src/main/resources/spring/annotations/Calculator.composite
index 8f8c01a451..21f89e6a1c 100644
--- a/java/sca/itest/implementation-spring/src/main/resources/spring/annotations/Calculator.composite
+++ b/java/sca/itest/implementation-spring/src/main/resources/spring/annotations/Calculator.composite
@@ -17,8 +17,8 @@
* specific language governing permissions and limitations
* under the License.
-->
-<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
- targetNamespace="http://sample"
+<composite targetNamespace="http://sample"
+ xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
xmlns:sample="http://sample"
name="Calculator"
xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1">
diff --git a/java/sca/itest/implementation-spring/src/test/java/context/multiple/StockQuoteServer.java b/java/sca/itest/implementation-spring/src/test/java/context/multiple/StockQuoteServer.java
index e8d2ec8e3d..d8ecae99bd 100644
--- a/java/sca/itest/implementation-spring/src/test/java/context/multiple/StockQuoteServer.java
+++ b/java/sca/itest/implementation-spring/src/test/java/context/multiple/StockQuoteServer.java
@@ -36,7 +36,7 @@ public class StockQuoteServer {
System.out.println("Starting the Sample SCA StockQuote Service...");
String location = ContributionLocationHelper.getContributionLocation("context/multiple/MultipleContext.composite");
- Node node = NodeFactory.newInstance().createNode("MultipleContext.composite", new Contribution("c1", location));
+ Node node = NodeFactory.newInstance().createNode("context/multiple/MultipleContext.composite", new Contribution("c1", location));
node.start();
// Method 1: To access the Spring Application Context instance
diff --git a/java/sca/itest/implementation-spring/src/test/java/implementation/policies/CalculatorClient.java b/java/sca/itest/implementation-spring/src/test/java/implementation/policies/CalculatorClient.java
index 754ee9efa7..3f26b8c6db 100644
--- a/java/sca/itest/implementation-spring/src/test/java/implementation/policies/CalculatorClient.java
+++ b/java/sca/itest/implementation-spring/src/test/java/implementation/policies/CalculatorClient.java
@@ -42,7 +42,7 @@ public class CalculatorClient {
}
String location = ContributionLocationHelper.getContributionLocation("implementation/policies/ImplementationPolicies.composite");
- Node node = NodeFactory.newInstance().createNode("ImplementationPolicies.composite", new Contribution("c1", location));
+ Node node = NodeFactory.newInstance().createNode("implementation/policies/ImplementationPolicies.composite", new Contribution("c1", location));
node.start();
CalculatorService calculatorService =
diff --git a/java/sca/itest/implementation-spring/src/test/java/org/apache/tuscany/sca/itest/spring/AbstractSCATestCase.java b/java/sca/itest/implementation-spring/src/test/java/org/apache/tuscany/sca/itest/spring/AbstractSCATestCase.java
index 55bf3c33d4..605a0079fb 100644
--- a/java/sca/itest/implementation-spring/src/test/java/org/apache/tuscany/sca/itest/spring/AbstractSCATestCase.java
+++ b/java/sca/itest/implementation-spring/src/test/java/org/apache/tuscany/sca/itest/spring/AbstractSCATestCase.java
@@ -21,6 +21,8 @@ package org.apache.tuscany.sca.itest.spring;
import junit.framework.TestCase;
import org.apache.tuscany.sca.node.Client;
+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;
@@ -31,8 +33,9 @@ public abstract class AbstractSCATestCase<T> extends TestCase {
@Override
protected void setUp() throws Exception {
- NodeFactory factory = NodeFactory.newInstance();
- node = factory.createNode(getCompositeName());
+ NodeFactory factory = NodeFactory.newInstance();
+ String location = ContributionLocationHelper.getContributionLocation(getCompositeName());
+ node = factory.createNode(getCompositeName(), new Contribution("c1", location));
node.start();
service = ((Client)node).getService(getServiceClass(), "ClientComponent");
}
diff --git a/java/sca/itest/implementation-spring/src/test/java/spring/annotations/CalculatorClient.java b/java/sca/itest/implementation-spring/src/test/java/spring/annotations/CalculatorClient.java
index 899a709a9b..5a5056d91e 100644
--- a/java/sca/itest/implementation-spring/src/test/java/spring/annotations/CalculatorClient.java
+++ b/java/sca/itest/implementation-spring/src/test/java/spring/annotations/CalculatorClient.java
@@ -35,7 +35,7 @@ public class CalculatorClient {
public static void main(String[] args) throws Exception {
String location = ContributionLocationHelper.getContributionLocation("spring/annotations/Calculator.composite");
- Node node = NodeFactory.newInstance().createNode("Calculator.composite", new Contribution("c1", location));
+ Node node = NodeFactory.newInstance().createNode("spring/annotations/Calculator.composite", new Contribution("c1", location));
node.start();
CalculatorService calculatorService =