From 91a8b67512bba3d12f970b6e7707bae5b659eb13 Mon Sep 17 00:00:00 2001 From: rfeng Date: Wed, 3 Jun 2009 22:17:26 +0000 Subject: Change the rmi port # git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@781608 13f79535-47bb-0310-9956-ffa450edef68 --- .../payment/creditcard/impl/CreditCardPaymentImpl.java | 6 ++++-- .../src/main/resources/CreditCardPayment.wsdl | 2 +- .../src/main/resources/OSGI-INF/sca/bundle.composite | 10 +++++----- .../payment/creditcard/test/CreditCardPaymentOSGiTestCase.java | 2 +- .../src/main/resources/CreditCardPayment.wsdl | 2 +- .../src/main/webapp/WEB-INF/web.composite | 2 +- .../src/main/resources/OSGI-INF/sca/bundle.composite | 2 +- 7 files changed, 14 insertions(+), 12 deletions(-) (limited to 'sandbox/rfeng') diff --git a/sandbox/rfeng/scatours-creditcard-payment-dosgi-contribution/src/main/java/scatours/payment/creditcard/impl/CreditCardPaymentImpl.java b/sandbox/rfeng/scatours-creditcard-payment-dosgi-contribution/src/main/java/scatours/payment/creditcard/impl/CreditCardPaymentImpl.java index 54a6f722de..6605c23bcd 100644 --- a/sandbox/rfeng/scatours-creditcard-payment-dosgi-contribution/src/main/java/scatours/payment/creditcard/impl/CreditCardPaymentImpl.java +++ b/sandbox/rfeng/scatours-creditcard-payment-dosgi-contribution/src/main/java/scatours/payment/creditcard/impl/CreditCardPaymentImpl.java @@ -45,6 +45,7 @@ public class CreditCardPaymentImpl implements CreditCardPayment { } public String authorize(CreditCardDetailsType creditCard, float amount) { + float charge = amount; if (creditCard != null) { try { print(creditCard); @@ -58,12 +59,13 @@ public class CreditCardPaymentImpl implements CreditCardPayment { + " for amount " + amount + " EUR"); - amount = convertCurrency(amount); + charge = convertCurrency(amount); } else { System.out.println("Credit card is null"); + return "FAILURE: Invalid Credit Card Number"; } - return "SUCCESS: Confirmation Code=" + UUID.randomUUID() + " ($" + amount + ")"; + return "SUCCESS: Auth Code=" + UUID.randomUUID() + " (EUR"+amount+"->USD" + charge + ")"; } private void print(CreditCardDetailsType creditCard) throws JAXBException, PropertyException { diff --git a/sandbox/rfeng/scatours-creditcard-payment-dosgi-contribution/src/main/resources/CreditCardPayment.wsdl b/sandbox/rfeng/scatours-creditcard-payment-dosgi-contribution/src/main/resources/CreditCardPayment.wsdl index a2e882d2d2..d50a63ac42 100644 --- a/sandbox/rfeng/scatours-creditcard-payment-dosgi-contribution/src/main/resources/CreditCardPayment.wsdl +++ b/sandbox/rfeng/scatours-creditcard-payment-dosgi-contribution/src/main/resources/CreditCardPayment.wsdl @@ -108,7 +108,7 @@ - + diff --git a/sandbox/rfeng/scatours-creditcard-payment-dosgi-contribution/src/main/resources/OSGI-INF/sca/bundle.composite b/sandbox/rfeng/scatours-creditcard-payment-dosgi-contribution/src/main/resources/OSGI-INF/sca/bundle.composite index 0bb37a02e8..7b12b36368 100644 --- a/sandbox/rfeng/scatours-creditcard-payment-dosgi-contribution/src/main/resources/OSGI-INF/sca/bundle.composite +++ b/sandbox/rfeng/scatours-creditcard-payment-dosgi-contribution/src/main/resources/OSGI-INF/sca/bundle.composite @@ -26,21 +26,21 @@ - + - + - + diff --git a/sandbox/rfeng/scatours-creditcard-payment-dosgi-contribution/src/test/java/scatours/payment/creditcard/test/CreditCardPaymentOSGiTestCase.java b/sandbox/rfeng/scatours-creditcard-payment-dosgi-contribution/src/test/java/scatours/payment/creditcard/test/CreditCardPaymentOSGiTestCase.java index 7188fe7f0a..98c1fced9d 100644 --- a/sandbox/rfeng/scatours-creditcard-payment-dosgi-contribution/src/test/java/scatours/payment/creditcard/test/CreditCardPaymentOSGiTestCase.java +++ b/sandbox/rfeng/scatours-creditcard-payment-dosgi-contribution/src/test/java/scatours/payment/creditcard/test/CreditCardPaymentOSGiTestCase.java @@ -85,7 +85,7 @@ public class CreditCardPaymentOSGiTestCase { @Test // @Ignore("Now we use the testClient") public void testWS() throws Exception { - URL url = new URL("http://localhost:8086/CreditCardPayment?wsdl"); + URL url = new URL("http://localhost:8082/CreditCardPayment?wsdl"); InputStream is = url.openStream(); Reader reader = new InputStreamReader(is); char[] content = new char[10240]; // 10k 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 index 1fac949ea1..c8660c4ffe 100644 --- 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 @@ -106,7 +106,7 @@ - + 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 index 38c59f7da3..188c9937f7 100644 --- 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 @@ -26,7 +26,7 @@ - + diff --git a/sandbox/rfeng/scatours-currency-converter-dosgi-contribution/src/main/resources/OSGI-INF/sca/bundle.composite b/sandbox/rfeng/scatours-currency-converter-dosgi-contribution/src/main/resources/OSGI-INF/sca/bundle.composite index 65f62d62d2..b59e8bf248 100644 --- a/sandbox/rfeng/scatours-currency-converter-dosgi-contribution/src/main/resources/OSGI-INF/sca/bundle.composite +++ b/sandbox/rfeng/scatours-currency-converter-dosgi-contribution/src/main/resources/OSGI-INF/sca/bundle.composite @@ -25,7 +25,7 @@ - + -- cgit v1.2.3