summaryrefslogtreecommitdiffstats
path: root/sandbox/travelsample/services/creditcard-payment-jaxws-service/src/main/java/scatours/creditcard/CreditCardServiceImpl.java
diff options
context:
space:
mode:
authormcombellack <mcombellack@13f79535-47bb-0310-9956-ffa450edef68>2009-05-19 09:25:57 +0000
committermcombellack <mcombellack@13f79535-47bb-0310-9956-ffa450edef68>2009-05-19 09:25:57 +0000
commit88f6101eb95a913cab79084c426af2987553b153 (patch)
treeefef6aa077b232695163c254d6877a1b7bd45557 /sandbox/travelsample/services/creditcard-payment-jaxws-service/src/main/java/scatours/creditcard/CreditCardServiceImpl.java
parent3c2babfc32ec89f05d00794935a87eaa2fc3cdd4 (diff)
Initial commit of a non-SCA implementation of the Credit Card service using JAX-WS that will be used to show how SCA references can connect to non-SCA implemented web services
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@776246 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to '')
-rw-r--r--sandbox/travelsample/services/creditcard-payment-jaxws-service/src/main/java/scatours/creditcard/CreditCardServiceImpl.java35
1 files changed, 35 insertions, 0 deletions
diff --git a/sandbox/travelsample/services/creditcard-payment-jaxws-service/src/main/java/scatours/creditcard/CreditCardServiceImpl.java b/sandbox/travelsample/services/creditcard-payment-jaxws-service/src/main/java/scatours/creditcard/CreditCardServiceImpl.java
new file mode 100644
index 0000000000..aeb0632ed4
--- /dev/null
+++ b/sandbox/travelsample/services/creditcard-payment-jaxws-service/src/main/java/scatours/creditcard/CreditCardServiceImpl.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 scatours.creditcard;
+
+import javax.jws.WebService;
+
+@WebService(endpointInterface
+ = "scatours.creditcard.CreditCardService")
+public class CreditCardServiceImpl implements CreditCardService {
+
+ public String makePayment(String cardNumber, String name, double amount) {
+ System.out.println("Payment request from " + name);
+
+ if (cardNumber != null && cardNumber.startsWith("1")) {
+ return "AUTH_ID:" + System.currentTimeMillis();
+ }
+ return NOT_AUTHORIZED;
+ }
+}