summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-java-policy
diff options
context:
space:
mode:
authorrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2010-03-16 18:08:46 +0000
committerrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2010-03-16 18:08:46 +0000
commit3b191c283307dc68e2aaa6faea58f4b3b717e35c (patch)
tree9f5742cb5dd7be684c73a606077b106e8d23a700 /sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-java-policy
parentf31b8fa6a3b9d9d356212670296c60beb468c8e5 (diff)
Update the travelsample with 2.x namespace/api/dependency (not completed yet)
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@923913 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-java-policy')
-rw-r--r--sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-java-policy/maven-eclipse.xml2
-rw-r--r--sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-java-policy/pom.xml6
-rw-r--r--sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-java-policy/src/main/java/com/tuscanyscatours/customer/impl/CustomerRegistryImpl.java14
-rw-r--r--sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-java-policy/src/main/java/com/tuscanyscatours/emailgateway/EmailGateway.java2
-rw-r--r--sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-java-policy/src/main/java/com/tuscanyscatours/emailgateway/impl/EmailGatewayImpl.java2
-rw-r--r--sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-java-policy/src/main/java/com/tuscanyscatours/payment/impl/PaymentImpl.java10
-rw-r--r--sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-java-policy/src/main/resources/META-INF/sca-contribution.xml4
-rw-r--r--sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-java-policy/src/main/resources/definitions.xml6
-rw-r--r--sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-java-policy/src/main/resources/payment.composite2
-rw-r--r--sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-java-policy/src/test/java/scatours/payment/PaymentTestCase.java26
10 files changed, 37 insertions, 37 deletions
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-java-policy/maven-eclipse.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-java-policy/maven-eclipse.xml
index 4ceebd71f7..3adfca89f4 100644
--- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-java-policy/maven-eclipse.xml
+++ b/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-java-policy/maven-eclipse.xml
@@ -2,7 +2,7 @@
<target name="init"/>
<target name="copy-resources" depends="init">
<copy todir="target/classes/META-INF" filtering="true">
- <fileset dir="." includes="LICENSE|NOTICE"/>
+ <fileset dir="." includes="LICENSE|NOTICE" excludes="**/*.java"/>
</copy>
</target>
</project> \ No newline at end of file
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-java-policy/pom.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-java-policy/pom.xml
index e4d416fee2..b04b40b6a0 100644
--- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-java-policy/pom.xml
+++ b/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-java-policy/pom.xml
@@ -22,10 +22,10 @@
<parent>
<groupId>org.apache.tuscany.sca</groupId>
<artifactId>scatours</artifactId>
- <version>1.0-SNAPSHOT</version>
+ <version>2.0-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
- <version>1.0-SNAPSHOT</version>
+ <version>2.0-SNAPSHOT</version>
<artifactId>scatours-contribution-payment-java-policy</artifactId>
<name>Apache Tuscany SCA Tours Payment Java Policy Contribution</name>
@@ -52,7 +52,7 @@
<dependency>
<groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-binding-ws-axis2</artifactId>
+ <artifactId>tuscany-binding-ws-runtime-axis2</artifactId>
<version>${tuscany.version}</version>
<scope>runtime</scope>
</dependency>
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-java-policy/src/main/java/com/tuscanyscatours/customer/impl/CustomerRegistryImpl.java b/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-java-policy/src/main/java/com/tuscanyscatours/customer/impl/CustomerRegistryImpl.java
index 26926c7764..d0b1736e98 100644
--- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-java-policy/src/main/java/com/tuscanyscatours/customer/impl/CustomerRegistryImpl.java
+++ b/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-java-policy/src/main/java/com/tuscanyscatours/customer/impl/CustomerRegistryImpl.java
@@ -23,12 +23,12 @@ import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
-import org.osoa.sca.annotations.Destroy;
-import org.osoa.sca.annotations.EagerInit;
-import org.osoa.sca.annotations.Init;
-import org.osoa.sca.annotations.Requires;
-import org.osoa.sca.annotations.Scope;
-import org.osoa.sca.annotations.Service;
+import org.oasisopen.sca.annotation.Destroy;
+import org.oasisopen.sca.annotation.EagerInit;
+import org.oasisopen.sca.annotation.Init;
+import org.oasisopen.sca.annotation.Requires;
+import org.oasisopen.sca.annotation.Scope;
+import org.oasisopen.sca.annotation.Service;
import com.tuscanyscatours.customer.Customer;
import com.tuscanyscatours.customer.CustomerNotFoundException;
@@ -44,7 +44,7 @@ import com.tuscanyscatours.payment.creditcard.PayerType;
@Service(CustomerRegistry.class)
@Scope("COMPOSITE")
@EagerInit
-@Requires("{http://www.osoa.org/xmlns/sca/1.0}managedTransaction.global")
+@Requires("{http://docs.oasis-open.org/ns/opencsa/sca/200912}managedTransaction.global")
public class CustomerRegistryImpl implements CustomerRegistry {
private volatile static int idGenerator = 0;
private Map<String, Customer> customers = new HashMap<String, Customer>();
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-java-policy/src/main/java/com/tuscanyscatours/emailgateway/EmailGateway.java b/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-java-policy/src/main/java/com/tuscanyscatours/emailgateway/EmailGateway.java
index 0fbf63d6bc..716ea18ee4 100644
--- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-java-policy/src/main/java/com/tuscanyscatours/emailgateway/EmailGateway.java
+++ b/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-java-policy/src/main/java/com/tuscanyscatours/emailgateway/EmailGateway.java
@@ -19,7 +19,7 @@
package com.tuscanyscatours.emailgateway;
-import org.osoa.sca.annotations.Remotable;
+import org.oasisopen.sca.annotation.Remotable;
/**
* A gateway to send e-mail
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-java-policy/src/main/java/com/tuscanyscatours/emailgateway/impl/EmailGatewayImpl.java b/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-java-policy/src/main/java/com/tuscanyscatours/emailgateway/impl/EmailGatewayImpl.java
index d9798e436a..3556b4855b 100644
--- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-java-policy/src/main/java/com/tuscanyscatours/emailgateway/impl/EmailGatewayImpl.java
+++ b/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-java-policy/src/main/java/com/tuscanyscatours/emailgateway/impl/EmailGatewayImpl.java
@@ -19,7 +19,7 @@
package com.tuscanyscatours.emailgateway.impl;
-import org.osoa.sca.annotations.Service;
+import org.oasisopen.sca.annotation.Service;
import com.tuscanyscatours.emailgateway.EmailGateway;
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-java-policy/src/main/java/com/tuscanyscatours/payment/impl/PaymentImpl.java b/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-java-policy/src/main/java/com/tuscanyscatours/payment/impl/PaymentImpl.java
index b3eb95b44b..e25505ce45 100644
--- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-java-policy/src/main/java/com/tuscanyscatours/payment/impl/PaymentImpl.java
+++ b/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-java-policy/src/main/java/com/tuscanyscatours/payment/impl/PaymentImpl.java
@@ -19,10 +19,10 @@
package com.tuscanyscatours.payment.impl;
-import org.osoa.sca.annotations.Property;
-import org.osoa.sca.annotations.Reference;
-import org.osoa.sca.annotations.Requires;
-import org.osoa.sca.annotations.Service;
+import org.oasisopen.sca.annotation.Property;
+import org.oasisopen.sca.annotation.Reference;
+import org.oasisopen.sca.annotation.Requires;
+import org.oasisopen.sca.annotation.Service;
import com.tuscanyscatours.customer.Customer;
import com.tuscanyscatours.customer.CustomerNotFoundException;
@@ -45,7 +45,7 @@ public class PaymentImpl implements Payment {
@Reference
//@Authentication - not supported
- @Requires("{http://www.osoa.org/xmlns/sca/1.0}authentication")
+ @Requires("{http://docs.oasis-open.org/ns/opencsa/sca/200912}authentication")
protected CreditCardPayment creditCardPayment;
@Reference
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-java-policy/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-java-policy/src/main/resources/META-INF/sca-contribution.xml
index 0fd7cb9910..abe5ba8718 100644
--- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-java-policy/src/main/resources/META-INF/sca-contribution.xml
+++ b/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-java-policy/src/main/resources/META-INF/sca-contribution.xml
@@ -17,8 +17,8 @@
* specific language governing permissions and limitations
* under the License.
-->
-<contribution xmlns="http://www.osoa.org/xmlns/sca/1.0"
+<contribution xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
xmlns:scatours="http://tuscanyscatours.com/">
- <export.java package="com.tuscanyscatours.payment" />
<deployable composite="scatours:payment" />
+ <export.java package="com.tuscanyscatours.payment" />
</contribution>
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-java-policy/src/main/resources/definitions.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-java-policy/src/main/resources/definitions.xml
index edaa250b10..1cd5ebb59e 100644
--- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-java-policy/src/main/resources/definitions.xml
+++ b/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-java-policy/src/main/resources/definitions.xml
@@ -17,9 +17,9 @@
* specific language governing permissions and limitations
* under the License.
-->
-<definitions xmlns="http://www.osoa.org/xmlns/sca/1.0"
- targetNamespace="http://www.osoa.org/xmlns/sca/1.0"
- xmlns:sca="http://www.osoa.org/xmlns/sca/1.0"
+<definitions xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ targetNamespace="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200912"
xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.0">
<!-- Policy Intents Defined by the SCA Runtime -->
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-java-policy/src/main/resources/payment.composite b/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-java-policy/src/main/resources/payment.composite
index 710583ae5d..8050d19771 100644
--- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-java-policy/src/main/resources/payment.composite
+++ b/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-java-policy/src/main/resources/payment.composite
@@ -17,7 +17,7 @@
* specific language governing permissions and limitations
* under the License.
-->
-<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
targetNamespace="http://tuscanyscatours.com/"
name="payment">
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-java-policy/src/test/java/scatours/payment/PaymentTestCase.java b/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-java-policy/src/test/java/scatours/payment/PaymentTestCase.java
index d8c79622e6..6ebcc4f2dc 100644
--- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-java-policy/src/test/java/scatours/payment/PaymentTestCase.java
+++ b/sca-java-2.x/trunk/tutorials/travelsample/contributions/payment-java-policy/src/test/java/scatours/payment/PaymentTestCase.java
@@ -19,10 +19,10 @@
package scatours.payment;
-import org.apache.tuscany.sca.node.SCAClient;
-import org.apache.tuscany.sca.node.SCAContribution;
-import org.apache.tuscany.sca.node.SCANode;
-import org.apache.tuscany.sca.node.SCANodeFactory;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Ignore;
@@ -31,19 +31,19 @@ import org.junit.Test;
import com.tuscanyscatours.payment.Payment;
public class PaymentTestCase {
- private static SCANode node1;
- private static SCANode node2;
+ private static Node node1;
+ private static Node node2;
@BeforeClass
public static void setUpBeforeClass() throws Exception {
node1 =
- SCANodeFactory.newInstance()
- .createSCANode("payment.composite",
- new SCAContribution("payment", "./target/classes"));
+ NodeFactory.getInstance()
+ .createNode("payment.composite",
+ new Contribution("payment", "./target/classes"));
node2 =
- SCANodeFactory.newInstance()
- .createSCANode("creditcard.composite",
- new SCAContribution("creditcard",
+ NodeFactory.getInstance()
+ .createNode("creditcard.composite",
+ new Contribution("creditcard",
"../../contributions/creditcard-payment-jaxb/target/classes"));
node1.start();
node2.start();
@@ -51,7 +51,7 @@ public class PaymentTestCase {
@Test
public void testPayment() {
- SCAClient client = (SCAClient)node1;
+ Node client = (Node)node1;
Payment payment = client.getService(Payment.class, "Payment");
System.out.println("\n\nSuccessful Payment - Status = \n\n" + payment.makePaymentMember("c-0", 100.00f));