Author: alex.guizar(a)jboss.com
Date: 2009-11-05 04:17:48 -0500 (Thu, 05 Nov 2009)
New Revision: 227
Added:
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/QuickstartBPELAtmTestCase.java
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/atm/
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/atm/AtmFrontEndService.java
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/atm/FrontEnd.java
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/atm/InsufficientFunds.java
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/atm/InsufficientFunds_Exception.java
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/atm/UnauthorizedAccess.java
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/atm/UnauthorizedAccess_Exception.java
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/atm/package-info.java
trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_atm/
trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_atm/bpel/
trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_atm/bpel/account-service.wsdl
trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_atm/bpel/atm-service.wsdl
trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_atm/bpel/atm.bpel
trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_atm/bpel/bpel-deploy.xml
trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_atm/bpel/interface/
trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_atm/bpel/interface/account.wsdl
trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_atm/bpel/interface/atm.wsdl
trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_atm/bpel/interface/ticket.wsdl
trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_atm/bpel/ticket-service.wsdl
trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_atm/build.xml
trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_atm/war/
trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_atm/war/resources/
trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_atm/war/resources/WEB-INF/
trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_atm/war/resources/WEB-INF/web.xml
trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_atm/war/src/
trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_atm/war/src/org/
trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_atm/war/src/org/jboss/
trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_atm/war/src/org/jboss/soa/
trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_atm/war/src/org/jboss/soa/bpel/
trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_atm/war/src/org/jboss/soa/bpel/samples/
trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_atm/war/src/org/jboss/soa/bpel/samples/quickstart/
trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_atm/war/src/org/jboss/soa/bpel/samples/quickstart/account/
trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_atm/war/src/org/jboss/soa/bpel/samples/quickstart/account/AccountOperation.java
trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_atm/war/src/org/jboss/soa/bpel/samples/quickstart/account/AccountSystem.java
trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_atm/war/src/org/jboss/soa/bpel/samples/quickstart/account/AccountSystem_Impl.java
trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_atm/war/src/org/jboss/soa/bpel/samples/quickstart/account/accounts.xml
trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_atm/war/src/org/jboss/soa/bpel/samples/quickstart/account/package-info.java
trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_atm/war/src/org/jboss/soa/bpel/samples/quickstart/ticket/
trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_atm/war/src/org/jboss/soa/bpel/samples/quickstart/ticket/TicketIssuer.java
trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_atm/war/src/org/jboss/soa/bpel/samples/quickstart/ticket/TicketIssuer_Impl.java
trunk/samples/quickstart/atm/
trunk/samples/quickstart/atm/bpel/
trunk/samples/quickstart/atm/bpel/account-service.wsdl
trunk/samples/quickstart/atm/bpel/atm-service.wsdl
trunk/samples/quickstart/atm/bpel/atm.bpel
trunk/samples/quickstart/atm/bpel/bpel-deploy.xml
trunk/samples/quickstart/atm/bpel/interface/
trunk/samples/quickstart/atm/bpel/interface/account.wsdl
trunk/samples/quickstart/atm/bpel/interface/atm.wsdl
trunk/samples/quickstart/atm/bpel/interface/ticket.wsdl
trunk/samples/quickstart/atm/bpel/ticket-service.wsdl
trunk/samples/quickstart/atm/build.xml
trunk/samples/quickstart/atm/war/
trunk/samples/quickstart/atm/war/resources/
trunk/samples/quickstart/atm/war/resources/WEB-INF/
trunk/samples/quickstart/atm/war/resources/WEB-INF/web.xml
trunk/samples/quickstart/atm/war/src/
trunk/samples/quickstart/atm/war/src/org/
trunk/samples/quickstart/atm/war/src/org/jboss/
trunk/samples/quickstart/atm/war/src/org/jboss/soa/
trunk/samples/quickstart/atm/war/src/org/jboss/soa/bpel/
trunk/samples/quickstart/atm/war/src/org/jboss/soa/bpel/samples/
trunk/samples/quickstart/atm/war/src/org/jboss/soa/bpel/samples/quickstart/
trunk/samples/quickstart/atm/war/src/org/jboss/soa/bpel/samples/quickstart/account/
trunk/samples/quickstart/atm/war/src/org/jboss/soa/bpel/samples/quickstart/account/AccountOperation.java
trunk/samples/quickstart/atm/war/src/org/jboss/soa/bpel/samples/quickstart/account/AccountSystem.java
trunk/samples/quickstart/atm/war/src/org/jboss/soa/bpel/samples/quickstart/account/AccountSystem_Impl.java
trunk/samples/quickstart/atm/war/src/org/jboss/soa/bpel/samples/quickstart/account/accounts.xml
trunk/samples/quickstart/atm/war/src/org/jboss/soa/bpel/samples/quickstart/account/package-info.java
trunk/samples/quickstart/atm/war/src/org/jboss/soa/bpel/samples/quickstart/ticket/
trunk/samples/quickstart/atm/war/src/org/jboss/soa/bpel/samples/quickstart/ticket/TicketIssuer.java
trunk/samples/quickstart/atm/war/src/org/jboss/soa/bpel/samples/quickstart/ticket/TicketIssuer_Impl.java
Modified:
trunk/integration-tests/build.xml
Log:
RIFTSAW-34: Provide ATM sample and related integration test, first stab
Modified: trunk/integration-tests/build.xml
===================================================================
--- trunk/integration-tests/build.xml 2009-11-04 10:26:25 UTC (rev 226)
+++ trunk/integration-tests/build.xml 2009-11-05 09:17:48 UTC (rev 227)
@@ -99,6 +99,7 @@
<ant
antfile="src/test/resources/samples/Quickstart_bpel_simple_correlation/build.xml"
/>
<ant
antfile="src/test/resources/samples/Quickstart_bpel_simple_invoke/build.xml"
/>
<ant
antfile="src/test/resources/samples/Quickstart_bpel_loan_approval/build.xml"
/>
+ <ant antfile="src/test/resources/samples/Quickstart_bpel_atm/build.xml"
/>
<ant
antfile="src/test/resources/samples/Quickstart_esb_bpel_hello_world/build.xml"
/>
</target>
Added:
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/QuickstartBPELAtmTestCase.java
===================================================================
---
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/QuickstartBPELAtmTestCase.java
(rev 0)
+++
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/QuickstartBPELAtmTestCase.java 2009-11-05
09:17:48 UTC (rev 227)
@@ -0,0 +1,187 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the JBPM BPEL PUBLIC LICENSE AGREEMENT as
+ * published by JBoss Inc.; either version 1.0 of the License, or
+ * (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ */
+package org.jboss.soa.bpel.tests.samples;
+
+import junit.framework.Test;
+
+import org.jboss.soa.bpel.tests.RiftSawTest;
+import org.jboss.soa.bpel.tests.RiftSawTestSetup;
+import org.jboss.soa.bpel.tests.samples.atm.AtmFrontEndService;
+import org.jboss.soa.bpel.tests.samples.atm.FrontEnd;
+import org.jboss.soa.bpel.tests.samples.atm.InsufficientFunds;
+import org.jboss.soa.bpel.tests.samples.atm.InsufficientFunds_Exception;
+import org.jboss.soa.bpel.tests.samples.atm.UnauthorizedAccess_Exception;
+
+/**
+ * Test for common ATM usage scenarios.
+ *
+ * @author Juan Cantu
+ * @author Alejandro Guizar
+ * @version $Revision$ $Date: 2007/11/29 10:31:47 $
+ */
+public class QuickstartBPELAtmTestCase extends RiftSawTest {
+
+ private FrontEnd frontEnd;
+
+ private static final String TEST_NAME = "Quickstart_bpel_atm";
+
+ public QuickstartBPELAtmTestCase() {
+ super(TEST_NAME);
+ }
+
+ public static Test suite() {
+ return (new RiftSawTestSetup(QuickstartBPELAtmTestCase.class, TEST_NAME,
+ "Quickstart_bpel_atm.war,Quickstart_bpel_atm-1.jar"));
+ }
+
+ protected void setUp() throws Exception {
+ AtmFrontEndService frontEndService = new AtmFrontEndService();
+
+ // obtain dynamic proxy for web service port
+ frontEnd = frontEndService.getFrontEndPort();
+ }
+
+ public void testConnect() {
+ // connect to bank
+ int ticketNumber = frontEnd.connect();
+ assertTrue(ticketNumber > 0);
+
+ // check atm is connected
+ String status = frontEnd.status(ticketNumber);
+ assertEquals("connected", status);
+
+ // disconnect from bank
+ frontEnd.disconnect(ticketNumber);
+ }
+
+ public void testLogOnAuthorized() {
+ // connect to bank
+ int ticketNumber = frontEnd.connect();
+
+ // begin customer session
+ final String customerName = "koen";
+ try {
+ frontEnd.logOn(ticketNumber, customerName);
+ }
+ catch (UnauthorizedAccess_Exception e) {
+ fail("log on of authorized customer should succeed");
+ }
+
+ // end customer session
+ frontEnd.logOff(customerName);
+
+ // disconnect from bank
+ frontEnd.disconnect(ticketNumber);
+ }
+
+ public void testLogOnUnauthorized() {
+ // connect to bank
+ int ticketNumber = frontEnd.connect();
+
+ // begin customer session
+ final String customerName = "nobody";
+ try {
+ frontEnd.logOn(ticketNumber, customerName);
+ fail("log on of unauthorized customer should fail");
+ }
+ catch (UnauthorizedAccess_Exception e) {
+ assertEquals(customerName, e.getFaultInfo().getCustomerName());
+ }
+
+ // disconnect from bank
+ frontEnd.disconnect(ticketNumber);
+ }
+
+ public void testDeposit() throws UnauthorizedAccess_Exception {
+ // connect to bank
+ int ticketNumber = frontEnd.connect();
+
+ // begin customer session
+ final String customerName = "tom";
+ frontEnd.logOn(ticketNumber, customerName);
+
+ // get current balance
+ double previousBalance = frontEnd.getBalance(customerName);
+
+ // deposit some funds
+ double newBalance = frontEnd.deposit(customerName, 10);
+ // check the new balance is correct
+ assertEquals(previousBalance + 10, newBalance, 0);
+
+ // end customer session
+ frontEnd.logOff(customerName);
+
+ // disconnect from bank
+ frontEnd.disconnect(ticketNumber);
+ }
+
+ public void testWithdrawUnderBalance() throws UnauthorizedAccess_Exception {
+ // connect to bank
+ int ticketNumber = frontEnd.connect();
+
+ // begin customer session
+ final String customerName = "tom";
+ frontEnd.logOn(ticketNumber, customerName);
+
+ // get current balance
+ double previousBalance = frontEnd.getBalance(customerName);
+
+ // withdraw some funds
+ try {
+ double newBalance = frontEnd.withdraw(customerName, 10);
+ // check new balance is correct
+ assertEquals(previousBalance - 10, newBalance, 0);
+ }
+ catch (InsufficientFunds_Exception e) {
+ fail("withdraw under balance should succeed");
+ }
+
+ // end customer session
+ frontEnd.logOff(customerName);
+
+ // disconnect from bank
+ frontEnd.disconnect(ticketNumber);
+ }
+
+ public void testWithdrawOverBalance() throws UnauthorizedAccess_Exception {
+ // connect to bank
+ int ticketNumber = frontEnd.connect();
+
+ // begin customer session
+ final String customerName = "fady";
+ frontEnd.logOn(ticketNumber, customerName);
+
+ // get current balance
+ double previousBalance = frontEnd.getBalance(customerName);
+
+ // try to withdraw an amount greater than current balance
+ try {
+ frontEnd.withdraw(customerName, previousBalance + 1);
+ fail("withdraw over balance should fail");
+ }
+ catch (InsufficientFunds_Exception e) {
+ InsufficientFunds faultInfo = e.getFaultInfo();
+ assertEquals(customerName, faultInfo.getCustomerName());
+ // check account balance has not changed
+ assertEquals(previousBalance, faultInfo.getAmount(), 0);
+ }
+
+ // end customer session
+ frontEnd.logOff(customerName);
+
+ // disconnect from bank
+ frontEnd.disconnect(ticketNumber);
+ }
+}
\ No newline at end of file
Property changes on:
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/QuickstartBPELAtmTestCase.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/atm/AtmFrontEndService.java
===================================================================
---
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/atm/AtmFrontEndService.java
(rev 0)
+++
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/atm/AtmFrontEndService.java 2009-11-05
09:17:48 UTC (rev 227)
@@ -0,0 +1,44 @@
+package org.jboss.soa.bpel.tests.samples.atm;
+
+import java.net.URL;
+import javax.xml.namespace.QName;
+import javax.xml.ws.Service;
+import javax.xml.ws.WebEndpoint;
+import javax.xml.ws.WebServiceClient;
+import javax.xml.ws.WebServiceFeature;
+
+@WebServiceClient(name = AtmFrontEndService.NAME, targetNamespace =
AtmFrontEndService.TARGET_NAMESPACE, wsdlLocation = AtmFrontEndService.WSDL_LOCATION)
+public class AtmFrontEndService extends Service {
+
+ public static final String NAME = "AtmFrontEndService";
+ public static final String TARGET_NAMESPACE = "http://jbpm.org/examples/atm";
+ public static final String WSDL_LOCATION =
+ "http://127.0.0.1:8080/Quickstart_bpel_atmFrontEnd?wsdl";
+ public static final String FRONT_END_PORT = "FrontEndPort";
+
+ public AtmFrontEndService(URL wsdlLocation, QName serviceName) {
+ super(wsdlLocation, serviceName);
+ }
+
+ public AtmFrontEndService() {
+ super(null, new QName(TARGET_NAMESPACE, NAME));
+ }
+
+ @WebEndpoint(name = FRONT_END_PORT)
+ public FrontEnd getFrontEndPort() {
+ return super
+ .getPort(new QName(TARGET_NAMESPACE, FRONT_END_PORT), FrontEnd.class);
+ }
+
+ /**
+ * @param features A list of {@link javax.xml.ws.WebServiceFeature} to
+ * configure on the proxy. Supported features not in the
<code>features</code>
+ * parameter will have their default values.
+ */
+ @WebEndpoint(name = FRONT_END_PORT)
+ public FrontEnd getFrontEndPort(WebServiceFeature... features) {
+ return super
+ .getPort(new QName(TARGET_NAMESPACE, FRONT_END_PORT), FrontEnd.class, features);
+ }
+
+}
Property changes on:
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/atm/AtmFrontEndService.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/atm/FrontEnd.java
===================================================================
---
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/atm/FrontEnd.java
(rev 0)
+++
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/atm/FrontEnd.java 2009-11-05
09:17:48 UTC (rev 227)
@@ -0,0 +1,84 @@
+package org.jboss.soa.bpel.tests.samples.atm;
+
+import javax.jws.Oneway;
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebResult;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+
+/**
+ * bank functions available to ATMs
+ */
+@WebService(name = "FrontEnd", targetNamespace =
"http://jbpm.org/examples/atm")
+@SOAPBinding(style = SOAPBinding.Style.RPC)
+public interface FrontEnd {
+
+ /**
+ * initiate bank connection
+ */
+ @WebMethod(action = "http://jbpm.org/examples/atm/connect")
+ @WebResult(name = "ticketNo", partName = "ticketNo")
+ public int connect();
+
+ /**
+ * terminate bank connection
+ */
+ @WebMethod(action = "http://jbpm.org/examples/atm/disconnect")
+ @Oneway
+ public void disconnect(
+ @WebParam(name = "ticketNo", partName = "ticketNo") int
ticketNo);
+
+ /**
+ * retrieve bank connection status
+ */
+ @WebMethod(action = "http://jbpm.org/examples/atm/status")
+ @WebResult(name = "status", partName = "status")
+ public String status(
+ @WebParam(name = "ticketNo", partName = "ticketNo") int
ticketNo);
+
+ /**
+ * initiate customer access
+ */
+ @WebMethod(action = "http://jbpm.org/examples/atm/logOn")
+ public void logOn(
+ @WebParam(name = "ticketNo", partName = "ticketNo") int ticketNo,
+ @WebParam(name = "customerName", partName = "customerName") String
customerName)
+ throws UnauthorizedAccess_Exception;
+
+ /**
+ * terminate customer access
+ */
+ @WebMethod(action = "http://jbpm.org/examples/atm/logOff")
+ @Oneway
+ public void logOff(
+ @WebParam(name = "customerName", partName = "customerName") String
customerName);
+
+ /**
+ * retrieve account balance
+ */
+ @WebMethod(action = "http://jbpm.org/examples/atm/getBalance")
+ @WebResult(name = "balance", partName = "balance")
+ public double getBalance(
+ @WebParam(name = "customerName", partName = "customerName") String
customerName);
+
+ /**
+ * increase account balance
+ */
+ @WebMethod(action = "http://jbpm.org/examples/atm/deposit")
+ @WebResult(name = "balance", partName = "balance")
+ public double deposit(
+ @WebParam(name = "customerName", partName = "customerName") String
customerName,
+ @WebParam(name = "amount", partName = "amount") double amount);
+
+ /**
+ * decrease account balance
+ */
+ @WebMethod(action = "http://jbpm.org/examples/atm/withdraw")
+ @WebResult(name = "balance", partName = "balance")
+ public double withdraw(
+ @WebParam(name = "customerName", partName = "customerName") String
customerName,
+ @WebParam(name = "amount", partName = "amount") double amount)
+ throws InsufficientFunds_Exception;
+
+}
Property changes on:
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/atm/FrontEnd.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/atm/InsufficientFunds.java
===================================================================
---
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/atm/InsufficientFunds.java
(rev 0)
+++
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/atm/InsufficientFunds.java 2009-11-05
09:17:48 UTC (rev 227)
@@ -0,0 +1,81 @@
+
+package org.jboss.soa.bpel.tests.samples.atm;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for InsufficientFunds complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within
this class.
+ *
+ * <pre>
+ * <complexType name="InsufficientFunds">
+ * <complexContent>
+ * <restriction
base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="customerName"
type="{http://www.w3.org/2001/XMLSchema}string"/>
+ * <element name="amount"
type="{http://www.w3.org/2001/XMLSchema}double"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
+(a)XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "InsufficientFunds", propOrder = {
+ "customerName",
+ "amount"
+})
+public class InsufficientFunds {
+
+ @XmlElement(required = true)
+ protected String customerName;
+ protected double amount;
+
+ /**
+ * Gets the value of the customerName property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getCustomerName() {
+ return customerName;
+ }
+
+ /**
+ * Sets the value of the customerName property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setCustomerName(String value) {
+ this.customerName = value;
+ }
+
+ /**
+ * Gets the value of the amount property.
+ *
+ */
+ public double getAmount() {
+ return amount;
+ }
+
+ /**
+ * Sets the value of the amount property.
+ *
+ */
+ public void setAmount(double value) {
+ this.amount = value;
+ }
+
+}
Property changes on:
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/atm/InsufficientFunds.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/atm/InsufficientFunds_Exception.java
===================================================================
---
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/atm/InsufficientFunds_Exception.java
(rev 0)
+++
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/atm/InsufficientFunds_Exception.java 2009-11-05
09:17:48 UTC (rev 227)
@@ -0,0 +1,54 @@
+
+package org.jboss.soa.bpel.tests.samples.atm;
+
+import javax.xml.ws.WebFault;
+
+
+/**
+ * This class was generated by the JAX-WS RI.
+ * JAX-WS RI 2.1.6
+ * Generated source version: 2.1
+ *
+ */
+@WebFault(name = "insufficientFunds", targetNamespace =
"http://jbpm.org/examples/atm")
+public class InsufficientFunds_Exception
+ extends Exception
+{
+
+ /**
+ * Java type that goes as soapenv:Fault detail element.
+ *
+ */
+ private InsufficientFunds faultInfo;
+
+ /**
+ *
+ * @param message
+ * @param faultInfo
+ */
+ public InsufficientFunds_Exception(String message, InsufficientFunds faultInfo) {
+ super(message);
+ this.faultInfo = faultInfo;
+ }
+
+ /**
+ *
+ * @param message
+ * @param faultInfo
+ * @param cause
+ */
+ public InsufficientFunds_Exception(String message, InsufficientFunds faultInfo,
Throwable cause) {
+ super(message, cause);
+ this.faultInfo = faultInfo;
+ }
+
+ /**
+ *
+ * @return
+ * returns fault bean:
org.jboss.soa.bpel.samples.quickstart.atm.InsufficientFunds
+ */
+ public InsufficientFunds getFaultInfo() {
+ return faultInfo;
+ }
+
+}
Property changes on:
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/atm/InsufficientFunds_Exception.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/atm/UnauthorizedAccess.java
===================================================================
---
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/atm/UnauthorizedAccess.java
(rev 0)
+++
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/atm/UnauthorizedAccess.java 2009-11-05
09:17:48 UTC (rev 227)
@@ -0,0 +1,62 @@
+
+package org.jboss.soa.bpel.tests.samples.atm;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for UnauthorizedAccess complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within
this class.
+ *
+ * <pre>
+ * <complexType name="UnauthorizedAccess">
+ * <complexContent>
+ * <restriction
base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="customerName"
type="{http://www.w3.org/2001/XMLSchema}string"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
+(a)XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "UnauthorizedAccess", propOrder = {
+ "customerName"
+})
+public class UnauthorizedAccess {
+
+ @XmlElement(required = true)
+ protected String customerName;
+
+ /**
+ * Gets the value of the customerName property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getCustomerName() {
+ return customerName;
+ }
+
+ /**
+ * Sets the value of the customerName property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setCustomerName(String value) {
+ this.customerName = value;
+ }
+
+}
Property changes on:
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/atm/UnauthorizedAccess.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/atm/UnauthorizedAccess_Exception.java
===================================================================
---
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/atm/UnauthorizedAccess_Exception.java
(rev 0)
+++
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/atm/UnauthorizedAccess_Exception.java 2009-11-05
09:17:48 UTC (rev 227)
@@ -0,0 +1,54 @@
+
+package org.jboss.soa.bpel.tests.samples.atm;
+
+import javax.xml.ws.WebFault;
+
+
+/**
+ * This class was generated by the JAX-WS RI.
+ * JAX-WS RI 2.1.6
+ * Generated source version: 2.1
+ *
+ */
+@WebFault(name = "unauthorizedAccess", targetNamespace =
"http://jbpm.org/examples/atm")
+public class UnauthorizedAccess_Exception
+ extends Exception
+{
+
+ /**
+ * Java type that goes as soapenv:Fault detail element.
+ *
+ */
+ private UnauthorizedAccess faultInfo;
+
+ /**
+ *
+ * @param message
+ * @param faultInfo
+ */
+ public UnauthorizedAccess_Exception(String message, UnauthorizedAccess faultInfo) {
+ super(message);
+ this.faultInfo = faultInfo;
+ }
+
+ /**
+ *
+ * @param message
+ * @param faultInfo
+ * @param cause
+ */
+ public UnauthorizedAccess_Exception(String message, UnauthorizedAccess faultInfo,
Throwable cause) {
+ super(message, cause);
+ this.faultInfo = faultInfo;
+ }
+
+ /**
+ *
+ * @return
+ * returns fault bean:
org.jboss.soa.bpel.samples.quickstart.atm.UnauthorizedAccess
+ */
+ public UnauthorizedAccess getFaultInfo() {
+ return faultInfo;
+ }
+
+}
Property changes on:
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/atm/UnauthorizedAccess_Exception.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/atm/package-info.java
===================================================================
---
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/atm/package-info.java
(rev 0)
+++
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/atm/package-info.java 2009-11-05
09:17:48 UTC (rev 227)
@@ -0,0 +1,2 @@
+(a)javax.xml.bind.annotation.XmlSchema(namespace =
"http://jbpm.org/examples/atm")
+package org.jboss.soa.bpel.tests.samples.atm;
Property changes on:
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/atm/package-info.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_atm/bpel/account-service.wsdl
===================================================================
---
trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_atm/bpel/account-service.wsdl
(rev 0)
+++
trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_atm/bpel/account-service.wsdl 2009-11-05
09:17:48 UTC (rev 227)
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<definitions
targetNamespace="http://jbpm.org/examples/account"
+
xmlns:tns="http://jbpm.org/examples/account"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns="http://schemas.xmlsoap.org/wsdl/">
+
+ <import
namespace="http://jbpm.org/examples/account"
location="interface/account.wsdl" />
+
+ <binding name="AccountSystemBinding"
type="tns:AccountSystem">
+
+ <soap:binding style="rpc"
+
transport="http://schemas.xmlsoap.org/soap/http" />
+
+ <operation name="checkAccess">
+ <soap:operation
soapAction="http://jbpm.org/examples/account#verifyAccess" />
+ <input>
+ <soap:body use="literal"
namespace="http://jbpm.org/examples/account" />
+ </input>
+ <output>
+ <soap:body use="literal"
namespace="http://jbpm.org/examples/account" />
+ </output>
+ </operation>
+
+ <operation name="queryBalance">
+ <soap:operation
soapAction="http://jbpm.org/examples/account#queryBalance" />
+ <input>
+ <soap:body use="literal"
namespace="http://jbpm.org/examples/account" />
+ </input>
+ <output>
+ <soap:body use="literal"
namespace="http://jbpm.org/examples/account" />
+ </output>
+ </operation>
+
+ <operation name="updateBalance">
+ <soap:operation
soapAction="http://jbpm.org/examples/account#updateBalance" />
+ <input>
+ <soap:body use="literal"
namespace="http://jbpm.org/examples/account" />
+ </input>
+ <output>
+ <soap:body use="literal"
namespace="http://jbpm.org/examples/account" />
+ </output>
+ </operation>
+
+ </binding>
+
+ <service name="AccountService">
+
+ <port name="AccountSystemPort"
binding="tns:AccountSystemBinding">
+ <soap:address
location="http://127.0.0.1:8080/Quickstart_bpel_atm/accountSystem" />
+ </port>
+
+ </service>
+
+</definitions>
\ No newline at end of file
Property changes on:
trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_atm/bpel/account-service.wsdl
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_atm/bpel/atm-service.wsdl
===================================================================
---
trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_atm/bpel/atm-service.wsdl
(rev 0)
+++
trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_atm/bpel/atm-service.wsdl 2009-11-05
09:17:48 UTC (rev 227)
@@ -0,0 +1,138 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<definitions
targetNamespace="http://jbpm.org/examples/atm"
+
xmlns:tns="http://jbpm.org/examples/atm"
xmlns:acc="http://jbpm.org/examples/account"
+
xmlns:tic="http://jbpm.org/examples/ticket"
xmlns:plt="http://docs.oasis-open.org/wsbpel/2.0/plnktype"
+
xmlns:vprop="http://docs.oasis-open.org/wsbpel/2.0/varprop"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns="http://schemas.xmlsoap.org/wsdl/">
+
+ <import
namespace="http://jbpm.org/examples/atm"
location="interface/atm.wsdl" />
+ <import
namespace="http://jbpm.org/examples/account"
location="interface/account.wsdl" />
+ <import
namespace="http://jbpm.org/examples/ticket"
location="interface/ticket.wsdl" />
+
+ <vprop:property name="customerId" type="xsd:string">
+ <vprop:documentation>customer name property</vprop:documentation>
+ </vprop:property>
+
+ <vprop:propertyAlias propertyName="tns:customerId"
+ messageType="tns:logOnRequest" part="customerName" />
+
+ <vprop:propertyAlias propertyName="tns:customerId"
+ messageType="tns:balanceChange" part="customerName" />
+ <vprop:propertyAlias propertyName="tns:customerId"
+ messageType="acc:customerMessage" part="customerName" />
+ <vprop:propertyAlias propertyName="tns:customerId"
+ messageType="acc:accountOperation" part="body">
+ <vprop:query>/body/customerName</vprop:query>
+ </vprop:propertyAlias>
+
+ <vprop:property name="ticketId" type="xsd:int">
+ <vprop:documentation>ticket number property</vprop:documentation>
+ </vprop:property>
+
+ <vprop:propertyAlias propertyName="tns:ticketId"
+ messageType="tic:ticketMessage" part="ticketNo" />
+ <vprop:propertyAlias propertyName="tns:ticketId"
+ messageType="tns:logOnRequest" part="ticketNo" />
+
+ <plt:partnerLinkType name="Atm-Front">
+ <plt:documentation>
+ relationship between the ATM and the process
+ </plt:documentation>
+ <plt:role name="FrontEnd" portType="tns:FrontEnd" />
+ </plt:partnerLinkType>
+ <plt:partnerLinkType name="Front-Ticket">
+ <vprop:documentation>
+ relationship between the process and the ticket issuer
+ </vprop:documentation>
+ <plt:role name="TicketIssuer" portType="tic:TicketIssuer" />
+ </plt:partnerLinkType>
+ <plt:partnerLinkType name="Front-Account">
+ <plt:documentation>
+ relationship between the process and the account system
+ </plt:documentation>
+ <plt:role name="AccountSystem" portType="acc:AccountSystem"
/>
+ </plt:partnerLinkType>
+
+ <binding name="FrontEndBinding" type="tns:FrontEnd">
+ <soap:binding style="rpc"
transport="http://schemas.xmlsoap.org/soap/http" />
+ <operation name="connect">
+ <soap:operation
soapAction="http://jbpm.org/examples/atm/connect" />
+ <input>
+ <soap:body use="literal"
namespace="http://jbpm.org/examples/atm" />
+ </input>
+ <output>
+ <soap:body use="literal"
namespace="http://jbpm.org/examples/atm" />
+ </output>
+ </operation>
+ <operation name="disconnect">
+ <soap:operation
soapAction="http://jbpm.org/examples/atm/disconnect"
/>
+ <input>
+ <soap:body use="literal"
namespace="http://jbpm.org/examples/atm" />
+ </input>
+ </operation>
+ <operation name="status">
+ <soap:operation
soapAction="http://jbpm.org/examples/atm/status" />
+ <input>
+ <soap:body use="literal"
namespace="http://jbpm.org/examples/atm" />
+ </input>
+ <output>
+ <soap:body use="literal"
namespace="http://jbpm.org/examples/atm" />
+ </output>
+ </operation>
+ <operation name="logOn">
+ <soap:operation
soapAction="http://jbpm.org/examples/atm/logOn" />
+ <input>
+ <soap:body use="literal"
namespace="http://jbpm.org/examples/atm" />
+ </input>
+ <output>
+ <soap:body use="literal"
namespace="http://jbpm.org/examples/atm" />
+ </output>
+ <fault name="unauthorizedAccess">
+ <soap:fault use="literal" name="unauthorizedAccess" />
+ </fault>
+ </operation>
+ <operation name="logOff">
+ <soap:operation
soapAction="http://jbpm.org/examples/atm/logOff" />
+ <input>
+ <soap:body use="literal"
namespace="http://jbpm.org/examples/atm" />
+ </input>
+ </operation>
+ <operation name="getBalance">
+ <soap:operation
soapAction="http://jbpm.org/examples/atm/getBalance"
/>
+ <input>
+ <soap:body use="literal"
namespace="http://jbpm.org/examples/atm" />
+ </input>
+ <output>
+ <soap:body use="literal"
namespace="http://jbpm.org/examples/atm" />
+ </output>
+ </operation>
+ <operation name="deposit">
+ <soap:operation
soapAction="http://jbpm.org/examples/atm/deposit" />
+ <input>
+ <soap:body use="literal"
namespace="http://jbpm.org/examples/atm" />
+ </input>
+ <output>
+ <soap:body use="literal"
namespace="http://jbpm.org/examples/atm" />
+ </output>
+ </operation>
+ <operation name="withdraw">
+ <soap:operation
soapAction="http://jbpm.org/examples/atm/withdraw" />
+ <input>
+ <soap:body use="literal"
namespace="http://jbpm.org/examples/atm" />
+ </input>
+ <output>
+ <soap:body use="literal"
namespace="http://jbpm.org/examples/atm" />
+ </output>
+ <fault name="insufficientFunds">
+ <soap:fault use="literal" name="insufficientFunds" />
+ </fault>
+ </operation>
+ </binding>
+
+ <service name="AtmFrontEndService">
+ <port name="FrontEndPort" binding="tns:FrontEndBinding">
+ <soap:address
location="http://127.0.0.1:8080/Quickstart_bpel_atmFrontEnd" />
+ </port>
+ </service>
+
+</definitions>
Property changes on:
trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_atm/bpel/atm-service.wsdl
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_atm/bpel/atm.bpel
===================================================================
--- trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_atm/bpel/atm.bpel
(rev 0)
+++
trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_atm/bpel/atm.bpel 2009-11-05
09:17:48 UTC (rev 227)
@@ -0,0 +1,508 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<process name="AtmFrontEnd"
targetNamespace="http://jbpm.org/examples/atm"
+
xmlns:acc="http://jbpm.org/examples/account"
xmlns:atm="http://jbpm.org/examples/atm"
+
xmlns:tic="http://jbpm.org/examples/ticket"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable...
+
xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable"...
+
+ <bpel:import
namespace="http://jbpm.org/examples/account"
location="account-service.wsdl"
+
importType="http://schemas.xmlsoap.org/wsdl/" />
+ <bpel:import
namespace="http://jbpm.org/examples/ticket"
location="ticket-service.wsdl"
+
importType="http://schemas.xmlsoap.org/wsdl/" />
+ <bpel:import
namespace="http://jbpm.org/examples/atm"
location="atm-service.wsdl"
+
importType="http://schemas.xmlsoap.org/wsdl/" />
+
+ <partnerLinks>
+ <partnerLink myRole="FrontEnd" name="atm"
partnerLinkType="atm:Atm-Front">
+ <documentation>relationship with the ATM</documentation>
+ </partnerLink>
+ <partnerLink name="ticket" partnerLinkType="atm:Front-Ticket"
+ partnerRole="TicketIssuer">
+ <documentation>relationship with the ticket issuer</documentation>
+ </partnerLink>
+ <partnerLink name="account" partnerLinkType="atm:Front-Account"
+ partnerRole="AccountSystem">
+ <documentation>relationship with the account system</documentation>
+ </partnerLink>
+ </partnerLinks>
+
+ <variables>
+ <variable name="connected" type="xsd:boolean">
+ <documentation>ATM connection flag</documentation>
+ </variable>
+ <variable name="logged" type="xsd:boolean">
+ <documentation>customer access flag</documentation>
+ </variable>
+ <variable messageType="tic:ticketMessage" name="ticketMsg">
+ <documentation>ticket number wrapper</documentation>
+ </variable>
+ </variables>
+
+ <correlationSets>
+ <correlationSet name="atmInteraction"
properties="atm:ticketId">
+ <documentation>conversation with a connected ATM</documentation>
+ </correlationSet>
+ </correlationSets>
+
+ <sequence name="MainSeq">
+ <scope name="TicketCreationUnit">
+ <variables>
+ <variable messageType="tic:ticketRequest"
name="ticketReq">
+ <documentation>ATM connection request</documentation>
+ </variable>
+ <variable messageType="atm:connectRequest"
name="connectReq">
+ <documentation>ticket creation request</documentation>
+ </variable>
+ </variables>
+
+ <sequence name="TicketCreationSeq">
+ <receive createInstance="yes" name="AcceptConnection"
operation="connect"
+ partnerLink="atm" portType="atm:FrontEnd"
variable="connectReq">
+ <documentation>receive a connection request</documentation>
+ </receive>
+
+ <invoke inputVariable="ticketReq" name="CreateTicket"
operation="createTicket"
+ outputVariable="ticketMsg" partnerLink="ticket"
portType="tic:TicketIssuer">
+ <documentation>generate a ticket number</documentation>
+ <correlations>
+ <correlation initiate="yes" pattern="response"
set="atmInteraction" />
+ </correlations>
+ </invoke>
+
+ <reply name="SendTicketNumber" operation="connect"
partnerLink="atm"
+ portType="atm:FrontEnd" variable="ticketMsg">
+ <documentation>
+ send the ticket number back to the ATM
+ </documentation>
+ <correlations>
+ <correlation set="atmInteraction" />
+ </correlations>
+ </reply>
+ </sequence>
+ </scope>
+
+ <assign name="InitializeStatus">
+ <documentation>initialize the status flags</documentation>
+ <copy>
+ <from>true()</from>
+ <to variable="connected" />
+ </copy>
+ <copy>
+ <from>false()</from>
+ <to variable="logged" />
+ </copy>
+ </assign>
+
+ <scope name="ConnectionUnit">
+ <documentation>handle the ATM connection</documentation>
+
+ <variables>
+ <variable messageType="atm:logOnRequest" name="logOnReq">
+ <documentation>customer log on request</documentation>
+ </variable>
+ <variable messageType="atm:statusResponse"
name="statusRsp">
+ <documentation>connection status response</documentation>
+ </variable>
+ </variables>
+
+ <eventHandlers>
+ <onEvent messageType="tic:ticketMessage" operation="status"
+ partnerLink="atm" portType="atm:FrontEnd"
variable="ticketMsg">
+ <correlations>
+ <correlation set="atmInteraction" />
+ </correlations>
+
+ <scope name="StatusUnit">
+ <sequence name="StatusSeq">
+ <if name="StatusDecision">
+ <condition>$logged</condition>
+ <assign name="SetStatusLogged">
+ <copy>
+ <from>'logged'</from>
+ <to part="status" variable="statusRsp" />
+ </copy>
+ </assign>
+
+ <elseif>
+ <condition>$connected</condition>
+ <assign name="SetStatusConnected">
+ <copy>
+ <from>'connected'</from>
+ <to part="status" variable="statusRsp" />
+ </copy>
+ </assign>
+ </elseif>
+
+ <else>
+ <assign name="Assign">
+ <copy>
+ <from>'disconnected'</from>
+ <to part="status" variable="statusRsp" />
+ </copy>
+ </assign>
+ </else>
+ </if>
+
+ <reply name="SendStatus" operation="status"
partnerLink="atm"
+ portType="atm:FrontEnd" variable="statusRsp" />
+ </sequence>
+ </scope>
+ </onEvent>
+ </eventHandlers>
+
+ <while name="ConnectionLoop">
+ <documentation>accept ATM requests, one at a time</documentation>
+ <condition>$connected</condition>
+
+ <pick name="ConnectionMenu">
+ <documentation>
+ listen for either disconnect or log on request
+ </documentation>
+
+ <onMessage operation="logOn" partnerLink="atm"
portType="atm:FrontEnd"
+ variable="logOnReq">
+ <correlations>
+ <correlation set="atmInteraction" />
+ </correlations>
+
+ <scope name="AccountUnit">
+ <documentation>handle account access</documentation>
+
+ <variables>
+ <variable messageType="acc:accessMessage"
name="accessMsg">
+ <documentation>access check response</documentation>
+ </variable>
+ <variable messageType="acc:customerMessage"
name="customerMsg">
+ <documentation>customer name wrapper</documentation>
+ </variable>
+ <variable messageType="atm:logOnResponse"
name="logOnRsp">
+ <documentation>customer access acknowledgment</documentation>
+ </variable>
+ <variable messageType="atm:unauthorizedAccess"
name="unauthorizedAccess">
+ <documentation>customer access fault</documentation>
+ </variable>
+ <variable messageType="acc:balanceMessage"
name="balanceMsg">
+ <documentation>account balance wrapper</documentation>
+ </variable>
+ <variable messageType="atm:balanceChange"
name="balanceChange">
+ <documentation>balance change request</documentation>
+ </variable>
+ <variable messageType="acc:accountOperation"
name="accountOperation">
+ <documentation>account system operation request</documentation>
+ </variable>
+ <variable name="newBalance" type="xsd:double">
+ <documentation>
+ resulting balance after withdrawal
+ </documentation>
+ </variable>
+ <variable messageType="atm:insufficientFunds"
name="insufficientFunds">
+ <documentation>withdraw fault</documentation>
+ </variable>
+ </variables>
+
+ <correlationSets>
+ <correlationSet name="customerInteraction"
properties="atm:customerId">
+ <documentation>
+ conversation with a logged customer
+ </documentation>
+ </correlationSet>
+ </correlationSets>
+
+ <sequence name="AccountSeq">
+ <assign name="PrepareAccessCheck">
+ <documentation>populate access check request</documentation>
+ <copy>
+ <from part="customerName" variable="logOnReq" />
+ <to part="customerName" variable="customerMsg" />
+ </copy>
+ </assign>
+
+ <invoke inputVariable="customerMsg" name="CheckAccess"
operation="checkAccess"
+ outputVariable="accessMsg" partnerLink="account"
portType="acc:AccountSystem">
+ <documentation>check account access privilege</documentation>
+ <correlations>
+ <correlation initiate="yes" pattern="request"
set="customerInteraction" />
+ </correlations>
+ </invoke>
+
+ <if name="AccessDecision">
+ <documentation>
+ decide outcome of customer access request
+ </documentation>
+ <condition>$accessMsg.granted</condition>
+
+ <sequence name="AccessGrantedSeq">
+ <documentation>grant customer access</documentation>
+
+ <assign name="SetLoggedOn">
+ <documentation>turn on logged flag</documentation>
+ <copy>
+ <from>true()</from>
+ <to variable="logged" />
+ </copy>
+ </assign>
+
+ <reply name="GrantAccess" operation="logOn"
partnerLink="atm"
+ portType="atm:FrontEnd" variable="logOnRsp">
+ <documentation>
+ send acknowledgment back to ATM
+ </documentation>
+ </reply>
+ </sequence>
+
+ <else>
+ <sequence name="AccessDeniedSeq">
+ <documentation>deny customer access</documentation>
+
+ <assign name="PrepareAccessDenial">
+ <documentation>populate access fault</documentation>
+ <copy>
+ <from part="customerName" variable="logOnReq" />
+ <to part="detail" variable="unauthorizedAccess">
+ <query>customerName</query>
+ </to>
+ </copy>
+ </assign>
+
+ <reply name="DenyAccess" operation="logOn"
partnerLink="atm"
+ portType="atm:FrontEnd" variable="unauthorizedAccess"
faultName="atm:unauthorizedAccess">
+ <documentation>send fault back to ATM</documentation>
+ </reply>
+ </sequence>
+ </else>
+ </if>
+
+ <while name="AccountLoop">
+ <documentation>
+ accept account requests, one at a time
+ </documentation>
+ <condition>$logged</condition>
+
+ <pick name="AccountMenu">
+ <onMessage operation="getBalance" partnerLink="atm"
+ portType="atm:FrontEnd" variable="customerMsg">
+ <correlations>
+ <correlation set="customerInteraction" />
+ </correlations>
+
+ <sequence name="BalanceSeq">
+ <invoke inputVariable="customerMsg"
name="QueryBalance"
+ operation="queryBalance" outputVariable="balanceMsg"
partnerLink="account"
+ portType="acc:AccountSystem">
+ <documentation>get current account balance</documentation>
+ </invoke>
+
+ <reply name="TellBalance" operation="getBalance"
partnerLink="atm"
+ portType="atm:FrontEnd" variable="balanceMsg">
+ <documentation>return balance to ATM</documentation>
+ </reply>
+ </sequence>
+ </onMessage>
+
+ <onMessage operation="deposit" partnerLink="atm"
portType="atm:FrontEnd"
+ variable="balanceChange">
+ <correlations>
+ <correlation set="customerInteraction" />
+ </correlations>
+
+ <sequence name="DepositSeq">
+ <assign name="PrepareDeposit">
+ <documentation>
+ populate balance update request
+ </documentation>
+ <copy>
+ <from part="customerName" variable="balanceChange"
/>
+ <to part="body" variable="accountOperation">
+ <query>customerName</query>
+ </to>
+ </copy>
+ <copy>
+ <from part="amount" variable="balanceChange" />
+ <to part="body" variable="accountOperation">
+ <query>amount</query>
+ </to>
+ </copy>
+ </assign>
+
+ <invoke inputVariable="accountOperation"
name="UpdateBalance"
+ operation="updateBalance" outputVariable="balanceMsg"
partnerLink="account"
+ portType="acc:AccountSystem">
+ <documentation>post positive balance update</documentation>
+ <correlations>
+ <correlation pattern="request"
set="customerInteraction" />
+ </correlations>
+ </invoke>
+
+ <reply name="TellNewBalance" operation="deposit"
partnerLink="atm"
+ portType="atm:FrontEnd" variable="balanceMsg">
+ <documentation>
+ make new balance available to ATM
+ </documentation>
+ </reply>
+ </sequence>
+ </onMessage>
+
+ <onMessage operation="withdraw" partnerLink="atm"
portType="atm:FrontEnd"
+ variable="balanceChange">
+ <correlations>
+ <correlation set="customerInteraction" />
+ </correlations>
+
+ <sequence name="WithdrawSeq">
+ <assign name="PrepareBalanceQuery">
+ <documentation>
+ populate balance query request
+ </documentation>
+ <copy>
+ <from part="customerName" variable="balanceChange"
/>
+ <to part="customerName" variable="customerMsg"
/>
+ </copy>
+ </assign>
+
+ <invoke inputVariable="customerMsg"
name="QueryBalance"
+ operation="queryBalance" outputVariable="balanceMsg"
partnerLink="account"
+ portType="acc:AccountSystem">
+ <documentation>get current account balance</documentation>
+ <correlations>
+ <correlation pattern="request"
set="customerInteraction" />
+ </correlations>
+ </invoke>
+
+ <assign name="EvaluateNewBalance">
+ <documentation>
+ evaluate amount that would remain in account
+ </documentation>
+ <copy>
+ <from>$balanceMsg.balance - $balanceChange.amount</from>
+ <to variable="newBalance" />
+ </copy>
+ </assign>
+
+ <if name="BalanceDecision">
+ <documentation>
+ decide outcome of withdraw request
+ </documentation>
+ <condition>$newBalance >= 0.0</condition>
+
+ <sequence name="PositiveBalanceSeq">
+ <documentation>accept withdrawal</documentation>
+
+ <assign name="PrepareWithdraw">
+ <documentation>
+ populate balance update request
+ </documentation>
+ <copy>
+ <from part="customerName" variable="balanceChange"
/>
+ <to part="body" variable="accountOperation">
+ <query>customerName</query>
+ </to>
+ </copy>
+ <copy>
+ <from>-$balanceChange.amount</from>
+ <to part="body" variable="accountOperation">
+ <query>amount</query>
+ </to>
+ </copy>
+ </assign>
+
+ <invoke inputVariable="accountOperation"
name="UpdateBalance"
+ operation="updateBalance" outputVariable="balanceMsg"
+ partnerLink="account"
portType="acc:AccountSystem">
+ <documentation>
+ post negative balance update
+ </documentation>
+ <correlations>
+ <correlation pattern="request"
set="customerInteraction" />
+ </correlations>
+ </invoke>
+
+ <reply name="TellNewBalance" operation="withdraw"
+ partnerLink="atm" portType="atm:FrontEnd"
variable="balanceMsg">
+ <documentation>return new balance to ATM</documentation>
+ </reply>
+ </sequence>
+
+ <else>
+ <sequence name="NegativeBalanceSeq">
+ <documentation>reject withdrawal</documentation>
+
+ <assign name="PrepareRejection">
+ <documentation>populate withdraw fault</documentation>
+ <copy>
+ <from part="customerName"
variable="balanceChange" />
+ <to part="detail"
variable="insufficientFunds">
+ <query>customerName</query>
+ </to>
+ </copy>
+ <copy>
+ <from part="balance" variable="balanceMsg" />
+ <to part="detail"
variable="insufficientFunds">
+ <query>amount</query>
+ </to>
+ </copy>
+ </assign>
+
+ <reply name="RejectWithdraw" operation="withdraw"
+ partnerLink="atm" portType="atm:FrontEnd"
variable="insufficientFunds"
+ faultName="atm:insufficientFunds">
+ <documentation>return fault to ATM</documentation>
+ </reply>
+ </sequence>
+ </else>
+ </if>
+ </sequence>
+ </onMessage>
+
+ <onMessage operation="logOff" partnerLink="atm"
portType="atm:FrontEnd"
+ variable="customerMsg">
+ <correlations>
+ <correlation set="customerInteraction" />
+ </correlations>
+
+ <assign name="SetLoggedOff">
+ <documentation>turn off logged flag</documentation>
+ <copy>
+ <from>false()</from>
+ <to variable="logged" />
+ </copy>
+ </assign>
+ </onMessage>
+
+ <onAlarm>
+ <for>'PT2M'</for>
+
+ <assign name="SetLoggedOff">
+ <documentation>
+ turn off logged flag after a period of inactivity
+ </documentation>
+ <copy>
+ <from>false()</from>
+ <to variable="logged" />
+ </copy>
+ </assign>
+ </onAlarm>
+ </pick>
+ </while>
+ </sequence>
+ </scope>
+ </onMessage>
+
+ <onMessage operation="disconnect" partnerLink="atm"
portType="atm:FrontEnd"
+ variable="ticketMsg">
+ <correlations>
+ <correlation set="atmInteraction" />
+ </correlations>
+
+ <assign name="SetDisconnected">
+ <documentation>turn off connected flag</documentation>
+ <copy>
+ <from>false()</from>
+ <to variable="connected" />
+ </copy>
+ </assign>
+ </onMessage>
+ </pick>
+ </while>
+ </scope>
+ </sequence>
+</process>
Added:
trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_atm/bpel/bpel-deploy.xml
===================================================================
---
trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_atm/bpel/bpel-deploy.xml
(rev 0)
+++
trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_atm/bpel/bpel-deploy.xml 2009-11-05
09:17:48 UTC (rev 227)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<deploy
xmlns="http://www.apache.org/ode/schemas/dd/2007/03">
+ <process name="atm:AtmFrontEnd"
xmlns:atm="http://jbpm.org/examples/atm">
+ <active>true</active>
+ <provide partnerLink="atm">
+ <service name="atm:AtmFrontEndService" port="FrontEndPort"
/>
+ </provide>
+ <invoke partnerLink="ticket">
+ <service name="tic:TicketService" port="TicketIssuerPort"
+
xmlns:tic="http://jbpm.org/examples/ticket" />
+ </invoke>
+ <invoke partnerLink="account">
+ <service name="acc:AccountService" port="AccountSystemPort"
+
xmlns:acc="http://jbpm.org/examples/account" />
+ </invoke>
+ </process>
+</deploy>
\ No newline at end of file
Property changes on:
trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_atm/bpel/bpel-deploy.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_atm/bpel/interface/account.wsdl
===================================================================
---
trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_atm/bpel/interface/account.wsdl
(rev 0)
+++
trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_atm/bpel/interface/account.wsdl 2009-11-05
09:17:48 UTC (rev 227)
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<definitions
targetNamespace="http://jbpm.org/examples/account"
+
xmlns:tns="http://jbpm.org/examples/account"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+
xmlns="http://schemas.xmlsoap.org/wsdl/">
+
+ <types>
+
+ <schema
targetNamespace="http://jbpm.org/examples/account"
+
xmlns="http://www.w3.org/2001/XMLSchema">
+
+ <complexType name="AccountOperation">
+ <annotation>
+ <documentation>account data transfer type</documentation>
+ </annotation>
+ <sequence>
+ <element name="customerName" type="xsd:string" />
+ <element name="amount" type="xsd:double" />
+ </sequence>
+ </complexType>
+
+ </schema>
+
+ </types>
+
+ <message name="customerMessage">
+ <documentation>customer name wrapper</documentation>
+ <part name="customerName" type="xsd:string" />
+ </message>
+
+ <message name="accessMessage">
+ <documentation>access check response</documentation>
+ <part name="granted" type="xsd:boolean" />
+ </message>
+
+ <message name="balanceMessage">
+ <documentation>account balance wrapper</documentation>
+ <part name="balance" type="xsd:double" />
+ </message>
+
+ <message name="accountOperation">
+ <documentation>account operation request</documentation>
+ <part name="body" type="tns:AccountOperation" />
+ </message>
+
+ <portType name="AccountSystem">
+ <documentation>published account functions</documentation>
+
+ <operation name="checkAccess">
+ <documentation>
+ tell whether a customer has an active account
+ </documentation>
+ <input message="tns:customerMessage" />
+ <output message="tns:accessMessage" />
+ </operation>
+
+ <operation name="queryBalance">
+ <documentation>retrieve the balance of an account</documentation>
+ <input message="tns:customerMessage" />
+ <output message="tns:balanceMessage" />
+ </operation>
+
+ <operation name="updateBalance">
+ <documentation>
+ increase/decrease the balance of an account
+ </documentation>
+ <input message="tns:accountOperation" />
+ <output message="tns:balanceMessage" />
+ </operation>
+
+ </portType>
+
+</definitions>
\ No newline at end of file
Property changes on:
trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_atm/bpel/interface/account.wsdl
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_atm/bpel/interface/atm.wsdl
===================================================================
---
trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_atm/bpel/interface/atm.wsdl
(rev 0)
+++
trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_atm/bpel/interface/atm.wsdl 2009-11-05
09:17:48 UTC (rev 227)
@@ -0,0 +1,114 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<definitions
targetNamespace="http://jbpm.org/examples/atm"
+
xmlns:tns="http://jbpm.org/examples/atm"
xmlns:tic="http://jbpm.org/examples/ticket"
+
xmlns:acc="http://jbpm.org/examples/account"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+
xmlns="http://schemas.xmlsoap.org/wsdl/">
+
+ <import
namespace="http://jbpm.org/examples/ticket"
location="ticket.wsdl" />
+ <import
namespace="http://jbpm.org/examples/account"
location="account.wsdl" />
+
+ <types>
+
+ <schema
targetNamespace="http://jbpm.org/examples/atm"
xmlns="http://www.w3.org/2001/XMLSchema">
+
+ <complexType name="UnauthorizedAccess">
+ <sequence>
+ <element name="customerName" type="xsd:string" />
+ </sequence>
+ </complexType>
+
+ <element name="unauthorizedAccess"
type="tns:UnauthorizedAccess" />
+
+ <complexType name="InsufficientFunds">
+ <sequence>
+ <element name="customerName" type="xsd:string" />
+ <element name="amount" type="xsd:double" />
+ </sequence>
+ </complexType>
+
+ <element name="insufficientFunds" type="tns:InsufficientFunds"
/>
+
+ </schema>
+
+ </types>
+
+ <message name="connectRequest" />
+
+ <message name="logOnRequest">
+ <part name="ticketNo" type="xsd:int" />
+ <part name="customerName" type="xsd:string" />
+ </message>
+
+ <message name="logOnResponse" />
+
+ <message name="statusResponse">
+ <part name="status" type="xsd:string" />
+ </message>
+
+ <message name="balanceChange">
+ <part name="customerName" type="xsd:string" />
+ <part name="amount" type="xsd:double" />
+ </message>
+
+ <message name="unauthorizedAccess">
+ <part name="detail" element="tns:unauthorizedAccess" />
+ </message>
+
+ <message name="insufficientFunds">
+ <part name="detail" element="tns:insufficientFunds" />
+ </message>
+
+ <portType name="FrontEnd">
+ <documentation>bank functions available to ATMs</documentation>
+
+ <operation name="connect">
+ <documentation>initiate bank connection</documentation>
+ <input message="tns:connectRequest" />
+ <output message="tic:ticketMessage" />
+ </operation>
+
+ <operation name="disconnect">
+ <documentation>terminate bank connection</documentation>
+ <input message="tic:ticketMessage" />
+ </operation>
+
+ <operation name="status">
+ <documentation>retrieve bank connection status</documentation>
+ <input message="tic:ticketMessage" />
+ <output message="tns:statusResponse" />
+ </operation>
+
+ <operation name="logOn">
+ <documentation>initiate customer access</documentation>
+ <input message="tns:logOnRequest" />
+ <output message="tns:logOnResponse" />
+ <fault name="unauthorizedAccess"
message="tns:unauthorizedAccess" />
+ </operation>
+
+ <operation name="logOff">
+ <documentation>terminate customer access</documentation>
+ <input message="acc:customerMessage" />
+ </operation>
+
+ <operation name="getBalance">
+ <documentation>retrieve account balance</documentation>
+ <input message="acc:customerMessage" />
+ <output message="acc:balanceMessage" />
+ </operation>
+
+ <operation name="deposit">
+ <documentation>increase account balance</documentation>
+ <input message="tns:balanceChange" />
+ <output message="acc:balanceMessage" />
+ </operation>
+
+ <operation name="withdraw">
+ <documentation>decrease account balance</documentation>
+ <input message="tns:balanceChange" />
+ <output message="acc:balanceMessage" />
+ <fault name="insufficientFunds" message="tns:insufficientFunds"
/>
+ </operation>
+
+ </portType>
+
+</definitions>
\ No newline at end of file
Property changes on:
trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_atm/bpel/interface/atm.wsdl
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_atm/bpel/interface/ticket.wsdl
===================================================================
---
trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_atm/bpel/interface/ticket.wsdl
(rev 0)
+++
trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_atm/bpel/interface/ticket.wsdl 2009-11-05
09:17:48 UTC (rev 227)
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<definitions
targetNamespace="http://jbpm.org/examples/ticket"
+
xmlns:tns="http://jbpm.org/examples/ticket"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+
xmlns="http://schemas.xmlsoap.org/wsdl/">
+
+ <message name="ticketRequest">
+ <documentation>ticket creation request</documentation>
+ </message>
+
+ <message name="ticketMessage">
+ <documentation>ticket number wrapper</documentation>
+ <part name="ticketNo" type="xsd:int" />
+ </message>
+
+ <portType name="TicketIssuer">
+ <documentation>interface to ticket issuer service</documentation>
+
+ <operation name="createTicket">
+ <documentation>
+ generate a ticket number, distinct from previous calls
+ </documentation>
+ <input message="tns:ticketRequest" />
+ <output message="tns:ticketMessage" />
+ </operation>
+
+ </portType>
+
+</definitions>
\ No newline at end of file
Property changes on:
trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_atm/bpel/interface/ticket.wsdl
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_atm/bpel/ticket-service.wsdl
===================================================================
---
trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_atm/bpel/ticket-service.wsdl
(rev 0)
+++
trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_atm/bpel/ticket-service.wsdl 2009-11-05
09:17:48 UTC (rev 227)
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<definitions
targetNamespace="http://jbpm.org/examples/ticket"
+
xmlns:tns="http://jbpm.org/examples/ticket"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns="http://schemas.xmlsoap.org/wsdl/">
+
+ <import
namespace="http://jbpm.org/examples/ticket"
location="interface/ticket.wsdl" />
+
+ <binding name="TicketIssuerBinding" type="tns:TicketIssuer">
+
+ <soap:binding style="rpc"
+
transport="http://schemas.xmlsoap.org/soap/http" />
+
+ <operation name="createTicket">
+ <soap:operation
soapAction="http://jbpm.org/examples/ticket#createTicket"
/>
+ <input>
+ <soap:body use="literal"
namespace="http://jbpm.org/examples/ticket" />
+ </input>
+ <output>
+ <soap:body use="literal"
namespace="http://jbpm.org/examples/ticket" />
+ </output>
+ </operation>
+
+ </binding>
+
+ <service name="TicketService">
+ <port name="TicketIssuerPort"
binding="tns:TicketIssuerBinding">
+ <soap:address
location="http://127.0.0.1:8080/Quickstart_bpel_atm/ticketIssuer" />
+ </port>
+ </service>
+
+</definitions>
\ No newline at end of file
Property changes on:
trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_atm/bpel/ticket-service.wsdl
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_atm/build.xml
===================================================================
--- trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_atm/build.xml
(rev 0)
+++
trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_atm/build.xml 2009-11-05
09:17:48 UTC (rev 227)
@@ -0,0 +1,49 @@
+<project name="Quickstart_bpel_atm" default="deploy"
basedir=".">
+
+ <description>
+ ${ant.project.name}
+ </description>
+
+ <property name="version" value="1" />
+
+ <property name="deploy.dir" value="${basedir}/target/tests"
/>
+ <property name="test.dir"
value="${basedir}/src/test/resources/samples/${ant.project.name}" />
+
+ <property name="sample.jar.name"
value="${ant.project.name}-${version}.jar" />
+
+ <property name="war.build.dir"
location="${deploy.dir}/${ant.project.name}/build/war/classes" />
+
+ <path id="compile-classpath">
+ <!-- Required for JMS Client Code. -->
+ <fileset dir="${org.jboss.esb.server.home}/client"
includes="*.jar" />
+ </path>
+
+ <target name="deploywar" description="make war">
+ <!-- Compile... -->
+ <mkdir dir="${war.build.dir}" />
+
+ <javac srcdir="${test.dir}/war/src" destdir="${war.build.dir}"
target="1.5" debug="true">
+ <classpath refid="compile-classpath" />
+ </javac>
+
+ <!-- War... -->
+ <war warfile="${deploy.dir}/${ant.project.name}/${ant.project.name}.war"
webxml="${test.dir}/war/resources/WEB-INF/web.xml">
+ <classes dir="${war.build.dir}" />
+ </war>
+ </target>
+
+ <target name="undeploywar">
+ <delete file="${deploy.dir}/${ant.project.name}/${ant.project.name}.war"
/>
+ </target>
+
+ <target name="deploy" depends="deploywar">
+ <echo>Deploy ${ant.project.name}</echo>
+ <jar basedir="${test.dir}/bpel"
destfile="${deploy.dir}/${ant.project.name}/${sample.jar.name}" />
+ </target>
+
+ <target name="undeploy" depends="undeploywar">
+ <echo>Undeploy ${ant.project.name}</echo>
+ <delete file="${deploy.dir}/${ant.project.name}/${sample.jar.name}" />
+ </target>
+
+</project>
Property changes on:
trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_atm/build.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Added:
trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_atm/war/resources/WEB-INF/web.xml
===================================================================
---
trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_atm/war/resources/WEB-INF/web.xml
(rev 0)
+++
trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_atm/war/resources/WEB-INF/web.xml 2009-11-05
09:17:48 UTC (rev 227)
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app version="2.4"
xmlns="http://java.sun.com/xml/ns/j2ee"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
+
+ <servlet>
+ <servlet-name>accountSystemServlet</servlet-name>
+ <servlet-class>
+ org.jboss.soa.bpel.samples.quickstart.account.AccountSystem_Impl
+ </servlet-class>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>accountSystemServlet</servlet-name>
+ <url-pattern>/accountSystem</url-pattern>
+ </servlet-mapping>
+
+ <servlet>
+ <servlet-name>ticketIssuerServlet</servlet-name>
+ <servlet-class>
+ org.jboss.soa.bpel.samples.quickstart.ticket.TicketIssuer_Impl
+ </servlet-class>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>ticketIssuerServlet</servlet-name>
+ <url-pattern>/ticketIssuer</url-pattern>
+ </servlet-mapping>
+
+</web-app>
\ No newline at end of file
Property changes on:
trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_atm/war/resources/WEB-INF/web.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_atm/war/src/org/jboss/soa/bpel/samples/quickstart/account/AccountOperation.java
===================================================================
---
trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_atm/war/src/org/jboss/soa/bpel/samples/quickstart/account/AccountOperation.java
(rev 0)
+++
trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_atm/war/src/org/jboss/soa/bpel/samples/quickstart/account/AccountOperation.java 2009-11-05
09:17:48 UTC (rev 227)
@@ -0,0 +1,77 @@
+package org.jboss.soa.bpel.samples.quickstart.account;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+/**
+ * account data transfer type
+ *
+ * <p>
+ * Java class for AccountOperation complex type.
+ *
+ * <p>
+ * The following schema fragment specifies the expected content contained within this
class.
+ *
+ * <pre>
+ * <complexType name="AccountOperation">
+ * <complexContent>
+ * <restriction
base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="customerName"
type="{http://www.w3.org/2001/XMLSchema}string"/>
+ * <element name="amount"
type="{http://www.w3.org/2001/XMLSchema}double"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
+(a)XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "AccountOperation", propOrder = { "customerName",
"amount" })
+public class AccountOperation {
+
+ @XmlElement(required = true)
+ protected String customerName;
+ protected double amount;
+
+ /**
+ * Gets the value of the customerName property.
+ *
+ * @return possible object is {@link String }
+ *
+ */
+ public String getCustomerName() {
+ return customerName;
+ }
+
+ /**
+ * Sets the value of the customerName property.
+ *
+ * @param value
+ * allowed object is {@link String }
+ *
+ */
+ public void setCustomerName(String value) {
+ this.customerName = value;
+ }
+
+ /**
+ * Gets the value of the amount property.
+ *
+ */
+ public double getAmount() {
+ return amount;
+ }
+
+ /**
+ * Sets the value of the amount property.
+ *
+ */
+ public void setAmount(double value) {
+ this.amount = value;
+ }
+
+}
Property changes on:
trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_atm/war/src/org/jboss/soa/bpel/samples/quickstart/account/AccountOperation.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_atm/war/src/org/jboss/soa/bpel/samples/quickstart/account/AccountSystem.java
===================================================================
---
trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_atm/war/src/org/jboss/soa/bpel/samples/quickstart/account/AccountSystem.java
(rev 0)
+++
trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_atm/war/src/org/jboss/soa/bpel/samples/quickstart/account/AccountSystem.java 2009-11-05
09:17:48 UTC (rev 227)
@@ -0,0 +1,40 @@
+package org.jboss.soa.bpel.samples.quickstart.account;
+
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebResult;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+
+/**
+ * published account functions
+ */
+@WebService(name = "AccountSystem", targetNamespace =
"http://jbpm.org/examples/account")
+@SOAPBinding(style = SOAPBinding.Style.RPC)
+public interface AccountSystem {
+
+ /**
+ * tell whether a customer has an active account
+ */
+ @WebMethod(action = "http://jbpm.org/examples/account#verifyAccess")
+ @WebResult(name = "granted", partName = "granted")
+ public boolean checkAccess(
+ @WebParam(name = "customerName", partName = "customerName") String
customerName);
+
+ /**
+ * retrieve the balance of an account
+ */
+ @WebMethod(action = "http://jbpm.org/examples/account#queryBalance")
+ @WebResult(name = "balance", partName = "balance")
+ public double queryBalance(
+ @WebParam(name = "customerName", partName = "customerName") String
customerName);
+
+ /**
+ * increase/decrease the balance of an account
+ */
+ @WebMethod(action = "http://jbpm.org/examples/account#updateBalance")
+ @WebResult(name = "balance", partName = "balance")
+ public double updateBalance(
+ @WebParam(name = "body", partName = "body") AccountOperation
body);
+
+}
Property changes on:
trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_atm/war/src/org/jboss/soa/bpel/samples/quickstart/account/AccountSystem.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_atm/war/src/org/jboss/soa/bpel/samples/quickstart/account/AccountSystem_Impl.java
===================================================================
---
trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_atm/war/src/org/jboss/soa/bpel/samples/quickstart/account/AccountSystem_Impl.java
(rev 0)
+++
trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_atm/war/src/org/jboss/soa/bpel/samples/quickstart/account/AccountSystem_Impl.java 2009-11-05
09:17:48 UTC (rev 227)
@@ -0,0 +1,97 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the JBPM BPEL PUBLIC LICENSE AGREEMENT as
+ * published by JBoss Inc.; either version 1.0 of the License, or
+ * (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ */
+package org.jboss.soa.bpel.samples.quickstart.account;
+
+import java.io.IOException;
+import java.net.URL;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.jws.WebService;
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.NodeList;
+import org.xml.sax.SAXException;
+
+/**
+ * Account system endpoint implementation bean.
+ *
+ * @author Alejandro Guizar
+ * @version $Revision$ $Date: 2006/09/27 03:53:01 $
+ */
+@WebService(endpointInterface =
"org.jboss.soa.bpel.samples.quickstart.account.AccountSystem", targetNamespace =
"http://jbpm.org/examples/account", serviceName = "AccountService",
portName = "AccountSystemPort")
+public class AccountSystem_Impl implements AccountSystem {
+
+ private static Map<String, Double> accounts =
loadAccounts("accounts.xml");
+
+ public boolean checkAccess(String customerName) {
+ return accounts.containsKey(customerName);
+ }
+
+ public double queryBalance(String customerName) {
+ return getBalance(customerName);
+ }
+
+ public double updateBalance(AccountOperation body) {
+ String customerName = body.getCustomerName();
+ double newBalance = getBalance(customerName) + body.getAmount();
+ accounts.put(customerName, new Double(newBalance));
+ return newBalance;
+ }
+
+ private double getBalance(String customerName) {
+ Double balance = (Double) accounts.get(customerName);
+ return balance.doubleValue();
+ }
+
+ private static Map<String, Double> loadAccounts(String resourceName) {
+ try {
+ // parse the accounts document
+ DocumentBuilder domBuilder =
+ DocumentBuilderFactory.newInstance().newDocumentBuilder();
+ URL resource = AccountSystem_Impl.class.getResource(resourceName);
+ if (resource == null) return Collections.emptyMap();
+ Document accountsDocument = domBuilder.parse(resource.toString());
+ // give everyone an initial balance of $50
+ Double initialBalance = new Double(50);
+ // iterate over the accounts
+ Map<String, Double> accounts = new HashMap<String, Double>();
+ Element accountsElem = accountsDocument.getDocumentElement();
+ NodeList accountElems = accountsElem.getElementsByTagName("account");
+ for (int i = 0, n = accountElems.getLength(); i < n; i++) {
+ Element accountElem = (Element) accountElems.item(i);
+ // create account, assign initial balance
+ String customerName = accountElem.getAttribute("holder");
+ accounts.put(customerName, initialBalance);
+ }
+ return accounts;
+ }
+ catch (ParserConfigurationException e) {
+ // default configuration for document builder should work
+ throw new AssertionError(e);
+ }
+ catch (SAXException e) {
+ return Collections.emptyMap();
+ }
+ catch (IOException e) {
+ return Collections.emptyMap();
+ }
+ }
+}
Property changes on:
trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_atm/war/src/org/jboss/soa/bpel/samples/quickstart/account/AccountSystem_Impl.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_atm/war/src/org/jboss/soa/bpel/samples/quickstart/account/accounts.xml
===================================================================
---
trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_atm/war/src/org/jboss/soa/bpel/samples/quickstart/account/accounts.xml
(rev 0)
+++
trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_atm/war/src/org/jboss/soa/bpel/samples/quickstart/account/accounts.xml 2009-11-05
09:17:48 UTC (rev 227)
@@ -0,0 +1,6 @@
+<accounts>
+ <account holder="alex" />
+ <account holder="fady" />
+ <account holder="koen" />
+ <account holder="tom" />
+</accounts>
\ No newline at end of file
Property changes on:
trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_atm/war/src/org/jboss/soa/bpel/samples/quickstart/account/accounts.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_atm/war/src/org/jboss/soa/bpel/samples/quickstart/account/package-info.java
===================================================================
---
trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_atm/war/src/org/jboss/soa/bpel/samples/quickstart/account/package-info.java
(rev 0)
+++
trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_atm/war/src/org/jboss/soa/bpel/samples/quickstart/account/package-info.java 2009-11-05
09:17:48 UTC (rev 227)
@@ -0,0 +1,3 @@
+(a)javax.xml.bind.annotation.XmlSchema(namespace =
"http://jbpm.org/examples/account")
+package org.jboss.soa.bpel.samples.quickstart.account;
+
Property changes on:
trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_atm/war/src/org/jboss/soa/bpel/samples/quickstart/account/package-info.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_atm/war/src/org/jboss/soa/bpel/samples/quickstart/ticket/TicketIssuer.java
===================================================================
---
trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_atm/war/src/org/jboss/soa/bpel/samples/quickstart/ticket/TicketIssuer.java
(rev 0)
+++
trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_atm/war/src/org/jboss/soa/bpel/samples/quickstart/ticket/TicketIssuer.java 2009-11-05
09:17:48 UTC (rev 227)
@@ -0,0 +1,22 @@
+package org.jboss.soa.bpel.samples.quickstart.ticket;
+
+import javax.jws.WebMethod;
+import javax.jws.WebResult;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+
+/**
+ * interface to ticket issuer service
+ */
+@WebService(name = "TicketIssuer", targetNamespace =
"http://jbpm.org/examples/ticket")
+@SOAPBinding(style = SOAPBinding.Style.RPC)
+public interface TicketIssuer {
+
+ /**
+ * generate a ticket number, distinct from previous calls
+ */
+ @WebMethod(action = "http://jbpm.org/examples/ticket#createTicket")
+ @WebResult(name = "ticketNo", partName = "ticketNo")
+ public int createTicket();
+
+}
Property changes on:
trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_atm/war/src/org/jboss/soa/bpel/samples/quickstart/ticket/TicketIssuer.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_atm/war/src/org/jboss/soa/bpel/samples/quickstart/ticket/TicketIssuer_Impl.java
===================================================================
---
trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_atm/war/src/org/jboss/soa/bpel/samples/quickstart/ticket/TicketIssuer_Impl.java
(rev 0)
+++
trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_atm/war/src/org/jboss/soa/bpel/samples/quickstart/ticket/TicketIssuer_Impl.java 2009-11-05
09:17:48 UTC (rev 227)
@@ -0,0 +1,33 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the JBPM BPEL PUBLIC LICENSE AGREEMENT as
+ * published by JBoss Inc.; either version 1.0 of the License, or
+ * (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ */
+package org.jboss.soa.bpel.samples.quickstart.ticket;
+
+import javax.jws.WebService;
+
+/**
+ * @author Alejandro Guizar
+ * @version $Revision$ $Date: 2006/09/27 03:53:07 $
+ */
+@WebService(endpointInterface =
"org.jboss.soa.bpel.samples.quickstart.ticket.TicketIssuer", targetNamespace =
"http://jbpm.org/examples/ticket", serviceName = "TicketService",
portName = "TicketIssuerPort")
+public class TicketIssuer_Impl implements TicketIssuer {
+
+ private static int currentSession = 1;
+
+ public int createTicket() {
+ synchronized (TicketIssuer_Impl.class) {
+ return currentSession++;
+ }
+ }
+}
Property changes on:
trunk/integration-tests/src/test/resources/samples/Quickstart_bpel_atm/war/src/org/jboss/soa/bpel/samples/quickstart/ticket/TicketIssuer_Impl.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Property changes on: trunk/samples/quickstart/atm
___________________________________________________________________
Name: svn:ignore
+ .classpath
target
.project
Added: trunk/samples/quickstart/atm/bpel/account-service.wsdl
===================================================================
--- trunk/samples/quickstart/atm/bpel/account-service.wsdl (rev
0)
+++ trunk/samples/quickstart/atm/bpel/account-service.wsdl 2009-11-05 09:17:48 UTC (rev
227)
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<definitions
targetNamespace="http://jbpm.org/examples/account"
+
xmlns:tns="http://jbpm.org/examples/account"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns="http://schemas.xmlsoap.org/wsdl/">
+
+ <import
namespace="http://jbpm.org/examples/account"
location="interface/account.wsdl" />
+
+ <binding name="AccountSystemBinding"
type="tns:AccountSystem">
+
+ <soap:binding style="rpc"
+
transport="http://schemas.xmlsoap.org/soap/http" />
+
+ <operation name="checkAccess">
+ <soap:operation
soapAction="http://jbpm.org/examples/account#verifyAccess" />
+ <input>
+ <soap:body use="literal"
namespace="http://jbpm.org/examples/account" />
+ </input>
+ <output>
+ <soap:body use="literal"
namespace="http://jbpm.org/examples/account" />
+ </output>
+ </operation>
+
+ <operation name="queryBalance">
+ <soap:operation
soapAction="http://jbpm.org/examples/account#queryBalance" />
+ <input>
+ <soap:body use="literal"
namespace="http://jbpm.org/examples/account" />
+ </input>
+ <output>
+ <soap:body use="literal"
namespace="http://jbpm.org/examples/account" />
+ </output>
+ </operation>
+
+ <operation name="updateBalance">
+ <soap:operation
soapAction="http://jbpm.org/examples/account#updateBalance" />
+ <input>
+ <soap:body use="literal"
namespace="http://jbpm.org/examples/account" />
+ </input>
+ <output>
+ <soap:body use="literal"
namespace="http://jbpm.org/examples/account" />
+ </output>
+ </operation>
+
+ </binding>
+
+ <service name="AccountService">
+
+ <port name="AccountSystemPort"
binding="tns:AccountSystemBinding">
+ <soap:address
location="http://127.0.0.1:8080/Quickstart_bpel_atm/accountSystem" />
+ </port>
+
+ </service>
+
+</definitions>
\ No newline at end of file
Property changes on: trunk/samples/quickstart/atm/bpel/account-service.wsdl
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: trunk/samples/quickstart/atm/bpel/atm-service.wsdl
===================================================================
--- trunk/samples/quickstart/atm/bpel/atm-service.wsdl (rev 0)
+++ trunk/samples/quickstart/atm/bpel/atm-service.wsdl 2009-11-05 09:17:48 UTC (rev 227)
@@ -0,0 +1,138 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<definitions
targetNamespace="http://jbpm.org/examples/atm"
+
xmlns:tns="http://jbpm.org/examples/atm"
xmlns:acc="http://jbpm.org/examples/account"
+
xmlns:tic="http://jbpm.org/examples/ticket"
xmlns:plt="http://docs.oasis-open.org/wsbpel/2.0/plnktype"
+
xmlns:vprop="http://docs.oasis-open.org/wsbpel/2.0/varprop"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns="http://schemas.xmlsoap.org/wsdl/">
+
+ <import
namespace="http://jbpm.org/examples/atm"
location="interface/atm.wsdl" />
+ <import
namespace="http://jbpm.org/examples/account"
location="interface/account.wsdl" />
+ <import
namespace="http://jbpm.org/examples/ticket"
location="interface/ticket.wsdl" />
+
+ <vprop:property name="customerId" type="xsd:string">
+ <vprop:documentation>customer name property</vprop:documentation>
+ </vprop:property>
+
+ <vprop:propertyAlias propertyName="tns:customerId"
+ messageType="tns:logOnRequest" part="customerName" />
+
+ <vprop:propertyAlias propertyName="tns:customerId"
+ messageType="tns:balanceChange" part="customerName" />
+ <vprop:propertyAlias propertyName="tns:customerId"
+ messageType="acc:customerMessage" part="customerName" />
+ <vprop:propertyAlias propertyName="tns:customerId"
+ messageType="acc:accountOperation" part="body">
+ <vprop:query>/body/customerName</vprop:query>
+ </vprop:propertyAlias>
+
+ <vprop:property name="ticketId" type="xsd:int">
+ <vprop:documentation>ticket number property</vprop:documentation>
+ </vprop:property>
+
+ <vprop:propertyAlias propertyName="tns:ticketId"
+ messageType="tic:ticketMessage" part="ticketNo" />
+ <vprop:propertyAlias propertyName="tns:ticketId"
+ messageType="tns:logOnRequest" part="ticketNo" />
+
+ <plt:partnerLinkType name="Atm-Front">
+ <plt:documentation>
+ relationship between the ATM and the process
+ </plt:documentation>
+ <plt:role name="FrontEnd" portType="tns:FrontEnd" />
+ </plt:partnerLinkType>
+ <plt:partnerLinkType name="Front-Ticket">
+ <vprop:documentation>
+ relationship between the process and the ticket issuer
+ </vprop:documentation>
+ <plt:role name="TicketIssuer" portType="tic:TicketIssuer" />
+ </plt:partnerLinkType>
+ <plt:partnerLinkType name="Front-Account">
+ <plt:documentation>
+ relationship between the process and the account system
+ </plt:documentation>
+ <plt:role name="AccountSystem" portType="acc:AccountSystem"
/>
+ </plt:partnerLinkType>
+
+ <binding name="FrontEndBinding" type="tns:FrontEnd">
+ <soap:binding style="rpc"
transport="http://schemas.xmlsoap.org/soap/http" />
+ <operation name="connect">
+ <soap:operation
soapAction="http://jbpm.org/examples/atm/connect" />
+ <input>
+ <soap:body use="literal"
namespace="http://jbpm.org/examples/atm" />
+ </input>
+ <output>
+ <soap:body use="literal"
namespace="http://jbpm.org/examples/atm" />
+ </output>
+ </operation>
+ <operation name="disconnect">
+ <soap:operation
soapAction="http://jbpm.org/examples/atm/disconnect"
/>
+ <input>
+ <soap:body use="literal"
namespace="http://jbpm.org/examples/atm" />
+ </input>
+ </operation>
+ <operation name="status">
+ <soap:operation
soapAction="http://jbpm.org/examples/atm/status" />
+ <input>
+ <soap:body use="literal"
namespace="http://jbpm.org/examples/atm" />
+ </input>
+ <output>
+ <soap:body use="literal"
namespace="http://jbpm.org/examples/atm" />
+ </output>
+ </operation>
+ <operation name="logOn">
+ <soap:operation
soapAction="http://jbpm.org/examples/atm/logOn" />
+ <input>
+ <soap:body use="literal"
namespace="http://jbpm.org/examples/atm" />
+ </input>
+ <output>
+ <soap:body use="literal"
namespace="http://jbpm.org/examples/atm" />
+ </output>
+ <fault name="unauthorizedAccess">
+ <soap:fault use="literal" name="unauthorizedAccess" />
+ </fault>
+ </operation>
+ <operation name="logOff">
+ <soap:operation
soapAction="http://jbpm.org/examples/atm/logOff" />
+ <input>
+ <soap:body use="literal"
namespace="http://jbpm.org/examples/atm" />
+ </input>
+ </operation>
+ <operation name="getBalance">
+ <soap:operation
soapAction="http://jbpm.org/examples/atm/getBalance"
/>
+ <input>
+ <soap:body use="literal"
namespace="http://jbpm.org/examples/atm" />
+ </input>
+ <output>
+ <soap:body use="literal"
namespace="http://jbpm.org/examples/atm" />
+ </output>
+ </operation>
+ <operation name="deposit">
+ <soap:operation
soapAction="http://jbpm.org/examples/atm/deposit" />
+ <input>
+ <soap:body use="literal"
namespace="http://jbpm.org/examples/atm" />
+ </input>
+ <output>
+ <soap:body use="literal"
namespace="http://jbpm.org/examples/atm" />
+ </output>
+ </operation>
+ <operation name="withdraw">
+ <soap:operation
soapAction="http://jbpm.org/examples/atm/withdraw" />
+ <input>
+ <soap:body use="literal"
namespace="http://jbpm.org/examples/atm" />
+ </input>
+ <output>
+ <soap:body use="literal"
namespace="http://jbpm.org/examples/atm" />
+ </output>
+ <fault name="insufficientFunds">
+ <soap:fault use="literal" name="insufficientFunds" />
+ </fault>
+ </operation>
+ </binding>
+
+ <service name="AtmFrontEndService">
+ <port name="FrontEndPort" binding="tns:FrontEndBinding">
+ <soap:address
location="http://127.0.0.1:8080/Quickstart_bpel_atmFrontEnd" />
+ </port>
+ </service>
+
+</definitions>
Property changes on: trunk/samples/quickstart/atm/bpel/atm-service.wsdl
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: trunk/samples/quickstart/atm/bpel/atm.bpel
===================================================================
--- trunk/samples/quickstart/atm/bpel/atm.bpel (rev 0)
+++ trunk/samples/quickstart/atm/bpel/atm.bpel 2009-11-05 09:17:48 UTC (rev 227)
@@ -0,0 +1,508 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<process name="AtmFrontEnd"
targetNamespace="http://jbpm.org/examples/atm"
+
xmlns:acc="http://jbpm.org/examples/account"
xmlns:atm="http://jbpm.org/examples/atm"
+
xmlns:tic="http://jbpm.org/examples/ticket"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable...
+
xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable"...
+
+ <bpel:import
namespace="http://jbpm.org/examples/account"
location="account-service.wsdl"
+
importType="http://schemas.xmlsoap.org/wsdl/" />
+ <bpel:import
namespace="http://jbpm.org/examples/ticket"
location="ticket-service.wsdl"
+
importType="http://schemas.xmlsoap.org/wsdl/" />
+ <bpel:import
namespace="http://jbpm.org/examples/atm"
location="atm-service.wsdl"
+
importType="http://schemas.xmlsoap.org/wsdl/" />
+
+ <partnerLinks>
+ <partnerLink myRole="FrontEnd" name="atm"
partnerLinkType="atm:Atm-Front">
+ <documentation>relationship with the ATM</documentation>
+ </partnerLink>
+ <partnerLink name="ticket" partnerLinkType="atm:Front-Ticket"
+ partnerRole="TicketIssuer">
+ <documentation>relationship with the ticket issuer</documentation>
+ </partnerLink>
+ <partnerLink name="account" partnerLinkType="atm:Front-Account"
+ partnerRole="AccountSystem">
+ <documentation>relationship with the account system</documentation>
+ </partnerLink>
+ </partnerLinks>
+
+ <variables>
+ <variable name="connected" type="xsd:boolean">
+ <documentation>ATM connection flag</documentation>
+ </variable>
+ <variable name="logged" type="xsd:boolean">
+ <documentation>customer access flag</documentation>
+ </variable>
+ <variable messageType="tic:ticketMessage" name="ticketMsg">
+ <documentation>ticket number wrapper</documentation>
+ </variable>
+ </variables>
+
+ <correlationSets>
+ <correlationSet name="atmInteraction"
properties="atm:ticketId">
+ <documentation>conversation with a connected ATM</documentation>
+ </correlationSet>
+ </correlationSets>
+
+ <sequence name="MainSeq">
+ <scope name="TicketCreationUnit">
+ <variables>
+ <variable messageType="tic:ticketRequest"
name="ticketReq">
+ <documentation>ATM connection request</documentation>
+ </variable>
+ <variable messageType="atm:connectRequest"
name="connectReq">
+ <documentation>ticket creation request</documentation>
+ </variable>
+ </variables>
+
+ <sequence name="TicketCreationSeq">
+ <receive createInstance="yes" name="AcceptConnection"
operation="connect"
+ partnerLink="atm" portType="atm:FrontEnd"
variable="connectReq">
+ <documentation>receive a connection request</documentation>
+ </receive>
+
+ <invoke inputVariable="ticketReq" name="CreateTicket"
operation="createTicket"
+ outputVariable="ticketMsg" partnerLink="ticket"
portType="tic:TicketIssuer">
+ <documentation>generate a ticket number</documentation>
+ <correlations>
+ <correlation initiate="yes" pattern="response"
set="atmInteraction" />
+ </correlations>
+ </invoke>
+
+ <reply name="SendTicketNumber" operation="connect"
partnerLink="atm"
+ portType="atm:FrontEnd" variable="ticketMsg">
+ <documentation>
+ send the ticket number back to the ATM
+ </documentation>
+ <correlations>
+ <correlation set="atmInteraction" />
+ </correlations>
+ </reply>
+ </sequence>
+ </scope>
+
+ <assign name="InitializeStatus">
+ <documentation>initialize the status flags</documentation>
+ <copy>
+ <from>true()</from>
+ <to variable="connected" />
+ </copy>
+ <copy>
+ <from>false()</from>
+ <to variable="logged" />
+ </copy>
+ </assign>
+
+ <scope name="ConnectionUnit">
+ <documentation>handle the ATM connection</documentation>
+
+ <variables>
+ <variable messageType="atm:logOnRequest" name="logOnReq">
+ <documentation>customer log on request</documentation>
+ </variable>
+ <variable messageType="atm:statusResponse"
name="statusRsp">
+ <documentation>connection status response</documentation>
+ </variable>
+ </variables>
+
+ <eventHandlers>
+ <onEvent messageType="tic:ticketMessage" operation="status"
+ partnerLink="atm" portType="atm:FrontEnd"
variable="ticketMsg">
+ <correlations>
+ <correlation set="atmInteraction" />
+ </correlations>
+
+ <scope name="StatusUnit">
+ <sequence name="StatusSeq">
+ <if name="StatusDecision">
+ <condition>$logged</condition>
+ <assign name="SetStatusLogged">
+ <copy>
+ <from>'logged'</from>
+ <to part="status" variable="statusRsp" />
+ </copy>
+ </assign>
+
+ <elseif>
+ <condition>$connected</condition>
+ <assign name="SetStatusConnected">
+ <copy>
+ <from>'connected'</from>
+ <to part="status" variable="statusRsp" />
+ </copy>
+ </assign>
+ </elseif>
+
+ <else>
+ <assign name="Assign">
+ <copy>
+ <from>'disconnected'</from>
+ <to part="status" variable="statusRsp" />
+ </copy>
+ </assign>
+ </else>
+ </if>
+
+ <reply name="SendStatus" operation="status"
partnerLink="atm"
+ portType="atm:FrontEnd" variable="statusRsp" />
+ </sequence>
+ </scope>
+ </onEvent>
+ </eventHandlers>
+
+ <while name="ConnectionLoop">
+ <documentation>accept ATM requests, one at a time</documentation>
+ <condition>$connected</condition>
+
+ <pick name="ConnectionMenu">
+ <documentation>
+ listen for either disconnect or log on request
+ </documentation>
+
+ <onMessage operation="logOn" partnerLink="atm"
portType="atm:FrontEnd"
+ variable="logOnReq">
+ <correlations>
+ <correlation set="atmInteraction" />
+ </correlations>
+
+ <scope name="AccountUnit">
+ <documentation>handle account access</documentation>
+
+ <variables>
+ <variable messageType="acc:accessMessage"
name="accessMsg">
+ <documentation>access check response</documentation>
+ </variable>
+ <variable messageType="acc:customerMessage"
name="customerMsg">
+ <documentation>customer name wrapper</documentation>
+ </variable>
+ <variable messageType="atm:logOnResponse"
name="logOnRsp">
+ <documentation>customer access acknowledgment</documentation>
+ </variable>
+ <variable messageType="atm:unauthorizedAccess"
name="unauthorizedAccess">
+ <documentation>customer access fault</documentation>
+ </variable>
+ <variable messageType="acc:balanceMessage"
name="balanceMsg">
+ <documentation>account balance wrapper</documentation>
+ </variable>
+ <variable messageType="atm:balanceChange"
name="balanceChange">
+ <documentation>balance change request</documentation>
+ </variable>
+ <variable messageType="acc:accountOperation"
name="accountOperation">
+ <documentation>account system operation request</documentation>
+ </variable>
+ <variable name="newBalance" type="xsd:double">
+ <documentation>
+ resulting balance after withdrawal
+ </documentation>
+ </variable>
+ <variable messageType="atm:insufficientFunds"
name="insufficientFunds">
+ <documentation>withdraw fault</documentation>
+ </variable>
+ </variables>
+
+ <correlationSets>
+ <correlationSet name="customerInteraction"
properties="atm:customerId">
+ <documentation>
+ conversation with a logged customer
+ </documentation>
+ </correlationSet>
+ </correlationSets>
+
+ <sequence name="AccountSeq">
+ <assign name="PrepareAccessCheck">
+ <documentation>populate access check request</documentation>
+ <copy>
+ <from part="customerName" variable="logOnReq" />
+ <to part="customerName" variable="customerMsg" />
+ </copy>
+ </assign>
+
+ <invoke inputVariable="customerMsg" name="CheckAccess"
operation="checkAccess"
+ outputVariable="accessMsg" partnerLink="account"
portType="acc:AccountSystem">
+ <documentation>check account access privilege</documentation>
+ <correlations>
+ <correlation initiate="yes" pattern="request"
set="customerInteraction" />
+ </correlations>
+ </invoke>
+
+ <if name="AccessDecision">
+ <documentation>
+ decide outcome of customer access request
+ </documentation>
+ <condition>$accessMsg.granted</condition>
+
+ <sequence name="AccessGrantedSeq">
+ <documentation>grant customer access</documentation>
+
+ <assign name="SetLoggedOn">
+ <documentation>turn on logged flag</documentation>
+ <copy>
+ <from>true()</from>
+ <to variable="logged" />
+ </copy>
+ </assign>
+
+ <reply name="GrantAccess" operation="logOn"
partnerLink="atm"
+ portType="atm:FrontEnd" variable="logOnRsp">
+ <documentation>
+ send acknowledgment back to ATM
+ </documentation>
+ </reply>
+ </sequence>
+
+ <else>
+ <sequence name="AccessDeniedSeq">
+ <documentation>deny customer access</documentation>
+
+ <assign name="PrepareAccessDenial">
+ <documentation>populate access fault</documentation>
+ <copy>
+ <from part="customerName" variable="logOnReq" />
+ <to part="detail" variable="unauthorizedAccess">
+ <query>customerName</query>
+ </to>
+ </copy>
+ </assign>
+
+ <reply name="DenyAccess" operation="logOn"
partnerLink="atm"
+ portType="atm:FrontEnd" variable="unauthorizedAccess"
faultName="atm:unauthorizedAccess">
+ <documentation>send fault back to ATM</documentation>
+ </reply>
+ </sequence>
+ </else>
+ </if>
+
+ <while name="AccountLoop">
+ <documentation>
+ accept account requests, one at a time
+ </documentation>
+ <condition>$logged</condition>
+
+ <pick name="AccountMenu">
+ <onMessage operation="getBalance" partnerLink="atm"
+ portType="atm:FrontEnd" variable="customerMsg">
+ <correlations>
+ <correlation set="customerInteraction" />
+ </correlations>
+
+ <sequence name="BalanceSeq">
+ <invoke inputVariable="customerMsg"
name="QueryBalance"
+ operation="queryBalance" outputVariable="balanceMsg"
partnerLink="account"
+ portType="acc:AccountSystem">
+ <documentation>get current account balance</documentation>
+ </invoke>
+
+ <reply name="TellBalance" operation="getBalance"
partnerLink="atm"
+ portType="atm:FrontEnd" variable="balanceMsg">
+ <documentation>return balance to ATM</documentation>
+ </reply>
+ </sequence>
+ </onMessage>
+
+ <onMessage operation="deposit" partnerLink="atm"
portType="atm:FrontEnd"
+ variable="balanceChange">
+ <correlations>
+ <correlation set="customerInteraction" />
+ </correlations>
+
+ <sequence name="DepositSeq">
+ <assign name="PrepareDeposit">
+ <documentation>
+ populate balance update request
+ </documentation>
+ <copy>
+ <from part="customerName" variable="balanceChange"
/>
+ <to part="body" variable="accountOperation">
+ <query>customerName</query>
+ </to>
+ </copy>
+ <copy>
+ <from part="amount" variable="balanceChange" />
+ <to part="body" variable="accountOperation">
+ <query>amount</query>
+ </to>
+ </copy>
+ </assign>
+
+ <invoke inputVariable="accountOperation"
name="UpdateBalance"
+ operation="updateBalance" outputVariable="balanceMsg"
partnerLink="account"
+ portType="acc:AccountSystem">
+ <documentation>post positive balance update</documentation>
+ <correlations>
+ <correlation pattern="request"
set="customerInteraction" />
+ </correlations>
+ </invoke>
+
+ <reply name="TellNewBalance" operation="deposit"
partnerLink="atm"
+ portType="atm:FrontEnd" variable="balanceMsg">
+ <documentation>
+ make new balance available to ATM
+ </documentation>
+ </reply>
+ </sequence>
+ </onMessage>
+
+ <onMessage operation="withdraw" partnerLink="atm"
portType="atm:FrontEnd"
+ variable="balanceChange">
+ <correlations>
+ <correlation set="customerInteraction" />
+ </correlations>
+
+ <sequence name="WithdrawSeq">
+ <assign name="PrepareBalanceQuery">
+ <documentation>
+ populate balance query request
+ </documentation>
+ <copy>
+ <from part="customerName" variable="balanceChange"
/>
+ <to part="customerName" variable="customerMsg"
/>
+ </copy>
+ </assign>
+
+ <invoke inputVariable="customerMsg"
name="QueryBalance"
+ operation="queryBalance" outputVariable="balanceMsg"
partnerLink="account"
+ portType="acc:AccountSystem">
+ <documentation>get current account balance</documentation>
+ <correlations>
+ <correlation pattern="request"
set="customerInteraction" />
+ </correlations>
+ </invoke>
+
+ <assign name="EvaluateNewBalance">
+ <documentation>
+ evaluate amount that would remain in account
+ </documentation>
+ <copy>
+ <from>$balanceMsg.balance - $balanceChange.amount</from>
+ <to variable="newBalance" />
+ </copy>
+ </assign>
+
+ <if name="BalanceDecision">
+ <documentation>
+ decide outcome of withdraw request
+ </documentation>
+ <condition>$newBalance >= 0.0</condition>
+
+ <sequence name="PositiveBalanceSeq">
+ <documentation>accept withdrawal</documentation>
+
+ <assign name="PrepareWithdraw">
+ <documentation>
+ populate balance update request
+ </documentation>
+ <copy>
+ <from part="customerName" variable="balanceChange"
/>
+ <to part="body" variable="accountOperation">
+ <query>customerName</query>
+ </to>
+ </copy>
+ <copy>
+ <from>-$balanceChange.amount</from>
+ <to part="body" variable="accountOperation">
+ <query>amount</query>
+ </to>
+ </copy>
+ </assign>
+
+ <invoke inputVariable="accountOperation"
name="UpdateBalance"
+ operation="updateBalance" outputVariable="balanceMsg"
+ partnerLink="account"
portType="acc:AccountSystem">
+ <documentation>
+ post negative balance update
+ </documentation>
+ <correlations>
+ <correlation pattern="request"
set="customerInteraction" />
+ </correlations>
+ </invoke>
+
+ <reply name="TellNewBalance" operation="withdraw"
+ partnerLink="atm" portType="atm:FrontEnd"
variable="balanceMsg">
+ <documentation>return new balance to ATM</documentation>
+ </reply>
+ </sequence>
+
+ <else>
+ <sequence name="NegativeBalanceSeq">
+ <documentation>reject withdrawal</documentation>
+
+ <assign name="PrepareRejection">
+ <documentation>populate withdraw fault</documentation>
+ <copy>
+ <from part="customerName"
variable="balanceChange" />
+ <to part="detail"
variable="insufficientFunds">
+ <query>customerName</query>
+ </to>
+ </copy>
+ <copy>
+ <from part="balance" variable="balanceMsg" />
+ <to part="detail"
variable="insufficientFunds">
+ <query>amount</query>
+ </to>
+ </copy>
+ </assign>
+
+ <reply name="RejectWithdraw" operation="withdraw"
+ partnerLink="atm" portType="atm:FrontEnd"
variable="insufficientFunds"
+ faultName="atm:insufficientFunds">
+ <documentation>return fault to ATM</documentation>
+ </reply>
+ </sequence>
+ </else>
+ </if>
+ </sequence>
+ </onMessage>
+
+ <onMessage operation="logOff" partnerLink="atm"
portType="atm:FrontEnd"
+ variable="customerMsg">
+ <correlations>
+ <correlation set="customerInteraction" />
+ </correlations>
+
+ <assign name="SetLoggedOff">
+ <documentation>turn off logged flag</documentation>
+ <copy>
+ <from>false()</from>
+ <to variable="logged" />
+ </copy>
+ </assign>
+ </onMessage>
+
+ <onAlarm>
+ <for>'PT2M'</for>
+
+ <assign name="SetLoggedOff">
+ <documentation>
+ turn off logged flag after a period of inactivity
+ </documentation>
+ <copy>
+ <from>false()</from>
+ <to variable="logged" />
+ </copy>
+ </assign>
+ </onAlarm>
+ </pick>
+ </while>
+ </sequence>
+ </scope>
+ </onMessage>
+
+ <onMessage operation="disconnect" partnerLink="atm"
portType="atm:FrontEnd"
+ variable="ticketMsg">
+ <correlations>
+ <correlation set="atmInteraction" />
+ </correlations>
+
+ <assign name="SetDisconnected">
+ <documentation>turn off connected flag</documentation>
+ <copy>
+ <from>false()</from>
+ <to variable="connected" />
+ </copy>
+ </assign>
+ </onMessage>
+ </pick>
+ </while>
+ </scope>
+ </sequence>
+</process>
Added: trunk/samples/quickstart/atm/bpel/bpel-deploy.xml
===================================================================
--- trunk/samples/quickstart/atm/bpel/bpel-deploy.xml (rev 0)
+++ trunk/samples/quickstart/atm/bpel/bpel-deploy.xml 2009-11-05 09:17:48 UTC (rev 227)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<deploy
xmlns="http://www.apache.org/ode/schemas/dd/2007/03">
+ <process name="atm:AtmFrontEnd"
xmlns:atm="http://jbpm.org/examples/atm">
+ <active>true</active>
+ <provide partnerLink="atm">
+ <service name="atm:AtmFrontEndService" port="FrontEndPort"
/>
+ </provide>
+ <invoke partnerLink="ticket">
+ <service name="tic:TicketService" port="TicketIssuerPort"
+
xmlns:tic="http://jbpm.org/examples/ticket" />
+ </invoke>
+ <invoke partnerLink="account">
+ <service name="acc:AccountService" port="AccountSystemPort"
+
xmlns:acc="http://jbpm.org/examples/account" />
+ </invoke>
+ </process>
+</deploy>
\ No newline at end of file
Property changes on: trunk/samples/quickstart/atm/bpel/bpel-deploy.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: trunk/samples/quickstart/atm/bpel/interface/account.wsdl
===================================================================
--- trunk/samples/quickstart/atm/bpel/interface/account.wsdl (rev
0)
+++ trunk/samples/quickstart/atm/bpel/interface/account.wsdl 2009-11-05 09:17:48 UTC (rev
227)
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<definitions
targetNamespace="http://jbpm.org/examples/account"
+
xmlns:tns="http://jbpm.org/examples/account"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+
xmlns="http://schemas.xmlsoap.org/wsdl/">
+
+ <types>
+
+ <schema
targetNamespace="http://jbpm.org/examples/account"
+
xmlns="http://www.w3.org/2001/XMLSchema">
+
+ <complexType name="AccountOperation">
+ <annotation>
+ <documentation>account data transfer type</documentation>
+ </annotation>
+ <sequence>
+ <element name="customerName" type="xsd:string" />
+ <element name="amount" type="xsd:double" />
+ </sequence>
+ </complexType>
+
+ </schema>
+
+ </types>
+
+ <message name="customerMessage">
+ <documentation>customer name wrapper</documentation>
+ <part name="customerName" type="xsd:string" />
+ </message>
+
+ <message name="accessMessage">
+ <documentation>access check response</documentation>
+ <part name="granted" type="xsd:boolean" />
+ </message>
+
+ <message name="balanceMessage">
+ <documentation>account balance wrapper</documentation>
+ <part name="balance" type="xsd:double" />
+ </message>
+
+ <message name="accountOperation">
+ <documentation>account operation request</documentation>
+ <part name="body" type="tns:AccountOperation" />
+ </message>
+
+ <portType name="AccountSystem">
+ <documentation>published account functions</documentation>
+
+ <operation name="checkAccess">
+ <documentation>
+ tell whether a customer has an active account
+ </documentation>
+ <input message="tns:customerMessage" />
+ <output message="tns:accessMessage" />
+ </operation>
+
+ <operation name="queryBalance">
+ <documentation>retrieve the balance of an account</documentation>
+ <input message="tns:customerMessage" />
+ <output message="tns:balanceMessage" />
+ </operation>
+
+ <operation name="updateBalance">
+ <documentation>
+ increase/decrease the balance of an account
+ </documentation>
+ <input message="tns:accountOperation" />
+ <output message="tns:balanceMessage" />
+ </operation>
+
+ </portType>
+
+</definitions>
\ No newline at end of file
Property changes on: trunk/samples/quickstart/atm/bpel/interface/account.wsdl
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: trunk/samples/quickstart/atm/bpel/interface/atm.wsdl
===================================================================
--- trunk/samples/quickstart/atm/bpel/interface/atm.wsdl (rev 0)
+++ trunk/samples/quickstart/atm/bpel/interface/atm.wsdl 2009-11-05 09:17:48 UTC (rev
227)
@@ -0,0 +1,114 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<definitions
targetNamespace="http://jbpm.org/examples/atm"
+
xmlns:tns="http://jbpm.org/examples/atm"
xmlns:tic="http://jbpm.org/examples/ticket"
+
xmlns:acc="http://jbpm.org/examples/account"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+
xmlns="http://schemas.xmlsoap.org/wsdl/">
+
+ <import
namespace="http://jbpm.org/examples/ticket"
location="ticket.wsdl" />
+ <import
namespace="http://jbpm.org/examples/account"
location="account.wsdl" />
+
+ <types>
+
+ <schema
targetNamespace="http://jbpm.org/examples/atm"
xmlns="http://www.w3.org/2001/XMLSchema">
+
+ <complexType name="UnauthorizedAccess">
+ <sequence>
+ <element name="customerName" type="xsd:string" />
+ </sequence>
+ </complexType>
+
+ <element name="unauthorizedAccess"
type="tns:UnauthorizedAccess" />
+
+ <complexType name="InsufficientFunds">
+ <sequence>
+ <element name="customerName" type="xsd:string" />
+ <element name="amount" type="xsd:double" />
+ </sequence>
+ </complexType>
+
+ <element name="insufficientFunds" type="tns:InsufficientFunds"
/>
+
+ </schema>
+
+ </types>
+
+ <message name="connectRequest" />
+
+ <message name="logOnRequest">
+ <part name="ticketNo" type="xsd:int" />
+ <part name="customerName" type="xsd:string" />
+ </message>
+
+ <message name="logOnResponse" />
+
+ <message name="statusResponse">
+ <part name="status" type="xsd:string" />
+ </message>
+
+ <message name="balanceChange">
+ <part name="customerName" type="xsd:string" />
+ <part name="amount" type="xsd:double" />
+ </message>
+
+ <message name="unauthorizedAccess">
+ <part name="detail" element="tns:unauthorizedAccess" />
+ </message>
+
+ <message name="insufficientFunds">
+ <part name="detail" element="tns:insufficientFunds" />
+ </message>
+
+ <portType name="FrontEnd">
+ <documentation>bank functions available to ATMs</documentation>
+
+ <operation name="connect">
+ <documentation>initiate bank connection</documentation>
+ <input message="tns:connectRequest" />
+ <output message="tic:ticketMessage" />
+ </operation>
+
+ <operation name="disconnect">
+ <documentation>terminate bank connection</documentation>
+ <input message="tic:ticketMessage" />
+ </operation>
+
+ <operation name="status">
+ <documentation>retrieve bank connection status</documentation>
+ <input message="tic:ticketMessage" />
+ <output message="tns:statusResponse" />
+ </operation>
+
+ <operation name="logOn">
+ <documentation>initiate customer access</documentation>
+ <input message="tns:logOnRequest" />
+ <output message="tns:logOnResponse" />
+ <fault name="unauthorizedAccess"
message="tns:unauthorizedAccess" />
+ </operation>
+
+ <operation name="logOff">
+ <documentation>terminate customer access</documentation>
+ <input message="acc:customerMessage" />
+ </operation>
+
+ <operation name="getBalance">
+ <documentation>retrieve account balance</documentation>
+ <input message="acc:customerMessage" />
+ <output message="acc:balanceMessage" />
+ </operation>
+
+ <operation name="deposit">
+ <documentation>increase account balance</documentation>
+ <input message="tns:balanceChange" />
+ <output message="acc:balanceMessage" />
+ </operation>
+
+ <operation name="withdraw">
+ <documentation>decrease account balance</documentation>
+ <input message="tns:balanceChange" />
+ <output message="acc:balanceMessage" />
+ <fault name="insufficientFunds" message="tns:insufficientFunds"
/>
+ </operation>
+
+ </portType>
+
+</definitions>
\ No newline at end of file
Property changes on: trunk/samples/quickstart/atm/bpel/interface/atm.wsdl
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: trunk/samples/quickstart/atm/bpel/interface/ticket.wsdl
===================================================================
--- trunk/samples/quickstart/atm/bpel/interface/ticket.wsdl (rev
0)
+++ trunk/samples/quickstart/atm/bpel/interface/ticket.wsdl 2009-11-05 09:17:48 UTC (rev
227)
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<definitions
targetNamespace="http://jbpm.org/examples/ticket"
+
xmlns:tns="http://jbpm.org/examples/ticket"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+
xmlns="http://schemas.xmlsoap.org/wsdl/">
+
+ <message name="ticketRequest">
+ <documentation>ticket creation request</documentation>
+ </message>
+
+ <message name="ticketMessage">
+ <documentation>ticket number wrapper</documentation>
+ <part name="ticketNo" type="xsd:int" />
+ </message>
+
+ <portType name="TicketIssuer">
+ <documentation>interface to ticket issuer service</documentation>
+
+ <operation name="createTicket">
+ <documentation>
+ generate a ticket number, distinct from previous calls
+ </documentation>
+ <input message="tns:ticketRequest" />
+ <output message="tns:ticketMessage" />
+ </operation>
+
+ </portType>
+
+</definitions>
\ No newline at end of file
Property changes on: trunk/samples/quickstart/atm/bpel/interface/ticket.wsdl
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: trunk/samples/quickstart/atm/bpel/ticket-service.wsdl
===================================================================
--- trunk/samples/quickstart/atm/bpel/ticket-service.wsdl (rev 0)
+++ trunk/samples/quickstart/atm/bpel/ticket-service.wsdl 2009-11-05 09:17:48 UTC (rev
227)
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<definitions
targetNamespace="http://jbpm.org/examples/ticket"
+
xmlns:tns="http://jbpm.org/examples/ticket"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns="http://schemas.xmlsoap.org/wsdl/">
+
+ <import
namespace="http://jbpm.org/examples/ticket"
location="interface/ticket.wsdl" />
+
+ <binding name="TicketIssuerBinding" type="tns:TicketIssuer">
+
+ <soap:binding style="rpc"
+
transport="http://schemas.xmlsoap.org/soap/http" />
+
+ <operation name="createTicket">
+ <soap:operation
soapAction="http://jbpm.org/examples/ticket#createTicket"
/>
+ <input>
+ <soap:body use="literal"
namespace="http://jbpm.org/examples/ticket" />
+ </input>
+ <output>
+ <soap:body use="literal"
namespace="http://jbpm.org/examples/ticket" />
+ </output>
+ </operation>
+
+ </binding>
+
+ <service name="TicketService">
+ <port name="TicketIssuerPort"
binding="tns:TicketIssuerBinding">
+ <soap:address
location="http://127.0.0.1:8080/Quickstart_bpel_atm/ticketIssuer" />
+ </port>
+ </service>
+
+</definitions>
\ No newline at end of file
Property changes on: trunk/samples/quickstart/atm/bpel/ticket-service.wsdl
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: trunk/samples/quickstart/atm/build.xml
===================================================================
--- trunk/samples/quickstart/atm/build.xml (rev 0)
+++ trunk/samples/quickstart/atm/build.xml 2009-11-05 09:17:48 UTC (rev 227)
@@ -0,0 +1,60 @@
+<project name="Quickstart_bpel_atm" default="deploy"
basedir=".">
+
+ <description>
+ ${ant.project.name}
+ </description>
+
+ <!-- Import the base Ant build script... -->
+ <property file="../../../install/deployment.properties" />
+
+ <property name="version" value="1" />
+
+ <property name="server.dir"
value="${org.jboss.esb.server.home}/server/${org.jboss.esb.server.config}"
/>
+ <property name="conf.dir" value="${server.dir}/conf" />
+ <property name="deploy.dir" value="${server.dir}/deploy" />
+ <property name="server.lib.dir" value="${server.dir}/lib" />
+
+ <property name="sample.jar.name"
value="${ant.project.name}-${version}.jar" />
+ <property name="war.build.dir" location="build/war/classes"
/>
+
+ <path id="compile-classpath">
+ <!-- Required for JMS Client Code. -->
+ <fileset dir="${org.jboss.esb.server.home}/client"
includes="*.jar" />
+ </path>
+ <property name="compile-classpath" refid="compile-classpath"
/>
+
+ <target name="makewar" description="make war">
+ <!-- Compile... -->
+ <mkdir dir="${war.build.dir}" />
+ <javac srcdir="war/src" destdir="${war.build.dir}"
target="1.5" debug="true">
+ <classpath refid="compile-classpath" />
+ </javac>
+ <copy todir="${war.build.dir}">
+ <fileset dir="war/src" includes="**/*.xml" />
+ </copy>
+
+ <!-- War... -->
+ <war warfile="build/${ant.project.name}.war"
webxml="${basedir}/war/resources/WEB-INF/web.xml">
+ <classes dir="${war.build.dir}" />
+ </war>
+ </target>
+
+ <target name="deploywar" depends="makewar">
+ <copy todir="${deploy.dir}" file="build/${ant.project.name}.war"
/>
+ </target>
+
+ <target name="undeploywar">
+ <delete file="${deploy.dir}/${ant.project.name}.war" />
+ </target>
+
+ <target name="deploy" depends="deploywar">
+ <echo>Deploy ${ant.project.name}</echo>
+ <jar basedir="bpel" destfile="${deploy.dir}/${sample.jar.name}"
/>
+ </target>
+
+ <target name="undeploy" depends="undeploywar">
+ <echo>Undeploy ${ant.project.name}</echo>
+ <delete file="${deploy.dir}/${sample.jar.name}" />
+ </target>
+
+</project>
Added: trunk/samples/quickstart/atm/war/resources/WEB-INF/web.xml
===================================================================
--- trunk/samples/quickstart/atm/war/resources/WEB-INF/web.xml
(rev 0)
+++ trunk/samples/quickstart/atm/war/resources/WEB-INF/web.xml 2009-11-05 09:17:48 UTC
(rev 227)
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app version="2.4"
xmlns="http://java.sun.com/xml/ns/j2ee"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
+
+ <servlet>
+ <servlet-name>accountSystemServlet</servlet-name>
+ <servlet-class>
+ org.jboss.soa.bpel.samples.quickstart.account.AccountSystem_Impl
+ </servlet-class>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>accountSystemServlet</servlet-name>
+ <url-pattern>/accountSystem</url-pattern>
+ </servlet-mapping>
+
+ <servlet>
+ <servlet-name>ticketIssuerServlet</servlet-name>
+ <servlet-class>
+ org.jboss.soa.bpel.samples.quickstart.ticket.TicketIssuer_Impl
+ </servlet-class>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>ticketIssuerServlet</servlet-name>
+ <url-pattern>/ticketIssuer</url-pattern>
+ </servlet-mapping>
+
+</web-app>
\ No newline at end of file
Property changes on: trunk/samples/quickstart/atm/war/resources/WEB-INF/web.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
trunk/samples/quickstart/atm/war/src/org/jboss/soa/bpel/samples/quickstart/account/AccountOperation.java
===================================================================
---
trunk/samples/quickstart/atm/war/src/org/jboss/soa/bpel/samples/quickstart/account/AccountOperation.java
(rev 0)
+++
trunk/samples/quickstart/atm/war/src/org/jboss/soa/bpel/samples/quickstart/account/AccountOperation.java 2009-11-05
09:17:48 UTC (rev 227)
@@ -0,0 +1,77 @@
+package org.jboss.soa.bpel.samples.quickstart.account;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+/**
+ * account data transfer type
+ *
+ * <p>
+ * Java class for AccountOperation complex type.
+ *
+ * <p>
+ * The following schema fragment specifies the expected content contained within this
class.
+ *
+ * <pre>
+ * <complexType name="AccountOperation">
+ * <complexContent>
+ * <restriction
base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="customerName"
type="{http://www.w3.org/2001/XMLSchema}string"/>
+ * <element name="amount"
type="{http://www.w3.org/2001/XMLSchema}double"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
+(a)XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "AccountOperation", propOrder = { "customerName",
"amount" })
+public class AccountOperation {
+
+ @XmlElement(required = true)
+ protected String customerName;
+ protected double amount;
+
+ /**
+ * Gets the value of the customerName property.
+ *
+ * @return possible object is {@link String }
+ *
+ */
+ public String getCustomerName() {
+ return customerName;
+ }
+
+ /**
+ * Sets the value of the customerName property.
+ *
+ * @param value
+ * allowed object is {@link String }
+ *
+ */
+ public void setCustomerName(String value) {
+ this.customerName = value;
+ }
+
+ /**
+ * Gets the value of the amount property.
+ *
+ */
+ public double getAmount() {
+ return amount;
+ }
+
+ /**
+ * Sets the value of the amount property.
+ *
+ */
+ public void setAmount(double value) {
+ this.amount = value;
+ }
+
+}
Property changes on:
trunk/samples/quickstart/atm/war/src/org/jboss/soa/bpel/samples/quickstart/account/AccountOperation.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
trunk/samples/quickstart/atm/war/src/org/jboss/soa/bpel/samples/quickstart/account/AccountSystem.java
===================================================================
---
trunk/samples/quickstart/atm/war/src/org/jboss/soa/bpel/samples/quickstart/account/AccountSystem.java
(rev 0)
+++
trunk/samples/quickstart/atm/war/src/org/jboss/soa/bpel/samples/quickstart/account/AccountSystem.java 2009-11-05
09:17:48 UTC (rev 227)
@@ -0,0 +1,40 @@
+package org.jboss.soa.bpel.samples.quickstart.account;
+
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebResult;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+
+/**
+ * published account functions
+ */
+@WebService(name = "AccountSystem", targetNamespace =
"http://jbpm.org/examples/account")
+@SOAPBinding(style = SOAPBinding.Style.RPC)
+public interface AccountSystem {
+
+ /**
+ * tell whether a customer has an active account
+ */
+ @WebMethod(action = "http://jbpm.org/examples/account#verifyAccess")
+ @WebResult(name = "granted", partName = "granted")
+ public boolean checkAccess(
+ @WebParam(name = "customerName", partName = "customerName") String
customerName);
+
+ /**
+ * retrieve the balance of an account
+ */
+ @WebMethod(action = "http://jbpm.org/examples/account#queryBalance")
+ @WebResult(name = "balance", partName = "balance")
+ public double queryBalance(
+ @WebParam(name = "customerName", partName = "customerName") String
customerName);
+
+ /**
+ * increase/decrease the balance of an account
+ */
+ @WebMethod(action = "http://jbpm.org/examples/account#updateBalance")
+ @WebResult(name = "balance", partName = "balance")
+ public double updateBalance(
+ @WebParam(name = "body", partName = "body") AccountOperation
body);
+
+}
Property changes on:
trunk/samples/quickstart/atm/war/src/org/jboss/soa/bpel/samples/quickstart/account/AccountSystem.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
trunk/samples/quickstart/atm/war/src/org/jboss/soa/bpel/samples/quickstart/account/AccountSystem_Impl.java
===================================================================
---
trunk/samples/quickstart/atm/war/src/org/jboss/soa/bpel/samples/quickstart/account/AccountSystem_Impl.java
(rev 0)
+++
trunk/samples/quickstart/atm/war/src/org/jboss/soa/bpel/samples/quickstart/account/AccountSystem_Impl.java 2009-11-05
09:17:48 UTC (rev 227)
@@ -0,0 +1,97 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the JBPM BPEL PUBLIC LICENSE AGREEMENT as
+ * published by JBoss Inc.; either version 1.0 of the License, or
+ * (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ */
+package org.jboss.soa.bpel.samples.quickstart.account;
+
+import java.io.IOException;
+import java.net.URL;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.jws.WebService;
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.NodeList;
+import org.xml.sax.SAXException;
+
+/**
+ * Account system endpoint implementation bean.
+ *
+ * @author Alejandro Guizar
+ * @version $Revision$ $Date: 2006/09/27 03:53:01 $
+ */
+@WebService(endpointInterface =
"org.jboss.soa.bpel.samples.quickstart.account.AccountSystem", targetNamespace =
"http://jbpm.org/examples/account", serviceName = "AccountService",
portName = "AccountSystemPort")
+public class AccountSystem_Impl implements AccountSystem {
+
+ private static Map<String, Double> accounts =
loadAccounts("accounts.xml");
+
+ public boolean checkAccess(String customerName) {
+ return accounts.containsKey(customerName);
+ }
+
+ public double queryBalance(String customerName) {
+ return getBalance(customerName);
+ }
+
+ public double updateBalance(AccountOperation body) {
+ String customerName = body.getCustomerName();
+ double newBalance = getBalance(customerName) + body.getAmount();
+ accounts.put(customerName, new Double(newBalance));
+ return newBalance;
+ }
+
+ private double getBalance(String customerName) {
+ Double balance = (Double) accounts.get(customerName);
+ return balance.doubleValue();
+ }
+
+ private static Map<String, Double> loadAccounts(String resourceName) {
+ try {
+ // parse the accounts document
+ DocumentBuilder domBuilder =
+ DocumentBuilderFactory.newInstance().newDocumentBuilder();
+ URL resource = AccountSystem_Impl.class.getResource(resourceName);
+ if (resource == null) return Collections.emptyMap();
+ Document accountsDocument = domBuilder.parse(resource.toString());
+ // give everyone an initial balance of $50
+ Double initialBalance = new Double(50);
+ // iterate over the accounts
+ Map<String, Double> accounts = new HashMap<String, Double>();
+ Element accountsElem = accountsDocument.getDocumentElement();
+ NodeList accountElems = accountsElem.getElementsByTagName("account");
+ for (int i = 0, n = accountElems.getLength(); i < n; i++) {
+ Element accountElem = (Element) accountElems.item(i);
+ // create account, assign initial balance
+ String customerName = accountElem.getAttribute("holder");
+ accounts.put(customerName, initialBalance);
+ }
+ return accounts;
+ }
+ catch (ParserConfigurationException e) {
+ // default configuration for document builder should work
+ throw new AssertionError(e);
+ }
+ catch (SAXException e) {
+ return Collections.emptyMap();
+ }
+ catch (IOException e) {
+ return Collections.emptyMap();
+ }
+ }
+}
Property changes on:
trunk/samples/quickstart/atm/war/src/org/jboss/soa/bpel/samples/quickstart/account/AccountSystem_Impl.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
trunk/samples/quickstart/atm/war/src/org/jboss/soa/bpel/samples/quickstart/account/accounts.xml
===================================================================
---
trunk/samples/quickstart/atm/war/src/org/jboss/soa/bpel/samples/quickstart/account/accounts.xml
(rev 0)
+++
trunk/samples/quickstart/atm/war/src/org/jboss/soa/bpel/samples/quickstart/account/accounts.xml 2009-11-05
09:17:48 UTC (rev 227)
@@ -0,0 +1,6 @@
+<accounts>
+ <account holder="alex" />
+ <account holder="fady" />
+ <account holder="koen" />
+ <account holder="tom" />
+</accounts>
\ No newline at end of file
Property changes on:
trunk/samples/quickstart/atm/war/src/org/jboss/soa/bpel/samples/quickstart/account/accounts.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
trunk/samples/quickstart/atm/war/src/org/jboss/soa/bpel/samples/quickstart/account/package-info.java
===================================================================
---
trunk/samples/quickstart/atm/war/src/org/jboss/soa/bpel/samples/quickstart/account/package-info.java
(rev 0)
+++
trunk/samples/quickstart/atm/war/src/org/jboss/soa/bpel/samples/quickstart/account/package-info.java 2009-11-05
09:17:48 UTC (rev 227)
@@ -0,0 +1,3 @@
+(a)javax.xml.bind.annotation.XmlSchema(namespace =
"http://jbpm.org/examples/account")
+package org.jboss.soa.bpel.samples.quickstart.account;
+
Property changes on:
trunk/samples/quickstart/atm/war/src/org/jboss/soa/bpel/samples/quickstart/account/package-info.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
trunk/samples/quickstart/atm/war/src/org/jboss/soa/bpel/samples/quickstart/ticket/TicketIssuer.java
===================================================================
---
trunk/samples/quickstart/atm/war/src/org/jboss/soa/bpel/samples/quickstart/ticket/TicketIssuer.java
(rev 0)
+++
trunk/samples/quickstart/atm/war/src/org/jboss/soa/bpel/samples/quickstart/ticket/TicketIssuer.java 2009-11-05
09:17:48 UTC (rev 227)
@@ -0,0 +1,22 @@
+package org.jboss.soa.bpel.samples.quickstart.ticket;
+
+import javax.jws.WebMethod;
+import javax.jws.WebResult;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+
+/**
+ * interface to ticket issuer service
+ */
+@WebService(name = "TicketIssuer", targetNamespace =
"http://jbpm.org/examples/ticket")
+@SOAPBinding(style = SOAPBinding.Style.RPC)
+public interface TicketIssuer {
+
+ /**
+ * generate a ticket number, distinct from previous calls
+ */
+ @WebMethod(action = "http://jbpm.org/examples/ticket#createTicket")
+ @WebResult(name = "ticketNo", partName = "ticketNo")
+ public int createTicket();
+
+}
Property changes on:
trunk/samples/quickstart/atm/war/src/org/jboss/soa/bpel/samples/quickstart/ticket/TicketIssuer.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
trunk/samples/quickstart/atm/war/src/org/jboss/soa/bpel/samples/quickstart/ticket/TicketIssuer_Impl.java
===================================================================
---
trunk/samples/quickstart/atm/war/src/org/jboss/soa/bpel/samples/quickstart/ticket/TicketIssuer_Impl.java
(rev 0)
+++
trunk/samples/quickstart/atm/war/src/org/jboss/soa/bpel/samples/quickstart/ticket/TicketIssuer_Impl.java 2009-11-05
09:17:48 UTC (rev 227)
@@ -0,0 +1,33 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the JBPM BPEL PUBLIC LICENSE AGREEMENT as
+ * published by JBoss Inc.; either version 1.0 of the License, or
+ * (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ */
+package org.jboss.soa.bpel.samples.quickstart.ticket;
+
+import javax.jws.WebService;
+
+/**
+ * @author Alejandro Guizar
+ * @version $Revision$ $Date: 2006/09/27 03:53:07 $
+ */
+@WebService(endpointInterface =
"org.jboss.soa.bpel.samples.quickstart.ticket.TicketIssuer", targetNamespace =
"http://jbpm.org/examples/ticket", serviceName = "TicketService",
portName = "TicketIssuerPort")
+public class TicketIssuer_Impl implements TicketIssuer {
+
+ private static int currentSession = 1;
+
+ public int createTicket() {
+ synchronized (TicketIssuer_Impl.class) {
+ return currentSession++;
+ }
+ }
+}
Property changes on:
trunk/samples/quickstart/atm/war/src/org/jboss/soa/bpel/samples/quickstart/ticket/TicketIssuer_Impl.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF