From cf75948877439a6c842521ab2fa3c1d973d8e7ac Mon Sep 17 00:00:00 2001 From: rfeng Date: Tue, 20 Oct 2009 05:29:34 +0000 Subject: Add a webapp for creditcard-payment-jaxb git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@826957 13f79535-47bb-0310-9956-ffa450edef68 --- .../creditcard-payment-webapp/pom.xml | 65 ++++++++++ .../src/main/webapp/CreditCardPayment.wsdl | 134 +++++++++++++++++++++ .../webapp/META-INF/sca-deployables/web.composite | 43 +++++++ .../src/main/webapp/WEB-INF/web.xml | 42 +++++++ .../src/main/webapp/creditcard.jsp | 71 +++++++++++ 5 files changed, 355 insertions(+) create mode 100644 sandbox/travelsample/contributions/creditcard-payment-webapp/pom.xml create mode 100644 sandbox/travelsample/contributions/creditcard-payment-webapp/src/main/webapp/CreditCardPayment.wsdl create mode 100644 sandbox/travelsample/contributions/creditcard-payment-webapp/src/main/webapp/META-INF/sca-deployables/web.composite create mode 100644 sandbox/travelsample/contributions/creditcard-payment-webapp/src/main/webapp/WEB-INF/web.xml create mode 100644 sandbox/travelsample/contributions/creditcard-payment-webapp/src/main/webapp/creditcard.jsp (limited to 'sandbox/travelsample') diff --git a/sandbox/travelsample/contributions/creditcard-payment-webapp/pom.xml b/sandbox/travelsample/contributions/creditcard-payment-webapp/pom.xml new file mode 100644 index 0000000000..afb42b6180 --- /dev/null +++ b/sandbox/travelsample/contributions/creditcard-payment-webapp/pom.xml @@ -0,0 +1,65 @@ + + + + 4.0.0 + + org.apache.tuscany.sca + tuscany-sca + 1.6-SNAPSHOT + + 1.0-SNAPSHOT + scatours-contribution-creditcard-payment-webapp + war + Apache Tuscany SCA Tours CreditCard Payment WebApp Contribution + + + + + org.apache.tuscany.sca + tuscany-sca-api + 1.6-SNAPSHOT + compile + + + + org.apache.tuscany.sca + tuscany-implementation-web-runtime + 1.6-SNAPSHOT + runtime + + + + org.apache.tuscany.sca + tuscany-host-webapp + 1.6-SNAPSHOT + runtime + + + + org.apache.tuscany.sca + scatours-contribution-creditcard-payment-jaxb + 1.0-SNAPSHOT + + + + + ${artifactId} + + diff --git a/sandbox/travelsample/contributions/creditcard-payment-webapp/src/main/webapp/CreditCardPayment.wsdl b/sandbox/travelsample/contributions/creditcard-payment-webapp/src/main/webapp/CreditCardPayment.wsdl new file mode 100644 index 0000000000..6dcc619c48 --- /dev/null +++ b/sandbox/travelsample/contributions/creditcard-payment-webapp/src/main/webapp/CreditCardPayment.wsdl @@ -0,0 +1,134 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/sandbox/travelsample/contributions/creditcard-payment-webapp/src/main/webapp/META-INF/sca-deployables/web.composite b/sandbox/travelsample/contributions/creditcard-payment-webapp/src/main/webapp/META-INF/sca-deployables/web.composite new file mode 100644 index 0000000000..ac9128a6d5 --- /dev/null +++ b/sandbox/travelsample/contributions/creditcard-payment-webapp/src/main/webapp/META-INF/sca-deployables/web.composite @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/sandbox/travelsample/contributions/creditcard-payment-webapp/src/main/webapp/WEB-INF/web.xml b/sandbox/travelsample/contributions/creditcard-payment-webapp/src/main/webapp/WEB-INF/web.xml new file mode 100644 index 0000000000..a6188e25ba --- /dev/null +++ b/sandbox/travelsample/contributions/creditcard-payment-webapp/src/main/webapp/WEB-INF/web.xml @@ -0,0 +1,42 @@ + + + + + + SCA Tours Credit Card Payment WebApp + + + tuscany + org.apache.tuscany.sca.host.webapp.TuscanyServletFilter + + + + tuscany + /* + + + + creditcard.jsp + + + diff --git a/sandbox/travelsample/contributions/creditcard-payment-webapp/src/main/webapp/creditcard.jsp b/sandbox/travelsample/contributions/creditcard-payment-webapp/src/main/webapp/creditcard.jsp new file mode 100644 index 0000000000..98b7f41e7b --- /dev/null +++ b/sandbox/travelsample/contributions/creditcard-payment-webapp/src/main/webapp/creditcard.jsp @@ -0,0 +1,71 @@ + + +<%@ page contentType="text/html;charset=UTF-8" language="java"%> +<%@ taglib uri="http://www.osoa.org/sca/sca_jsp.tld" prefix="sca"%> + + + + +<%@page import="com.tuscanyscatours.payment.creditcard.CreditCardPaymentService"%> +<%@page import="com.tuscanyscatours.payment.creditcard.ObjectFactory"%> +<%@page import="com.tuscanyscatours.payment.creditcard.CreditCardDetailsType"%> +<%@page import="com.tuscanyscatours.payment.creditcard.CreditCardTypeType"%> +<%@page import="com.tuscanyscatours.payment.creditcard.PayerType"%> + + +

SCATours Credit Card Payment Web Application

+ +

+

Card Type:
+Card Number:
+Card Holder:
+Amount (EUR):
+

+

+ +<% + String c = request.getParameter("charge"); + if (c != null) { + ObjectFactory objectFactory = new ObjectFactory(); + CreditCardDetailsType ccDetails = objectFactory.createCreditCardDetailsType(); + ccDetails.setCreditCardType(CreditCardTypeType.fromValue(request.getParameter("type"))); + ccDetails.setCreditCardNumber(request.getParameter("cardNumber")); + ccDetails.setCVV2("123"); + ccDetails.setExpMonth(12); + ccDetails.setExpYear(2011); + PayerType ccOwner = objectFactory.createPayerType(); + ccOwner.setName(request.getParameter("cardHolder")); + ccDetails.setCardOwner(ccOwner); + float amount = Float.parseFloat(request.getParameter("amount")); +%> +<%=service.authorize(ccDetails, amount)%> +<% + } +%> + + + -- cgit v1.2.3