From 696b7fd29e37e5e7b4abba40f154d2df5a12ff4b Mon Sep 17 00:00:00 2001 From: rfeng Date: Thu, 28 May 2009 00:43:46 +0000 Subject: Add the implementation.web based jsp for CreditCardPayment git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@779376 13f79535-47bb-0310-9956-ffa450edef68 --- .../pom.xml | 100 ++++++++++++++++++ .../src/main/resources/CreditCardPayment.wsdl | 116 +++++++++++++++++++++ .../src/main/webapp/WEB-INF/web.composite | 33 ++++++ .../src/main/webapp/WEB-INF/web.xml | 41 ++++++++ .../src/main/webapp/creditcard.jsp | 69 ++++++++++++ 5 files changed, 359 insertions(+) create mode 100644 sandbox/rfeng/scatours-creditcard-payment-web-contribution/pom.xml create mode 100644 sandbox/rfeng/scatours-creditcard-payment-web-contribution/src/main/resources/CreditCardPayment.wsdl create mode 100644 sandbox/rfeng/scatours-creditcard-payment-web-contribution/src/main/webapp/WEB-INF/web.composite create mode 100644 sandbox/rfeng/scatours-creditcard-payment-web-contribution/src/main/webapp/WEB-INF/web.xml create mode 100644 sandbox/rfeng/scatours-creditcard-payment-web-contribution/src/main/webapp/creditcard.jsp (limited to 'sandbox/rfeng') diff --git a/sandbox/rfeng/scatours-creditcard-payment-web-contribution/pom.xml b/sandbox/rfeng/scatours-creditcard-payment-web-contribution/pom.xml new file mode 100644 index 0000000000..a7fa84ae74 --- /dev/null +++ b/sandbox/rfeng/scatours-creditcard-payment-web-contribution/pom.xml @@ -0,0 +1,100 @@ + + + + 4.0.0 + + org.apache.tuscany.sca + tuscany-sca + 2.0-SNAPSHOT + ../../pom.xml + + + scatours-creditcard-payment-web + war + SCATours Credit Card Payment Web + + + + org.apache.tuscany.sca + tuscany-sca-api + 2.0-SNAPSHOT + provided + + + + + + java.net2 + java.net Maven 2.x Repository + http://download.java.net/maven/2 + + + + ${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 + + + wsimport + generate-sources + + wsimport + + + scatours.payment.creditcard + ${basedir}/src/main/resources + + + CreditCardPayment.wsdl + + ${project.build.directory}/jaxws-source + + false + true + + + + + + + + diff --git a/sandbox/rfeng/scatours-creditcard-payment-web-contribution/src/main/resources/CreditCardPayment.wsdl b/sandbox/rfeng/scatours-creditcard-payment-web-contribution/src/main/resources/CreditCardPayment.wsdl new file mode 100644 index 0000000000..1fac949ea1 --- /dev/null +++ b/sandbox/rfeng/scatours-creditcard-payment-web-contribution/src/main/resources/CreditCardPayment.wsdl @@ -0,0 +1,116 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/sandbox/rfeng/scatours-creditcard-payment-web-contribution/src/main/webapp/WEB-INF/web.composite b/sandbox/rfeng/scatours-creditcard-payment-web-contribution/src/main/webapp/WEB-INF/web.composite new file mode 100644 index 0000000000..38c59f7da3 --- /dev/null +++ b/sandbox/rfeng/scatours-creditcard-payment-web-contribution/src/main/webapp/WEB-INF/web.composite @@ -0,0 +1,33 @@ + + + + + + + + + + + + + diff --git a/sandbox/rfeng/scatours-creditcard-payment-web-contribution/src/main/webapp/WEB-INF/web.xml b/sandbox/rfeng/scatours-creditcard-payment-web-contribution/src/main/webapp/WEB-INF/web.xml new file mode 100644 index 0000000000..33332936b3 --- /dev/null +++ b/sandbox/rfeng/scatours-creditcard-payment-web-contribution/src/main/webapp/WEB-INF/web.xml @@ -0,0 +1,41 @@ + + + + + Apache Tuscany CreditCard Payment + + + tuscany + org.apache.tuscany.sca.host.webapp.TuscanyServletFilter + + + + tuscany + /* + + + + creditcard.jsp + + + diff --git a/sandbox/rfeng/scatours-creditcard-payment-web-contribution/src/main/webapp/creditcard.jsp b/sandbox/rfeng/scatours-creditcard-payment-web-contribution/src/main/webapp/creditcard.jsp new file mode 100644 index 0000000000..69409db313 --- /dev/null +++ b/sandbox/rfeng/scatours-creditcard-payment-web-contribution/src/main/webapp/creditcard.jsp @@ -0,0 +1,69 @@ + + +<%@ page contentType="text/html;charset=UTF-8" language="java"%> +<%@ taglib uri="http://www.osoa.org/sca/sca_jsp.tld" prefix="sca"%> + + + + +<%@page import="scatours.payment.creditcard.CreditCardPaymentService"%> +<%@page import="scatours.payment.creditcard.ObjectFactory"%> +<%@page import="scatours.payment.creditcard.CreditCardDetailsType"%> +<%@page import="scatours.payment.creditcard.CreditCardTypeType"%> +<%@page import="scatours.payment.creditcard.PayerType"%> + + +

SCATours Credit Card Payment Web Application

+ +

+

Card Type:
+Card Number:
+Card Holder:
+Amount:
+
+ +<% + 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); +%> +<%=service.authorize(ccDetails, 100.0f)%> +<% + } +%> + + + -- cgit v1.2.3