From 3d3670cdd4ee1aaf6d3e22fd7de7fb362c9eefba Mon Sep 17 00:00:00 2001 From: slaws Date: Sun, 24 Jan 2010 14:24:14 +0000 Subject: Copy into trunk from sandbox git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@902572 13f79535-47bb-0310-9956-ffa450edef68 --- .../src/main/resources/CreditCardPayment.wsdl | 134 +++++++++++++++++++++ .../src/main/webapp/META-INF/sca-contribution.xml | 23 ++++ .../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, 313 insertions(+) create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/contributions/creditcard-payment-webapp/src/main/resources/CreditCardPayment.wsdl create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/contributions/creditcard-payment-webapp/src/main/webapp/META-INF/sca-contribution.xml create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/contributions/creditcard-payment-webapp/src/main/webapp/META-INF/sca-deployables/web.composite create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/contributions/creditcard-payment-webapp/src/main/webapp/WEB-INF/web.xml create mode 100644 sca-java-1.x/trunk/tutorials/travelsample/contributions/creditcard-payment-webapp/src/main/webapp/creditcard.jsp (limited to 'sca-java-1.x/trunk/tutorials/travelsample/contributions/creditcard-payment-webapp/src/main') diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contributions/creditcard-payment-webapp/src/main/resources/CreditCardPayment.wsdl b/sca-java-1.x/trunk/tutorials/travelsample/contributions/creditcard-payment-webapp/src/main/resources/CreditCardPayment.wsdl new file mode 100644 index 0000000000..6dcc619c48 --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/contributions/creditcard-payment-webapp/src/main/resources/CreditCardPayment.wsdl @@ -0,0 +1,134 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contributions/creditcard-payment-webapp/src/main/webapp/META-INF/sca-contribution.xml b/sca-java-1.x/trunk/tutorials/travelsample/contributions/creditcard-payment-webapp/src/main/webapp/META-INF/sca-contribution.xml new file mode 100644 index 0000000000..898321c510 --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/contributions/creditcard-payment-webapp/src/main/webapp/META-INF/sca-contribution.xml @@ -0,0 +1,23 @@ + + + + + diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contributions/creditcard-payment-webapp/src/main/webapp/META-INF/sca-deployables/web.composite b/sca-java-1.x/trunk/tutorials/travelsample/contributions/creditcard-payment-webapp/src/main/webapp/META-INF/sca-deployables/web.composite new file mode 100644 index 0000000000..ac9128a6d5 --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/travelsample/contributions/creditcard-payment-webapp/src/main/webapp/META-INF/sca-deployables/web.composite @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/trunk/tutorials/travelsample/contributions/creditcard-payment-webapp/src/main/webapp/WEB-INF/web.xml b/sca-java-1.x/trunk/tutorials/travelsample/contributions/creditcard-payment-webapp/src/main/webapp/WEB-INF/web.xml new file mode 100644 index 0000000000..a6188e25ba --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/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/sca-java-1.x/trunk/tutorials/travelsample/contributions/creditcard-payment-webapp/src/main/webapp/creditcard.jsp b/sca-java-1.x/trunk/tutorials/travelsample/contributions/creditcard-payment-webapp/src/main/webapp/creditcard.jsp new file mode 100644 index 0000000000..98b7f41e7b --- /dev/null +++ b/sca-java-1.x/trunk/tutorials/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