Author: alex.guizar(a)jboss.com
Date: 2009-11-17 02:10:53 -0500 (Tue, 17 Nov 2009)
New Revision: 267
Added:
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/atm/AtmService.java
trunk/samples/quickstart/purchase/
trunk/samples/quickstart/purchase/bpel/
trunk/samples/quickstart/purchase/bpel/invoice.wsdl
trunk/samples/quickstart/purchase/bpel/purchase.bpel
trunk/samples/quickstart/purchase/bpel/purchase.bpelex
trunk/samples/quickstart/purchase/bpel/purchase.wsdl
trunk/samples/quickstart/purchase/bpel/purchase.xsd
trunk/samples/quickstart/purchase/bpel/scheduling.wsdl
trunk/samples/quickstart/purchase/bpel/shipping.wsdl
trunk/samples/quickstart/purchase/build.xml
trunk/samples/quickstart/purchase/ejb/
trunk/samples/quickstart/purchase/ejb/src/
trunk/samples/quickstart/purchase/ejb/src/org/
trunk/samples/quickstart/purchase/ejb/src/org/jboss/
trunk/samples/quickstart/purchase/ejb/src/org/jboss/soa/
trunk/samples/quickstart/purchase/ejb/src/org/jboss/soa/bpel/
trunk/samples/quickstart/purchase/ejb/src/org/jboss/soa/bpel/samples/
trunk/samples/quickstart/purchase/ejb/src/org/jboss/soa/bpel/samples/quickstart/
trunk/samples/quickstart/purchase/ejb/src/org/jboss/soa/bpel/samples/quickstart/purchase/
trunk/samples/quickstart/purchase/ejb/src/org/jboss/soa/bpel/samples/quickstart/purchase/CustomerInfo.java
trunk/samples/quickstart/purchase/ejb/src/org/jboss/soa/bpel/samples/quickstart/purchase/Invoice.java
trunk/samples/quickstart/purchase/ejb/src/org/jboss/soa/bpel/samples/quickstart/purchase/InvoiceCallbackBean.java
trunk/samples/quickstart/purchase/ejb/src/org/jboss/soa/bpel/samples/quickstart/purchase/InvoiceCallbackPT.java
trunk/samples/quickstart/purchase/ejb/src/org/jboss/soa/bpel/samples/quickstart/purchase/OrderFaultType.java
trunk/samples/quickstart/purchase/ejb/src/org/jboss/soa/bpel/samples/quickstart/purchase/ProblemInfo.java
trunk/samples/quickstart/purchase/ejb/src/org/jboss/soa/bpel/samples/quickstart/purchase/PurchaseOrder.java
trunk/samples/quickstart/purchase/ejb/src/org/jboss/soa/bpel/samples/quickstart/purchase/PurchaseOrderPT.java
trunk/samples/quickstart/purchase/ejb/src/org/jboss/soa/bpel/samples/quickstart/purchase/PurchaseSVC.java
trunk/samples/quickstart/purchase/ejb/src/org/jboss/soa/bpel/samples/quickstart/purchase/ScheduleInfo.java
trunk/samples/quickstart/purchase/ejb/src/org/jboss/soa/bpel/samples/quickstart/purchase/ShippingCallbackBean.java
trunk/samples/quickstart/purchase/ejb/src/org/jboss/soa/bpel/samples/quickstart/purchase/ShippingCallbackPT.java
trunk/samples/quickstart/purchase/ejb/src/org/jboss/soa/bpel/samples/quickstart/purchase/ShippingInfo.java
trunk/samples/quickstart/purchase/ejb/src/org/jboss/soa/bpel/samples/quickstart/purchase/package-info.java
trunk/samples/quickstart/purchase/purchase-queue-service.xml
trunk/samples/quickstart/purchase/war/
trunk/samples/quickstart/purchase/war/resources/
trunk/samples/quickstart/purchase/war/resources/WEB-INF/
trunk/samples/quickstart/purchase/war/resources/WEB-INF/jboss-web.xml
trunk/samples/quickstart/purchase/war/resources/WEB-INF/web.xml
trunk/samples/quickstart/purchase/war/src/
trunk/samples/quickstart/purchase/war/src/org/
trunk/samples/quickstart/purchase/war/src/org/jboss/
trunk/samples/quickstart/purchase/war/src/org/jboss/soa/
trunk/samples/quickstart/purchase/war/src/org/jboss/soa/bpel/
trunk/samples/quickstart/purchase/war/src/org/jboss/soa/bpel/samples/
trunk/samples/quickstart/purchase/war/src/org/jboss/soa/bpel/samples/quickstart/
trunk/samples/quickstart/purchase/war/src/org/jboss/soa/bpel/samples/quickstart/purchase/
trunk/samples/quickstart/purchase/war/src/org/jboss/soa/bpel/samples/quickstart/purchase/ComputePricePT.java
trunk/samples/quickstart/purchase/war/src/org/jboss/soa/bpel/samples/quickstart/purchase/ComputePricePT_Impl.java
trunk/samples/quickstart/purchase/war/src/org/jboss/soa/bpel/samples/quickstart/purchase/CustomerInfo.java
trunk/samples/quickstart/purchase/war/src/org/jboss/soa/bpel/samples/quickstart/purchase/Invoice.java
trunk/samples/quickstart/purchase/war/src/org/jboss/soa/bpel/samples/quickstart/purchase/ObjectFactory.java
trunk/samples/quickstart/purchase/war/src/org/jboss/soa/bpel/samples/quickstart/purchase/OrderFaultType.java
trunk/samples/quickstart/purchase/war/src/org/jboss/soa/bpel/samples/quickstart/purchase/ProblemInfo.java
trunk/samples/quickstart/purchase/war/src/org/jboss/soa/bpel/samples/quickstart/purchase/PurchaseOrder.java
trunk/samples/quickstart/purchase/war/src/org/jboss/soa/bpel/samples/quickstart/purchase/ScheduleInfo.java
trunk/samples/quickstart/purchase/war/src/org/jboss/soa/bpel/samples/quickstart/purchase/SchedulingPT.java
trunk/samples/quickstart/purchase/war/src/org/jboss/soa/bpel/samples/quickstart/purchase/SchedulingPT_Impl.java
trunk/samples/quickstart/purchase/war/src/org/jboss/soa/bpel/samples/quickstart/purchase/ShippingInfo.java
trunk/samples/quickstart/purchase/war/src/org/jboss/soa/bpel/samples/quickstart/purchase/ShippingPT.java
trunk/samples/quickstart/purchase/war/src/org/jboss/soa/bpel/samples/quickstart/purchase/ShippingPT_Impl.java
trunk/samples/quickstart/purchase/war/src/org/jboss/soa/bpel/samples/quickstart/purchase/package-info.java
Removed:
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/atm/AtmFrontEndService.java
Modified:
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/QuickstartBPELAtmTestCase.java
trunk/samples/quickstart/atm/bpel/atm-service.wsdl
trunk/samples/quickstart/atm/build.xml
Log:
RIFTSAW-34: initial commit of the purchase example
Modified:
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 2009-11-16
17:47:05 UTC (rev 266)
+++
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/QuickstartBPELAtmTestCase.java 2009-11-17
07:10:53 UTC (rev 267)
@@ -18,7 +18,7 @@
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.AtmService;
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;
@@ -47,7 +47,7 @@
}
protected void setUp() throws Exception {
- AtmFrontEndService frontEndService = new AtmFrontEndService();
+ AtmService frontEndService = new AtmService();
// obtain dynamic proxy for web service port
frontEnd = frontEndService.getFrontEndPort();
Deleted:
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 2009-11-16
17:47:05 UTC (rev 266)
+++
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/atm/AtmFrontEndService.java 2009-11-17
07:10:53 UTC (rev 267)
@@ -1,59 +0,0 @@
-package org.jboss.soa.bpel.tests.samples.atm;
-
-import java.net.MalformedURLException;
-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.SERVICE_NAME, targetNamespace =
AtmFrontEndService.SERVICE_TARGET_NAMESPACE, wsdlLocation =
AtmFrontEndService.WSDL_LOCATION)
-public class AtmFrontEndService extends Service {
-
- public static final String SERVICE_NAME = "AtmFrontEndService";
- public static final String SERVICE_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_NAME = "FrontEndPort";
-
- private static final URL WSDL_URL = createURL(WSDL_LOCATION);
- private static final QName SERVICE_QNAME =
- new QName(SERVICE_TARGET_NAMESPACE, SERVICE_NAME);
- private static final QName FRONT_END_PORT_QNAME =
- new QName(SERVICE_TARGET_NAMESPACE, FRONT_END_PORT_NAME);
-
- private static URL createURL(String location) {
- try {
- return new URL(location);
- }
- catch (MalformedURLException e) {
- throw new IllegalArgumentException(location, e);
- }
- }
-
- public AtmFrontEndService(URL wsdlLocation, QName serviceName) {
- super(wsdlLocation, serviceName);
- }
-
- public AtmFrontEndService() {
- super(WSDL_URL, SERVICE_QNAME);
- }
-
- @WebEndpoint(name = FRONT_END_PORT_NAME)
- public FrontEnd getFrontEndPort() {
- return getPort(FRONT_END_PORT_QNAME, 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_NAME)
- public FrontEnd getFrontEndPort(WebServiceFeature... features) {
- return getPort(FRONT_END_PORT_QNAME, FrontEnd.class, features);
- }
-
-}
Copied:
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/atm/AtmService.java
(from rev 265,
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/AtmService.java
(rev 0)
+++
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/atm/AtmService.java 2009-11-17
07:10:53 UTC (rev 267)
@@ -0,0 +1,58 @@
+package org.jboss.soa.bpel.tests.samples.atm;
+
+import java.net.MalformedURLException;
+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 = AtmService.SERVICE_NAME, targetNamespace =
AtmService.TARGET_NAMESPACE, wsdlLocation = AtmService.WSDL_LOCATION)
+public class AtmService extends Service {
+
+ public static final String SERVICE_NAME = "AtmService";
+ 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_atm/frontEnd?wsdl";
+ public static final String FRONT_END_PORT_NAME = "FrontEndPort";
+
+ private static final URL WSDL_URL = createURL(WSDL_LOCATION);
+ private static final QName SERVICE_QNAME =
+ new QName(TARGET_NAMESPACE, SERVICE_NAME);
+ private static final QName FRONT_END_PORT_QNAME =
+ new QName(TARGET_NAMESPACE, FRONT_END_PORT_NAME);
+
+ private static URL createURL(String location) {
+ try {
+ return new URL(location);
+ }
+ catch (MalformedURLException e) {
+ throw new IllegalArgumentException(location, e);
+ }
+ }
+
+ public AtmService(URL wsdlLocation, QName serviceName) {
+ super(wsdlLocation, serviceName);
+ }
+
+ public AtmService() {
+ super(WSDL_URL, SERVICE_QNAME);
+ }
+
+ @WebEndpoint(name = FRONT_END_PORT_NAME)
+ public FrontEnd getFrontEndPort() {
+ return getPort(FRONT_END_PORT_QNAME, 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_NAME)
+ public FrontEnd getFrontEndPort(WebServiceFeature... features) {
+ return getPort(FRONT_END_PORT_QNAME, FrontEnd.class, features);
+ }
+
+}
Property changes on:
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/atm/AtmService.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: trunk/samples/quickstart/atm/bpel/atm-service.wsdl
===================================================================
--- trunk/samples/quickstart/atm/bpel/atm-service.wsdl 2009-11-16 17:47:05 UTC (rev 266)
+++ trunk/samples/quickstart/atm/bpel/atm-service.wsdl 2009-11-17 07:10:53 UTC (rev 267)
@@ -129,9 +129,9 @@
</operation>
</binding>
- <service name="AtmFrontEndService">
+ <service name="AtmService">
<port name="FrontEndPort" binding="tns:FrontEndBinding">
- <soap:address
location="http://127.0.0.1:8080/Quickstart_bpel_atmFrontEnd" />
+ <soap:address
location="http://127.0.0.1:8080/Quickstart_bpel_atm/frontEnd" />
</port>
</service>
Modified: trunk/samples/quickstart/atm/build.xml
===================================================================
--- trunk/samples/quickstart/atm/build.xml 2009-11-16 17:47:05 UTC (rev 266)
+++ trunk/samples/quickstart/atm/build.xml 2009-11-17 07:10:53 UTC (rev 267)
@@ -18,10 +18,8 @@
<property name="war.build.dir" location="build/war/classes"
/>
<path id="compile-classpath">
- <!-- Required for JMS Client Code. -->
<fileset dir="${org.jboss.as.home}/client" includes="*.jar"
/>
</path>
- <property name="compile-classpath" refid="compile-classpath"
/>
<target name="makewar" description="make war">
<!-- Compile... -->
Added: trunk/samples/quickstart/purchase/bpel/invoice.wsdl
===================================================================
--- trunk/samples/quickstart/purchase/bpel/invoice.wsdl (rev 0)
+++ trunk/samples/quickstart/purchase/bpel/invoice.wsdl 2009-11-17 07:10:53 UTC (rev 267)
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<definitions
targetNamespace="http://manufacturing.org/wsdl/purchase"
+
xmlns:tns="http://manufacturing.org/wsdl/purchase"
+
xmlns:pos="http://manufacturing.org/wsdl/purchase"
+
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+
xmlns="http://schemas.xmlsoap.org/wsdl/">
+
+ <import
namespace="http://manufacturing.org/wsdl/purchase"
+ location="purchase.wsdl" />
+
+ <binding name="computePriceSB" type="pos:computePricePT">
+ <soap:binding style="rpc"
transport="http://schemas.xmlsoap.org/soap/http" />
+ <operation name="initiatePriceCalculation">
+ <soap:operation
soapAction="http://manufacturing.org/wsdl/purchase"
/>
+ <input>
+ <soap:body use="literal"
+
namespace="http://manufacturing.org/wsdl/purchase" />
+ </input>
+ <output>
+ <soap:body use="literal"
+
namespace="http://manufacturing.org/wsdl/purchase" />
+ </output>
+ </operation>
+ <operation name="sendShippingPrice">
+ <soap:operation
soapAction="http://manufacturing.org/wsdl/purchase"
/>
+ <input>
+ <soap:body use="literal"
+
namespace="http://manufacturing.org/wsdl/purchase" />
+ </input>
+ <output>
+ <soap:body use="literal"
+
namespace="http://manufacturing.org/wsdl/purchase" />
+ </output>
+ </operation>
+ </binding>
+
+ <service name="invoiceSVC">
+ <port name="computePriceSP" binding="tns:computePriceSB">
+ <soap:address
location="http://127.0.0.1:8080/Quickstart_bpel_purchase/invoiceService" />
+ </port>
+ </service>
+
+</definitions>
\ No newline at end of file
Property changes on: trunk/samples/quickstart/purchase/bpel/invoice.wsdl
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: trunk/samples/quickstart/purchase/bpel/purchase.bpel
===================================================================
--- trunk/samples/quickstart/purchase/bpel/purchase.bpel (rev 0)
+++ trunk/samples/quickstart/purchase/bpel/purchase.bpel 2009-11-17 07:10:53 UTC (rev
267)
@@ -0,0 +1,109 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<bpws:process exitOnStandardFault="yes" name="PurchaseOrder"
+
targetNamespace="http://acme.com/ws-bp/purchase"
xmlns:bpws="http://docs.oasis-open.org/wsbpel/2.0/process/executable...
+
xmlns:lns="http://manufacturing.org/wsdl/purchase">
+ <bpws:documentation>WS-BPEL process for handling a purchase order.
+ </bpws:documentation>
+
+ <bpws:import
importType="http://schemas.xmlsoap.org/wsdl/"
+ location="purchase.wsdl"
namespace="http://manufacturing.org/wsdl/purchase" />
+
+ <bpws:partnerLinks>
+ <bpws:partnerLink myRole="purchaseService" name="purchasing"
+ partnerLinkType="lns:purchasingLT" />
+ <bpws:partnerLink myRole="invoiceRequester" name="invoicing"
+ partnerLinkType="lns:invoicingLT" partnerRole="invoiceService"
/>
+ <bpws:partnerLink myRole="shippingRequester" name="shipping"
+ partnerLinkType="lns:shippingLT" partnerRole="shippingService"
/>
+ <bpws:partnerLink name="scheduling"
partnerLinkType="lns:schedulingLT"
+ partnerRole="schedulingService" />
+ </bpws:partnerLinks>
+
+ <bpws:variables>
+ <bpws:variable messageType="lns:POMessage" name="PO" />
+ <bpws:variable messageType="lns:InvMessage" name="Invoice"
/>
+ <bpws:variable messageType="lns:orderFaultType" name="POFault"
/>
+ <bpws:variable messageType="lns:shippingRequestMessage"
name="shippingRequest" />
+ <bpws:variable messageType="lns:shippingInfoMessage"
name="shippingInfo" />
+ <bpws:variable messageType="lns:scheduleMessage"
name="shippingSchedule" />
+ </bpws:variables>
+
+ <bpws:faultHandlers>
+ <bpws:catch faultMessageType="lns:orderFaultType"
faultName="lns:cannotCompleteOrder"
+ faultVariable="POFault">
+ <bpws:reply faultName="cannotCompleteOrder"
name="NotifyPurchaseFault"
+ operation="sendPurchaseOrder" partnerLink="purchasing"
portType="lns:purchaseOrderPT"
+ variable="POFault" />
+ </bpws:catch>
+ </bpws:faultHandlers>
+
+ <bpws:sequence name="Main">
+ <bpws:receive createInstance="yes" name="ReceivePurchaseOrder"
+ operation="sendPurchaseOrder" partnerLink="purchasing"
portType="lns:purchaseOrderPT"
+ variable="PO" />
+
+ <bpws:flow>
+ <bpws:documentation>A parallel flow to handle shipping, invoicing and
+ scheduling</bpws:documentation>
+
+ <bpws:links>
+ <bpws:link name="ship-to-invoice" />
+ <bpws:link name="ship-to-scheduling" />
+ </bpws:links>
+
+ <bpws:sequence name="Invoicing">
+ <bpws:invoke inputVariable="PO"
name="InitiatePriceCalculation"
+ operation="initiatePriceCalculation" partnerLink="invoicing"
portType="lns:computePricePT" />
+
+ <bpws:invoke inputVariable="shippingInfo"
name="SendShippingPrice"
+ operation="sendShippingPrice" partnerLink="invoicing"
portType="lns:computePricePT">
+ <bpws:targets>
+ <bpws:target linkName="ship-to-invoice" />
+ </bpws:targets>
+ </bpws:invoke>
+
+ <bpws:receive name="ReceiveInvoice" operation="sendInvoice"
+ partnerLink="invoicing" portType="lns:invoiceCallbackPT"
variable="Invoice" />
+ </bpws:sequence>
+
+ <bpws:sequence name="Shipping">
+ <bpws:assign name="PrepareShipping" validate="no">
+ <bpws:copy>
+ <bpws:from part="customerInfo" variable="PO" />
+ <bpws:to part="customerInfo" variable="shippingRequest"
/>
+ </bpws:copy>
+ </bpws:assign>
+
+ <bpws:invoke inputVariable="shippingRequest"
name="RequestShipping"
+ operation="requestShipping" outputVariable="shippingInfo"
partnerLink="shipping"
+ portType="lns:shippingPT">
+ <bpws:sources>
+ <bpws:source linkName="ship-to-invoice" />
+ </bpws:sources>
+ </bpws:invoke>
+
+ <bpws:receive name="ReceiveSchedule" operation="sendSchedule"
+ partnerLink="shipping" portType="lns:shippingCallbackPT"
variable="shippingSchedule">
+ <bpws:sources>
+ <bpws:source linkName="ship-to-scheduling" />
+ </bpws:sources>
+ </bpws:receive>
+ </bpws:sequence>
+
+ <bpws:sequence name="Scheduling">
+ <bpws:invoke inputVariable="PO" name="RequestScheduling"
+ operation="requestProductionScheduling" partnerLink="scheduling"
portType="lns:schedulingPT" />
+
+ <bpws:invoke inputVariable="shippingSchedule"
name="SendShippingSchedule"
+ operation="sendShippingSchedule" partnerLink="scheduling"
portType="lns:schedulingPT">
+ <bpws:targets>
+ <bpws:target linkName="ship-to-scheduling" />
+ </bpws:targets>
+ </bpws:invoke>
+ </bpws:sequence>
+ </bpws:flow>
+
+ <bpws:reply name="SendPurchaseOrder"
operation="sendPurchaseOrder"
+ partnerLink="purchasing" portType="lns:purchaseOrderPT"
variable="Invoice" />
+ </bpws:sequence>
+</bpws:process>
Added: trunk/samples/quickstart/purchase/bpel/purchase.bpelex
===================================================================
--- trunk/samples/quickstart/purchase/bpel/purchase.bpelex (rev
0)
+++ trunk/samples/quickstart/purchase/bpel/purchase.bpelex 2009-11-17 07:10:53 UTC (rev
267)
@@ -0,0 +1,111 @@
+<?xml version="1.0" encoding="ASCII"?>
+<extensionmodel:ExtensionMap xmi:version="2.0"
xmlns:xmi="http://www.omg.org/XMI"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:extensionmodel="http:///extensionmodel.ecore"
xmlns:org.eclipse.bpel.ui.uiextensionmodel="http:///org/eclipse/bpel/ui/uiextensionmodel.ecore"
namespace="http://org.eclipse.bpel.ui/">
+ <extensions>
+ <extendedObject href="purchase.bpel#//@variables/(a)children.0"/>
+ <extensionObject
xsi:type="org.eclipse.bpel.ui.uiextensionmodel:VariableExtension"/>
+ </extensions>
+ <extensions>
+ <extendedObject href="purchase.bpel#//@variables/(a)children.1"/>
+ <extensionObject
xsi:type="org.eclipse.bpel.ui.uiextensionmodel:VariableExtension"/>
+ </extensions>
+ <extensions>
+ <extendedObject href="purchase.bpel#//@variables/(a)children.2"/>
+ <extensionObject
xsi:type="org.eclipse.bpel.ui.uiextensionmodel:VariableExtension"/>
+ </extensions>
+ <extensions>
+ <extendedObject href="purchase.bpel#//@variables/(a)children.3"/>
+ <extensionObject
xsi:type="org.eclipse.bpel.ui.uiextensionmodel:VariableExtension"/>
+ </extensions>
+ <extensions>
+ <extendedObject href="purchase.bpel#//@variables/(a)children.4"/>
+ <extensionObject
xsi:type="org.eclipse.bpel.ui.uiextensionmodel:VariableExtension"/>
+ </extensions>
+ <extensions>
+ <extendedObject href="purchase.bpel#//@variables/(a)children.5"/>
+ <extensionObject
xsi:type="org.eclipse.bpel.ui.uiextensionmodel:VariableExtension"/>
+ </extensions>
+ <extensions>
+ <extendedObject href="purchase.bpel#//@activity"/>
+ <extensionObject
xsi:type="org.eclipse.bpel.ui.uiextensionmodel:ActivityExtension"/>
+ </extensions>
+ <extensions>
+ <extendedObject href="purchase.bpel#//@activity/(a)activities.0"/>
+ <extensionObject
xsi:type="org.eclipse.bpel.ui.uiextensionmodel:ActivityExtension"/>
+ </extensions>
+ <extensions>
+ <extendedObject href="purchase.bpel#//@activity/(a)activities.1"/>
+ <extensionObject
xsi:type="org.eclipse.bpel.ui.uiextensionmodel:ActivityExtension"/>
+ </extensions>
+ <extensions>
+ <extendedObject
href="purchase.bpel#//@activity/@activities.1/(a)activities.0"/>
+ <extensionObject
xsi:type="org.eclipse.bpel.ui.uiextensionmodel:ActivityExtension"
x="8" y="8"/>
+ </extensions>
+ <extensions>
+ <extendedObject
href="purchase.bpel#//@activity/@activities.1/@activities.0/(a)activities.0"/>
+ <extensionObject
xsi:type="org.eclipse.bpel.ui.uiextensionmodel:ActivityExtension"/>
+ </extensions>
+ <extensions>
+ <extendedObject
href="purchase.bpel#//@activity/@activities.1/@activities.0/(a)activities.1"/>
+ <extensionObject
xsi:type="org.eclipse.bpel.ui.uiextensionmodel:ActivityExtension"/>
+ </extensions>
+ <extensions>
+ <extendedObject
href="purchase.bpel#//@activity/@activities.1/@activities.0/(a)activities.2"/>
+ <extensionObject
xsi:type="org.eclipse.bpel.ui.uiextensionmodel:ActivityExtension"/>
+ </extensions>
+ <extensions>
+ <extendedObject
href="purchase.bpel#//@activity/@activities.1/(a)activities.1"/>
+ <extensionObject
xsi:type="org.eclipse.bpel.ui.uiextensionmodel:ActivityExtension"
x="280" y="8"/>
+ </extensions>
+ <extensions>
+ <extendedObject
href="purchase.bpel#//@activity/@activities.1/@activities.1/(a)activities.0"/>
+ <extensionObject
xsi:type="org.eclipse.bpel.ui.uiextensionmodel:ActivityExtension"/>
+ </extensions>
+ <extensions>
+ <extendedObject
href="purchase.bpel#//@activity/@activities.1/@activities.1/@activities.0/(a)copy.0"/>
+ <extensionObject
xsi:type="org.eclipse.bpel.ui.uiextensionmodel:CopyExtension"/>
+ </extensions>
+ <extensions>
+ <extendedObject
href="purchase.bpel#//@activity/@activities.1/@activities.1/(a)activities.1"/>
+ <extensionObject
xsi:type="org.eclipse.bpel.ui.uiextensionmodel:ActivityExtension"/>
+ </extensions>
+ <extensions>
+ <extendedObject
href="purchase.bpel#//@activity/@activities.1/@activities.1/(a)activities.2"/>
+ <extensionObject
xsi:type="org.eclipse.bpel.ui.uiextensionmodel:ActivityExtension"/>
+ </extensions>
+ <extensions>
+ <extendedObject
href="purchase.bpel#//@activity/@activities.1/(a)activities.2"/>
+ <extensionObject
xsi:type="org.eclipse.bpel.ui.uiextensionmodel:ActivityExtension"
x="515" y="8"/>
+ </extensions>
+ <extensions>
+ <extendedObject
href="purchase.bpel#//@activity/@activities.1/@activities.2/(a)activities.0"/>
+ <extensionObject
xsi:type="org.eclipse.bpel.ui.uiextensionmodel:ActivityExtension"/>
+ </extensions>
+ <extensions>
+ <extendedObject
href="purchase.bpel#//@activity/@activities.1/@activities.2/(a)activities.1"/>
+ <extensionObject
xsi:type="org.eclipse.bpel.ui.uiextensionmodel:ActivityExtension"/>
+ </extensions>
+ <extensions>
+ <extendedObject
href="purchase.bpel#//@activity/@activities.1/@links/(a)children.0"/>
+ <extensionObject
xsi:type="org.eclipse.bpel.ui.uiextensionmodel:LinkExtension"/>
+ </extensions>
+ <extensions>
+ <extendedObject
href="purchase.bpel#//@activity/@activities.1/@links/(a)children.1"/>
+ <extensionObject
xsi:type="org.eclipse.bpel.ui.uiextensionmodel:LinkExtension"/>
+ </extensions>
+ <extensions>
+ <extendedObject href="purchase.bpel#//@activity/(a)activities.2"/>
+ <extensionObject
xsi:type="org.eclipse.bpel.ui.uiextensionmodel:ActivityExtension"/>
+ </extensions>
+ <extensions>
+ <extendedObject
href="purchase.bpel#//@faultHandlers/@catch.0/(a)faultVariable"/>
+ <extensionObject
xsi:type="org.eclipse.bpel.ui.uiextensionmodel:VariableExtension"/>
+ </extensions>
+ <extensions>
+ <extendedObject
href="purchase.bpel#//@faultHandlers/@catch.0/(a)activity"/>
+ <extensionObject
xsi:type="org.eclipse.bpel.ui.uiextensionmodel:ActivityExtension"/>
+ </extensions>
+ <extensions>
+ <extendedObject href="purchase.bpel#/"/>
+ <extensionObject
xsi:type="org.eclipse.bpel.ui.uiextensionmodel:ProcessExtension"
modificationStamp="1258410536000"/>
+ </extensions>
+</extensionmodel:ExtensionMap>
Added: trunk/samples/quickstart/purchase/bpel/purchase.wsdl
===================================================================
--- trunk/samples/quickstart/purchase/bpel/purchase.wsdl (rev 0)
+++ trunk/samples/quickstart/purchase/bpel/purchase.wsdl 2009-11-17 07:10:53 UTC (rev
267)
@@ -0,0 +1,160 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<definitions
targetNamespace="http://manufacturing.org/wsdl/purchase"
+
xmlns:pos="http://manufacturing.org/wsdl/purchase"
xmlns:sns="http://manufacturing.org/xsd/purchase"
+
xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
+
+ <types>
+ <xsd:schema>
+ <xsd:import
namespace="http://manufacturing.org/xsd/purchase"
+ schemaLocation="purchase.xsd" />
+ </xsd:schema>
+ </types>
+
+ <message name="POMessage">
+ <part name="customerInfo" type="sns:customerInfo" />
+ <part name="purchaseOrder" type="sns:purchaseOrder" />
+ </message>
+
+ <message name="InvMessage">
+ <part name="IVC" type="sns:Invoice" />
+ </message>
+
+ <message name="orderFaultType">
+ <part name="problemInfo" element="sns:problemInfo" />
+ </message>
+
+ <message name="shippingRequestMessage">
+ <part name="customerInfo" type="sns:customerInfo" />
+ </message>
+
+ <message name="shippingInfoMessage">
+ <part name="shippingInfo" type="sns:shippingInfo" />
+ </message>
+
+ <message name="scheduleMessage">
+ <part name="schedule" type="sns:scheduleInfo" />
+ </message>
+
+ <!-- portTypes supported by the purchase order process -->
+
+ <portType name="purchaseOrderPT">
+ <operation name="sendPurchaseOrder">
+ <input message="pos:POMessage" />
+ <output message="pos:InvMessage" />
+ <fault name="cannotCompleteOrder" message="pos:orderFaultType"
/>
+ </operation>
+ </portType>
+
+ <portType name="invoiceCallbackPT">
+ <operation name="sendInvoice">
+ <input message="pos:InvMessage" />
+ </operation>
+ </portType>
+
+ <portType name="shippingCallbackPT">
+ <operation name="sendSchedule">
+ <input message="pos:scheduleMessage" />
+ </operation>
+ </portType>
+
+ <!-- portType supported by the invoice services -->
+
+ <portType name="computePricePT">
+ <operation name="initiatePriceCalculation">
+ <input message="pos:POMessage" />
+ </operation>
+ <operation name="sendShippingPrice">
+ <input message="pos:shippingInfoMessage" />
+ </operation>
+ </portType>
+
+ <!-- portType supported by the shipping service -->
+
+ <portType name="shippingPT">
+ <operation name="requestShipping">
+ <input message="pos:shippingRequestMessage" />
+ <output message="pos:shippingInfoMessage" />
+ <fault name="cannotCompleteOrder" message="pos:orderFaultType"
/>
+ </operation>
+ </portType>
+
+ <!-- portType supported by the production scheduling process -->
+
+ <portType name="schedulingPT">
+ <operation name="requestProductionScheduling">
+ <input message="pos:POMessage" />
+ </operation>
+ <operation name="sendShippingSchedule">
+ <input message="pos:scheduleMessage" />
+ </operation>
+ </portType>
+
+ <plnk:partnerLinkType name="purchasingLT">
+ <plnk:role name="purchaseService" portType="pos:purchaseOrderPT"
/>
+ </plnk:partnerLinkType>
+
+ <plnk:partnerLinkType name="invoicingLT">
+ <plnk:role name="invoiceService" portType="pos:computePricePT"
/>
+ <plnk:role name="invoiceRequester"
portType="pos:invoiceCallbackPT" />
+ </plnk:partnerLinkType>
+
+ <plnk:partnerLinkType name="shippingLT">
+ <plnk:role name="shippingService" portType="pos:shippingPT"
/>
+ <plnk:role name="shippingRequester"
portType="pos:shippingCallbackPT" />
+ </plnk:partnerLinkType>
+
+ <plnk:partnerLinkType name="schedulingLT">
+ <plnk:role name="schedulingService" portType="pos:schedulingPT"
/>
+ </plnk:partnerLinkType>
+
+ <binding name="purchaseOrderSB" type="pos:purchaseOrderPT">
+ <soap:binding style="rpc"
transport="http://schemas.xmlsoap.org/soap/http" />
+ <operation name="sendPurchaseOrder">
+ <soap:operation
soapAction="http://manufacturing.org/wsdl/purchase/sendPurchaseOrder... />
+ <input>
+ <soap:body use="literal"
namespace="http://manufacturing.org/wsdl/purchase" />
+ </input>
+ <output>
+ <soap:body use="literal"
namespace="http://manufacturing.org/wsdl/purchase" />
+ </output>
+ <fault name="cannotCompleteOrder">
+ <soap:fault use="literal" name="cannotCompleteOrder" />
+ </fault>
+ </operation>
+ </binding>
+
+ <binding name="invoiceCallbackSB"
type="pos:invoiceCallbackPT">
+ <soap:binding style="rpc"
transport="http://schemas.xmlsoap.org/soap/http" />
+ <operation name="sendInvoice">
+ <soap:operation
soapAction="http://manufacturing.org/wsdl/purchase/sendInvoice" />
+ <input>
+ <soap:body use="literal"
namespace="http://manufacturing.org/wsdl/purchase" />
+ </input>
+ </operation>
+ </binding>
+
+ <binding name="shippingCallbackSB"
type="pos:shippingCallbackPT">
+ <soap:binding style="rpc"
transport="http://schemas.xmlsoap.org/soap/http" />
+ <operation name="sendSchedule">
+ <soap:operation
soapAction="http://manufacturing.org/wsdl/purchase/sendSchedule" />
+ <input>
+ <soap:body use="literal"
namespace="http://manufacturing.org/wsdl/purchase" />
+ </input>
+ </operation>
+ </binding>
+
+ <service name="purchaseSVC">
+ <port name="purchaseOrderSP" binding="pos:purchaseOrderSB">
+ <soap:address
location="http://127.0.0.1:8080/Quickstart_bpel_purchase/purchaseOrder" />
+ </port>
+ <port name="invoiceCallbackSP"
binding="pos:invoiceCallbackSB">
+ <soap:address
+ location="http://127.0.0.1:8080/Quickstart_bpel_purchase/invoiceCallback"
/>
+ </port>
+ <port name="shippingCallbackSP"
binding="pos:shippingCallbackSB">
+ <soap:address
+ location="http://127.0.0.1:8080/Quickstart_bpel_purchase/shippingCallback"
/>
+ </port>
+ </service>
+</definitions>
\ No newline at end of file
Property changes on: trunk/samples/quickstart/purchase/bpel/purchase.wsdl
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: trunk/samples/quickstart/purchase/bpel/purchase.xsd
===================================================================
--- trunk/samples/quickstart/purchase/bpel/purchase.xsd (rev 0)
+++ trunk/samples/quickstart/purchase/bpel/purchase.xsd 2009-11-17 07:10:53 UTC (rev 267)
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsd:schema
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+
targetNamespace="http://manufacturing.org/xsd/purchase"
+
xmlns:tns="http://manufacturing.org/xsd/purchase">
+
+ <xsd:complexType name="customerInfo">
+ <xsd:sequence>
+ <xsd:element name="customerId" type="xsd:string" />
+ <xsd:element name="address" type="xsd:string" />
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:complexType name="shippingInfo">
+ <xsd:sequence>
+ <xsd:element name="shippingPrice" type="xsd:float" />
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:complexType name="scheduleInfo">
+ <xsd:sequence>
+ <xsd:element name="shipDate" type="xsd:date" />
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:complexType name="purchaseOrder">
+ <xsd:sequence>
+ <xsd:element name="orderId" type="xsd:int" />
+ <xsd:element name="partNumber" type="xsd:int" />
+ <xsd:element name="quantity" type="xsd:int" />
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:complexType name="Invoice">
+ <xsd:sequence>
+ <xsd:element name="amount" type="xsd:float" />
+ <xsd:element name="orderId" type="xsd:int" />
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:complexType name="ProblemInfo">
+ <xsd:sequence>
+ <xsd:element name="detail" type="xsd:string" />
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:element name="problemInfo" type="tns:ProblemInfo" />
+
+</xsd:schema>
\ No newline at end of file
Property changes on: trunk/samples/quickstart/purchase/bpel/purchase.xsd
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: trunk/samples/quickstart/purchase/bpel/scheduling.wsdl
===================================================================
--- trunk/samples/quickstart/purchase/bpel/scheduling.wsdl (rev
0)
+++ trunk/samples/quickstart/purchase/bpel/scheduling.wsdl 2009-11-17 07:10:53 UTC (rev
267)
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<definitions
targetNamespace="http://manufacturing.org/wsdl/purchase"
+
xmlns:tns="http://manufacturing.org/wsdl/purchase"
+
xmlns:pos="http://manufacturing.org/wsdl/purchase"
+
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+
xmlns="http://schemas.xmlsoap.org/wsdl/">
+
+ <import
namespace="http://manufacturing.org/wsdl/purchase"
+ location="purchase.wsdl" />
+
+ <binding name="schedulingSB" type="pos:schedulingPT">
+ <soap:binding style="rpc"
transport="http://schemas.xmlsoap.org/soap/http" />
+ <operation name="requestProductionScheduling">
+ <soap:operation
soapAction="http://manufacturing.org/wsdl/purchase"
/>
+ <input>
+ <soap:body use="literal"
+
namespace="http://manufacturing.org/wsdl/purchase" />
+ </input>
+ <output>
+ <soap:body use="literal"
+
namespace="http://manufacturing.org/wsdl/purchase" />
+ </output>
+ </operation>
+ <operation name="sendShippingSchedule">
+ <soap:operation
soapAction="http://manufacturing.org/wsdl/purchase"
/>
+ <input>
+ <soap:body use="literal"
+
namespace="http://manufacturing.org/wsdl/purchase" />
+ </input>
+ <output>
+ <soap:body use="literal"
+
namespace="http://manufacturing.org/wsdl/purchase" />
+ </output>
+ </operation>
+ </binding>
+
+ <service name="schedulingSVC">
+ <port name="schedulingSP" binding="tns:schedulingSB">
+ <soap:address
location="http://127.0.0.1:8080/Quickstart_bpel_purchase/schedulingProcess"
/>
+ </port>
+ </service>
+
+</definitions>
\ No newline at end of file
Property changes on: trunk/samples/quickstart/purchase/bpel/scheduling.wsdl
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: trunk/samples/quickstart/purchase/bpel/shipping.wsdl
===================================================================
--- trunk/samples/quickstart/purchase/bpel/shipping.wsdl (rev 0)
+++ trunk/samples/quickstart/purchase/bpel/shipping.wsdl 2009-11-17 07:10:53 UTC (rev
267)
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<definitions
targetNamespace="http://manufacturing.org/wsdl/purchase"
+
xmlns:tns="http://manufacturing.org/wsdl/purchase"
+
xmlns:pos="http://manufacturing.org/wsdl/purchase"
+
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+
xmlns="http://schemas.xmlsoap.org/wsdl/">
+
+ <import
namespace="http://manufacturing.org/wsdl/purchase"
+ location="purchase.wsdl" />
+
+ <binding name="shippingSB" type="tns:shippingPT">
+ <soap:binding style="rpc"
transport="http://schemas.xmlsoap.org/soap/http" />
+ <operation name="requestShipping">
+ <soap:operation
soapAction="http://manufacturing.org/wsdl/purchase"
/>
+ <input>
+ <soap:body use="literal"
+
namespace="http://manufacturing.org/wsdl/purchase" />
+ </input>
+ <output>
+ <soap:body use="literal"
+
namespace="http://manufacturing.org/wsdl/purchase" />
+ </output>
+ <fault name="cannotCompleteOrder">
+ <soap:fault name="cannotCompleteOrder" use="literal"
/>
+ </fault>
+ </operation>
+ </binding>
+
+ <service name="shippingSVC">
+ <port name="shippingSP" binding="tns:shippingSB">
+ <soap:address
location="http://127.0.0.1:8080/Quickstart_bpel_purchase/shippingService" />
+ </port>
+ </service>
+
+</definitions>
\ No newline at end of file
Property changes on: trunk/samples/quickstart/purchase/bpel/shipping.wsdl
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: trunk/samples/quickstart/purchase/build.xml
===================================================================
--- trunk/samples/quickstart/purchase/build.xml (rev 0)
+++ trunk/samples/quickstart/purchase/build.xml 2009-11-17 07:10:53 UTC (rev 267)
@@ -0,0 +1,89 @@
+<project name="quickstart_bpel_purchase" 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.as.home}/server/${org.jboss.as.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"
/>
+ <property name="ejb.build.dir" location="build/ejb/classes"
/>
+
+ <path id="compile-classpath">
+ <fileset dir="${org.jboss.as.home}/client" includes="*.jar"
/>
+ </path>
+
+ <target name="deployq">
+ <copy todir="${deploy.dir}" file="purchase-queue-service.xml"
/>
+ </target>
+
+ <target name="undeployq">
+ <delete file="${deploy.dir}/purchase-queue-service.xml" />
+ </target>
+
+ <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}" />
+ <webinf dir="${basedir}/war/resources/WEB-INF"
includes="jboss-web.xml" />
+ </war>
+ </target>
+
+ <target name="deploywar" depends="makewar,deployq">
+ <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="makeejb">
+ <!-- Compile -->
+ <mkdir dir="${ejb.build.dir}" />
+ <javac srcdir="ejb/src" destdir="${ejb.build.dir}"
target="1.5" debug="true">
+ <classpath refid="compile-classpath" />
+ </javac>
+
+ <!-- Jar -->
+ <jar destfile="build/${ant.project.name}.jar">
+ <fileset dir="${ejb.build.dir}" />
+ </jar>
+ </target>
+
+ <target name="deployejb" depends="makeejb,deployq">
+ <copy todir="${deploy.dir}" file="build/${ant.project.name}.jar"
/>
+ </target>
+
+ <target name="undeployejb">
+ <delete file="${deploy.dir}/${ant.project.name}.jar" />
+ </target>
+
+ <target name="deploy" depends="deploywar,deployejb">
+ <echo>Deploy ${ant.project.name}</echo>
+ <jar basedir="bpel" destfile="${deploy.dir}/${sample.jar.name}"
/>
+ </target>
+
+ <target name="undeploy"
depends="undeploywar,undeployejb,undeployq">
+ <echo>Undeploy ${ant.project.name}</echo>
+ <delete file="${deploy.dir}/${sample.jar.name}" />
+ </target>
+
+</project>
Property changes on: trunk/samples/quickstart/purchase/build.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Property changes on: trunk/samples/quickstart/purchase/ejb
___________________________________________________________________
Name: svn:ignore
+ .project
.classpath
target
Added:
trunk/samples/quickstart/purchase/ejb/src/org/jboss/soa/bpel/samples/quickstart/purchase/CustomerInfo.java
===================================================================
---
trunk/samples/quickstart/purchase/ejb/src/org/jboss/soa/bpel/samples/quickstart/purchase/CustomerInfo.java
(rev 0)
+++
trunk/samples/quickstart/purchase/ejb/src/org/jboss/soa/bpel/samples/quickstart/purchase/CustomerInfo.java 2009-11-17
07:10:53 UTC (rev 267)
@@ -0,0 +1,73 @@
+package org.jboss.soa.bpel.samples.quickstart.purchase;
+
+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 customerInfo complex type.
+ * <p>
+ * The following schema fragment specifies the expected content contained within
+ * this class.
+ *
+ * <pre>
+ * <complexType name="customerInfo">
+ * <complexContent>
+ * <restriction
base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="customerId"
type="{http://www.w3.org/2001/XMLSchema}string"/>
+ * <element name="address"
type="{http://www.w3.org/2001/XMLSchema}string"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ */
+(a)XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "customerInfo", propOrder = { "customerId",
"address" })
+public class CustomerInfo {
+
+ @XmlElement(required = true)
+ protected String customerId;
+ @XmlElement(required = true)
+ protected String address;
+
+ /**
+ * Gets the value of the customerId property.
+ *
+ * @return possible object is {@link String }
+ */
+ public String getCustomerId() {
+ return customerId;
+ }
+
+ /**
+ * Sets the value of the customerId property.
+ *
+ * @param value allowed object is {@link String }
+ */
+ public void setCustomerId(String value) {
+ this.customerId = value;
+ }
+
+ /**
+ * Gets the value of the address property.
+ *
+ * @return possible object is {@link String }
+ */
+ public String getAddress() {
+ return address;
+ }
+
+ /**
+ * Sets the value of the address property.
+ *
+ * @param value allowed object is {@link String }
+ */
+ public void setAddress(String value) {
+ this.address = value;
+ }
+
+}
Property changes on:
trunk/samples/quickstart/purchase/ejb/src/org/jboss/soa/bpel/samples/quickstart/purchase/CustomerInfo.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
trunk/samples/quickstart/purchase/ejb/src/org/jboss/soa/bpel/samples/quickstart/purchase/Invoice.java
===================================================================
---
trunk/samples/quickstart/purchase/ejb/src/org/jboss/soa/bpel/samples/quickstart/purchase/Invoice.java
(rev 0)
+++
trunk/samples/quickstart/purchase/ejb/src/org/jboss/soa/bpel/samples/quickstart/purchase/Invoice.java 2009-11-17
07:10:53 UTC (rev 267)
@@ -0,0 +1,62 @@
+package org.jboss.soa.bpel.samples.quickstart.purchase;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlType;
+
+/**
+ * <p>
+ * Java class for Invoice complex type.
+ * <p>
+ * The following schema fragment specifies the expected content contained within
+ * this class.
+ *
+ * <pre>
+ * <complexType name="Invoice">
+ * <complexContent>
+ * <restriction
base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="amount"
type="{http://www.w3.org/2001/XMLSchema}float"/>
+ * <element name="orderId"
type="{http://www.w3.org/2001/XMLSchema}int"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ */
+(a)XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "Invoice", propOrder = { "amount",
"orderId" })
+public class Invoice {
+
+ protected float amount;
+ protected int orderId;
+
+ /**
+ * Gets the value of the amount property.
+ */
+ public float getAmount() {
+ return amount;
+ }
+
+ /**
+ * Sets the value of the amount property.
+ */
+ public void setAmount(float value) {
+ this.amount = value;
+ }
+
+ /**
+ * Gets the value of the orderId property.
+ */
+ public int getOrderId() {
+ return orderId;
+ }
+
+ /**
+ * Sets the value of the orderId property.
+ */
+ public void setOrderId(int value) {
+ this.orderId = value;
+ }
+
+}
Property changes on:
trunk/samples/quickstart/purchase/ejb/src/org/jboss/soa/bpel/samples/quickstart/purchase/Invoice.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
trunk/samples/quickstart/purchase/ejb/src/org/jboss/soa/bpel/samples/quickstart/purchase/InvoiceCallbackBean.java
===================================================================
---
trunk/samples/quickstart/purchase/ejb/src/org/jboss/soa/bpel/samples/quickstart/purchase/InvoiceCallbackBean.java
(rev 0)
+++
trunk/samples/quickstart/purchase/ejb/src/org/jboss/soa/bpel/samples/quickstart/purchase/InvoiceCallbackBean.java 2009-11-17
07:10:53 UTC (rev 267)
@@ -0,0 +1,82 @@
+/*
+ * 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.purchase;
+
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+import javax.annotation.Resource;
+import javax.ejb.MessageDriven;
+import javax.ejb.MessageDrivenContext;
+import javax.ejb.ActivationConfigProperty;
+import javax.jms.JMSException;
+import javax.jms.MapMessage;
+import javax.jms.Message;
+import javax.jms.MessageListener;
+import javax.xml.ws.WebServiceRef;
+
+/**
+ * Asynchronous invoice callback bean.
+ *
+ * @author Jeff DeLong
+ * @author Alejandro Guizar
+ */
+@MessageDriven(activationConfig = {
+ @ActivationConfigProperty(propertyName = "destinationType", propertyValue =
"javax.jms.Queue"),
+ @ActivationConfigProperty(propertyName = "destination", propertyValue =
"queue/invoice") })
+public class InvoiceCallbackBean implements MessageListener {
+
+ @Resource
+ private MessageDrivenContext messageContext;
+ @WebServiceRef
+ private PurchaseSVC purchaseService;
+
+ private final Logger logger =
+ Logger.getLogger(InvoiceCallbackBean.class.getName());
+
+ /**
+ * Process the invoice callback message.
+ */
+ public void onMessage(Message message) {
+ if (!(message instanceof MapMessage)) {
+ logger.severe("received non-map message");
+ messageContext.setRollbackOnly();
+ return;
+ }
+ try {
+ // extract contents
+ MapMessage invoiceMessage = (MapMessage) message;
+ int orderId = invoiceMessage.getInt("orderId");
+ float amount = invoiceMessage.getFloat("amount");
+
+ // populate invoice with contents
+ Invoice inv = new Invoice();
+ inv.setOrderId(orderId);
+ inv.setAmount(amount);
+
+ // send invoice back to requester
+ purchaseService.getInvoiceCallbackSP().sendInvoice(inv);
+
+ logger.log(
+ Level.FINE,
+ "Requested invoice for order #{0,number,integer} with amount
{1,number,currency}",
+ new Object[] { orderId, amount });
+ }
+ catch (JMSException e) {
+ messageContext.setRollbackOnly();
+ logger.log(Level.SEVERE, "could not read invoice message", e);
+ }
+ }
+}
Property changes on:
trunk/samples/quickstart/purchase/ejb/src/org/jboss/soa/bpel/samples/quickstart/purchase/InvoiceCallbackBean.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
trunk/samples/quickstart/purchase/ejb/src/org/jboss/soa/bpel/samples/quickstart/purchase/InvoiceCallbackPT.java
===================================================================
---
trunk/samples/quickstart/purchase/ejb/src/org/jboss/soa/bpel/samples/quickstart/purchase/InvoiceCallbackPT.java
(rev 0)
+++
trunk/samples/quickstart/purchase/ejb/src/org/jboss/soa/bpel/samples/quickstart/purchase/InvoiceCallbackPT.java 2009-11-17
07:10:53 UTC (rev 267)
@@ -0,0 +1,24 @@
+package org.jboss.soa.bpel.samples.quickstart.purchase;
+
+import javax.jws.Oneway;
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+
+/**
+ * This class was generated by the JAX-WS RI. JAX-WS RI 2.1.6 Generated source
+ * version: 2.1
+ */
+@WebService(name = "invoiceCallbackPT", targetNamespace =
"http://manufacturing.org/wsdl/purchase")
+@SOAPBinding(style = SOAPBinding.Style.RPC)
+public interface InvoiceCallbackPT {
+
+ /**
+ * @param ivc
+ */
+ @WebMethod(action = "http://manufacturing.org/wsdl/purchase/sendInvoice")
+ @Oneway
+ public void sendInvoice(@WebParam(name = "IVC", partName = "IVC")
Invoice ivc);
+
+}
Property changes on:
trunk/samples/quickstart/purchase/ejb/src/org/jboss/soa/bpel/samples/quickstart/purchase/InvoiceCallbackPT.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
trunk/samples/quickstart/purchase/ejb/src/org/jboss/soa/bpel/samples/quickstart/purchase/OrderFaultType.java
===================================================================
---
trunk/samples/quickstart/purchase/ejb/src/org/jboss/soa/bpel/samples/quickstart/purchase/OrderFaultType.java
(rev 0)
+++
trunk/samples/quickstart/purchase/ejb/src/org/jboss/soa/bpel/samples/quickstart/purchase/OrderFaultType.java 2009-11-17
07:10:53 UTC (rev 267)
@@ -0,0 +1,46 @@
+package org.jboss.soa.bpel.samples.quickstart.purchase;
+
+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 = "problemInfo", targetNamespace =
"http://manufacturing.org/xsd/purchase")
+public class OrderFaultType extends Exception {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * Java type that goes as soapenv:Fault detail element.
+ */
+ private ProblemInfo faultInfo;
+
+ /**
+ * @param message
+ * @param faultInfo
+ */
+ public OrderFaultType(String message, ProblemInfo faultInfo) {
+ super(message);
+ this.faultInfo = faultInfo;
+ }
+
+ /**
+ * @param message
+ * @param faultInfo
+ * @param cause
+ */
+ public OrderFaultType(String message, ProblemInfo faultInfo, Throwable cause) {
+ super(message, cause);
+ this.faultInfo = faultInfo;
+ }
+
+ /**
+ * @return returns fault bean:
+ * org.jboss.soa.bpel.samples.quickstart.purchase.ProblemInfo
+ */
+ public ProblemInfo getFaultInfo() {
+ return faultInfo;
+ }
+
+}
Property changes on:
trunk/samples/quickstart/purchase/ejb/src/org/jboss/soa/bpel/samples/quickstart/purchase/OrderFaultType.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
trunk/samples/quickstart/purchase/ejb/src/org/jboss/soa/bpel/samples/quickstart/purchase/ProblemInfo.java
===================================================================
---
trunk/samples/quickstart/purchase/ejb/src/org/jboss/soa/bpel/samples/quickstart/purchase/ProblemInfo.java
(rev 0)
+++
trunk/samples/quickstart/purchase/ejb/src/org/jboss/soa/bpel/samples/quickstart/purchase/ProblemInfo.java 2009-11-17
07:10:53 UTC (rev 267)
@@ -0,0 +1,52 @@
+package org.jboss.soa.bpel.samples.quickstart.purchase;
+
+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 ProblemInfo complex type.
+ * <p>
+ * The following schema fragment specifies the expected content contained within
+ * this class.
+ *
+ * <pre>
+ * <complexType name="ProblemInfo">
+ * <complexContent>
+ * <restriction
base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="detail"
type="{http://www.w3.org/2001/XMLSchema}string"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ */
+(a)XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "ProblemInfo", propOrder = { "detail" })
+public class ProblemInfo {
+
+ @XmlElement(required = true)
+ protected String detail;
+
+ /**
+ * Gets the value of the detail property.
+ *
+ * @return possible object is {@link String }
+ */
+ public String getDetail() {
+ return detail;
+ }
+
+ /**
+ * Sets the value of the detail property.
+ *
+ * @param value allowed object is {@link String }
+ */
+ public void setDetail(String value) {
+ this.detail = value;
+ }
+
+}
Property changes on:
trunk/samples/quickstart/purchase/ejb/src/org/jboss/soa/bpel/samples/quickstart/purchase/ProblemInfo.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
trunk/samples/quickstart/purchase/ejb/src/org/jboss/soa/bpel/samples/quickstart/purchase/PurchaseOrder.java
===================================================================
---
trunk/samples/quickstart/purchase/ejb/src/org/jboss/soa/bpel/samples/quickstart/purchase/PurchaseOrder.java
(rev 0)
+++
trunk/samples/quickstart/purchase/ejb/src/org/jboss/soa/bpel/samples/quickstart/purchase/PurchaseOrder.java 2009-11-17
07:10:53 UTC (rev 267)
@@ -0,0 +1,79 @@
+package org.jboss.soa.bpel.samples.quickstart.purchase;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlType;
+
+/**
+ * <p>
+ * Java class for purchaseOrder complex type.
+ * <p>
+ * The following schema fragment specifies the expected content contained within
+ * this class.
+ *
+ * <pre>
+ * <complexType name="purchaseOrder">
+ * <complexContent>
+ * <restriction
base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="orderId"
type="{http://www.w3.org/2001/XMLSchema}int"/>
+ * <element name="partNumber"
type="{http://www.w3.org/2001/XMLSchema}int"/>
+ * <element name="quantity"
type="{http://www.w3.org/2001/XMLSchema}int"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ */
+(a)XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "purchaseOrder", propOrder = { "orderId",
"partNumber",
+ "quantity" })
+public class PurchaseOrder {
+
+ protected int orderId;
+ protected int partNumber;
+ protected int quantity;
+
+ /**
+ * Gets the value of the orderId property.
+ */
+ public int getOrderId() {
+ return orderId;
+ }
+
+ /**
+ * Sets the value of the orderId property.
+ */
+ public void setOrderId(int value) {
+ this.orderId = value;
+ }
+
+ /**
+ * Gets the value of the partNumber property.
+ */
+ public int getPartNumber() {
+ return partNumber;
+ }
+
+ /**
+ * Sets the value of the partNumber property.
+ */
+ public void setPartNumber(int value) {
+ this.partNumber = value;
+ }
+
+ /**
+ * Gets the value of the quantity property.
+ */
+ public int getQuantity() {
+ return quantity;
+ }
+
+ /**
+ * Sets the value of the quantity property.
+ */
+ public void setQuantity(int value) {
+ this.quantity = value;
+ }
+
+}
Property changes on:
trunk/samples/quickstart/purchase/ejb/src/org/jboss/soa/bpel/samples/quickstart/purchase/PurchaseOrder.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
trunk/samples/quickstart/purchase/ejb/src/org/jboss/soa/bpel/samples/quickstart/purchase/PurchaseOrderPT.java
===================================================================
---
trunk/samples/quickstart/purchase/ejb/src/org/jboss/soa/bpel/samples/quickstart/purchase/PurchaseOrderPT.java
(rev 0)
+++
trunk/samples/quickstart/purchase/ejb/src/org/jboss/soa/bpel/samples/quickstart/purchase/PurchaseOrderPT.java 2009-11-17
07:10:53 UTC (rev 267)
@@ -0,0 +1,30 @@
+package org.jboss.soa.bpel.samples.quickstart.purchase;
+
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebResult;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+
+/**
+ * This class was generated by the JAX-WS RI. JAX-WS RI 2.1.6 Generated source
+ * version: 2.1
+ */
+@WebService(name = "purchaseOrderPT", targetNamespace =
"http://manufacturing.org/wsdl/purchase")
+@SOAPBinding(style = SOAPBinding.Style.RPC)
+public interface PurchaseOrderPT {
+
+ /**
+ * @param purchaseOrder
+ * @param customerInfo
+ * @return returns org.jboss.soa.bpel.samples.quickstart.purchase.Invoice
+ * @throws OrderFaultType
+ */
+ @WebMethod(action =
"http://manufacturing.org/wsdl/purchase/sendPurchaseOrder")
+ @WebResult(name = "IVC", partName = "IVC")
+ public Invoice sendPurchaseOrder(
+ @WebParam(name = "customerInfo", partName = "customerInfo")
CustomerInfo customerInfo,
+ @WebParam(name = "purchaseOrder", partName = "purchaseOrder")
PurchaseOrder purchaseOrder)
+ throws OrderFaultType;
+
+}
Property changes on:
trunk/samples/quickstart/purchase/ejb/src/org/jboss/soa/bpel/samples/quickstart/purchase/PurchaseOrderPT.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
trunk/samples/quickstart/purchase/ejb/src/org/jboss/soa/bpel/samples/quickstart/purchase/PurchaseSVC.java
===================================================================
---
trunk/samples/quickstart/purchase/ejb/src/org/jboss/soa/bpel/samples/quickstart/purchase/PurchaseSVC.java
(rev 0)
+++
trunk/samples/quickstart/purchase/ejb/src/org/jboss/soa/bpel/samples/quickstart/purchase/PurchaseSVC.java 2009-11-17
07:10:53 UTC (rev 267)
@@ -0,0 +1,112 @@
+package org.jboss.soa.bpel.samples.quickstart.purchase;
+
+import java.net.MalformedURLException;
+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;
+
+/**
+ * This class was generated by the JAX-WS RI. JAX-WS RI 2.1.6 Generated source
+ * version: 2.1
+ */
+@WebServiceClient(name = PurchaseSVC.SERVICE_NAME, targetNamespace =
PurchaseSVC.TARGET_NAMESPACE, wsdlLocation = PurchaseSVC.WSDL_LOCATION)
+public class PurchaseSVC extends Service {
+
+ private static final String SHIPPING_CALLBACK_PORT_NAME =
+ "shippingCallbackSP";
+ private static final String INVOICE_CALLBACK_PORT_NAME = "invoiceCallbackSP";
+ static final String SERVICE_NAME = "purchaseSVC";
+ static final String TARGET_NAMESPACE =
+ "http://manufacturing.org/wsdl/purchase";
+ static final String WSDL_LOCATION =
+ "file:/home/aguizar/riftsaw/trunk/samples/quickstart/purchase/bpel/purchase.wsdl";
+ static final String PURCHASE_ORDER_PORT_NAME = "purchaseOrderSP";
+
+ private static final URL WSDL_URL = createURL(WSDL_LOCATION);
+
+ private static URL createURL(String location) {
+ try {
+ return new URL(location);
+ }
+ catch (MalformedURLException e) {
+ throw new IllegalArgumentException(location, e);
+ }
+ }
+
+ public PurchaseSVC(URL wsdlLocation, QName serviceName) {
+ super(wsdlLocation, serviceName);
+ }
+
+ public PurchaseSVC() {
+ super(WSDL_URL, new QName(TARGET_NAMESPACE, SERVICE_NAME));
+ }
+
+ /**
+ * @return returns PurchaseOrderPT
+ */
+ @WebEndpoint(name = PURCHASE_ORDER_PORT_NAME)
+ public PurchaseOrderPT getPurchaseOrderSP() {
+ return super.getPort(new QName(TARGET_NAMESPACE, PURCHASE_ORDER_PORT_NAME),
+ PurchaseOrderPT.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.
+ * @return returns PurchaseOrderPT
+ */
+ @WebEndpoint(name = PURCHASE_ORDER_PORT_NAME)
+ public PurchaseOrderPT getPurchaseOrderSP(WebServiceFeature... features) {
+ return super.getPort(new QName(TARGET_NAMESPACE, PURCHASE_ORDER_PORT_NAME),
+ PurchaseOrderPT.class, features);
+ }
+
+ /**
+ * @return returns InvoiceCallbackPT
+ */
+ @WebEndpoint(name = INVOICE_CALLBACK_PORT_NAME)
+ public InvoiceCallbackPT getInvoiceCallbackSP() {
+ return super.getPort(
+ new QName(TARGET_NAMESPACE, INVOICE_CALLBACK_PORT_NAME),
+ InvoiceCallbackPT.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.
+ * @return returns InvoiceCallbackPT
+ */
+ @WebEndpoint(name = INVOICE_CALLBACK_PORT_NAME)
+ public InvoiceCallbackPT getInvoiceCallbackSP(WebServiceFeature... features) {
+ return super.getPort(
+ new QName(TARGET_NAMESPACE, INVOICE_CALLBACK_PORT_NAME),
+ InvoiceCallbackPT.class, features);
+ }
+
+ /**
+ * @return returns ShippingCallbackPT
+ */
+ @WebEndpoint(name = SHIPPING_CALLBACK_PORT_NAME)
+ public ShippingCallbackPT getShippingCallbackSP() {
+ return super.getPort(new QName(TARGET_NAMESPACE,
+ SHIPPING_CALLBACK_PORT_NAME), ShippingCallbackPT.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.
+ * @return returns ShippingCallbackPT
+ */
+ @WebEndpoint(name = SHIPPING_CALLBACK_PORT_NAME)
+ public ShippingCallbackPT getShippingCallbackSP(WebServiceFeature... features) {
+ return super.getPort(new QName(TARGET_NAMESPACE,
+ SHIPPING_CALLBACK_PORT_NAME), ShippingCallbackPT.class, features);
+ }
+
+}
Property changes on:
trunk/samples/quickstart/purchase/ejb/src/org/jboss/soa/bpel/samples/quickstart/purchase/PurchaseSVC.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
trunk/samples/quickstart/purchase/ejb/src/org/jboss/soa/bpel/samples/quickstart/purchase/ScheduleInfo.java
===================================================================
---
trunk/samples/quickstart/purchase/ejb/src/org/jboss/soa/bpel/samples/quickstart/purchase/ScheduleInfo.java
(rev 0)
+++
trunk/samples/quickstart/purchase/ejb/src/org/jboss/soa/bpel/samples/quickstart/purchase/ScheduleInfo.java 2009-11-17
07:10:53 UTC (rev 267)
@@ -0,0 +1,55 @@
+package org.jboss.soa.bpel.samples.quickstart.purchase;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlSchemaType;
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.datatype.XMLGregorianCalendar;
+
+/**
+ * <p>
+ * Java class for scheduleInfo complex type.
+ * <p>
+ * The following schema fragment specifies the expected content contained within
+ * this class.
+ *
+ * <pre>
+ * <complexType name="scheduleInfo">
+ * <complexContent>
+ * <restriction
base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="shipDate"
type="{http://www.w3.org/2001/XMLSchema}date"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ */
+(a)XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "scheduleInfo", propOrder = { "shipDate" })
+public class ScheduleInfo {
+
+ @XmlElement(required = true)
+ @XmlSchemaType(name = "date")
+ protected XMLGregorianCalendar shipDate;
+
+ /**
+ * Gets the value of the shipDate property.
+ *
+ * @return possible object is {@link XMLGregorianCalendar }
+ */
+ public XMLGregorianCalendar getShipDate() {
+ return shipDate;
+ }
+
+ /**
+ * Sets the value of the shipDate property.
+ *
+ * @param value allowed object is {@link XMLGregorianCalendar }
+ */
+ public void setShipDate(XMLGregorianCalendar value) {
+ this.shipDate = value;
+ }
+
+}
Property changes on:
trunk/samples/quickstart/purchase/ejb/src/org/jboss/soa/bpel/samples/quickstart/purchase/ScheduleInfo.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
trunk/samples/quickstart/purchase/ejb/src/org/jboss/soa/bpel/samples/quickstart/purchase/ShippingCallbackBean.java
===================================================================
---
trunk/samples/quickstart/purchase/ejb/src/org/jboss/soa/bpel/samples/quickstart/purchase/ShippingCallbackBean.java
(rev 0)
+++
trunk/samples/quickstart/purchase/ejb/src/org/jboss/soa/bpel/samples/quickstart/purchase/ShippingCallbackBean.java 2009-11-17
07:10:53 UTC (rev 267)
@@ -0,0 +1,72 @@
+/*
+ * 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.purchase;
+
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+import javax.annotation.PostConstruct;
+import javax.ejb.ActivationConfigProperty;
+import javax.ejb.MessageDriven;
+import javax.jms.Message;
+import javax.jms.MessageListener;
+import javax.xml.datatype.DatatypeConfigurationException;
+import javax.xml.datatype.DatatypeFactory;
+import javax.xml.datatype.XMLGregorianCalendar;
+import javax.xml.ws.WebServiceRef;
+
+/**
+ * Asynchronous shipping callback bean.
+ *
+ * @author Jeff DeLong
+ * @author Alejandro Guizar
+ */
+@MessageDriven(activationConfig = {
+ @ActivationConfigProperty(propertyName = "destinationType", propertyValue =
"javax.jms.Queue"),
+ @ActivationConfigProperty(propertyName = "destination", propertyValue =
"queue/shipping") })
+public class ShippingCallbackBean implements MessageListener {
+
+ @WebServiceRef
+ private PurchaseSVC purchaseService;
+
+ private DatatypeFactory datatypeFactory;
+
+ private final Logger log =
+ Logger.getLogger(ShippingCallbackBean.class.getName());
+
+ @PostConstruct
+ void createDatatypeFactory() {
+ try {
+ datatypeFactory = DatatypeFactory.newInstance();
+ }
+ catch (DatatypeConfigurationException e) {
+ throw new AssertionError(e);
+ }
+ }
+
+ /**
+ * Process the shipping message.
+ */
+ public void onMessage(Message msg) {
+ // populate schedule info; for now the message contents are irrelevant
+ XMLGregorianCalendar shipDate = datatypeFactory.newXMLGregorianCalendar();
+ ScheduleInfo schedule = new ScheduleInfo();
+ schedule.setShipDate(shipDate);
+
+ // send schedule back to requester
+ purchaseService.getShippingCallbackSP().sendSchedule(schedule);
+ log.log(Level.FINE, "sent shiping schedule on {0,date}", shipDate);
+ }
+}
Property changes on:
trunk/samples/quickstart/purchase/ejb/src/org/jboss/soa/bpel/samples/quickstart/purchase/ShippingCallbackBean.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
trunk/samples/quickstart/purchase/ejb/src/org/jboss/soa/bpel/samples/quickstart/purchase/ShippingCallbackPT.java
===================================================================
---
trunk/samples/quickstart/purchase/ejb/src/org/jboss/soa/bpel/samples/quickstart/purchase/ShippingCallbackPT.java
(rev 0)
+++
trunk/samples/quickstart/purchase/ejb/src/org/jboss/soa/bpel/samples/quickstart/purchase/ShippingCallbackPT.java 2009-11-17
07:10:53 UTC (rev 267)
@@ -0,0 +1,25 @@
+package org.jboss.soa.bpel.samples.quickstart.purchase;
+
+import javax.jws.Oneway;
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+
+/**
+ * This class was generated by the JAX-WS RI. JAX-WS RI 2.1.6 Generated source
+ * version: 2.1
+ */
+@WebService(name = "shippingCallbackPT", targetNamespace =
"http://manufacturing.org/wsdl/purchase")
+@SOAPBinding(style = SOAPBinding.Style.RPC)
+public interface ShippingCallbackPT {
+
+ /**
+ * @param schedule
+ */
+ @WebMethod(action = "http://manufacturing.org/wsdl/purchase/sendSchedule")
+ @Oneway
+ public void sendSchedule(
+ @WebParam(name = "schedule", partName = "schedule") ScheduleInfo
schedule);
+
+}
Property changes on:
trunk/samples/quickstart/purchase/ejb/src/org/jboss/soa/bpel/samples/quickstart/purchase/ShippingCallbackPT.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
trunk/samples/quickstart/purchase/ejb/src/org/jboss/soa/bpel/samples/quickstart/purchase/ShippingInfo.java
===================================================================
---
trunk/samples/quickstart/purchase/ejb/src/org/jboss/soa/bpel/samples/quickstart/purchase/ShippingInfo.java
(rev 0)
+++
trunk/samples/quickstart/purchase/ejb/src/org/jboss/soa/bpel/samples/quickstart/purchase/ShippingInfo.java 2009-11-17
07:10:53 UTC (rev 267)
@@ -0,0 +1,46 @@
+package org.jboss.soa.bpel.samples.quickstart.purchase;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlType;
+
+/**
+ * <p>
+ * Java class for shippingInfo complex type.
+ * <p>
+ * The following schema fragment specifies the expected content contained within
+ * this class.
+ *
+ * <pre>
+ * <complexType name="shippingInfo">
+ * <complexContent>
+ * <restriction
base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="shippingPrice"
type="{http://www.w3.org/2001/XMLSchema}float"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ */
+(a)XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "shippingInfo", propOrder = { "shippingPrice" })
+public class ShippingInfo {
+
+ protected float shippingPrice;
+
+ /**
+ * Gets the value of the shippingPrice property.
+ */
+ public float getShippingPrice() {
+ return shippingPrice;
+ }
+
+ /**
+ * Sets the value of the shippingPrice property.
+ */
+ public void setShippingPrice(float value) {
+ this.shippingPrice = value;
+ }
+
+}
Property changes on:
trunk/samples/quickstart/purchase/ejb/src/org/jboss/soa/bpel/samples/quickstart/purchase/ShippingInfo.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
trunk/samples/quickstart/purchase/ejb/src/org/jboss/soa/bpel/samples/quickstart/purchase/package-info.java
===================================================================
---
trunk/samples/quickstart/purchase/ejb/src/org/jboss/soa/bpel/samples/quickstart/purchase/package-info.java
(rev 0)
+++
trunk/samples/quickstart/purchase/ejb/src/org/jboss/soa/bpel/samples/quickstart/purchase/package-info.java 2009-11-17
07:10:53 UTC (rev 267)
@@ -0,0 +1,3 @@
+(a)javax.xml.bind.annotation.XmlSchema(namespace =
"http://manufacturing.org/xsd/purchase")
+package org.jboss.soa.bpel.samples.quickstart.purchase;
+
Property changes on:
trunk/samples/quickstart/purchase/ejb/src/org/jboss/soa/bpel/samples/quickstart/purchase/package-info.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: trunk/samples/quickstart/purchase/purchase-queue-service.xml
===================================================================
Property changes on: trunk/samples/quickstart/purchase/purchase-queue-service.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Property changes on: trunk/samples/quickstart/purchase/war
___________________________________________________________________
Name: svn:ignore
+ .project
.classpath
target
Added: trunk/samples/quickstart/purchase/war/resources/WEB-INF/jboss-web.xml
===================================================================
--- trunk/samples/quickstart/purchase/war/resources/WEB-INF/jboss-web.xml
(rev 0)
+++ trunk/samples/quickstart/purchase/war/resources/WEB-INF/jboss-web.xml 2009-11-17
07:10:53 UTC (rev 267)
@@ -0,0 +1,23 @@
+<?xml version="1.0"?>
+<!DOCTYPE jboss-web PUBLIC "-//JBoss//DTD Web Application 2.4//EN"
+ "http://www.jboss.org/j2ee/dtd/jboss-web_4_0.dtd">
+
+<jboss-web>
+
+ <!-- Invoice Service -->
+ <resource-ref>
+ <res-ref-name>jms/connectionFactory</res-ref-name>
+ <jndi-name>java:ConnectionFactory</jndi-name>
+ </resource-ref>
+
+ <message-destination-ref>
+
<message-destination-ref-name>jms/invoiceQueue</message-destination-ref-name>
+ <jndi-name>queue/invoice</jndi-name>
+ </message-destination-ref>
+
+ <message-destination-ref>
+
<message-destination-ref-name>jms/shippingQueue</message-destination-ref-name>
+ <jndi-name>queue/shipping</jndi-name>
+ </message-destination-ref>
+
+</jboss-web>
\ No newline at end of file
Property changes on:
trunk/samples/quickstart/purchase/war/resources/WEB-INF/jboss-web.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: trunk/samples/quickstart/purchase/war/resources/WEB-INF/web.xml
===================================================================
--- trunk/samples/quickstart/purchase/war/resources/WEB-INF/web.xml
(rev 0)
+++ trunk/samples/quickstart/purchase/war/resources/WEB-INF/web.xml 2009-11-17 07:10:53
UTC (rev 267)
@@ -0,0 +1,66 @@
+<?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">
+
+ <!-- Invoice Service -->
+ <servlet>
+ <servlet-name>invoiceServlet</servlet-name>
+ <servlet-class>org.jbpm.bpel.tutorial.invoice.ComputePricePT_Impl</servlet-class>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>invoiceServlet</servlet-name>
+ <url-pattern>/invoiceService</url-pattern>
+ </servlet-mapping>
+
+ <resource-ref>
+ <description>The single factory from which endpoint implementation beans
+ obtain JMS connections.</description>
+ <res-ref-name>jms/connectionFactory</res-ref-name>
+ <res-type>javax.jms.ConnectionFactory</res-type>
+ <res-auth>Container</res-auth>
+ <res-sharing-scope>Shareable</res-sharing-scope>
+ </resource-ref>
+
+ <message-destination-ref>
+ <description>The target for invoice messages.</description>
+ <message-destination-ref-name>jms/invoiceQueue</message-destination-ref-name>
+ <message-destination-type>javax.jms.Queue</message-destination-type>
+ <message-destination-usage>Produces</message-destination-usage>
+ </message-destination-ref>
+
+ <!-- Shipping Service -->
+ <servlet>
+ <servlet-name>shippingServlet</servlet-name>
+ <servlet-class>org.jbpm.bpel.tutorial.shipping.ShippingPT_Impl</servlet-class>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>shippingServlet</servlet-name>
+ <url-pattern>/shippingService</url-pattern>
+ </servlet-mapping>
+
+ <env-entry>
+ <description>Today's shipping price</description>
+ <env-entry-name>shippingPrice</env-entry-name>
+ <env-entry-type>java.lang.Float</env-entry-type>
+ <env-entry-value>10.95</env-entry-value>
+ </env-entry>
+
+ <message-destination-ref>
+ <description>The target for shipping messages.</description>
+ <message-destination-ref-name>jms/shippingQueue</message-destination-ref-name>
+ <message-destination-type>javax.jms.Queue</message-destination-type>
+ <message-destination-usage>Produces</message-destination-usage>
+ </message-destination-ref>
+
+ <!-- Production Scheduling Process -->
+ <servlet>
+ <servlet-name>schedulingServlet</servlet-name>
+ <servlet-class>org.jbpm.bpel.tutorial.scheduling.SchedulingPT_Impl</servlet-class>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>schedulingServlet</servlet-name>
+ <url-pattern>/schedulingProcess</url-pattern>
+ </servlet-mapping>
+
+</web-app>
\ No newline at end of file
Property changes on: trunk/samples/quickstart/purchase/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/purchase/war/src/org/jboss/soa/bpel/samples/quickstart/purchase/ComputePricePT.java
===================================================================
---
trunk/samples/quickstart/purchase/war/src/org/jboss/soa/bpel/samples/quickstart/purchase/ComputePricePT.java
(rev 0)
+++
trunk/samples/quickstart/purchase/war/src/org/jboss/soa/bpel/samples/quickstart/purchase/ComputePricePT.java 2009-11-17
07:10:53 UTC (rev 267)
@@ -0,0 +1,35 @@
+package org.jboss.soa.bpel.samples.quickstart.purchase;
+
+import javax.jws.Oneway;
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+
+/**
+ * This class was generated by the JAX-WS RI. JAX-WS RI 2.1.6 Generated source
+ * version: 2.1
+ */
+@WebService(name = "computePricePT", targetNamespace =
"http://manufacturing.org/wsdl/purchase")
+@SOAPBinding(style = SOAPBinding.Style.RPC)
+public interface ComputePricePT {
+
+ /**
+ * @param purchaseOrder
+ * @param customerInfo
+ */
+ @WebMethod(action = "http://manufacturing.org/wsdl/purchase")
+ @Oneway
+ public void initiatePriceCalculation(
+ @WebParam(name = "customerInfo", partName = "customerInfo")
CustomerInfo customerInfo,
+ @WebParam(name = "purchaseOrder", partName = "purchaseOrder")
PurchaseOrder purchaseOrder);
+
+ /**
+ * @param shippingInfo
+ */
+ @WebMethod(action = "http://manufacturing.org/wsdl/purchase")
+ @Oneway
+ public void sendShippingPrice(
+ @WebParam(name = "shippingInfo", partName = "shippingInfo")
ShippingInfo shippingInfo);
+
+}
Property changes on:
trunk/samples/quickstart/purchase/war/src/org/jboss/soa/bpel/samples/quickstart/purchase/ComputePricePT.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
trunk/samples/quickstart/purchase/war/src/org/jboss/soa/bpel/samples/quickstart/purchase/ComputePricePT_Impl.java
===================================================================
---
trunk/samples/quickstart/purchase/war/src/org/jboss/soa/bpel/samples/quickstart/purchase/ComputePricePT_Impl.java
(rev 0)
+++
trunk/samples/quickstart/purchase/war/src/org/jboss/soa/bpel/samples/quickstart/purchase/ComputePricePT_Impl.java 2009-11-17
07:10:53 UTC (rev 267)
@@ -0,0 +1,108 @@
+/*
+ * 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.purchase;
+
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+import javax.annotation.Resource;
+import javax.jms.Connection;
+import javax.jms.ConnectionFactory;
+import javax.jms.JMSException;
+import javax.jms.MapMessage;
+import javax.jms.MessageProducer;
+import javax.jms.Queue;
+import javax.jms.Session;
+import javax.jws.WebService;
+import javax.xml.ws.WebServiceContext;
+import javax.xml.ws.handler.MessageContext;
+
+/**
+ * Invoice endpoint bean.
+ *
+ * @author Jeff DeLong
+ * @author Alejandro Guizar
+ */
+@WebService(endpointInterface =
"org.jboss.soa.bpel.samples.quickstart.purchase.ComputePricePT", targetNamespace
= "http://manufacturing.org/wsdl/purchase", serviceName =
"invoiceSVC", portName = "computePriceSP")
+public class ComputePricePT_Impl implements ComputePricePT {
+
+ @Resource
+ private Queue invoiceQueue;
+ @Resource
+ private ConnectionFactory connectionFactory;
+
+ @Resource
+ private WebServiceContext serviceContext;
+
+ private final Logger logger =
+ Logger.getLogger(ComputePricePT_Impl.class.getName());
+
+ private static final String ORDER_ID_ATTR = "invoice.orderId";
+ private static final String LINE_PRICE_ATTR = "invoice.linePrice";
+
+ public void initiatePriceCalculation(CustomerInfo customerInfo,
+ PurchaseOrder purchaseOrder) {
+ MessageContext messageContext = serviceContext.getMessageContext();
+ messageContext.put(ORDER_ID_ATTR, purchaseOrder.getOrderId());
+ // In our system the part number is also the unit price!
+ messageContext.put(LINE_PRICE_ATTR, purchaseOrder.getQuantity()
+ * purchaseOrder.getPartNumber());
+ }
+
+ public void sendShippingPrice(ShippingInfo shippingInfo) {
+ try {
+ sendInvoiceMessage(shippingInfo.getShippingPrice());
+ }
+ catch (JMSException e) {
+ logger.log(Level.SEVERE, "failed to send invoice message", e);
+ }
+ }
+
+ protected void sendInvoiceMessage(float shippingPrice) throws JMSException {
+ MessageContext messageContext = serviceContext.getMessageContext();
+ Integer orderId = (Integer) messageContext.get(ORDER_ID_ATTR);
+ Integer linePrice = (Integer) messageContext.get(LINE_PRICE_ATTR);
+ float amount = linePrice + shippingPrice;
+
+ // create a connection
+ Connection connection = connectionFactory.createConnection();
+ try {
+ // create a session
+ Session session =
+ connection.createSession(false, Session.CLIENT_ACKNOWLEDGE);
+ try {
+ // create the message
+ MapMessage invoiceMessage = session.createMapMessage();
+ invoiceMessage.setInt("orderId", orderId);
+ invoiceMessage.setFloat("amount", amount);
+
+ // send it!
+ MessageProducer producer = session.createProducer(invoiceQueue);
+ producer.send(invoiceMessage);
+
+ logger.log(
+ Level.FINE,
+ "sent invoice message for PO #{0,number,integer} with amount
{1,number,currency}",
+ new Object[] { orderId, amount });
+ }
+ finally {
+ session.close();
+ }
+ }
+ finally {
+ connection.close();
+ }
+ }
+}
Property changes on:
trunk/samples/quickstart/purchase/war/src/org/jboss/soa/bpel/samples/quickstart/purchase/ComputePricePT_Impl.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
trunk/samples/quickstart/purchase/war/src/org/jboss/soa/bpel/samples/quickstart/purchase/CustomerInfo.java
===================================================================
---
trunk/samples/quickstart/purchase/war/src/org/jboss/soa/bpel/samples/quickstart/purchase/CustomerInfo.java
(rev 0)
+++
trunk/samples/quickstart/purchase/war/src/org/jboss/soa/bpel/samples/quickstart/purchase/CustomerInfo.java 2009-11-17
07:10:53 UTC (rev 267)
@@ -0,0 +1,73 @@
+package org.jboss.soa.bpel.samples.quickstart.purchase;
+
+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 customerInfo complex type.
+ * <p>
+ * The following schema fragment specifies the expected content contained within
+ * this class.
+ *
+ * <pre>
+ * <complexType name="customerInfo">
+ * <complexContent>
+ * <restriction
base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="customerId"
type="{http://www.w3.org/2001/XMLSchema}string"/>
+ * <element name="address"
type="{http://www.w3.org/2001/XMLSchema}string"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ */
+(a)XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "customerInfo", propOrder = { "customerId",
"address" })
+public class CustomerInfo {
+
+ @XmlElement(required = true)
+ protected String customerId;
+ @XmlElement(required = true)
+ protected String address;
+
+ /**
+ * Gets the value of the customerId property.
+ *
+ * @return possible object is {@link String }
+ */
+ public String getCustomerId() {
+ return customerId;
+ }
+
+ /**
+ * Sets the value of the customerId property.
+ *
+ * @param value allowed object is {@link String }
+ */
+ public void setCustomerId(String value) {
+ this.customerId = value;
+ }
+
+ /**
+ * Gets the value of the address property.
+ *
+ * @return possible object is {@link String }
+ */
+ public String getAddress() {
+ return address;
+ }
+
+ /**
+ * Sets the value of the address property.
+ *
+ * @param value allowed object is {@link String }
+ */
+ public void setAddress(String value) {
+ this.address = value;
+ }
+
+}
Property changes on:
trunk/samples/quickstart/purchase/war/src/org/jboss/soa/bpel/samples/quickstart/purchase/CustomerInfo.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
trunk/samples/quickstart/purchase/war/src/org/jboss/soa/bpel/samples/quickstart/purchase/Invoice.java
===================================================================
---
trunk/samples/quickstart/purchase/war/src/org/jboss/soa/bpel/samples/quickstart/purchase/Invoice.java
(rev 0)
+++
trunk/samples/quickstart/purchase/war/src/org/jboss/soa/bpel/samples/quickstart/purchase/Invoice.java 2009-11-17
07:10:53 UTC (rev 267)
@@ -0,0 +1,62 @@
+package org.jboss.soa.bpel.samples.quickstart.purchase;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlType;
+
+/**
+ * <p>
+ * Java class for Invoice complex type.
+ * <p>
+ * The following schema fragment specifies the expected content contained within
+ * this class.
+ *
+ * <pre>
+ * <complexType name="Invoice">
+ * <complexContent>
+ * <restriction
base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="amount"
type="{http://www.w3.org/2001/XMLSchema}float"/>
+ * <element name="orderId"
type="{http://www.w3.org/2001/XMLSchema}int"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ */
+(a)XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "Invoice", propOrder = { "amount",
"orderId" })
+public class Invoice {
+
+ protected float amount;
+ protected int orderId;
+
+ /**
+ * Gets the value of the amount property.
+ */
+ public float getAmount() {
+ return amount;
+ }
+
+ /**
+ * Sets the value of the amount property.
+ */
+ public void setAmount(float value) {
+ this.amount = value;
+ }
+
+ /**
+ * Gets the value of the orderId property.
+ */
+ public int getOrderId() {
+ return orderId;
+ }
+
+ /**
+ * Sets the value of the orderId property.
+ */
+ public void setOrderId(int value) {
+ this.orderId = value;
+ }
+
+}
Property changes on:
trunk/samples/quickstart/purchase/war/src/org/jboss/soa/bpel/samples/quickstart/purchase/Invoice.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
trunk/samples/quickstart/purchase/war/src/org/jboss/soa/bpel/samples/quickstart/purchase/ObjectFactory.java
===================================================================
---
trunk/samples/quickstart/purchase/war/src/org/jboss/soa/bpel/samples/quickstart/purchase/ObjectFactory.java
(rev 0)
+++
trunk/samples/quickstart/purchase/war/src/org/jboss/soa/bpel/samples/quickstart/purchase/ObjectFactory.java 2009-11-17
07:10:53 UTC (rev 267)
@@ -0,0 +1,85 @@
+package org.jboss.soa.bpel.samples.quickstart.purchase;
+
+import javax.xml.bind.JAXBElement;
+import javax.xml.bind.annotation.XmlElementDecl;
+import javax.xml.bind.annotation.XmlRegistry;
+import javax.xml.namespace.QName;
+
+/**
+ * This object contains factory methods for each Java content interface and Java
+ * element interface generated in the
+ * org.jboss.soa.bpel.samples.quickstart.purchase package.
+ * <p>
+ * An ObjectFactory allows you to programatically construct new instances of the
+ * Java representation for XML content. The Java representation of XML content
+ * can consist of schema derived interfaces and classes representing the binding
+ * of schema type definitions, element declarations and model groups. Factory
+ * methods for each of these are provided in this class.
+ */
+@XmlRegistry
+public class ObjectFactory {
+
+ private final static QName _ProblemInfo_QNAME =
+ new
QName("http://manufacturing.org/xsd/purchase",
"problemInfo");
+
+ /**
+ * Create a new ObjectFactory that can be used to create new instances of
+ * schema derived classes for package:
+ * org.jboss.soa.bpel.samples.quickstart.purchase
+ */
+ public ObjectFactory() {
+ }
+
+ /**
+ * Create an instance of {@link PurchaseOrder }
+ */
+ public PurchaseOrder createPurchaseOrder() {
+ return new PurchaseOrder();
+ }
+
+ /**
+ * Create an instance of {@link ShippingInfo }
+ */
+ public ShippingInfo createShippingInfo() {
+ return new ShippingInfo();
+ }
+
+ /**
+ * Create an instance of {@link ProblemInfo }
+ */
+ public ProblemInfo createProblemInfo() {
+ return new ProblemInfo();
+ }
+
+ /**
+ * Create an instance of {@link Invoice }
+ */
+ public Invoice createInvoice() {
+ return new Invoice();
+ }
+
+ /**
+ * Create an instance of {@link CustomerInfo }
+ */
+ public CustomerInfo createCustomerInfo() {
+ return new CustomerInfo();
+ }
+
+ /**
+ * Create an instance of {@link ScheduleInfo }
+ */
+ public ScheduleInfo createScheduleInfo() {
+ return new ScheduleInfo();
+ }
+
+ /**
+ * Create an instance of {@link JAXBElement }{@code <}{@link ProblemInfo }
+ * {@code >}
+ */
+ @XmlElementDecl(namespace = "http://manufacturing.org/xsd/purchase", name =
"problemInfo")
+ public JAXBElement<ProblemInfo> createProblemInfo(ProblemInfo value) {
+ return new JAXBElement<ProblemInfo>(_ProblemInfo_QNAME, ProblemInfo.class,
+ null, value);
+ }
+
+}
Property changes on:
trunk/samples/quickstart/purchase/war/src/org/jboss/soa/bpel/samples/quickstart/purchase/ObjectFactory.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
trunk/samples/quickstart/purchase/war/src/org/jboss/soa/bpel/samples/quickstart/purchase/OrderFaultType.java
===================================================================
---
trunk/samples/quickstart/purchase/war/src/org/jboss/soa/bpel/samples/quickstart/purchase/OrderFaultType.java
(rev 0)
+++
trunk/samples/quickstart/purchase/war/src/org/jboss/soa/bpel/samples/quickstart/purchase/OrderFaultType.java 2009-11-17
07:10:53 UTC (rev 267)
@@ -0,0 +1,45 @@
+package org.jboss.soa.bpel.samples.quickstart.purchase;
+
+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 = "problemInfo", targetNamespace =
"http://manufacturing.org/xsd/purchase")
+public class OrderFaultType extends Exception {
+
+ private static final long serialVersionUID = 1L;
+ /**
+ * Java type that goes as soapenv:Fault detail element.
+ */
+ private ProblemInfo faultInfo;
+
+ /**
+ * @param message
+ * @param faultInfo
+ */
+ public OrderFaultType(String message, ProblemInfo faultInfo) {
+ super(message);
+ this.faultInfo = faultInfo;
+ }
+
+ /**
+ * @param message
+ * @param faultInfo
+ * @param cause
+ */
+ public OrderFaultType(String message, ProblemInfo faultInfo, Throwable cause) {
+ super(message, cause);
+ this.faultInfo = faultInfo;
+ }
+
+ /**
+ * @return returns fault bean:
+ * org.jboss.soa.bpel.samples.quickstart.purchase.ProblemInfo
+ */
+ public ProblemInfo getFaultInfo() {
+ return faultInfo;
+ }
+
+}
Property changes on:
trunk/samples/quickstart/purchase/war/src/org/jboss/soa/bpel/samples/quickstart/purchase/OrderFaultType.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
trunk/samples/quickstart/purchase/war/src/org/jboss/soa/bpel/samples/quickstart/purchase/ProblemInfo.java
===================================================================
---
trunk/samples/quickstart/purchase/war/src/org/jboss/soa/bpel/samples/quickstart/purchase/ProblemInfo.java
(rev 0)
+++
trunk/samples/quickstart/purchase/war/src/org/jboss/soa/bpel/samples/quickstart/purchase/ProblemInfo.java 2009-11-17
07:10:53 UTC (rev 267)
@@ -0,0 +1,52 @@
+package org.jboss.soa.bpel.samples.quickstart.purchase;
+
+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 ProblemInfo complex type.
+ * <p>
+ * The following schema fragment specifies the expected content contained within
+ * this class.
+ *
+ * <pre>
+ * <complexType name="ProblemInfo">
+ * <complexContent>
+ * <restriction
base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="detail"
type="{http://www.w3.org/2001/XMLSchema}string"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ */
+(a)XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "ProblemInfo", propOrder = { "detail" })
+public class ProblemInfo {
+
+ @XmlElement(required = true)
+ protected String detail;
+
+ /**
+ * Gets the value of the detail property.
+ *
+ * @return possible object is {@link String }
+ */
+ public String getDetail() {
+ return detail;
+ }
+
+ /**
+ * Sets the value of the detail property.
+ *
+ * @param value allowed object is {@link String }
+ */
+ public void setDetail(String value) {
+ this.detail = value;
+ }
+
+}
Property changes on:
trunk/samples/quickstart/purchase/war/src/org/jboss/soa/bpel/samples/quickstart/purchase/ProblemInfo.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
trunk/samples/quickstart/purchase/war/src/org/jboss/soa/bpel/samples/quickstart/purchase/PurchaseOrder.java
===================================================================
---
trunk/samples/quickstart/purchase/war/src/org/jboss/soa/bpel/samples/quickstart/purchase/PurchaseOrder.java
(rev 0)
+++
trunk/samples/quickstart/purchase/war/src/org/jboss/soa/bpel/samples/quickstart/purchase/PurchaseOrder.java 2009-11-17
07:10:53 UTC (rev 267)
@@ -0,0 +1,79 @@
+package org.jboss.soa.bpel.samples.quickstart.purchase;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlType;
+
+/**
+ * <p>
+ * Java class for purchaseOrder complex type.
+ * <p>
+ * The following schema fragment specifies the expected content contained within
+ * this class.
+ *
+ * <pre>
+ * <complexType name="purchaseOrder">
+ * <complexContent>
+ * <restriction
base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="orderId"
type="{http://www.w3.org/2001/XMLSchema}int"/>
+ * <element name="partNumber"
type="{http://www.w3.org/2001/XMLSchema}int"/>
+ * <element name="quantity"
type="{http://www.w3.org/2001/XMLSchema}int"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ */
+(a)XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "purchaseOrder", propOrder = { "orderId",
"partNumber",
+ "quantity" })
+public class PurchaseOrder {
+
+ protected int orderId;
+ protected int partNumber;
+ protected int quantity;
+
+ /**
+ * Gets the value of the orderId property.
+ */
+ public int getOrderId() {
+ return orderId;
+ }
+
+ /**
+ * Sets the value of the orderId property.
+ */
+ public void setOrderId(int value) {
+ this.orderId = value;
+ }
+
+ /**
+ * Gets the value of the partNumber property.
+ */
+ public int getPartNumber() {
+ return partNumber;
+ }
+
+ /**
+ * Sets the value of the partNumber property.
+ */
+ public void setPartNumber(int value) {
+ this.partNumber = value;
+ }
+
+ /**
+ * Gets the value of the quantity property.
+ */
+ public int getQuantity() {
+ return quantity;
+ }
+
+ /**
+ * Sets the value of the quantity property.
+ */
+ public void setQuantity(int value) {
+ this.quantity = value;
+ }
+
+}
Property changes on:
trunk/samples/quickstart/purchase/war/src/org/jboss/soa/bpel/samples/quickstart/purchase/PurchaseOrder.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
trunk/samples/quickstart/purchase/war/src/org/jboss/soa/bpel/samples/quickstart/purchase/ScheduleInfo.java
===================================================================
---
trunk/samples/quickstart/purchase/war/src/org/jboss/soa/bpel/samples/quickstart/purchase/ScheduleInfo.java
(rev 0)
+++
trunk/samples/quickstart/purchase/war/src/org/jboss/soa/bpel/samples/quickstart/purchase/ScheduleInfo.java 2009-11-17
07:10:53 UTC (rev 267)
@@ -0,0 +1,55 @@
+package org.jboss.soa.bpel.samples.quickstart.purchase;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlSchemaType;
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.datatype.XMLGregorianCalendar;
+
+/**
+ * <p>
+ * Java class for scheduleInfo complex type.
+ * <p>
+ * The following schema fragment specifies the expected content contained within
+ * this class.
+ *
+ * <pre>
+ * <complexType name="scheduleInfo">
+ * <complexContent>
+ * <restriction
base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="shipDate"
type="{http://www.w3.org/2001/XMLSchema}date"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ */
+(a)XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "scheduleInfo", propOrder = { "shipDate" })
+public class ScheduleInfo {
+
+ @XmlElement(required = true)
+ @XmlSchemaType(name = "date")
+ protected XMLGregorianCalendar shipDate;
+
+ /**
+ * Gets the value of the shipDate property.
+ *
+ * @return possible object is {@link XMLGregorianCalendar }
+ */
+ public XMLGregorianCalendar getShipDate() {
+ return shipDate;
+ }
+
+ /**
+ * Sets the value of the shipDate property.
+ *
+ * @param value allowed object is {@link XMLGregorianCalendar }
+ */
+ public void setShipDate(XMLGregorianCalendar value) {
+ this.shipDate = value;
+ }
+
+}
Property changes on:
trunk/samples/quickstart/purchase/war/src/org/jboss/soa/bpel/samples/quickstart/purchase/ScheduleInfo.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
trunk/samples/quickstart/purchase/war/src/org/jboss/soa/bpel/samples/quickstart/purchase/SchedulingPT.java
===================================================================
---
trunk/samples/quickstart/purchase/war/src/org/jboss/soa/bpel/samples/quickstart/purchase/SchedulingPT.java
(rev 0)
+++
trunk/samples/quickstart/purchase/war/src/org/jboss/soa/bpel/samples/quickstart/purchase/SchedulingPT.java 2009-11-17
07:10:53 UTC (rev 267)
@@ -0,0 +1,35 @@
+package org.jboss.soa.bpel.samples.quickstart.purchase;
+
+import javax.jws.Oneway;
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+
+/**
+ * This class was generated by the JAX-WS RI. JAX-WS RI 2.1.6 Generated source
+ * version: 2.1
+ */
+@WebService(name = "schedulingPT", targetNamespace =
"http://manufacturing.org/wsdl/purchase")
+@SOAPBinding(style = SOAPBinding.Style.RPC)
+public interface SchedulingPT {
+
+ /**
+ * @param purchaseOrder
+ * @param customerInfo
+ */
+ @WebMethod(action = "http://manufacturing.org/wsdl/purchase")
+ @Oneway
+ public void requestProductionScheduling(
+ @WebParam(name = "customerInfo", partName = "customerInfo")
CustomerInfo customerInfo,
+ @WebParam(name = "purchaseOrder", partName = "purchaseOrder")
PurchaseOrder purchaseOrder);
+
+ /**
+ * @param schedule
+ */
+ @WebMethod(action = "http://manufacturing.org/wsdl/purchase")
+ @Oneway
+ public void sendShippingSchedule(
+ @WebParam(name = "schedule", partName = "schedule") ScheduleInfo
schedule);
+
+}
Property changes on:
trunk/samples/quickstart/purchase/war/src/org/jboss/soa/bpel/samples/quickstart/purchase/SchedulingPT.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
trunk/samples/quickstart/purchase/war/src/org/jboss/soa/bpel/samples/quickstart/purchase/SchedulingPT_Impl.java
===================================================================
---
trunk/samples/quickstart/purchase/war/src/org/jboss/soa/bpel/samples/quickstart/purchase/SchedulingPT_Impl.java
(rev 0)
+++
trunk/samples/quickstart/purchase/war/src/org/jboss/soa/bpel/samples/quickstart/purchase/SchedulingPT_Impl.java 2009-11-17
07:10:53 UTC (rev 267)
@@ -0,0 +1,44 @@
+/*
+ * 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.purchase;
+
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+import javax.jws.WebService;
+
+/**
+ * Production scheduling endpoint bean.
+ *
+ * @author Alejandro Guizar
+ */
+@WebService(endpointInterface =
"org.jboss.soa.bpel.samples.quickstart.purchase.SchedulingPT", targetNamespace =
"http://manufacturing.org/wsdl/purchase", serviceName =
"schedulingSVC", portName = "schedulingSP")
+public class SchedulingPT_Impl implements SchedulingPT {
+
+ private final Logger logger = Logger.getLogger(SchedulingPT.class.getName());
+
+ public void requestProductionScheduling(CustomerInfo customerInfo,
+ PurchaseOrder purchaseOrder) {
+ logger.log(
+ Level.FINE,
+ "received production scheduling request for customer {0} and PO
{1,number,integer}",
+ new Object[] { customerInfo.getCustomerId(), purchaseOrder.getOrderId() });
+ }
+
+ public void sendShippingSchedule(ScheduleInfo schedule) {
+ logger.log(Level.FINE, "received shipping schedule on {0,date}",
+ schedule.getShipDate().toGregorianCalendar().getTime());
+ }
+}
Property changes on:
trunk/samples/quickstart/purchase/war/src/org/jboss/soa/bpel/samples/quickstart/purchase/SchedulingPT_Impl.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
trunk/samples/quickstart/purchase/war/src/org/jboss/soa/bpel/samples/quickstart/purchase/ShippingInfo.java
===================================================================
---
trunk/samples/quickstart/purchase/war/src/org/jboss/soa/bpel/samples/quickstart/purchase/ShippingInfo.java
(rev 0)
+++
trunk/samples/quickstart/purchase/war/src/org/jboss/soa/bpel/samples/quickstart/purchase/ShippingInfo.java 2009-11-17
07:10:53 UTC (rev 267)
@@ -0,0 +1,46 @@
+package org.jboss.soa.bpel.samples.quickstart.purchase;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlType;
+
+/**
+ * <p>
+ * Java class for shippingInfo complex type.
+ * <p>
+ * The following schema fragment specifies the expected content contained within
+ * this class.
+ *
+ * <pre>
+ * <complexType name="shippingInfo">
+ * <complexContent>
+ * <restriction
base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="shippingPrice"
type="{http://www.w3.org/2001/XMLSchema}float"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ */
+(a)XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "shippingInfo", propOrder = { "shippingPrice" })
+public class ShippingInfo {
+
+ protected float shippingPrice;
+
+ /**
+ * Gets the value of the shippingPrice property.
+ */
+ public float getShippingPrice() {
+ return shippingPrice;
+ }
+
+ /**
+ * Sets the value of the shippingPrice property.
+ */
+ public void setShippingPrice(float value) {
+ this.shippingPrice = value;
+ }
+
+}
Property changes on:
trunk/samples/quickstart/purchase/war/src/org/jboss/soa/bpel/samples/quickstart/purchase/ShippingInfo.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
trunk/samples/quickstart/purchase/war/src/org/jboss/soa/bpel/samples/quickstart/purchase/ShippingPT.java
===================================================================
---
trunk/samples/quickstart/purchase/war/src/org/jboss/soa/bpel/samples/quickstart/purchase/ShippingPT.java
(rev 0)
+++
trunk/samples/quickstart/purchase/war/src/org/jboss/soa/bpel/samples/quickstart/purchase/ShippingPT.java 2009-11-17
07:10:53 UTC (rev 267)
@@ -0,0 +1,28 @@
+package org.jboss.soa.bpel.samples.quickstart.purchase;
+
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebResult;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+
+/**
+ * This class was generated by the JAX-WS RI. JAX-WS RI 2.1.6 Generated source
+ * version: 2.1
+ */
+@WebService(name = "shippingPT", targetNamespace =
"http://manufacturing.org/wsdl/purchase")
+@SOAPBinding(style = SOAPBinding.Style.RPC)
+public interface ShippingPT {
+
+ /**
+ * @param customerInfo
+ * @return returns org.jboss.soa.bpel.samples.quickstart.purchase.ShippingInfo
+ * @throws OrderFaultType
+ */
+ @WebMethod(action = "http://manufacturing.org/wsdl/purchase")
+ @WebResult(name = "shippingInfo", partName = "shippingInfo")
+ public ShippingInfo requestShipping(
+ @WebParam(name = "customerInfo", partName = "customerInfo")
CustomerInfo customerInfo)
+ throws OrderFaultType;
+
+}
Property changes on:
trunk/samples/quickstart/purchase/war/src/org/jboss/soa/bpel/samples/quickstart/purchase/ShippingPT.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
trunk/samples/quickstart/purchase/war/src/org/jboss/soa/bpel/samples/quickstart/purchase/ShippingPT_Impl.java
===================================================================
---
trunk/samples/quickstart/purchase/war/src/org/jboss/soa/bpel/samples/quickstart/purchase/ShippingPT_Impl.java
(rev 0)
+++
trunk/samples/quickstart/purchase/war/src/org/jboss/soa/bpel/samples/quickstart/purchase/ShippingPT_Impl.java 2009-11-17
07:10:53 UTC (rev 267)
@@ -0,0 +1,102 @@
+/*
+ * 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.purchase;
+
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+import javax.annotation.Resource;
+import javax.jms.Connection;
+import javax.jms.ConnectionFactory;
+import javax.jms.JMSException;
+import javax.jms.MapMessage;
+import javax.jms.MessageProducer;
+import javax.jms.Queue;
+import javax.jms.Session;
+import javax.jws.WebService;
+
+/**
+ * Shipping endpoint bean.
+ *
+ * @author Jeff DeLong
+ * @author Alejandro Guizar
+ */
+@WebService(endpointInterface =
"org.jboss.soa.bpel.samples.quickstart.purchase.ShippingPT", targetNamespace =
"http://manufacturing.org/wsdl/purchase", serviceName = "shippingSVC",
portName = "shippingSP")
+public class ShippingPT_Impl implements ShippingPT {
+
+ @Resource
+ private Queue shippingQueue;
+ @Resource
+ private ConnectionFactory connectionFactory;
+ @Resource
+ private float shippingPrice;
+
+ private final Logger logger =
+ Logger.getLogger(ShippingPT_Impl.class.getName());
+
+ /**
+ * Returns shipping price synchronously and date asynchronously.
+ */
+ public ShippingInfo requestShipping(CustomerInfo customerInfo)
+ throws OrderFaultType {
+ // check the address before accepting the shipping
+ String address = customerInfo.getAddress();
+ if (address.indexOf("Elm St") != -1) {
+ // we do not ship to Elm St, it is a scary place
+ ProblemInfo problemInfo = new ProblemInfo();
+ problemInfo.setDetail("Shipping to address '" + address
+ + "' is not available");
+ throw new OrderFaultType("shipping unavailable", problemInfo);
+ }
+
+ try {
+ sendShippingMessage(customerInfo.getCustomerId());
+ }
+ catch (JMSException e) {
+ logger.log(Level.SEVERE, "failed to send shipping message", e);
+ }
+
+ ShippingInfo shippingInfo = new ShippingInfo();
+ shippingInfo.setShippingPrice(shippingPrice);
+ return shippingInfo;
+ }
+
+ protected void sendShippingMessage(String customerId) throws JMSException {
+ Connection connection = connectionFactory.createConnection();
+ try {
+ // create a session
+ Session session =
+ connection.createSession(false, Session.CLIENT_ACKNOWLEDGE);
+ try {
+ // create the message
+ MapMessage message = session.createMapMessage();
+ message.setString("customerId", customerId);
+
+ // send it!
+ MessageProducer producer = session.createProducer(shippingQueue);
+ producer.send(message);
+
+ logger.log(Level.FINE, "sent shipping message for customer {0}",
+ customerId);
+ }
+ finally {
+ session.close();
+ }
+ }
+ finally {
+ connection.close();
+ }
+ }
+}
Property changes on:
trunk/samples/quickstart/purchase/war/src/org/jboss/soa/bpel/samples/quickstart/purchase/ShippingPT_Impl.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
trunk/samples/quickstart/purchase/war/src/org/jboss/soa/bpel/samples/quickstart/purchase/package-info.java
===================================================================
---
trunk/samples/quickstart/purchase/war/src/org/jboss/soa/bpel/samples/quickstart/purchase/package-info.java
(rev 0)
+++
trunk/samples/quickstart/purchase/war/src/org/jboss/soa/bpel/samples/quickstart/purchase/package-info.java 2009-11-17
07:10:53 UTC (rev 267)
@@ -0,0 +1,3 @@
+(a)javax.xml.bind.annotation.XmlSchema(namespace =
"http://manufacturing.org/xsd/purchase")
+package org.jboss.soa.bpel.samples.quickstart.purchase;
+
Property changes on:
trunk/samples/quickstart/purchase/war/src/org/jboss/soa/bpel/samples/quickstart/purchase/package-info.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF