tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rf...@apache.org
Subject svn commit: r781608 - in /tuscany/sandbox/rfeng: scatours-creditcard-payment-dosgi-contribution/src/main/java/scatours/payment/creditcard/impl/ scatours-creditcard-payment-dosgi-contribution/src/main/resources/ scatours-creditcard-payment-dosgi-contrib...
Date Wed, 03 Jun 2009 22:17:27 GMT
Author: rfeng
Date: Wed Jun  3 22:17:26 2009
New Revision: 781608

URL: http://svn.apache.org/viewvc?rev=781608&view=rev
Log:
Change the rmi port #

Modified:
    tuscany/sandbox/rfeng/scatours-creditcard-payment-dosgi-contribution/src/main/java/scatours/payment/creditcard/impl/CreditCardPaymentImpl.java
    tuscany/sandbox/rfeng/scatours-creditcard-payment-dosgi-contribution/src/main/resources/CreditCardPayment.wsdl
    tuscany/sandbox/rfeng/scatours-creditcard-payment-dosgi-contribution/src/main/resources/OSGI-INF/sca/bundle.composite
    tuscany/sandbox/rfeng/scatours-creditcard-payment-dosgi-contribution/src/test/java/scatours/payment/creditcard/test/CreditCardPaymentOSGiTestCase.java
    tuscany/sandbox/rfeng/scatours-creditcard-payment-web-contribution/src/main/resources/CreditCardPayment.wsdl
    tuscany/sandbox/rfeng/scatours-creditcard-payment-web-contribution/src/main/webapp/WEB-INF/web.composite
    tuscany/sandbox/rfeng/scatours-currency-converter-dosgi-contribution/src/main/resources/OSGI-INF/sca/bundle.composite

