diff options
author | rfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68> | 2009-06-03 22:17:26 +0000 |
---|---|---|
committer | rfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68> | 2009-06-03 22:17:26 +0000 |
commit | 91a8b67512bba3d12f970b6e7707bae5b659eb13 (patch) | |
tree | de19f8df372bab001b22417cdbcb07f957419a18 /sandbox/rfeng | |
parent | bf28f53c93794aa399a7700f12b31179f03f5ea9 (diff) |
Change the rmi port #
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@781608 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sandbox/rfeng')
7 files changed, 14 insertions, 12 deletions
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 @@ </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>
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 @@ <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>
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 @@ </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>
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 @@ <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>
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 @@ <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>
|