From 3d78e7e023933818a502e19f066e08482caa67aa Mon Sep 17 00:00:00 2001 From: slaws Date: Mon, 24 Nov 2008 08:24:41 +0000 Subject: More updates the BPEL component in the payment process git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@720132 13f79535-47bb-0310-9956-ffa450edef68 --- .../wsdl/EmailGateway.wsdl | 37 +++---- .../wsdl/CreditCardPayment.wsdl | 48 +++++---- .../paymentprocesstest.composite | 40 ------- .../paymentprocess-contribution/pom.xml | 32 ++++-- .../scatours/paymentprocess/CreditCardPayment.wsdl | 116 +++++++++++++++++++++ .../src/scatours/paymentprocess/EmailGateway.wsdl | 89 ++++++++++++++++ .../scatours/paymentprocess/PaymentProcess.wsdl | 39 +++---- .../src/scatours/paymentprocess/deploy.xml | 6 ++ .../scatours/paymentprocess/paymentprocess.bpel | 93 +++++++++++++---- .../paymentprocess/paymentprocess.componentType | 4 +- .../paymentprocess/PaymentProcessTestCase.java | 2 +- .../test/scatours/paymentprocess/log4j.properties | 36 +++++++ .../paymentprocess/paymentprocesstest.composite | 47 +++++++++ 13 files changed, 456 insertions(+), 133 deletions(-) delete mode 100644 sandbox/travelsample/paymentprocess-contribution/paymentprocesstest.composite create mode 100644 sandbox/travelsample/paymentprocess-contribution/src/scatours/paymentprocess/CreditCardPayment.wsdl create mode 100644 sandbox/travelsample/paymentprocess-contribution/src/scatours/paymentprocess/EmailGateway.wsdl create mode 100644 sandbox/travelsample/paymentprocess-contribution/test/scatours/paymentprocess/log4j.properties create mode 100644 sandbox/travelsample/paymentprocess-contribution/test/scatours/paymentprocess/paymentprocesstest.composite (limited to 'sandbox/travelsample') diff --git a/sandbox/travelsample/emailgateway-contribution/wsdl/EmailGateway.wsdl b/sandbox/travelsample/emailgateway-contribution/wsdl/EmailGateway.wsdl index ed5762410d..c103ad947d 100644 --- a/sandbox/travelsample/emailgateway-contribution/wsdl/EmailGateway.wsdl +++ b/sandbox/travelsample/emailgateway-contribution/wsdl/EmailGateway.wsdl @@ -29,20 +29,21 @@ - - - - - - - - - - - - - - + + + + + + + + + + + + + + + @@ -52,16 +53,16 @@ - + - + - - + + diff --git a/sandbox/travelsample/payment-contribution/wsdl/CreditCardPayment.wsdl b/sandbox/travelsample/payment-contribution/wsdl/CreditCardPayment.wsdl index c80c37cdf7..14ab0b3bbb 100644 --- a/sandbox/travelsample/payment-contribution/wsdl/CreditCardPayment.wsdl +++ b/sandbox/travelsample/payment-contribution/wsdl/CreditCardPayment.wsdl @@ -26,23 +26,25 @@ xmlns:bpws="http://schemas.xmlsoap.org/ws/2004/03/business-process/" xmlns:plnk="http://schemas.xmlsoap.org/ws/2004/03/partner-link/"> - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + @@ -78,16 +80,16 @@ - - + + - - + + - - + + diff --git a/sandbox/travelsample/paymentprocess-contribution/paymentprocesstest.composite b/sandbox/travelsample/paymentprocess-contribution/paymentprocesstest.composite deleted file mode 100644 index 3b11f0a368..0000000000 --- a/sandbox/travelsample/paymentprocess-contribution/paymentprocesstest.composite +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/sandbox/travelsample/paymentprocess-contribution/pom.xml b/sandbox/travelsample/paymentprocess-contribution/pom.xml index 2549201b9c..2c8536ae1b 100644 --- a/sandbox/travelsample/paymentprocess-contribution/pom.xml +++ b/sandbox/travelsample/paymentprocess-contribution/pom.xml @@ -77,16 +77,17 @@ ${basedir}/test - ${basedir} - - **/*.java - **/.*/** - pom.xml - build.xml - target/** - src/** - test/** - + ${basedir}/test/scatours/paymentprocess + + **.composite + **.properties + + + + ${basedir}/src/scatours/paymentprocess + + ** + @@ -135,6 +136,17 @@ + + org.apache.maven.plugins + maven-surefire-plugin + + 2.3.1 + + false + false + true + + org.apache.maven.plugins maven-dependency-plugin diff --git a/sandbox/travelsample/paymentprocess-contribution/src/scatours/paymentprocess/CreditCardPayment.wsdl b/sandbox/travelsample/paymentprocess-contribution/src/scatours/paymentprocess/CreditCardPayment.wsdl new file mode 100644 index 0000000000..272d6aaf44 --- /dev/null +++ b/sandbox/travelsample/paymentprocess-contribution/src/scatours/paymentprocess/CreditCardPayment.wsdl @@ -0,0 +1,116 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/sandbox/travelsample/paymentprocess-contribution/src/scatours/paymentprocess/EmailGateway.wsdl b/sandbox/travelsample/paymentprocess-contribution/src/scatours/paymentprocess/EmailGateway.wsdl new file mode 100644 index 0000000000..d9a5e36bc0 --- /dev/null +++ b/sandbox/travelsample/paymentprocess-contribution/src/scatours/paymentprocess/EmailGateway.wsdl @@ -0,0 +1,89 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/sandbox/travelsample/paymentprocess-contribution/src/scatours/paymentprocess/PaymentProcess.wsdl b/sandbox/travelsample/paymentprocess-contribution/src/scatours/paymentprocess/PaymentProcess.wsdl index 5efd6251cd..9022763fda 100644 --- a/sandbox/travelsample/paymentprocess-contribution/src/scatours/paymentprocess/PaymentProcess.wsdl +++ b/sandbox/travelsample/paymentprocess-contribution/src/scatours/paymentprocess/PaymentProcess.wsdl @@ -29,33 +29,34 @@ - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - + - + - - + + diff --git a/sandbox/travelsample/paymentprocess-contribution/src/scatours/paymentprocess/deploy.xml b/sandbox/travelsample/paymentprocess-contribution/src/scatours/paymentprocess/deploy.xml index 007fede130..b3dc960034 100644 --- a/sandbox/travelsample/paymentprocess-contribution/src/scatours/paymentprocess/deploy.xml +++ b/sandbox/travelsample/paymentprocess-contribution/src/scatours/paymentprocess/deploy.xml @@ -27,5 +27,11 @@ + + + + + + diff --git a/sandbox/travelsample/paymentprocess-contribution/src/scatours/paymentprocess/paymentprocess.bpel b/sandbox/travelsample/paymentprocess-contribution/src/scatours/paymentprocess/paymentprocess.bpel index 43986b1e2d..f1faf982aa 100644 --- a/sandbox/travelsample/paymentprocess-contribution/src/scatours/paymentprocess/paymentprocess.bpel +++ b/sandbox/travelsample/paymentprocess-contribution/src/scatours/paymentprocess/paymentprocess.bpel @@ -17,7 +17,7 @@ ~ under the License. --> + namespace="http://www.example.org/PaymentProcess/"/> - + namespace="http://www.example.org/EmailGateway/"/> - - + + - - - + + + + + + + + @@ -59,29 +62,79 @@ partnerLink="paymentProcessPartnerLink" portType="pp:PaymentProcess" operation="makePayment" - variable="paymentProcessMessage" + variable="makePaymentRequestMessage" createInstance="yes"/> - + + + + + + + Visa + 12345678 + 2 + 2010 + + Empty + + 1 The Road + Winchester + Hampshire + AB1 2CD + 12345678 + + + + 0.0 + + + + $authorizeRequestMessage.parameters + - $paymentProcessMessage.parameters.CustomerId - $emailMessage.parameters.Email.To + $makePaymentRequestMessage.parameters/CustomerId/text() + $authorizeRequestMessage.parameters/ccp:CreditCard/ccp:CardOwner/ccp:Name - + + $makePaymentRequestMessage.parameters/Amount/text() + $authorizeRequestMessage.parameters/ccp:Amount + + - + + + + + + + + + - OK - $paymentProcessResponseMessage.parameters.Status + $authorizeResponseMessage.parameters + $makePaymentResponseMessage.parameters + + + variable="makePaymentResponseMessage"> + diff --git a/sandbox/travelsample/paymentprocess-contribution/src/scatours/paymentprocess/paymentprocess.componentType b/sandbox/travelsample/paymentprocess-contribution/src/scatours/paymentprocess/paymentprocess.componentType index a7f95a012c..3fc519d8ea 100644 --- a/sandbox/travelsample/paymentprocess-contribution/src/scatours/paymentprocess/paymentprocess.componentType +++ b/sandbox/travelsample/paymentprocess-contribution/src/scatours/paymentprocess/paymentprocess.componentType @@ -26,13 +26,13 @@ - + \ No newline at end of file diff --git a/sandbox/travelsample/paymentprocess-contribution/test/scatours/paymentprocess/PaymentProcessTestCase.java b/sandbox/travelsample/paymentprocess-contribution/test/scatours/paymentprocess/PaymentProcessTestCase.java index 793e1eb887..2a120d99d0 100644 --- a/sandbox/travelsample/paymentprocess-contribution/test/scatours/paymentprocess/PaymentProcessTestCase.java +++ b/sandbox/travelsample/paymentprocess-contribution/test/scatours/paymentprocess/PaymentProcessTestCase.java @@ -46,7 +46,7 @@ public class PaymentProcessTestCase { public void testPaymentProcess() { SCAClient client = (SCAClient) node; PaymentProcess pp = client.getService(PaymentProcess.class, "PaymentProcessClient"); - System.out.println(pp.makePayment("Fred", 100.00f)); + System.out.println("Result = " + pp.makePayment("Fred", 100.00f)); } /** diff --git a/sandbox/travelsample/paymentprocess-contribution/test/scatours/paymentprocess/log4j.properties b/sandbox/travelsample/paymentprocess-contribution/test/scatours/paymentprocess/log4j.properties new file mode 100644 index 0000000000..4e13380e0b --- /dev/null +++ b/sandbox/travelsample/paymentprocess-contribution/test/scatours/paymentprocess/log4j.properties @@ -0,0 +1,36 @@ +# +# 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. +# + +# Set root logger level to WARN and its only appender to CONSOLE +log4j.rootLogger=OFF, CONSOLE + +# log4j properties to work with commandline tools. +log4j.category.org.mortbay=OFF +log4j.category.org.hibernate.type=OFF +log4j.category.org.objectweb=OFF +log4j.category.org.apache.ode.axis2=OFF +log4j.category.org.apache.ode.bpel.engine=OFF +log4j.category.org.apache.ode.daohib.bpel.CorrelatorDaoImpl=OFF +log4j.category.org.apache.ode.bpel.epr=OFF +log4j.category.org.apache.tuscany.sca.implementation.bpel=DEBUG +log4j.category.org.apache.tuscany.sca.implementation.bpel.ode=DEBUG +log4j.category.org.apache.tuscany.sca.implementation.bpel.provider=DEBUG + +# Console appender +log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender +log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout +log4j.appender.CONSOLE.layout.ConversionPattern=[%p] - %C{1}.%M(%L) | %m%n diff --git a/sandbox/travelsample/paymentprocess-contribution/test/scatours/paymentprocess/paymentprocesstest.composite b/sandbox/travelsample/paymentprocess-contribution/test/scatours/paymentprocess/paymentprocesstest.composite new file mode 100644 index 0000000000..a06bc12c03 --- /dev/null +++ b/sandbox/travelsample/paymentprocess-contribution/test/scatours/paymentprocess/paymentprocesstest.composite @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file -- cgit v1.2.3