From 8f7626cea88fb946a6c6395a2719126876ef0cb0 Mon Sep 17 00:00:00 2001 From: slaws Date: Sat, 29 Aug 2009 18:16:03 +0000 Subject: A client composite to drive policy samples git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@809184 13f79535-47bb-0310-9956-ffa450edef68 --- .../contributions/policy-client/build.xml | 45 +++++++++++ .../contributions/policy-client/maven-eclipse.xml | 8 ++ .../contributions/policy-client/pom.xml | 88 ++++++++++++++++++++++ .../src/main/java/scatours/client/TestClient.java | 38 ++++++++++ .../main/resources/META-INF/sca-contribution.xml | 24 ++++++ .../policy-client/src/main/resources/Payment.wsdl | 83 ++++++++++++++++++++ .../src/main/resources/client.composite | 28 +++++++ 7 files changed, 314 insertions(+) create mode 100644 sandbox/travelsample/contributions/policy-client/build.xml create mode 100644 sandbox/travelsample/contributions/policy-client/maven-eclipse.xml create mode 100644 sandbox/travelsample/contributions/policy-client/pom.xml create mode 100644 sandbox/travelsample/contributions/policy-client/src/main/java/scatours/client/TestClient.java create mode 100644 sandbox/travelsample/contributions/policy-client/src/main/resources/META-INF/sca-contribution.xml create mode 100644 sandbox/travelsample/contributions/policy-client/src/main/resources/Payment.wsdl create mode 100644 sandbox/travelsample/contributions/policy-client/src/main/resources/client.composite (limited to 'sandbox') diff --git a/sandbox/travelsample/contributions/policy-client/build.xml b/sandbox/travelsample/contributions/policy-client/build.xml new file mode 100644 index 0000000000..52b3087827 --- /dev/null +++ b/sandbox/travelsample/contributions/policy-client/build.xml @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sandbox/travelsample/contributions/policy-client/maven-eclipse.xml b/sandbox/travelsample/contributions/policy-client/maven-eclipse.xml new file mode 100644 index 0000000000..4ceebd71f7 --- /dev/null +++ b/sandbox/travelsample/contributions/policy-client/maven-eclipse.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/sandbox/travelsample/contributions/policy-client/pom.xml b/sandbox/travelsample/contributions/policy-client/pom.xml new file mode 100644 index 0000000000..74089cd82b --- /dev/null +++ b/sandbox/travelsample/contributions/policy-client/pom.xml @@ -0,0 +1,88 @@ + + + + 4.0.0 + + org.apache.tuscany.sca + tuscany-sca + 1.6-SNAPSHOT + + 1.0-SNAPSHOT + scatours-contribution-policy-client + Apache Tuscany SCA Tours Policy Client Contribution + + + + org.apache.tuscany.sca + tuscany-sca-api + 1.6-SNAPSHOT + + + + + + ${artifactId} + + + org.codehaus.mojo + build-helper-maven-plugin + 1.0 + + + add-source + generate-sources + + add-source + + + + target/jaxws-source + + + + + + + org.codehaus.mojo + jaxws-maven-plugin + 1.12 + + + payment + generate-sources + + wsimport + + + com.tuscanyscatours.payment + ${basedir}/src/main/resources + + Payment.wsdl + + ${project.build.directory}/jaxws-source + false + true + + + + + + + diff --git a/sandbox/travelsample/contributions/policy-client/src/main/java/scatours/client/TestClient.java b/sandbox/travelsample/contributions/policy-client/src/main/java/scatours/client/TestClient.java new file mode 100644 index 0000000000..bb7cf0bdb0 --- /dev/null +++ b/sandbox/travelsample/contributions/policy-client/src/main/java/scatours/client/TestClient.java @@ -0,0 +1,38 @@ +/* + * 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 scatours.client; + +import org.osoa.sca.annotations.Reference; +import org.osoa.sca.annotations.Service; + +import com.tuscanyscatours.payment.Payment; + +@Service(Runnable.class) +public class TestClient { + @Reference + protected Payment payment; + + public TestClient() { + } + + public void run() { + System.out.println("TestClient - Successful Payment - Status = " + payment.makePaymentMember("c-0", 100.00f)); + } +} diff --git a/sandbox/travelsample/contributions/policy-client/src/main/resources/META-INF/sca-contribution.xml b/sandbox/travelsample/contributions/policy-client/src/main/resources/META-INF/sca-contribution.xml new file mode 100644 index 0000000000..3ccb9da245 --- /dev/null +++ b/sandbox/travelsample/contributions/policy-client/src/main/resources/META-INF/sca-contribution.xml @@ -0,0 +1,24 @@ + + + + + + diff --git a/sandbox/travelsample/contributions/policy-client/src/main/resources/Payment.wsdl b/sandbox/travelsample/contributions/policy-client/src/main/resources/Payment.wsdl new file mode 100644 index 0000000000..2519d7642e --- /dev/null +++ b/sandbox/travelsample/contributions/policy-client/src/main/resources/Payment.wsdl @@ -0,0 +1,83 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/sandbox/travelsample/contributions/policy-client/src/main/resources/client.composite b/sandbox/travelsample/contributions/policy-client/src/main/resources/client.composite new file mode 100644 index 0000000000..788dd81a92 --- /dev/null +++ b/sandbox/travelsample/contributions/policy-client/src/main/resources/client.composite @@ -0,0 +1,28 @@ + + + + + + + + + -- cgit v1.2.3