Modified: tuscany/sandbox/rfeng/scatours-creditcard-payment-dosgi-contribution/src/main/java/scatours/payment/creditcard/impl/CreditCardPaymentImpl.java
URL: http://svn.apache.org/viewvc/tuscany/sandbox/rfeng/scatours-creditcard-payment-dosgi-contribution/src/main/java/scatours/payment/creditcard/impl/CreditCardPaymentImpl.java?rev=781608&r1=781607&r2=781608&view=diff
==============================================================================
--- tuscany/sandbox/rfeng/scatours-creditcard-payment-dosgi-contribution/src/main/java/scatours/payment/creditcard/impl/CreditCardPaymentImpl.java
(original)
+++ tuscany/sandbox/rfeng/scatours-creditcard-payment-dosgi-contribution/src/main/java/scatours/payment/creditcard/impl/CreditCardPaymentImpl.java
Wed Jun  3 22:17:26 2009
@@ -45,6 +45,7 @@
     }
 
     public String authorize(CreditCardDetailsType creditCard, float amount) {
+        float charge = amount;
         if (creditCard != null) {
             try {
                 print(creditCard);
@@ -58,12 +59,13 @@
                 + " 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
{

Modified: tuscany/sandbox/rfeng/scatours-creditcard-payment-dosgi-contribution/src/main/resources/CreditCardPayment.wsdl
URL: http://svn.apache.org/viewvc/tuscany/sandbox/rfeng/scatours-creditcard-payment-dosgi-contribution/src/main/resources/CreditCardPayment.wsdl?rev=781608&r1=781607&r2=781608&view=diff
==============================================================================
--- tuscany/sandbox/rfeng/scatours-creditcard-payment-dosgi-contribution/src/main/resources/CreditCardPayment.wsdl
(original)
+++ tuscany/sandbox/rfeng/scatours-creditcard-payment-dosgi-contribution/src/main/resources/CreditCardPayment.wsdl
Wed Jun  3 22:17:26 2009
@@ -108,7 +108,7 @@
     </wsdl:binding>
     <wsdl:service name="CreditCardPaymentService">
         <wsdl:port name="CreditCardPaymentPort" binding="tns:CreditCardPaymentBinding">
-            <soap:address location="http://localhost:8086/CreditCardPayment" />
+            <soap:address location="http://localhost:8082/CreditCardPayment" />
         </wsdl:port>
     </wsdl:service>
 

Modified: tuscany/sandbox/rfeng/scatours-creditcard-payment-dosgi-contribution/src/main/resources/OSGI-INF/sca/bundle.composite
URL: http://svn.apache.org/viewvc/tuscany/sandbox/rfeng/scatours-creditcard-payment-dosgi-contribution/src/main/resources/OSGI-INF/sca/bundle.composite?rev=781608&r1=781607&r2=781608&view=diff
==============================================================================
--- tuscany/sandbox/rfeng/scatours-creditcard-payment-dosgi-contribution/src/main/resources/OSGI-INF/sca/bundle.composite
(original)
+++ tuscany/sandbox/rfeng/scatours-creditcard-payment-dosgi-contribution/src/main/resources/OSGI-INF/sca/bundle.composite
Wed Jun  3 22:17:26 2009
@@ -26,21 +26,21 @@
     <component name="CreditCardPaymentComponent">
         <tuscany:implementation.osgi bundleSymbolicName="scatours.creditcard.payment"
bundleVersion="1.0.0" />
         <service name="CreditCardPayment">
-            <binding.ws uri="http://localhost:8086/CreditCardPayment"/>
+            <binding.ws uri="http://localhost:8082/CreditCardPayment"/>
         </service>
         <reference name="currencyConverter">
-            <tuscany:binding.rmi uri="rmi://localhost:8085/CurrencyConverter"/>
+            <tuscany:binding.rmi uri="rmi://localhost:8089/CurrencyConverter"/>
         </reference>
     </component>
 
 <!-- Other components can be declared here too -->
-
+<!--
     <component name="CurrencyConverterComponent">
         <implementation.java class="scatours.currency.impl.CurrencyConverterImpl" />
         <service name="CurrencyConverter">
-            <tuscany:binding.rmi uri="rmi://localhost:8085/CurrencyConverter" />
+            <tuscany:binding.rmi uri="rmi://localhost:8089/CurrencyConverter" />
         </service>
     </component>
-
+-->
 
 </composite>

Modified: tuscany/sandbox/rfeng/scatours-creditcard-payment-dosgi-contribution/src/test/java/scatours/payment/creditcard/test/CreditCardPaymentOSGiTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/sandbox/rfeng/scatours-creditcard-payment-dosgi-contribution/src/test/java/scatours/payment/creditcard/test/CreditCardPaymentOSGiTestCase.java?rev=781608&r1=781607&r2=781608&view=diff
==============================================================================
--- tuscany/sandbox/rfeng/scatours-creditcard-payment-dosgi-contribution/src/test/java/scatours/payment/creditcard/test/CreditCardPaymentOSGiTestCase.java
(original)
+++ tuscany/sandbox/rfeng/scatours-creditcard-payment-dosgi-contribution/src/test/java/scatours/payment/creditcard/test/CreditCardPaymentOSGiTestCase.java
Wed Jun  3 22:17:26 2009
@@ -85,7 +85,7 @@
     @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

Modified: tuscany/sandbox/rfeng/scatours-creditcard-payment-web-contribution/src/main/resources/CreditCardPayment.wsdl
URL: http://svn.apache.org/viewvc/tuscany/sandbox/rfeng/scatours-creditcard-payment-web-contribution/src/main/resources/CreditCardPayment.wsdl?rev=781608&r1=781607&r2=781608&view=diff
==============================================================================
--- tuscany/sandbox/rfeng/scatours-creditcard-payment-web-contribution/src/main/resources/CreditCardPayment.wsdl
(original)
+++ tuscany/sandbox/rfeng/scatours-creditcard-payment-web-contribution/src/main/resources/CreditCardPayment.wsdl
Wed Jun  3 22:17:26 2009
@@ -106,7 +106,7 @@
     </wsdl:binding>
     <wsdl:service name="CreditCardPaymentService">
         <wsdl:port name="CreditCardPaymentPort" binding="tns:CreditCardPaymentBinding">
-            <soap:address location="http://localhost:8086/CreditCardPayment" />
+            <soap:address location="http://localhost:8082/CreditCardPayment" />
         </wsdl:port>
     </wsdl:service>
 

Modified: tuscany/sandbox/rfeng/scatours-creditcard-payment-web-contribution/src/main/webapp/WEB-INF/web.composite
URL: http://svn.apache.org/viewvc/tuscany/sandbox/rfeng/scatours-creditcard-payment-web-contribution/src/main/webapp/WEB-INF/web.composite?rev=781608&r1=781607&r2=781608&view=diff
==============================================================================
--- tuscany/sandbox/rfeng/scatours-creditcard-payment-web-contribution/src/main/webapp/WEB-INF/web.composite
(original)
+++ tuscany/sandbox/rfeng/scatours-creditcard-payment-web-contribution/src/main/webapp/WEB-INF/web.composite
Wed Jun  3 22:17:26 2009
@@ -26,7 +26,7 @@
         <implementation.web web-uri="" />
         <reference name="service">
             <interface.java interface="scatours.payment.creditcard.CreditCardPayment"/>
-            <binding.ws uri="http://localhost:8086/CreditCardPayment" />
+            <binding.ws uri="http://localhost:8082/CreditCardPayment" />
         </reference>
     </component>
 

Modified: tuscany/sandbox/rfeng/scatours-currency-converter-dosgi-contribution/src/main/resources/OSGI-INF/sca/bundle.composite
URL: http://svn.apache.org/viewvc/tuscany/sandbox/rfeng/scatours-currency-converter-dosgi-contribution/src/main/resources/OSGI-INF/sca/bundle.composite?rev=781608&r1=781607&r2=781608&view=diff
==============================================================================
--- tuscany/sandbox/rfeng/scatours-currency-converter-dosgi-contribution/src/main/resources/OSGI-INF/sca/bundle.composite
(original)
+++ tuscany/sandbox/rfeng/scatours-currency-converter-dosgi-contribution/src/main/resources/OSGI-INF/sca/bundle.composite
Wed Jun  3 22:17:26 2009
@@ -25,7 +25,7 @@
     <component name="CurrencyConverterComponent">
         <tuscany:implementation.osgi bundleSymbolicName="scatours.currency.converter"
bundleVersion="1.0.0" />
         <service name="CurrencyConverter">
-            <tuscany:binding.rmi uri="rmi://localhost:8085/CurrencyConverter" />
+            <tuscany:binding.rmi uri="rmi://localhost:8089/CurrencyConverter" />
         </service>
     </component>
 



Mime
View raw message