summaryrefslogtreecommitdiffstats
path: root/java/sca
diff options
context:
space:
mode:
authorramkumar <ramkumar@13f79535-47bb-0310-9956-ffa450edef68>2009-04-21 17:20:10 +0000
committerramkumar <ramkumar@13f79535-47bb-0310-9956-ffa450edef68>2009-04-21 17:20:10 +0000
commit8c218dfc05c317a967894b46360111169a3f37d3 (patch)
treed4e340f9a5639df261c582768d1f004cee99fd0b /java/sca
parentf40258cc0b010575fe47e5c53af5a4313cdd3d6b (diff)
Fixes for Spring itest
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@767230 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/sca')
-rw-r--r--java/sca/itest/implementation-spring/pom.xml6
-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
8 files changed, 22 insertions, 16 deletions
diff --git a/java/sca/itest/implementation-spring/pom.xml b/java/sca/itest/implementation-spring/pom.xml
index fef74cf09e..75375e276b 100644
--- a/java/sca/itest/implementation-spring/pom.xml
+++ b/java/sca/itest/implementation-spring/pom.xml
@@ -47,6 +47,12 @@
<version>2.0-SNAPSHOT</version>
</dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-binding-ws-axis2</artifactId>
+ <version>2.0-SNAPSHOT</version>
+ </dependency>
+
<!-- Spring dependencies... -->
<dependency>
<groupId>org.springframework</groupId>
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 =