Author: objectiser
Date: 2010-02-01 12:44:33 -0500 (Mon, 01 Feb 2010)
New Revision: 486
Added:
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/QuickstartESBBPELHelloWorldExtendedTimeoutTestCase.java
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/QuickstartESBBPELHelloWorldNoExtendedTimeoutTestCase.java
trunk/integration-tests/src/test/resources/samples/Quickstart_esb_bpel_hello_world_extended_timeout/
trunk/integration-tests/src/test/resources/samples/Quickstart_esb_bpel_hello_world_extended_timeout/build.xml
trunk/integration-tests/src/test/resources/samples/Quickstart_esb_bpel_hello_world_extended_timeout/deployment.xml
trunk/integration-tests/src/test/resources/samples/Quickstart_esb_bpel_hello_world_extended_timeout/jbm-queue-service.xml
trunk/integration-tests/src/test/resources/samples/Quickstart_esb_bpel_hello_world_extended_timeout/jboss-esb.xml
trunk/integration-tests/src/test/resources/samples/Quickstart_esb_bpel_hello_world_extended_timeout/src/
trunk/integration-tests/src/test/resources/samples/Quickstart_esb_bpel_hello_world_extended_timeout/src/org/
trunk/integration-tests/src/test/resources/samples/Quickstart_esb_bpel_hello_world_extended_timeout/src/org/jboss/
trunk/integration-tests/src/test/resources/samples/Quickstart_esb_bpel_hello_world_extended_timeout/src/org/jboss/soa/
trunk/integration-tests/src/test/resources/samples/Quickstart_esb_bpel_hello_world_extended_timeout/src/org/jboss/soa/esb/
trunk/integration-tests/src/test/resources/samples/Quickstart_esb_bpel_hello_world_extended_timeout/src/org/jboss/soa/esb/samples/
trunk/integration-tests/src/test/resources/samples/Quickstart_esb_bpel_hello_world_extended_timeout/src/org/jboss/soa/esb/samples/quickstart/
trunk/integration-tests/src/test/resources/samples/Quickstart_esb_bpel_hello_world_extended_timeout/src/org/jboss/soa/esb/samples/quickstart/helloworld/
trunk/integration-tests/src/test/resources/samples/Quickstart_esb_bpel_hello_world_extended_timeout/src/org/jboss/soa/esb/samples/quickstart/helloworld/test/
trunk/integration-tests/src/test/resources/samples/Quickstart_esb_bpel_hello_world_extended_timeout/src/org/jboss/soa/esb/samples/quickstart/helloworld/test/SendEsbMessage.java
trunk/integration-tests/src/test/resources/samples/Quickstart_esb_bpel_hello_world_no_extended_timeout/
trunk/integration-tests/src/test/resources/samples/Quickstart_esb_bpel_hello_world_no_extended_timeout/build.xml
trunk/integration-tests/src/test/resources/samples/Quickstart_esb_bpel_hello_world_no_extended_timeout/deployment.xml
trunk/integration-tests/src/test/resources/samples/Quickstart_esb_bpel_hello_world_no_extended_timeout/jbm-queue-service.xml
trunk/integration-tests/src/test/resources/samples/Quickstart_esb_bpel_hello_world_no_extended_timeout/jboss-esb.xml
trunk/integration-tests/src/test/resources/samples/Quickstart_esb_bpel_hello_world_no_extended_timeout/src/
trunk/integration-tests/src/test/resources/samples/Quickstart_esb_bpel_hello_world_no_extended_timeout/src/org/
trunk/integration-tests/src/test/resources/samples/Quickstart_esb_bpel_hello_world_no_extended_timeout/src/org/jboss/
trunk/integration-tests/src/test/resources/samples/Quickstart_esb_bpel_hello_world_no_extended_timeout/src/org/jboss/soa/
trunk/integration-tests/src/test/resources/samples/Quickstart_esb_bpel_hello_world_no_extended_timeout/src/org/jboss/soa/esb/
trunk/integration-tests/src/test/resources/samples/Quickstart_esb_bpel_hello_world_no_extended_timeout/src/org/jboss/soa/esb/samples/
trunk/integration-tests/src/test/resources/samples/Quickstart_esb_bpel_hello_world_no_extended_timeout/src/org/jboss/soa/esb/samples/quickstart/
trunk/integration-tests/src/test/resources/samples/Quickstart_esb_bpel_hello_world_no_extended_timeout/src/org/jboss/soa/esb/samples/quickstart/helloworld/
trunk/integration-tests/src/test/resources/samples/Quickstart_esb_bpel_hello_world_no_extended_timeout/src/org/jboss/soa/esb/samples/quickstart/helloworld/test/
trunk/integration-tests/src/test/resources/samples/Quickstart_esb_bpel_hello_world_no_extended_timeout/src/org/jboss/soa/esb/samples/quickstart/helloworld/test/SendEsbMessage.java
Modified:
trunk/docs/docbook/userguide/src/main/module/esb.xml
trunk/integration-tests/build.xml
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/RiftSawTest.java
trunk/runtime/jbossesb-bpel/src/main/java/org/jboss/internal/soa/esb/actions/bpel/ESBInvocationAdapter.java
trunk/runtime/jbossesb-bpel/src/main/java/org/jboss/soa/esb/actions/bpel/BPELInvoke.java
Log:
RIFTSAW-156 - added support for configuring the optional port name in the ESB action
BPELInvoke. This enables the endpoint specific configuration information, associated with
the service+port, to be used when invoking the BPEL process. Added two tests around the
timeout property, to test that specifying the port does pick up the endpoint config
properties correctly. Updated ESB chapter in user guide to describe new property.
Modified: trunk/docs/docbook/userguide/src/main/module/esb.xml
===================================================================
--- trunk/docs/docbook/userguide/src/main/module/esb.xml 2010-02-01 13:31:46 UTC (rev
485)
+++ trunk/docs/docbook/userguide/src/main/module/esb.xml 2010-02-01 17:44:33 UTC (rev
486)
@@ -46,6 +46,7 @@
<programlisting role="XML" ><![CDATA[
<action name="action2"
class="org.jboss.soa.esb.actions.bpel.BPELInvoke">
<property name="service"
value="{http://www.jboss.org/bpel/examples/wsdl}HelloService"/>
+ <property name="port" value="HelloPort" />
<property name="operation" value="hello" />
<property name="requestPartName" value="TestPart" />
<property name="responsePartName" value="TestPart" />
@@ -73,6 +74,16 @@
</listitem>
<listitem>
<para>
+ port
+ </para>
+ <para>
+ This property is optional, and defines the port name registered in the WSDL
associated
+ with the deployed BPEL process. This parameter is only required if port
specific endpoint
+ configuration information has been registered as part of the BPEL process
deployment.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
operation
</para>
<para>
@@ -100,6 +111,17 @@
message value will be placed in the ESB message.
</para>
</listitem>
+ <listitem>
+ <para>
+ abortOnFault
+ </para>
+ <para>
+ This optional property can be used to indicate whether a fault, generated
during the
+ invocation of a BPEL process, should be treated as a message (when the value of
this
+ property is 'false'), or as an exception that will abort the ESB
service. The default
+ value is 'true', causing the ESB service to abort.
+ </para>
+ </listitem>
</itemizedlist>
<para>
Modified: trunk/integration-tests/build.xml
===================================================================
--- trunk/integration-tests/build.xml 2010-02-01 13:31:46 UTC (rev 485)
+++ trunk/integration-tests/build.xml 2010-02-01 17:44:33 UTC (rev 486)
@@ -132,6 +132,8 @@
<ant
antfile="src/test/resources/samples/Quickstart_bpel_loan_approval/build.xml"
/>
<ant
antfile="src/test/resources/samples/Quickstart_esb_bpel_hello_world/build.xml"
/>
+ <ant
antfile="src/test/resources/samples/Quickstart_esb_bpel_hello_world_extended_timeout/build.xml"
/>
+ <ant
antfile="src/test/resources/samples/Quickstart_esb_bpel_hello_world_no_extended_timeout/build.xml"
/>
<ant
antfile="src/test/resources/samples/Quickstart_esb_bpel_loan_fault/build.xml"
/>
<ant antfile="src/test/resources/samples/Tutorial_bpel_atm/build.xml"
/>
Modified: trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/RiftSawTest.java
===================================================================
---
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/RiftSawTest.java 2010-02-01
13:31:46 UTC (rev 485)
+++
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/RiftSawTest.java 2010-02-01
17:44:33 UTC (rev 486)
@@ -137,7 +137,12 @@
}
protected String sendESBMessage(String message, String serviceCategory, String
serviceName)
- throws Exception {
+ throws Exception {
+ return(sendESBMessage(message, serviceCategory, serviceName, 10000));
+ }
+
+ protected String sendESBMessage(String message, String serviceCategory, String
serviceName, long timeout)
+ throws Exception {
String result=null;
System.setProperty("javax.xml.registry.ConnectionFactoryClass",
@@ -147,7 +152,7 @@
esbMessage.getBody().add(message);
- Message respMessage = new ServiceInvoker(serviceCategory,
serviceName).deliverSync(esbMessage, 10000);
+ Message respMessage = new ServiceInvoker(serviceCategory,
serviceName).deliverSync(esbMessage, timeout);
result = (String)respMessage.getBody().get();
Added:
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/QuickstartESBBPELHelloWorldExtendedTimeoutTestCase.java
===================================================================
---
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/QuickstartESBBPELHelloWorldExtendedTimeoutTestCase.java
(rev 0)
+++
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/QuickstartESBBPELHelloWorldExtendedTimeoutTestCase.java 2010-02-01
17:44:33 UTC (rev 486)
@@ -0,0 +1,50 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 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. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.soa.bpel.tests.samples;
+
+import org.jboss.soa.bpel.tests.RiftSawTest;
+import org.jboss.soa.bpel.tests.RiftSawTestSetup;
+
+import junit.framework.Test;
+
+/**
+ * Test case for running the Quickstart_bpel_hello_world_extended_timeout sample.
+ */
+public class QuickstartESBBPELHelloWorldExtendedTimeoutTestCase extends RiftSawTest {
+
+ private static final String TEST_NAME =
"Quickstart_esb_bpel_hello_world_extended_timeout";
+
+ public QuickstartESBBPELHelloWorldExtendedTimeoutTestCase() {
+ super(TEST_NAME);
+ }
+
+ public static Test suite() {
+ return(new RiftSawTestSetup(QuickstartESBBPELHelloWorldExtendedTimeoutTestCase.class,
+ TEST_NAME,
"Quickstart_esb_bpel_hello_world_extended_timeout.esb,../Quickstart_bpel_hello_world_extended_timeout/Quickstart_bpel_hello_world_extended_timeout-1.jar"));
+ }
+
+ public void testSendHello() throws Exception {
+ String result=sendESBMessage("Hello World via ESB to BPEL",
"HelloWorldBPELESB", "SayHello", 180000);
+
+ assertMessage(result, "Hello World via ESB to BPEL World");
+ }
+}
Added:
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/QuickstartESBBPELHelloWorldNoExtendedTimeoutTestCase.java
===================================================================
---
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/QuickstartESBBPELHelloWorldNoExtendedTimeoutTestCase.java
(rev 0)
+++
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/QuickstartESBBPELHelloWorldNoExtendedTimeoutTestCase.java 2010-02-01
17:44:33 UTC (rev 486)
@@ -0,0 +1,55 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 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. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.soa.bpel.tests.samples;
+
+import org.jboss.soa.bpel.tests.RiftSawTest;
+import org.jboss.soa.bpel.tests.RiftSawTestSetup;
+
+import junit.framework.Test;
+
+/**
+ * Test case for running the Quickstart_bpel_hello_world_no_extended_timeout sample.
+ */
+public class QuickstartESBBPELHelloWorldNoExtendedTimeoutTestCase extends RiftSawTest {
+
+ private static final String TEST_NAME =
"Quickstart_esb_bpel_hello_world_no_extended_timeout";
+
+ public QuickstartESBBPELHelloWorldNoExtendedTimeoutTestCase() {
+ super(TEST_NAME);
+ }
+
+ public static Test suite() {
+ return(new
RiftSawTestSetup(QuickstartESBBPELHelloWorldNoExtendedTimeoutTestCase.class,
+ TEST_NAME,
"Quickstart_esb_bpel_hello_world_no_extended_timeout.esb,../Quickstart_bpel_hello_world_extended_timeout/Quickstart_bpel_hello_world_extended_timeout-1.jar"));
+ }
+
+ public void testSendHello() throws Exception {
+
+ try {
+ sendESBMessage("Hello World via ESB to BPEL", "HelloWorldBPELESB",
"SayHello", 180000);
+
+ fail("Should have timed out due to default timeout period on BPEL
process");
+ } catch(Exception e) {
+ // Ignore - should fail due to timeout
+ }
+ }
+}
Added:
trunk/integration-tests/src/test/resources/samples/Quickstart_esb_bpel_hello_world_extended_timeout/build.xml
===================================================================
---
trunk/integration-tests/src/test/resources/samples/Quickstart_esb_bpel_hello_world_extended_timeout/build.xml
(rev 0)
+++
trunk/integration-tests/src/test/resources/samples/Quickstart_esb_bpel_hello_world_extended_timeout/build.xml 2010-02-01
17:44:33 UTC (rev 486)
@@ -0,0 +1,28 @@
+<project name="Quickstart_esb_bpel_hello_world_extended_timeout"
default="deploy" basedir=".">
+
+ <description>
+ ${ant.project.name}
+ ${line.separator}
+ </description>
+
+ <property name="deploy.dir" value="${basedir}/target/tests"/>
+ <property name="test.dir"
value="${basedir}/src/test/resources/samples/${ant.project.name}" />
+
+ <property name="sample.esb.name" value="${ant.project.name}.esb"
/>
+
+ <target name="deploy">
+ <echo>Deploy ${ant.project.name}</echo>
+ <mkdir dir="${deploy.dir}/${ant.project.name}" />
+ <zip destfile="${deploy.dir}/${ant.project.name}/${sample.esb.name}">
+ <zipfileset dir="${test.dir}" includes="deployment.xml"
fullpath="META-INF/deployment.xml"/>
+ <zipfileset dir="${test.dir}" includes="jboss-esb.xml"
fullpath="META-INF/jboss-esb.xml"/>
+ <zipfileset dir="${test.dir}" includes="jbm-queue-service.xml"
fullpath="jbm-queue-service.xml"/>
+ </zip>
+ </target>
+
+ <target name="undeploy">
+ <echo>Undeploy ${ant.project.name}</echo>
+ <delete file="${deploy.dir}/${sample.jar.name}" />
+ </target>
+
+</project>
Added:
trunk/integration-tests/src/test/resources/samples/Quickstart_esb_bpel_hello_world_extended_timeout/deployment.xml
===================================================================
---
trunk/integration-tests/src/test/resources/samples/Quickstart_esb_bpel_hello_world_extended_timeout/deployment.xml
(rev 0)
+++
trunk/integration-tests/src/test/resources/samples/Quickstart_esb_bpel_hello_world_extended_timeout/deployment.xml 2010-02-01
17:44:33 UTC (rev 486)
@@ -0,0 +1,6 @@
+<jbossesb-deployment>
+ <depends>jboss.bpel:service=BPELEngine</depends>
+
<depends>jboss.esb.quickstart.destination:service=Queue,name=quickstart_bpel_helloworld_Request_esb</depends>
+
<depends>jboss.esb.quickstart.destination:service=Queue,name=quickstart_bpel_helloworld_Request_esb_reply</depends>
+
<depends>jboss.esb.quickstart.destination:service=Queue,name=quickstart_bpel_helloworld_Request_gw</depends>
+</jbossesb-deployment>
Added:
trunk/integration-tests/src/test/resources/samples/Quickstart_esb_bpel_hello_world_extended_timeout/jbm-queue-service.xml
===================================================================
---
trunk/integration-tests/src/test/resources/samples/Quickstart_esb_bpel_hello_world_extended_timeout/jbm-queue-service.xml
(rev 0)
+++
trunk/integration-tests/src/test/resources/samples/Quickstart_esb_bpel_hello_world_extended_timeout/jbm-queue-service.xml 2010-02-01
17:44:33 UTC (rev 486)
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<server>
+ <mbean code="org.jboss.jms.server.destination.QueueService"
+
name="jboss.esb.quickstart.destination:service=Queue,name=quickstart_bpel_helloworld_Request_esb"
+ xmbean-dd="xmdesc/Queue-xmbean.xml">
+ <depends
optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
+ <depends>jboss.messaging:service=PostOffice</depends>
+ </mbean>
+ <mbean code="org.jboss.jms.server.destination.QueueService"
+
name="jboss.esb.quickstart.destination:service=Queue,name=quickstart_bpel_helloworld_Request_esb_reply"
+ xmbean-dd="xmdesc/Queue-xmbean.xml">
+ <depends
optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
+ <depends>jboss.messaging:service=PostOffice</depends>
+ </mbean>
+ <mbean code="org.jboss.jms.server.destination.QueueService"
+
name="jboss.esb.quickstart.destination:service=Queue,name=quickstart_bpel_helloworld_Request_gw"
+ xmbean-dd="xmdesc/Queue-xmbean.xml">
+ <depends
optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
+ <depends>jboss.messaging:service=PostOffice</depends>
+ </mbean>
+</server>
Added:
trunk/integration-tests/src/test/resources/samples/Quickstart_esb_bpel_hello_world_extended_timeout/jboss-esb.xml
===================================================================
---
trunk/integration-tests/src/test/resources/samples/Quickstart_esb_bpel_hello_world_extended_timeout/jboss-esb.xml
(rev 0)
+++
trunk/integration-tests/src/test/resources/samples/Quickstart_esb_bpel_hello_world_extended_timeout/jboss-esb.xml 2010-02-01
17:44:33 UTC (rev 486)
@@ -0,0 +1,54 @@
+<?xml version = "1.0" encoding = "UTF-8"?>
+<jbossesb
xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc...
parameterReloadSecs="5">
+
+ <providers>
+ <jms-provider name="JBossMQ"
connection-factory="ConnectionFactory">
+ <jms-bus busid="quickstartGwChannel">
+ <jms-message-filter
+ dest-type="QUEUE"
+ dest-name="queue/quickstart_bpel_helloworld_Request_gw"
+ />
+ </jms-bus>
+ <jms-bus busid="quickstartEsbChannel">
+ <jms-message-filter
+ dest-type="QUEUE"
+ dest-name="queue/quickstart_bpel_helloworld_Request_esb"
+ />
+ </jms-bus>
+
+ </jms-provider>
+ </providers>
+
+ <services>
+ <service
+ category="HelloWorldBPELESB"
+ name="SayHello"
+ description="Hello World">
+ <listeners>
+ <jms-listener name="JMS-Gateway"
+ busidref="quickstartGwChannel"
+ is-gateway="true" />
+ <jms-listener name="helloWorld"
+ busidref="quickstartEsbChannel" />
+ </listeners>
+ <actions>
+ <action name="action1"
class="org.jboss.soa.esb.actions.SystemPrintln">
+ <property name="printfull"
value="true"/>
+ </action>
+ <action name="action2"
class="org.jboss.soa.esb.actions.bpel.BPELInvoke">
+ <property name="service"
value="{http://www.jboss.org/bpel/examples/wsdl}HelloExtendedTimeout...
+ <property name="port"
value="HelloExtendedTimeoutPort" />
+ <property name="operation" value="hello"
/>
+ <property name="requestPartName" value="TestPart" />
+ <property name="responsePartName" value="TestPart"
/>
+ </action>
+ <!-- The next action is for Continuous Integration testing -->
+ <action name="testStore"
class="org.jboss.soa.esb.actions.TestMessageStore"/>
+ <action name="action4"
class="org.jboss.soa.esb.actions.SystemPrintln">
+ <property name="printfull"
value="true"/>
+ </action>
+ </actions>
+ </service>
+ </services>
+
+</jbossesb>
Added:
trunk/integration-tests/src/test/resources/samples/Quickstart_esb_bpel_hello_world_extended_timeout/src/org/jboss/soa/esb/samples/quickstart/helloworld/test/SendEsbMessage.java
===================================================================
---
trunk/integration-tests/src/test/resources/samples/Quickstart_esb_bpel_hello_world_extended_timeout/src/org/jboss/soa/esb/samples/quickstart/helloworld/test/SendEsbMessage.java
(rev 0)
+++
trunk/integration-tests/src/test/resources/samples/Quickstart_esb_bpel_hello_world_extended_timeout/src/org/jboss/soa/esb/samples/quickstart/helloworld/test/SendEsbMessage.java 2010-02-01
17:44:33 UTC (rev 486)
@@ -0,0 +1,61 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 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. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+
+package org.jboss.soa.esb.samples.quickstart.helloworld.test;
+
+import org.jboss.soa.esb.message.Message;
+import org.jboss.soa.esb.message.format.MessageFactory;
+import org.jboss.soa.esb.client.ServiceInvoker;
+
+/**
+ * Standalone class with to send ESB messages to a 'known' [category,name].
+ * <p/> arg0 - service category
+ * <br/>arg1 - service name
+ * <br/>arg2 - Text of message to send
+ *
+ * @author <a
href="mailto:schifest@heuristica.com.ar">schifest@heuristica.com.ar</a>
+ * @since Version 4.0
+ *
+ */
+public class SendEsbMessage
+{
+ public static void main(String args[]) throws Exception
+ {
+// Setting the ConnectionFactory such that it will use scout
+
System.setProperty("javax.xml.registry.ConnectionFactoryClass","org.apache.ws.scout.registry.ConnectionFactoryImpl");
+
+ if (args.length < 3)
+ {
+ System.err.println("Usage SendEsbMessage <category> <name>
<text to send>");
+ System.exit(1);
+ }
+
+ Message esbMessage = MessageFactory.getInstance().getMessage();
+
+ esbMessage.getBody().add(args[2]);
+
+ Message respMessage = new ServiceInvoker(args[0],
args[1]).deliverSync(esbMessage, 5000);
+
+ System.out.println("REPLY: "+respMessage.getBody().get());
+ }
+
+}
Added:
trunk/integration-tests/src/test/resources/samples/Quickstart_esb_bpel_hello_world_no_extended_timeout/build.xml
===================================================================
---
trunk/integration-tests/src/test/resources/samples/Quickstart_esb_bpel_hello_world_no_extended_timeout/build.xml
(rev 0)
+++
trunk/integration-tests/src/test/resources/samples/Quickstart_esb_bpel_hello_world_no_extended_timeout/build.xml 2010-02-01
17:44:33 UTC (rev 486)
@@ -0,0 +1,28 @@
+<project name="Quickstart_esb_bpel_hello_world_no_extended_timeout"
default="deploy" basedir=".">
+
+ <description>
+ ${ant.project.name}
+ ${line.separator}
+ </description>
+
+ <property name="deploy.dir" value="${basedir}/target/tests"/>
+ <property name="test.dir"
value="${basedir}/src/test/resources/samples/${ant.project.name}" />
+
+ <property name="sample.esb.name" value="${ant.project.name}.esb"
/>
+
+ <target name="deploy">
+ <echo>Deploy ${ant.project.name}</echo>
+ <mkdir dir="${deploy.dir}/${ant.project.name}" />
+ <zip destfile="${deploy.dir}/${ant.project.name}/${sample.esb.name}">
+ <zipfileset dir="${test.dir}" includes="deployment.xml"
fullpath="META-INF/deployment.xml"/>
+ <zipfileset dir="${test.dir}" includes="jboss-esb.xml"
fullpath="META-INF/jboss-esb.xml"/>
+ <zipfileset dir="${test.dir}" includes="jbm-queue-service.xml"
fullpath="jbm-queue-service.xml"/>
+ </zip>
+ </target>
+
+ <target name="undeploy">
+ <echo>Undeploy ${ant.project.name}</echo>
+ <delete file="${deploy.dir}/${sample.jar.name}" />
+ </target>
+
+</project>
Added:
trunk/integration-tests/src/test/resources/samples/Quickstart_esb_bpel_hello_world_no_extended_timeout/deployment.xml
===================================================================
---
trunk/integration-tests/src/test/resources/samples/Quickstart_esb_bpel_hello_world_no_extended_timeout/deployment.xml
(rev 0)
+++
trunk/integration-tests/src/test/resources/samples/Quickstart_esb_bpel_hello_world_no_extended_timeout/deployment.xml 2010-02-01
17:44:33 UTC (rev 486)
@@ -0,0 +1,6 @@
+<jbossesb-deployment>
+ <depends>jboss.bpel:service=BPELEngine</depends>
+
<depends>jboss.esb.quickstart.destination:service=Queue,name=quickstart_bpel_helloworld_Request_esb</depends>
+
<depends>jboss.esb.quickstart.destination:service=Queue,name=quickstart_bpel_helloworld_Request_esb_reply</depends>
+
<depends>jboss.esb.quickstart.destination:service=Queue,name=quickstart_bpel_helloworld_Request_gw</depends>
+</jbossesb-deployment>
Added:
trunk/integration-tests/src/test/resources/samples/Quickstart_esb_bpel_hello_world_no_extended_timeout/jbm-queue-service.xml
===================================================================
---
trunk/integration-tests/src/test/resources/samples/Quickstart_esb_bpel_hello_world_no_extended_timeout/jbm-queue-service.xml
(rev 0)
+++
trunk/integration-tests/src/test/resources/samples/Quickstart_esb_bpel_hello_world_no_extended_timeout/jbm-queue-service.xml 2010-02-01
17:44:33 UTC (rev 486)
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<server>
+ <mbean code="org.jboss.jms.server.destination.QueueService"
+
name="jboss.esb.quickstart.destination:service=Queue,name=quickstart_bpel_helloworld_Request_esb"
+ xmbean-dd="xmdesc/Queue-xmbean.xml">
+ <depends
optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
+ <depends>jboss.messaging:service=PostOffice</depends>
+ </mbean>
+ <mbean code="org.jboss.jms.server.destination.QueueService"
+
name="jboss.esb.quickstart.destination:service=Queue,name=quickstart_bpel_helloworld_Request_esb_reply"
+ xmbean-dd="xmdesc/Queue-xmbean.xml">
+ <depends
optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
+ <depends>jboss.messaging:service=PostOffice</depends>
+ </mbean>
+ <mbean code="org.jboss.jms.server.destination.QueueService"
+
name="jboss.esb.quickstart.destination:service=Queue,name=quickstart_bpel_helloworld_Request_gw"
+ xmbean-dd="xmdesc/Queue-xmbean.xml">
+ <depends
optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
+ <depends>jboss.messaging:service=PostOffice</depends>
+ </mbean>
+</server>
Added:
trunk/integration-tests/src/test/resources/samples/Quickstart_esb_bpel_hello_world_no_extended_timeout/jboss-esb.xml
===================================================================
---
trunk/integration-tests/src/test/resources/samples/Quickstart_esb_bpel_hello_world_no_extended_timeout/jboss-esb.xml
(rev 0)
+++
trunk/integration-tests/src/test/resources/samples/Quickstart_esb_bpel_hello_world_no_extended_timeout/jboss-esb.xml 2010-02-01
17:44:33 UTC (rev 486)
@@ -0,0 +1,53 @@
+<?xml version = "1.0" encoding = "UTF-8"?>
+<jbossesb
xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc...
parameterReloadSecs="5">
+
+ <providers>
+ <jms-provider name="JBossMQ"
connection-factory="ConnectionFactory">
+ <jms-bus busid="quickstartGwChannel">
+ <jms-message-filter
+ dest-type="QUEUE"
+ dest-name="queue/quickstart_bpel_helloworld_Request_gw"
+ />
+ </jms-bus>
+ <jms-bus busid="quickstartEsbChannel">
+ <jms-message-filter
+ dest-type="QUEUE"
+ dest-name="queue/quickstart_bpel_helloworld_Request_esb"
+ />
+ </jms-bus>
+
+ </jms-provider>
+ </providers>
+
+ <services>
+ <service
+ category="HelloWorldBPELESB"
+ name="SayHello"
+ description="Hello World">
+ <listeners>
+ <jms-listener name="JMS-Gateway"
+ busidref="quickstartGwChannel"
+ is-gateway="true" />
+ <jms-listener name="helloWorld"
+ busidref="quickstartEsbChannel" />
+ </listeners>
+ <actions>
+ <action name="action1"
class="org.jboss.soa.esb.actions.SystemPrintln">
+ <property name="printfull"
value="true"/>
+ </action>
+ <action name="action2"
class="org.jboss.soa.esb.actions.bpel.BPELInvoke">
+ <property name="service"
value="{http://www.jboss.org/bpel/examples/wsdl}HelloExtendedTimeout...
+ <property name="operation" value="hello"
/>
+ <property name="requestPartName" value="TestPart" />
+ <property name="responsePartName" value="TestPart"
/>
+ </action>
+ <!-- The next action is for Continuous Integration testing -->
+ <action name="testStore"
class="org.jboss.soa.esb.actions.TestMessageStore"/>
+ <action name="action4"
class="org.jboss.soa.esb.actions.SystemPrintln">
+ <property name="printfull"
value="true"/>
+ </action>
+ </actions>
+ </service>
+ </services>
+
+</jbossesb>
Added:
trunk/integration-tests/src/test/resources/samples/Quickstart_esb_bpel_hello_world_no_extended_timeout/src/org/jboss/soa/esb/samples/quickstart/helloworld/test/SendEsbMessage.java
===================================================================
---
trunk/integration-tests/src/test/resources/samples/Quickstart_esb_bpel_hello_world_no_extended_timeout/src/org/jboss/soa/esb/samples/quickstart/helloworld/test/SendEsbMessage.java
(rev 0)
+++
trunk/integration-tests/src/test/resources/samples/Quickstart_esb_bpel_hello_world_no_extended_timeout/src/org/jboss/soa/esb/samples/quickstart/helloworld/test/SendEsbMessage.java 2010-02-01
17:44:33 UTC (rev 486)
@@ -0,0 +1,61 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 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. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+
+package org.jboss.soa.esb.samples.quickstart.helloworld.test;
+
+import org.jboss.soa.esb.message.Message;
+import org.jboss.soa.esb.message.format.MessageFactory;
+import org.jboss.soa.esb.client.ServiceInvoker;
+
+/**
+ * Standalone class with to send ESB messages to a 'known' [category,name].
+ * <p/> arg0 - service category
+ * <br/>arg1 - service name
+ * <br/>arg2 - Text of message to send
+ *
+ * @author <a
href="mailto:schifest@heuristica.com.ar">schifest@heuristica.com.ar</a>
+ * @since Version 4.0
+ *
+ */
+public class SendEsbMessage
+{
+ public static void main(String args[]) throws Exception
+ {
+// Setting the ConnectionFactory such that it will use scout
+
System.setProperty("javax.xml.registry.ConnectionFactoryClass","org.apache.ws.scout.registry.ConnectionFactoryImpl");
+
+ if (args.length < 3)
+ {
+ System.err.println("Usage SendEsbMessage <category> <name>
<text to send>");
+ System.exit(1);
+ }
+
+ Message esbMessage = MessageFactory.getInstance().getMessage();
+
+ esbMessage.getBody().add(args[2]);
+
+ Message respMessage = new ServiceInvoker(args[0],
args[1]).deliverSync(esbMessage, 5000);
+
+ System.out.println("REPLY: "+respMessage.getBody().get());
+ }
+
+}
Modified:
trunk/runtime/jbossesb-bpel/src/main/java/org/jboss/internal/soa/esb/actions/bpel/ESBInvocationAdapter.java
===================================================================
---
trunk/runtime/jbossesb-bpel/src/main/java/org/jboss/internal/soa/esb/actions/bpel/ESBInvocationAdapter.java 2010-02-01
13:31:46 UTC (rev 485)
+++
trunk/runtime/jbossesb-bpel/src/main/java/org/jboss/internal/soa/esb/actions/bpel/ESBInvocationAdapter.java 2010-02-01
17:44:33 UTC (rev 486)
@@ -35,14 +35,16 @@
{
private String operationName;
private QName serviceName;
+ private String portName;
private QName faultName;
private Element requestXML;
private Element responseXML;
- public ESBInvocationAdapter(String operationName, QName serviceName)
+ public ESBInvocationAdapter(String operationName, QName serviceName, String portName)
{
this.operationName = operationName;
this.serviceName = serviceName;
+ this.portName = portName;
}
public String getOperationName()
@@ -65,7 +67,7 @@
}
public String getPortName() {
- return(null);
+ return(portName);
}
public void setRequestXML(Element requestXML)
Modified:
trunk/runtime/jbossesb-bpel/src/main/java/org/jboss/soa/esb/actions/bpel/BPELInvoke.java
===================================================================
---
trunk/runtime/jbossesb-bpel/src/main/java/org/jboss/soa/esb/actions/bpel/BPELInvoke.java 2010-02-01
13:31:46 UTC (rev 485)
+++
trunk/runtime/jbossesb-bpel/src/main/java/org/jboss/soa/esb/actions/bpel/BPELInvoke.java 2010-02-01
17:44:33 UTC (rev 486)
@@ -49,6 +49,7 @@
protected static final String REQUEST_PART_NAME = "requestPartName";
protected static final String RESPONSE_PART_NAME = "responsePartName";
protected static final String SERVICE = "service";
+ protected static final String PORT = "port";
protected static final String OPERATION = "operation";
protected static final String ABORT_ON_FAULT = "abortOnFault";
@@ -184,7 +185,7 @@
// Create invocationContext
ESBInvocationAdapter invocationContext =
- new ESBInvocationAdapter(_config.getAttribute(OPERATION), qname);
+ new ESBInvocationAdapter(_config.getAttribute(OPERATION), qname,
_config.getAttribute(PORT));
invocationContext.setRequestXML(mesgElem);
// invoke ODE