summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--sandbox/travelsample/emailgateway-contribution/emailgatewaytest.composite4
-rw-r--r--sandbox/travelsample/emailgateway-contribution/test/scatours/emailgateway/EmailGatewayTestCase.java10
-rw-r--r--sandbox/travelsample/payment-contribution/creditcard.composite8
-rw-r--r--sandbox/travelsample/payment-contribution/src/payment/creditcard/impl/CreditCardPaymentImpl.java1
-rw-r--r--sandbox/travelsample/payment-contribution/src/payment/creditcard/ws/impl/CreditCardPaymentWSImpl.java11
-rw-r--r--sandbox/travelsample/payment-contribution/test/payment/creditcard/CreditCardPaymentTestCase.java18
-rw-r--r--sandbox/travelsample/paymentprocess-contribution/src/scatours/paymentprocess/CreditCardPayment.wsdl11
-rw-r--r--sandbox/travelsample/paymentprocess-contribution/src/scatours/paymentprocess/EmailGateway.wsdl4
-rw-r--r--sandbox/travelsample/paymentprocess-contribution/src/scatours/paymentprocess/paymentprocess.bpel54
-rw-r--r--sandbox/travelsample/paymentprocess-contribution/src/scatours/paymentprocess/paymentprocess.componentType4
-rw-r--r--sandbox/travelsample/paymentprocess-contribution/test/scatours/paymentprocess/log4j.properties2
-rw-r--r--sandbox/travelsample/paymentprocess-contribution/test/scatours/paymentprocess/paymentprocesstest.composite6
12 files changed, 86 insertions, 47 deletions
diff --git a/sandbox/travelsample/emailgateway-contribution/emailgatewaytest.composite b/sandbox/travelsample/emailgateway-contribution/emailgatewaytest.composite
index f6e9669dce..5be71b4d66 100644
--- a/sandbox/travelsample/emailgateway-contribution/emailgatewaytest.composite
+++ b/sandbox/travelsample/emailgateway-contribution/emailgatewaytest.composite
@@ -25,13 +25,13 @@
<component name="EmailGatewayClient">
<implementation.java class="scatours.emailgateway.EmailGatewayClientImpl" />
<reference name="emailGateway">
- <binding.ws uri="http://localhost:8080/EmailGateway" />
+ <binding.ws uri="http://localhost:8082/EmailGateway" />
</reference>
</component>
<component name="EmailGateway">
<implementation.java class="scatours.emailgateway.EmailGatewayImpl" />
<service name="EmailGateway">
- <binding.ws uri="http://localhost:8080/EmailGateway" />
+ <binding.ws uri="http://localhost:8082/EmailGateway" />
</service>
</component>
</composite> \ No newline at end of file
diff --git a/sandbox/travelsample/emailgateway-contribution/test/scatours/emailgateway/EmailGatewayTestCase.java b/sandbox/travelsample/emailgateway-contribution/test/scatours/emailgateway/EmailGatewayTestCase.java
index a39127653b..7445aa41c3 100644
--- a/sandbox/travelsample/emailgateway-contribution/test/scatours/emailgateway/EmailGatewayTestCase.java
+++ b/sandbox/travelsample/emailgateway-contribution/test/scatours/emailgateway/EmailGatewayTestCase.java
@@ -50,6 +50,16 @@ public class EmailGatewayTestCase {
EmailType email = objectFactory.createEmailType();
System.out.println(cc.sendEmail(email));
}
+
+ @Test
+ public void testWaitForInput() {
+ System.out.println("Press a key to end");
+ try {
+ System.in.read();
+ } catch (Exception ex) {
+ }
+ System.out.println("Shutting down");
+ }
/**
* @throws java.lang.Exception
diff --git a/sandbox/travelsample/payment-contribution/creditcard.composite b/sandbox/travelsample/payment-contribution/creditcard.composite
index 97ee9a2e69..184304e829 100644
--- a/sandbox/travelsample/payment-contribution/creditcard.composite
+++ b/sandbox/travelsample/payment-contribution/creditcard.composite
@@ -19,20 +19,20 @@
-->
<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" xmlns:t="http://tuscany.apache.org/xmlns/sca/1.0"
xmlns:c="http://creditcard" targetNamespace="http://creditcard" name="creditcard">
- <component name="CreditCardPayment">
+ <component name="CreditCardPaymentWSClient">
<implementation.java class="payment.creditcard.impl.CreditCardPaymentImpl" />
<reference name="creditCardPayment">
- <binding.ws uri="http://localhost:8080/CreditCardPayment" />
+ <binding.ws uri="http://localhost:8081/CreditCardPayment" />
</reference>
<service name="CreditCardPayment">
- <t:binding.jsonrpc uri="/jsonrpc/CreditCardPayment" />
+ <!--t:binding.jsonrpc uri="/jsonrpc/CreditCardPayment" /-->
<binding.sca />
</service>
</component>
<component name="CreditCardPaymentWS">
<implementation.java class="payment.creditcard.ws.impl.CreditCardPaymentWSImpl" />
<service name="CreditCardPayment">
- <binding.ws uri="http://localhost:8080/CreditCardPayment" />
+ <binding.ws uri="http://localhost:8081/CreditCardPayment" />
</service>
</component>
</composite> \ No newline at end of file
diff --git a/sandbox/travelsample/payment-contribution/src/payment/creditcard/impl/CreditCardPaymentImpl.java b/sandbox/travelsample/payment-contribution/src/payment/creditcard/impl/CreditCardPaymentImpl.java
index 7d8fb32f3c..2a9c537775 100644
--- a/sandbox/travelsample/payment-contribution/src/payment/creditcard/impl/CreditCardPaymentImpl.java
+++ b/sandbox/travelsample/payment-contribution/src/payment/creditcard/impl/CreditCardPaymentImpl.java
@@ -30,6 +30,7 @@ import payment.creditcard.CreditCardPayment;
*/
@Service(CreditCardPayment.class)
public class CreditCardPaymentImpl implements CreditCardPayment {
+
@Reference
protected CreditCardPayment creditCardPayment;
diff --git a/sandbox/travelsample/payment-contribution/src/payment/creditcard/ws/impl/CreditCardPaymentWSImpl.java b/sandbox/travelsample/payment-contribution/src/payment/creditcard/ws/impl/CreditCardPaymentWSImpl.java
index b0fd37f6ea..f0c61cd14d 100644
--- a/sandbox/travelsample/payment-contribution/src/payment/creditcard/ws/impl/CreditCardPaymentWSImpl.java
+++ b/sandbox/travelsample/payment-contribution/src/payment/creditcard/ws/impl/CreditCardPaymentWSImpl.java
@@ -31,6 +31,17 @@ import payment.creditcard.CreditCardPayment;
public class CreditCardPaymentWSImpl implements CreditCardPayment {
public String authorize(CreditCardDetailsType creditCard, float amount) {
+ if (creditCard != null){
+ System.out.println("Checking card: name = " +
+ creditCard.getCardOwner().getName() +
+ " number = " +
+ creditCard.getCreditCardNumber() +
+ " for amount " +
+ amount);
+ } else {
+ System.out.println("Checking card is null");
+ }
+
return "OK";
}
diff --git a/sandbox/travelsample/payment-contribution/test/payment/creditcard/CreditCardPaymentTestCase.java b/sandbox/travelsample/payment-contribution/test/payment/creditcard/CreditCardPaymentTestCase.java
index a43bcbbf17..ac5af4e547 100644
--- a/sandbox/travelsample/payment-contribution/test/payment/creditcard/CreditCardPaymentTestCase.java
+++ b/sandbox/travelsample/payment-contribution/test/payment/creditcard/CreditCardPaymentTestCase.java
@@ -45,11 +45,27 @@ public class CreditCardPaymentTestCase {
@Test
public void testCreditCardPayment() {
SCAClient client = (SCAClient) node;
- CreditCardPayment cc = client.getService(CreditCardPayment.class, "CreditCardPayment");
+ CreditCardPayment cc = client.getService(CreditCardPayment.class, "CreditCardPaymentWSClient");
+
ObjectFactory objectFactory = new ObjectFactory();
CreditCardDetailsType ccDetails = objectFactory.createCreditCardDetailsType();
+ ccDetails.setCreditCardType(CreditCardTypeType.fromValue("Visa"));
+ PayerType ccOwner = objectFactory.createPayerType();
+ ccOwner.setName("Fred");
+ ccDetails.setCardOwner(ccOwner);
+
System.out.println(cc.authorize(ccDetails, 100.00f));
}
+
+ @Test
+ public void testWaitForInput() {
+ System.out.println("Press a key to end");
+ try {
+ System.in.read();
+ } catch (Exception ex) {
+ }
+ System.out.println("Shutting down");
+ }
/**
* @throws java.lang.Exception
diff --git a/sandbox/travelsample/paymentprocess-contribution/src/scatours/paymentprocess/CreditCardPayment.wsdl b/sandbox/travelsample/paymentprocess-contribution/src/scatours/paymentprocess/CreditCardPayment.wsdl
index 272d6aaf44..4854e7819d 100644
--- a/sandbox/travelsample/paymentprocess-contribution/src/scatours/paymentprocess/CreditCardPayment.wsdl
+++ b/sandbox/travelsample/paymentprocess-contribution/src/scatours/paymentprocess/CreditCardPayment.wsdl
@@ -28,9 +28,10 @@
<wsdl:types>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://www.example.org/CreditCardPayment/"
- xmlns:tns="http://www.example.org/CreditCardPayment/">
+ xmlns:tns="http://www.example.org/CreditCardPayment/"
+ elementFormDefault="unqualified">
- <xsd:element name="Authorize" type="tns:AuthorizeType"/>
+ <xsd:element name="authorize" type="tns:AuthorizeType"/>
<xsd:complexType name="AuthorizeType">
<xsd:sequence>
<xsd:element name="CreditCard" type="tns:CreditCardDetailsType"></xsd:element>
@@ -38,7 +39,7 @@
</xsd:sequence>
</xsd:complexType>
- <xsd:element name="AuthorizeResponse" type="tns:AuthorizeResponseType"/>
+ <xsd:element name="authorizeResponse" type="tns:AuthorizeResponseType"/>
<xsd:complexType name="AuthorizeResponseType">
<xsd:sequence>
<xsd:element name="Status" type="xsd:string"></xsd:element>
@@ -81,10 +82,10 @@
</xsd:schema>
</wsdl:types>
<wsdl:message name="AuthorizeRequest">
- <wsdl:part name="parameters" element="tns:Authorize"></wsdl:part>
+ <wsdl:part name="parameters" element="tns:authorize"></wsdl:part>
</wsdl:message>
<wsdl:message name="AuthorizeResponse">
- <wsdl:part name="parameters" element="tns:AuthorizeResponse"></wsdl:part>
+ <wsdl:part name="parameters" element="tns:authorizeResponse"></wsdl:part>
</wsdl:message>
<wsdl:portType name="CreditCardPayment">
<wsdl:operation name="authorize">
diff --git a/sandbox/travelsample/paymentprocess-contribution/src/scatours/paymentprocess/EmailGateway.wsdl b/sandbox/travelsample/paymentprocess-contribution/src/scatours/paymentprocess/EmailGateway.wsdl
index d9a5e36bc0..98956e32fd 100644
--- a/sandbox/travelsample/paymentprocess-contribution/src/scatours/paymentprocess/EmailGateway.wsdl
+++ b/sandbox/travelsample/paymentprocess-contribution/src/scatours/paymentprocess/EmailGateway.wsdl
@@ -83,7 +83,7 @@
</wsdl:port>
</wsdl:service>
- <plnk:partnerLinkType name="EmailGatewayLinkType">
+ <!--plnk:partnerLinkType name="EmailGatewayLinkType">
<plnk:role name="forward" portType="tns:EmailGateway"/>
- </plnk:partnerLinkType>
+ </plnk:partnerLinkType-->
</wsdl:definitions> \ No newline at end of file
diff --git a/sandbox/travelsample/paymentprocess-contribution/src/scatours/paymentprocess/paymentprocess.bpel b/sandbox/travelsample/paymentprocess-contribution/src/scatours/paymentprocess/paymentprocess.bpel
index f1faf982aa..c23780b052 100644
--- a/sandbox/travelsample/paymentprocess-contribution/src/scatours/paymentprocess/paymentprocess.bpel
+++ b/sandbox/travelsample/paymentprocess-contribution/src/scatours/paymentprocess/paymentprocess.bpel
@@ -22,6 +22,7 @@
xmlns:bpws="http://schemas.xmlsoap.org/ws/2004/03/business-process/"
xmlns:tns="http://tuscany.apache.org/PaymentProcess"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:pp="http://www.example.org/PaymentProcess/"
xmlns:ccp="http://www.example.org/CreditCardPayment/"
xmlns:eg="http://www.example.org/EmailGateway/"
@@ -36,14 +37,14 @@
importType="http://schemas.xmlsoap.org/wsdl/"
namespace="http://www.example.org/CreditCardPayment/"/>
- <import location="EmailGateway.wsdl"
+ <!--import location="EmailGateway.wsdl"
importType="http://schemas.xmlsoap.org/wsdl/"
- namespace="http://www.example.org/EmailGateway/"/>
+ namespace="http://www.example.org/EmailGateway/"/-->
<partnerLinks>
<partnerLink name="paymentProcessPartnerLink" partnerLinkType="pp:PaymentProcessLinkType" myRole="forward" />
<partnerLink name="creditCardPaymentPartnerLink" partnerLinkType="ccp:CreditCardPaymentLinkType" partnerRole="forward" initializePartnerRole="yes" />
- <partnerLink name="emailGatewayPartnerLink" partnerLinkType="eg:EmailGatewayLinkType" partnerRole="forward" initializePartnerRole="yes" />
+ <!--partnerLink name="emailGatewayPartnerLink" partnerLinkType="eg:EmailGatewayLinkType" partnerRole="forward" initializePartnerRole="yes" /-->
</partnerLinks>
<variables>
@@ -53,8 +54,8 @@
<variable name="authorizeRequestMessage" messageType="ccp:AuthorizeRequest"/>
<variable name="authorizeResponseMessage" messageType="ccp:AuthorizeResponse"/>
<variable name="authorizeRequest" type="ccp:AuthorizeType"/>
- <variable name="sendEmailRequestMessage" messageType="eg:SendEmailRequest"/>
- <variable name="sendEmailResponseMessage" messageType="eg:SendEmailResponse"/>
+ <!--variable name="sendEmailRequestMessage" messageType="eg:SendEmailRequest"/>
+ <variable name="sendEmailResponseMessage" messageType="eg:SendEmailResponse"/-->
</variables>
<sequence>
@@ -70,40 +71,39 @@
<copy>
<from>
<literal>
- <ccp:Authorize>
- <ccp:CreditCard>
- <ccp:CreditCardType>Visa</ccp:CreditCardType>
- <ccp:CreditCardNumber>12345678</ccp:CreditCardNumber>
- <ccp:ExpMonth>2</ccp:ExpMonth>
- <ccp:ExpYear>2010</ccp:ExpYear>
- <ccp:CardOwner>
- <ccp:Name>Empty</ccp:Name>
- <ccp:Address>
- <ccp:Street>1 The Road</ccp:Street>
- <ccp:City>Winchester</ccp:City>
- <ccp:State>Hampshire</ccp:State>
- <ccp:ZipCode>AB1 2CD</ccp:ZipCode>
- <ccp:HomePhone>12345678</ccp:HomePhone>
- </ccp:Address>
- </ccp:CardOwner>
- </ccp:CreditCard>
- <ccp:Amount>0.0</ccp:Amount>
- </ccp:Authorize>
+ <authorize xmlns="http://www.example.org/CreditCardPayment/">
+ <CreditCard xmlns="">
+ <CreditCardType>Visa</CreditCardType>
+ <CreditCardNumber>12345678</CreditCardNumber>
+ <ExpMonth>2</ExpMonth>
+ <ExpYear>2010</ExpYear>
+ <CardOwner>
+ <Name>Empty</Name>
+ <Address>
+ <Street>1 The Road</Street>
+ <City>Winchester</City>
+ <State>Hampshire</State>
+ <ZipCode>AB1 2CD</ZipCode>
+ <HomePhone>12345678</HomePhone>
+ </Address>
+ </CardOwner>
+ </CreditCard>
+ <Amount xmlns="">0.0</Amount>
+ </authorize>
</literal>
</from>
<to>$authorizeRequestMessage.parameters</to>
</copy>
<copy>
<from>$makePaymentRequestMessage.parameters/CustomerId/text()</from>
- <to>$authorizeRequestMessage.parameters/ccp:CreditCard/ccp:CardOwner/ccp:Name</to>
+ <to>$authorizeRequestMessage.parameters/CreditCard/CardOwner/Name</to>
</copy>
<copy>
<from>$makePaymentRequestMessage.parameters/Amount/text()</from>
- <to>$authorizeRequestMessage.parameters/ccp:Amount</to>
+ <to>$authorizeRequestMessage.parameters/Amount</to>
</copy>
</assign>
-
<invoke name="invokeCreditCardPayment"
operation="authorize"
inputVariable="authorizeRequestMessage"
diff --git a/sandbox/travelsample/paymentprocess-contribution/src/scatours/paymentprocess/paymentprocess.componentType b/sandbox/travelsample/paymentprocess-contribution/src/scatours/paymentprocess/paymentprocess.componentType
index 3fc519d8ea..adadee5e91 100644
--- a/sandbox/travelsample/paymentprocess-contribution/src/scatours/paymentprocess/paymentprocess.componentType
+++ b/sandbox/travelsample/paymentprocess-contribution/src/scatours/paymentprocess/paymentprocess.componentType
@@ -30,9 +30,9 @@
<interface.wsdl interface="http://www.example.org/CrecitCardPayment/#wsdl.interface(CreditCardPayment)" />
</reference>
- <reference name="emailGatewayPartnerLink">
+ <!--reference name="emailGatewayPartnerLink">
<interface.wsdl interface="http://www.example.org/EmailGateway/#wsdl.interface(EmailGateway)" />
- </reference>
+ </reference-->
</componentType>
\ No newline at end of file
diff --git a/sandbox/travelsample/paymentprocess-contribution/test/scatours/paymentprocess/log4j.properties b/sandbox/travelsample/paymentprocess-contribution/test/scatours/paymentprocess/log4j.properties
index 4e13380e0b..7ed0bcaf77 100644
--- a/sandbox/travelsample/paymentprocess-contribution/test/scatours/paymentprocess/log4j.properties
+++ b/sandbox/travelsample/paymentprocess-contribution/test/scatours/paymentprocess/log4j.properties
@@ -23,7 +23,7 @@ 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.bpel.engine=DEBUG
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
diff --git a/sandbox/travelsample/paymentprocess-contribution/test/scatours/paymentprocess/paymentprocesstest.composite b/sandbox/travelsample/paymentprocess-contribution/test/scatours/paymentprocess/paymentprocesstest.composite
index a06bc12c03..8af02af425 100644
--- a/sandbox/travelsample/paymentprocess-contribution/test/scatours/paymentprocess/paymentprocesstest.composite
+++ b/sandbox/travelsample/paymentprocess-contribution/test/scatours/paymentprocess/paymentprocesstest.composite
@@ -37,11 +37,11 @@
<binding.ws uri="http://localhost:8080/PaymentProcess" wsdlElement="http://www.example.org/PaymentProcess/#wsdl.service(PaymentProcessService)"/>
</service>
<reference name="creditCardPaymentPartnerLink">
- <binding.ws uri="http://localhost:8081/CreditCardPayment"/>
+ <binding.ws uri="http://localhost:8082/CreditCardPayment"/>
</reference>
- <reference name="emailGatewayPartnerLink">
+ <!--reference name="emailGatewayPartnerLink">
<binding.ws uri="http://localhost:8082/EmailGateway"/>
- </reference>
+ </reference-->
</component>
</composite> \ No newline at end of file