Author: objectiser
Date: 2009-10-27 15:16:58 -0400 (Tue, 27 Oct 2009)
New Revision: 204
Added:
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/QuickstartESBBPELHelloWorldTestCase.java
trunk/integration-tests/src/test/resources/conf/
trunk/integration-tests/src/test/resources/conf/jbossesb-properties.xml
trunk/integration-tests/src/test/resources/conf/jndi.properties
trunk/integration-tests/src/test/resources/conf/juddi.properties
trunk/integration-tests/src/test/resources/conf/log4j.xml
trunk/integration-tests/src/test/resources/samples/Quickstart_esb_bpel_hello_world/
trunk/integration-tests/src/test/resources/samples/Quickstart_esb_bpel_hello_world/build.xml
trunk/integration-tests/src/test/resources/samples/Quickstart_esb_bpel_hello_world/deployment.xml
trunk/integration-tests/src/test/resources/samples/Quickstart_esb_bpel_hello_world/jbm-queue-service.xml
trunk/integration-tests/src/test/resources/samples/Quickstart_esb_bpel_hello_world/jbmq-queue-service.xml
trunk/integration-tests/src/test/resources/samples/Quickstart_esb_bpel_hello_world/jboss-esb.xml
trunk/integration-tests/src/test/resources/samples/Quickstart_esb_bpel_hello_world/jbossesb-properties.xml
trunk/integration-tests/src/test/resources/samples/Quickstart_esb_bpel_hello_world/jndi.properties
trunk/integration-tests/src/test/resources/samples/Quickstart_esb_bpel_hello_world/juddi.properties
trunk/integration-tests/src/test/resources/samples/Quickstart_esb_bpel_hello_world/lib/
trunk/integration-tests/src/test/resources/samples/Quickstart_esb_bpel_hello_world/log4j.xml
trunk/integration-tests/src/test/resources/samples/Quickstart_esb_bpel_hello_world/src/
trunk/integration-tests/src/test/resources/samples/Quickstart_esb_bpel_hello_world/src/org/
trunk/integration-tests/src/test/resources/samples/Quickstart_esb_bpel_hello_world/src/org/jboss/
trunk/integration-tests/src/test/resources/samples/Quickstart_esb_bpel_hello_world/src/org/jboss/soa/
trunk/integration-tests/src/test/resources/samples/Quickstart_esb_bpel_hello_world/src/org/jboss/soa/esb/
trunk/integration-tests/src/test/resources/samples/Quickstart_esb_bpel_hello_world/src/org/jboss/soa/esb/samples/
trunk/integration-tests/src/test/resources/samples/Quickstart_esb_bpel_hello_world/src/org/jboss/soa/esb/samples/quickstart/
trunk/integration-tests/src/test/resources/samples/Quickstart_esb_bpel_hello_world/src/org/jboss/soa/esb/samples/quickstart/helloworld/
trunk/integration-tests/src/test/resources/samples/Quickstart_esb_bpel_hello_world/src/org/jboss/soa/esb/samples/quickstart/helloworld/test/
trunk/integration-tests/src/test/resources/samples/Quickstart_esb_bpel_hello_world/src/org/jboss/soa/esb/samples/quickstart/helloworld/test/SendEsbMessage.java
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/RiftSawTestHelper.java
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/QuickstartBPELHelloWorldTestCase.java
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/QuickstartBPELLoanApprovalTestCase.java
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/QuickstartBPELSimpleCorrelationTestCase.java
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/QuickstartBPELSimpleInvokeTestCase.java
Log:
Added first ESB related test - does not fully work at present.
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 2009-10-26
11:08:27 UTC (rev 203)
+++
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/RiftSawTest.java 2009-10-27
19:16:58 UTC (rev 204)
@@ -34,6 +34,9 @@
import org.apache.commons.httpclient.methods.PostMethod;
import org.apache.commons.httpclient.methods.StringRequestEntity;
import org.jboss.logging.Logger;
+import org.jboss.soa.esb.message.Message;
+import org.jboss.soa.esb.message.format.MessageFactory;
+import org.jboss.soa.esb.client.ServiceInvoker;
/**
* Base class for RiftSaw test cases. Based on
@@ -82,7 +85,7 @@
return delegate.getTestFileURL(getTestSuiteName(), filename);
}
- protected void assertMessage(String message, String mesgFile) throws Exception {
+ protected void assertMessageFromFile(String message, String mesgFile) throws Exception
{
String
mesgpath=System.getProperty("test.dir")+java.io.File.separator+getTestSuiteName()+
java.io.File.separator+mesgFile;
@@ -100,7 +103,16 @@
}
}
- protected String sendMessage(String mesgFile, String url) throws Exception {
+ protected void assertMessage(String message, String comparison) throws Exception {
+ message = message.trim();
+
+ if (!comparison.equals(message)) {
+ fail("Expected message has content ["+comparison+
+ "] which is not the same as ["+message+"], lengths
"+comparison.length()+" to "+message.length());
+ }
+ }
+
+ protected String sendSOAPMessage(String mesgFile, String url) throws Exception {
String
mesgpath=System.getProperty("test.dir")+java.io.File.separator+getTestSuiteName()+
java.io.File.separator+mesgFile;
@@ -123,4 +135,22 @@
return(result);
}
+
+ protected String sendESBMessage(String message, String serviceCategory, String
serviceName)
+ throws Exception {
+ String result=null;
+
+ System.setProperty("javax.xml.registry.ConnectionFactoryClass",
+ "org.apache.ws.scout.registry.ConnectionFactoryImpl");
+
+ Message esbMessage = MessageFactory.getInstance().getMessage();
+
+ esbMessage.getBody().add(message);
+
+ Message respMessage = new ServiceInvoker(serviceCategory,
serviceName).deliverSync(esbMessage, 10000);
+
+ result = (String)respMessage.getBody().get();
+
+ return(result);
+ }
}
Modified:
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/RiftSawTestHelper.java
===================================================================
---
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/RiftSawTestHelper.java 2009-10-26
11:08:27 UTC (rev 203)
+++
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/RiftSawTestHelper.java 2009-10-27
19:16:58 UTC (rev 204)
@@ -96,7 +96,7 @@
return file;
String notSet = (getTestArchiveDir() == null ? " System property '" +
SYSPROP_TEST_ARCHIVE_DIRECTORY + "' not set." : "");
- throw new IllegalArgumentException("Cannot obtain '" +
getTestArchiveDir() + "/" + archive + "'." + notSet);
+ throw new IllegalArgumentException("Cannot obtain '" + file +
"'." + notSet);
}
public static String getTestArchiveDir() {
Modified:
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/QuickstartBPELHelloWorldTestCase.java
===================================================================
---
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/QuickstartBPELHelloWorldTestCase.java 2009-10-26
11:08:27 UTC (rev 203)
+++
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/QuickstartBPELHelloWorldTestCase.java 2009-10-27
19:16:58 UTC (rev 204)
@@ -43,9 +43,9 @@
}
public void testSendHello() throws Exception {
- String result=sendMessage("hello_request1.xml",
+ String result=sendSOAPMessage("hello_request1.xml",
"http://localhost:8080/bpel/processes/helloWorld");
- assertMessage(result, "hello_response1.xml");
+ assertMessageFromFile(result, "hello_response1.xml");
}
}
Modified:
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/QuickstartBPELLoanApprovalTestCase.java
===================================================================
---
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/QuickstartBPELLoanApprovalTestCase.java 2009-10-26
11:08:27 UTC (rev 203)
+++
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/QuickstartBPELLoanApprovalTestCase.java 2009-10-27
19:16:58 UTC (rev 204)
@@ -43,9 +43,9 @@
}
public void testSendHello() throws Exception {
- String result=sendMessage("loanreq1.xml",
+ String result=sendSOAPMessage("loanreq1.xml",
"http://localhost:8080/bpel/processes/loanService");
- assertMessage(result, "loanresp1.xml");
+ assertMessageFromFile(result, "loanresp1.xml");
}
}
Modified:
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/QuickstartBPELSimpleCorrelationTestCase.java
===================================================================
---
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/QuickstartBPELSimpleCorrelationTestCase.java 2009-10-26
11:08:27 UTC (rev 203)
+++
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/QuickstartBPELSimpleCorrelationTestCase.java 2009-10-27
19:16:58 UTC (rev 204)
@@ -43,14 +43,14 @@
}
public void testSendHello() throws Exception {
- String result1=sendMessage("hello_request1.xml",
+ String result1=sendSOAPMessage("hello_request1.xml",
"http://localhost:8080/bpel/processes/helloGoodbyeWorld");
- assertMessage(result1, "hello_response1.xml");
+ assertMessageFromFile(result1, "hello_response1.xml");
- String result2=sendMessage("goodbye_request1.xml",
+ String result2=sendSOAPMessage("goodbye_request1.xml",
"http://localhost:8080/bpel/processes/helloGoodbyeWorld");
- assertMessage(result2, "goodbye_response1.xml");
+ assertMessageFromFile(result2, "goodbye_response1.xml");
}
}
Modified:
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/QuickstartBPELSimpleInvokeTestCase.java
===================================================================
---
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/QuickstartBPELSimpleInvokeTestCase.java 2009-10-26
11:08:27 UTC (rev 203)
+++
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/QuickstartBPELSimpleInvokeTestCase.java 2009-10-27
19:16:58 UTC (rev 204)
@@ -43,9 +43,9 @@
}
public void testSendHello() throws Exception {
- String result=sendMessage("hello_request1.xml",
+ String result=sendSOAPMessage("hello_request1.xml",
"http://localhost:8080/bpel/processes/simpleInvoke");
- assertMessage(result, "hello_response1.xml");
+ assertMessageFromFile(result, "hello_response1.xml");
}
}
Added:
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/QuickstartESBBPELHelloWorldTestCase.java
===================================================================
---
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/QuickstartESBBPELHelloWorldTestCase.java
(rev 0)
+++
trunk/integration-tests/src/test/java/org/jboss/soa/bpel/tests/samples/QuickstartESBBPELHelloWorldTestCase.java 2009-10-27
19:16:58 UTC (rev 204)
@@ -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 sample.
+ */
+public class QuickstartESBBPELHelloWorldTestCase extends RiftSawTest {
+
+ private static final String TEST_NAME = "Quickstart_esb_bpel_hello_world";
+
+ public QuickstartESBBPELHelloWorldTestCase() {
+ super(TEST_NAME);
+ }
+
+ public static Test suite() {
+ return(new RiftSawTestSetup(QuickstartESBBPELHelloWorldTestCase.class,
+ TEST_NAME,
"Quickstart_esb_bpel_hello_world.esb,../Quickstart_bpel_hello_world/Quickstart_bpel_hello_world-1.jar"));
+ }
+
+ public void testSendHello() throws Exception {
+ String result=sendESBMessage("Hello World via ESB to BPEL",
"HelloWorldBPELESB", "SayHello");
+
+ assertMessage(result, "Hello World via ESB to BPEL World");
+ }
+}
Added: trunk/integration-tests/src/test/resources/conf/jbossesb-properties.xml
===================================================================
--- trunk/integration-tests/src/test/resources/conf/jbossesb-properties.xml
(rev 0)
+++ trunk/integration-tests/src/test/resources/conf/jbossesb-properties.xml 2009-10-27
19:16:58 UTC (rev 204)
@@ -0,0 +1,86 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+ JBoss, Home of Professional Open Source
+ Copyright 2006, JBoss Inc., and others contributors as indicated
+ by the @authors tag. All rights reserved.
+ See the copyright.txt in the distribution for a
+ full listing of individual contributors.
+ This copyrighted material is made available to anyone wishing to use,
+ modify, copy, or redistribute it subject to the terms and conditions
+ of the GNU Lesser General Public License, v. 2.1.
+ This program is distributed in the hope that it will be useful, but WITHOUT A
+ 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,
+ v.2.1 along with this distribution; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ MA 02110-1301, USA.
+
+ (C) 2005-2006,
+ @author JBoss Inc.
+-->
+<!-- $Id: jbossesb-unittest-properties.xml $ -->
+<!--
+ These options are described in the JBossESB manual.
+ Defaults are provided here for convenience only.
+
+ Please read through this file prior to using the system, and consider
+ updating the specified entries.
+-->
+<esb
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:noNamespaceSchemaLocation="jbossesb-1_0.xsd">
+ <properties name="core">
+ <property name="org.jboss.soa.esb.jndi.server.type"
value="jboss"/>
+ <property name="org.jboss.soa.esb.jndi.server.url"
value="localhost"/>
+ <property name="org.jboss.soa.esb.persistence.connection.factory"
value="org.jboss.internal.soa.esb.persistence.format.MessageStoreFactoryImpl"/>
+ <property name="jboss.esb.invm.scope.default"
value="NONE"/>
+ </properties>
+ <properties name="registry">
+ <property name="org.jboss.soa.esb.registry.queryManagerURI"
+
value="jnp://localhost:1099/InquiryService?org.apache.juddi.registry.rmi.Inquiry#inquire"/>
+ <property name="org.jboss.soa.esb.registry.lifeCycleManagerURI"
+
value="jnp://localhost:1099/PublishService?org.apache.juddi.registry.rmi.Publish#publish"
/>
+ <property name="org.jboss.soa.esb.registry.implementationClass"
+
value="org.jboss.internal.soa.esb.services.registry.JAXRRegistryImpl"/>
+ <property name="org.jboss.soa.esb.registry.factoryClass"
+ value="org.apache.ws.scout.registry.ConnectionFactoryImpl"/>
+ <property name="org.jboss.soa.esb.registry.user"
+ value="jbossesb"/>
+ <property name="org.jboss.soa.esb.registry.password"
+ value="password"/>
+ <!-- the following parameter is scout specific to set the type of communication
between scout and the UDDI (embedded, rmi, soap) -->
+ <property name="org.jboss.soa.esb.scout.proxy.transportClass"
+ value="org.apache.ws.scout.transport.RMITransport"/>
+ </properties>
+ <properties name="transports" depends="core">
+ <property name="org.jboss.soa.esb.mail.smtp.host"
value="localhost"/>
+ <property name="org.jboss.soa.esb.mail.smtp.user"
value="jbossesb"/>
+ <property name="org.jboss.soa.esb.mail.smtp.password"
value=""/>
+ <property name="org.jboss.soa.esb.mail.smtp.port"
value="25"/>
+ </properties>
+ <properties name="connection">
+ <property name="min-pool-size" value="5"/>
+ <property name="max-pool=size" value="10"/>
+ <property name="blocking-timeout-millis" value="5000"/>
+ <property name="abandoned-connection-timeout"
value="10000"/>
+ <property name="abandoned-connection-time-interval"
value="30000"/>
+ </properties>
+ <properties name="dbstore">
+ <property name="org.jboss.soa.esb.persistence.db.connection.url"
value="jdbc:hsqldb:hsql://localhost:9001/"/>
+ <property name="org.jboss.soa.esb.persistence.db.jdbc.driver"
value="org.hsqldb.jdbcDriver"/>
+ <property name="org.jboss.soa.esb.persistence.db.user"
value="sa"/>
+ <property name="org.jboss.soa.esb.persistence.db.pwd"
value=""/>
+ <property
name="org.jboss.soa.esb.persistence.db.pool.initial.size" value="2"/>
+ <property
name="org.jboss.soa.esb.persistence.db.pool.min.size" value="2"/>
+ <property
name="org.jboss.soa.esb.persistence.db.pool.max.size" value="5"/>
+ <!--table managed by pool to test for valid connections - created by pool
automatically -->
+ <property
name="org.jboss.soa.esb.persistence.db.pool.test.table" value="pooltest"/>
+ <!-- # of milliseconds to timeout waiting for a connection from pool -->
+ <property
name="org.jboss.soa.esb.persistence.db.pool.timeout.millis" value="5000"/>
+ <property
name="org.jboss.soa.esb.persistence.db.conn.manager"
value="org.jboss.internal.soa.esb.persistence.manager.StandaloneConnectionManager"/>
+ </properties>
+ <properties name="messagerouting">
+ <property name="org.jboss.soa.esb.routing.cbrClass"
value="org.jboss.internal.soa.esb.services.routing.cbr.JBossRulesRouter"/>
+ </properties>
+</esb>
Added: trunk/integration-tests/src/test/resources/conf/jndi.properties
===================================================================
--- trunk/integration-tests/src/test/resources/conf/jndi.properties
(rev 0)
+++ trunk/integration-tests/src/test/resources/conf/jndi.properties 2009-10-27 19:16:58
UTC (rev 204)
@@ -0,0 +1,5 @@
+java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
+java.naming.provider.url=jnp://localhost:1099
+java.naming.factory.url.pkgs=org.jboss.naming
+java.naming.factory.url.pkgs=org.jnp.interfaces
+
Added: trunk/integration-tests/src/test/resources/conf/juddi.properties
===================================================================
--- trunk/integration-tests/src/test/resources/conf/juddi.properties
(rev 0)
+++ trunk/integration-tests/src/test/resources/conf/juddi.properties 2009-10-27 19:16:58
UTC (rev 204)
@@ -0,0 +1,69 @@
+# jUDDI Registry Properties (used by RegistryServer)
+# see
http://www.juddi.org for more information
+
+# The UDDI Operator Name
+juddi.operatorName =
jUDDI.org
+
+# The i18n locale default codes
+juddi.i18n.languageCode = en
+juddi.i18n.countryCode = US
+
+# The UDDI DiscoveryURL Prefix
+juddi.discoveryURL =
http://localhost:8080/juddi/uddiget.jsp?
+
+# The UDDI Operator Contact Email Address
+juddi.operatorEmailAddress = admin(a)juddi.org
+
+# The maximum name size and maximum number
+# of name elements allows in several of the
+# FindXxxx and SaveXxxx UDDI functions.
+juddi.maxNameLength=255
+juddi.maxNameElementsAllowed=5
+
+# The maximum number of UDDI artifacts allowed
+# per publisher. A value of '-1' indicates any
+# number of artifacts is valid (These values can be
+# overridden at the individual publisher level).
+juddi.maxBusinessesPerPublisher=25
+juddi.maxServicesPerBusiness=20
+juddi.maxBindingsPerService=10
+juddi.maxTModelsPerPublisher=100
+
+# jUDDI Authentication module to use
+juddi.auth = org.apache.juddi.auth.DefaultAuthenticator
+
+# jUDDI DataStore module currently to use
+juddi.dataStore = org.apache.juddi.datastore.jdbc.JDBCDataStore
+
+# use a dataSource (if set to false a direct
+# jdbc connection will be used.
+juddi.isUseDataSource=false
+juddi.jdbcDriver=com.mysql.jdbc.Driver
+juddi.jdbcUrl=jdbc:mysql://localhost:3306/juddi
+juddi.jdbcUsername=root
+juddi.jdbcPassword=admin
+# jUDDI DataSource to use
+# juddi.dataSource=java:comp/env/jdbc/MySqlDS
+
+# jUDDI UUIDGen implementation to use
+juddi.uuidgen = org.apache.juddi.uuidgen.DefaultUUIDGen
+
+# jUDDI Cryptor implementation to use
+juddi.cryptor = org.apache.juddi.cryptor.DefaultCryptor
+
+# jUDDI Validator to use
+juddi.validator=org.apache.juddi.validator.DefaultValidator
+
+# jUDDI Proxy Properties (used by RegistryProxy)
+juddi.proxy.adminURL =
http://localhost:8080/juddi/admin
+juddi.proxy.inquiryURL =
http://localhost:8080/juddi/inquiry
+juddi.proxy.publishURL =
http://localhost:8080/juddi/publish
+juddi.proxy.transportClass = org.apache.juddi.proxy.AxisTransport
+juddi.proxy.securityProvider = com.sun.net.ssl.internal.ssl.Provider
+juddi.proxy.protocolHandler = com.sun.net.ssl.internal.www.protocol
+
+# JNDI settings (used by RMITransport)
+java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
+java.naming.provider.url=jnp://localhost:1099
+java.naming.factory.url.pkgs=org.jboss.naming
+
Added: trunk/integration-tests/src/test/resources/conf/log4j.xml
===================================================================
--- trunk/integration-tests/src/test/resources/conf/log4j.xml (rev
0)
+++ trunk/integration-tests/src/test/resources/conf/log4j.xml 2009-10-27 19:16:58 UTC (rev
204)
@@ -0,0 +1,79 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
+
+<!-- ===================================================================== -->
+<!-- -->
+<!-- Log4j Configuration -->
+<!-- -->
+<!-- ===================================================================== -->
+
+<!-- $Id: log4j.xml,v 1.26.2.5 2005/09/15 09:31:02 dimitris Exp $ -->
+
+<!--
+ | For more configuration infromation and examples see the Jakarta Log4j
+ | owebsite:
http://jakarta.apache.org/log4j
+ -->
+
+<log4j:configuration
xmlns:log4j="http://jakarta.apache.org/log4j/"
debug="false">
+
+ <!-- ============================== -->
+ <!-- Append messages to the console -->
+ <!-- ============================== -->
+
+ <appender name="CONSOLE"
class="org.apache.log4j.ConsoleAppender">
+ <errorHandler
class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
+ <param name="Target" value="System.out"/>
+ <param name="Threshold" value="INFO"/>
+
+ <layout class="org.apache.log4j.PatternLayout">
+ <!-- The default pattern: Date Priority [Category] Message\n -->
+ <param name="ConversionPattern" value="%d{ABSOLUTE} %-5p
[%t][%c{1}] %m%n"/>
+ </layout>
+ </appender>
+
+ <!-- ================================= -->
+ <!-- Preserve messages in a local file -->
+ <!-- ================================= -->
+
+ <!-- A size based file rolling appender -->
+ <appender name="FILE"
class="org.jboss.logging.appender.RollingFileAppender">
+ <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
+ <param name="File" value="./listener.log"/>
+ <param name="Append" value="false"/>
+ <param name="MaxFileSize" value="500KB"/>
+ <param name="MaxBackupIndex" value="1"/>
+
+ <layout class="org.apache.log4j.PatternLayout">
+ <param name="ConversionPattern" value="%d %-5p [%t][%c]
%m%n"/>
+ </layout>
+ </appender>
+
+ <!-- ================ -->
+ <!-- Limit categories -->
+ <!-- ================ -->
+
+ <category name="org.jboss">
+ <priority value="WARN"/>
+ </category>
+ <category name="org.jboss.soa.esb">
+ <priority value="ERROR"/>
+ </category>
+ <category name="org.jboss.internal.soa.esb">
+ <priority value="ERROR"/>
+ </category>
+ <category name="org.apache">
+ <priority value="ERROR"/>
+ </category>
+ <category name="quickstart">
+ <priority value="DEBUG"/>
+ </category>
+ <!-- ======================= -->
+ <!-- Setup the Root category -->
+ <!-- ======================= -->
+
+ <root>
+ <appender-ref ref="CONSOLE"/>
+ <appender-ref ref="FILE"/>
+ </root>
+
+</log4j:configuration>
Added:
trunk/integration-tests/src/test/resources/samples/Quickstart_esb_bpel_hello_world/build.xml
===================================================================
---
trunk/integration-tests/src/test/resources/samples/Quickstart_esb_bpel_hello_world/build.xml
(rev 0)
+++
trunk/integration-tests/src/test/resources/samples/Quickstart_esb_bpel_hello_world/build.xml 2009-10-27
19:16:58 UTC (rev 204)
@@ -0,0 +1,28 @@
+<project name="Quickstart_esb_bpel_hello_world" 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/deployment.xml
===================================================================
---
trunk/integration-tests/src/test/resources/samples/Quickstart_esb_bpel_hello_world/deployment.xml
(rev 0)
+++
trunk/integration-tests/src/test/resources/samples/Quickstart_esb_bpel_hello_world/deployment.xml 2009-10-27
19:16:58 UTC (rev 204)
@@ -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/jbm-queue-service.xml
===================================================================
---
trunk/integration-tests/src/test/resources/samples/Quickstart_esb_bpel_hello_world/jbm-queue-service.xml
(rev 0)
+++
trunk/integration-tests/src/test/resources/samples/Quickstart_esb_bpel_hello_world/jbm-queue-service.xml 2009-10-27
19:16:58 UTC (rev 204)
@@ -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/jbmq-queue-service.xml
===================================================================
---
trunk/integration-tests/src/test/resources/samples/Quickstart_esb_bpel_hello_world/jbmq-queue-service.xml
(rev 0)
+++
trunk/integration-tests/src/test/resources/samples/Quickstart_esb_bpel_hello_world/jbmq-queue-service.xml 2009-10-27
19:16:58 UTC (rev 204)
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<server>
+ <mbean code="org.jboss.mq.server.jmx.Queue"
+
name="jboss.esb.quickstart.destination:service=Queue,name=quickstart_bpel_helloworld_Request_esb">
+ <depends optional-attribute-name="DestinationManager">
+ jboss.mq:service=DestinationManager
+ </depends>
+ </mbean>
+ <mbean code="org.jboss.mq.server.jmx.Queue"
+
name="jboss.esb.quickstart.destination:service=Queue,name=quickstart_bpel_helloworld_Request_esb_reply">
+ <depends optional-attribute-name="DestinationManager">
+ jboss.mq:service=DestinationManager
+ </depends>
+ </mbean>
+ <mbean code="org.jboss.mq.server.jmx.Queue"
+
name="jboss.esb.quickstart.destination:service=Queue,name=quickstart_bpel_helloworld_Request_gw">
+ <depends optional-attribute-name="DestinationManager">
+ jboss.mq:service=DestinationManager
+ </depends>
+ </mbean>
+</server>
Added:
trunk/integration-tests/src/test/resources/samples/Quickstart_esb_bpel_hello_world/jboss-esb.xml
===================================================================
---
trunk/integration-tests/src/test/resources/samples/Quickstart_esb_bpel_hello_world/jboss-esb.xml
(rev 0)
+++
trunk/integration-tests/src/test/resources/samples/Quickstart_esb_bpel_hello_world/jboss-esb.xml 2009-10-27
19:16:58 UTC (rev 204)
@@ -0,0 +1,50 @@
+<?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}HelloService"/>
+ <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"/>
+ </actions>
+ </service>
+ </services>
+
+</jbossesb>
Added:
trunk/integration-tests/src/test/resources/samples/Quickstart_esb_bpel_hello_world/jbossesb-properties.xml
===================================================================
---
trunk/integration-tests/src/test/resources/samples/Quickstart_esb_bpel_hello_world/jbossesb-properties.xml
(rev 0)
+++
trunk/integration-tests/src/test/resources/samples/Quickstart_esb_bpel_hello_world/jbossesb-properties.xml 2009-10-27
19:16:58 UTC (rev 204)
@@ -0,0 +1,86 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+ JBoss, Home of Professional Open Source
+ Copyright 2006, JBoss Inc., and others contributors as indicated
+ by the @authors tag. All rights reserved.
+ See the copyright.txt in the distribution for a
+ full listing of individual contributors.
+ This copyrighted material is made available to anyone wishing to use,
+ modify, copy, or redistribute it subject to the terms and conditions
+ of the GNU Lesser General Public License, v. 2.1.
+ This program is distributed in the hope that it will be useful, but WITHOUT A
+ 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,
+ v.2.1 along with this distribution; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ MA 02110-1301, USA.
+
+ (C) 2005-2006,
+ @author JBoss Inc.
+-->
+<!-- $Id: jbossesb-unittest-properties.xml $ -->
+<!--
+ These options are described in the JBossESB manual.
+ Defaults are provided here for convenience only.
+
+ Please read through this file prior to using the system, and consider
+ updating the specified entries.
+-->
+<esb
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:noNamespaceSchemaLocation="jbossesb-1_0.xsd">
+ <properties name="core">
+ <property name="org.jboss.soa.esb.jndi.server.type"
value="jboss"/>
+ <property name="org.jboss.soa.esb.jndi.server.url"
value="localhost"/>
+ <property name="org.jboss.soa.esb.persistence.connection.factory"
value="org.jboss.internal.soa.esb.persistence.format.MessageStoreFactoryImpl"/>
+ <property name="jboss.esb.invm.scope.default"
value="NONE"/>
+ </properties>
+ <properties name="registry">
+ <property name="org.jboss.soa.esb.registry.queryManagerURI"
+
value="jnp://localhost:1099/InquiryService?org.apache.juddi.registry.rmi.Inquiry#inquire"/>
+ <property name="org.jboss.soa.esb.registry.lifeCycleManagerURI"
+
value="jnp://localhost:1099/PublishService?org.apache.juddi.registry.rmi.Publish#publish"
/>
+ <property name="org.jboss.soa.esb.registry.implementationClass"
+
value="org.jboss.internal.soa.esb.services.registry.JAXRRegistryImpl"/>
+ <property name="org.jboss.soa.esb.registry.factoryClass"
+ value="org.apache.ws.scout.registry.ConnectionFactoryImpl"/>
+ <property name="org.jboss.soa.esb.registry.user"
+ value="jbossesb"/>
+ <property name="org.jboss.soa.esb.registry.password"
+ value="password"/>
+ <!-- the following parameter is scout specific to set the type of communication
between scout and the UDDI (embedded, rmi, soap) -->
+ <property name="org.jboss.soa.esb.scout.proxy.transportClass"
+ value="org.apache.ws.scout.transport.RMITransport"/>
+ </properties>
+ <properties name="transports" depends="core">
+ <property name="org.jboss.soa.esb.mail.smtp.host"
value="localhost"/>
+ <property name="org.jboss.soa.esb.mail.smtp.user"
value="jbossesb"/>
+ <property name="org.jboss.soa.esb.mail.smtp.password"
value=""/>
+ <property name="org.jboss.soa.esb.mail.smtp.port"
value="25"/>
+ </properties>
+ <properties name="connection">
+ <property name="min-pool-size" value="5"/>
+ <property name="max-pool=size" value="10"/>
+ <property name="blocking-timeout-millis" value="5000"/>
+ <property name="abandoned-connection-timeout"
value="10000"/>
+ <property name="abandoned-connection-time-interval"
value="30000"/>
+ </properties>
+ <properties name="dbstore">
+ <property name="org.jboss.soa.esb.persistence.db.connection.url"
value="jdbc:hsqldb:hsql://localhost:9001/"/>
+ <property name="org.jboss.soa.esb.persistence.db.jdbc.driver"
value="org.hsqldb.jdbcDriver"/>
+ <property name="org.jboss.soa.esb.persistence.db.user"
value="sa"/>
+ <property name="org.jboss.soa.esb.persistence.db.pwd"
value=""/>
+ <property
name="org.jboss.soa.esb.persistence.db.pool.initial.size" value="2"/>
+ <property
name="org.jboss.soa.esb.persistence.db.pool.min.size" value="2"/>
+ <property
name="org.jboss.soa.esb.persistence.db.pool.max.size" value="5"/>
+ <!--table managed by pool to test for valid connections - created by pool
automatically -->
+ <property
name="org.jboss.soa.esb.persistence.db.pool.test.table" value="pooltest"/>
+ <!-- # of milliseconds to timeout waiting for a connection from pool -->
+ <property
name="org.jboss.soa.esb.persistence.db.pool.timeout.millis" value="5000"/>
+ <property
name="org.jboss.soa.esb.persistence.db.conn.manager"
value="org.jboss.internal.soa.esb.persistence.manager.StandaloneConnectionManager"/>
+ </properties>
+ <properties name="messagerouting">
+ <property name="org.jboss.soa.esb.routing.cbrClass"
value="org.jboss.internal.soa.esb.services.routing.cbr.JBossRulesRouter"/>
+ </properties>
+</esb>
Added:
trunk/integration-tests/src/test/resources/samples/Quickstart_esb_bpel_hello_world/jndi.properties
===================================================================
---
trunk/integration-tests/src/test/resources/samples/Quickstart_esb_bpel_hello_world/jndi.properties
(rev 0)
+++
trunk/integration-tests/src/test/resources/samples/Quickstart_esb_bpel_hello_world/jndi.properties 2009-10-27
19:16:58 UTC (rev 204)
@@ -0,0 +1,5 @@
+java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
+java.naming.provider.url=jnp://localhost:1099
+java.naming.factory.url.pkgs=org.jboss.naming
+java.naming.factory.url.pkgs=org.jnp.interfaces
+
Added:
trunk/integration-tests/src/test/resources/samples/Quickstart_esb_bpel_hello_world/juddi.properties
===================================================================
---
trunk/integration-tests/src/test/resources/samples/Quickstart_esb_bpel_hello_world/juddi.properties
(rev 0)
+++
trunk/integration-tests/src/test/resources/samples/Quickstart_esb_bpel_hello_world/juddi.properties 2009-10-27
19:16:58 UTC (rev 204)
@@ -0,0 +1,69 @@
+# jUDDI Registry Properties (used by RegistryServer)
+# see
http://www.juddi.org for more information
+
+# The UDDI Operator Name
+juddi.operatorName =
jUDDI.org
+
+# The i18n locale default codes
+juddi.i18n.languageCode = en
+juddi.i18n.countryCode = US
+
+# The UDDI DiscoveryURL Prefix
+juddi.discoveryURL =
http://localhost:8080/juddi/uddiget.jsp?
+
+# The UDDI Operator Contact Email Address
+juddi.operatorEmailAddress = admin(a)juddi.org
+
+# The maximum name size and maximum number
+# of name elements allows in several of the
+# FindXxxx and SaveXxxx UDDI functions.
+juddi.maxNameLength=255
+juddi.maxNameElementsAllowed=5
+
+# The maximum number of UDDI artifacts allowed
+# per publisher. A value of '-1' indicates any
+# number of artifacts is valid (These values can be
+# overridden at the individual publisher level).
+juddi.maxBusinessesPerPublisher=25
+juddi.maxServicesPerBusiness=20
+juddi.maxBindingsPerService=10
+juddi.maxTModelsPerPublisher=100
+
+# jUDDI Authentication module to use
+juddi.auth = org.apache.juddi.auth.DefaultAuthenticator
+
+# jUDDI DataStore module currently to use
+juddi.dataStore = org.apache.juddi.datastore.jdbc.JDBCDataStore
+
+# use a dataSource (if set to false a direct
+# jdbc connection will be used.
+juddi.isUseDataSource=false
+juddi.jdbcDriver=com.mysql.jdbc.Driver
+juddi.jdbcUrl=jdbc:mysql://localhost:3306/juddi
+juddi.jdbcUsername=root
+juddi.jdbcPassword=admin
+# jUDDI DataSource to use
+# juddi.dataSource=java:comp/env/jdbc/MySqlDS
+
+# jUDDI UUIDGen implementation to use
+juddi.uuidgen = org.apache.juddi.uuidgen.DefaultUUIDGen
+
+# jUDDI Cryptor implementation to use
+juddi.cryptor = org.apache.juddi.cryptor.DefaultCryptor
+
+# jUDDI Validator to use
+juddi.validator=org.apache.juddi.validator.DefaultValidator
+
+# jUDDI Proxy Properties (used by RegistryProxy)
+juddi.proxy.adminURL =
http://localhost:8080/juddi/admin
+juddi.proxy.inquiryURL =
http://localhost:8080/juddi/inquiry
+juddi.proxy.publishURL =
http://localhost:8080/juddi/publish
+juddi.proxy.transportClass = org.apache.juddi.proxy.AxisTransport
+juddi.proxy.securityProvider = com.sun.net.ssl.internal.ssl.Provider
+juddi.proxy.protocolHandler = com.sun.net.ssl.internal.www.protocol
+
+# JNDI settings (used by RMITransport)
+java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
+java.naming.provider.url=jnp://localhost:1099
+java.naming.factory.url.pkgs=org.jboss.naming
+
Added:
trunk/integration-tests/src/test/resources/samples/Quickstart_esb_bpel_hello_world/log4j.xml
===================================================================
---
trunk/integration-tests/src/test/resources/samples/Quickstart_esb_bpel_hello_world/log4j.xml
(rev 0)
+++
trunk/integration-tests/src/test/resources/samples/Quickstart_esb_bpel_hello_world/log4j.xml 2009-10-27
19:16:58 UTC (rev 204)
@@ -0,0 +1,79 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
+
+<!-- ===================================================================== -->
+<!-- -->
+<!-- Log4j Configuration -->
+<!-- -->
+<!-- ===================================================================== -->
+
+<!-- $Id: log4j.xml,v 1.26.2.5 2005/09/15 09:31:02 dimitris Exp $ -->
+
+<!--
+ | For more configuration infromation and examples see the Jakarta Log4j
+ | owebsite:
http://jakarta.apache.org/log4j
+ -->
+
+<log4j:configuration
xmlns:log4j="http://jakarta.apache.org/log4j/"
debug="false">
+
+ <!-- ============================== -->
+ <!-- Append messages to the console -->
+ <!-- ============================== -->
+
+ <appender name="CONSOLE"
class="org.apache.log4j.ConsoleAppender">
+ <errorHandler
class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
+ <param name="Target" value="System.out"/>
+ <param name="Threshold" value="INFO"/>
+
+ <layout class="org.apache.log4j.PatternLayout">
+ <!-- The default pattern: Date Priority [Category] Message\n -->
+ <param name="ConversionPattern" value="%d{ABSOLUTE} %-5p
[%t][%c{1}] %m%n"/>
+ </layout>
+ </appender>
+
+ <!-- ================================= -->
+ <!-- Preserve messages in a local file -->
+ <!-- ================================= -->
+
+ <!-- A size based file rolling appender -->
+ <appender name="FILE"
class="org.jboss.logging.appender.RollingFileAppender">
+ <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
+ <param name="File" value="./listener.log"/>
+ <param name="Append" value="false"/>
+ <param name="MaxFileSize" value="500KB"/>
+ <param name="MaxBackupIndex" value="1"/>
+
+ <layout class="org.apache.log4j.PatternLayout">
+ <param name="ConversionPattern" value="%d %-5p [%t][%c]
%m%n"/>
+ </layout>
+ </appender>
+
+ <!-- ================ -->
+ <!-- Limit categories -->
+ <!-- ================ -->
+
+ <category name="org.jboss">
+ <priority value="WARN"/>
+ </category>
+ <category name="org.jboss.soa.esb">
+ <priority value="ERROR"/>
+ </category>
+ <category name="org.jboss.internal.soa.esb">
+ <priority value="ERROR"/>
+ </category>
+ <category name="org.apache">
+ <priority value="ERROR"/>
+ </category>
+ <category name="quickstart">
+ <priority value="DEBUG"/>
+ </category>
+ <!-- ======================= -->
+ <!-- Setup the Root category -->
+ <!-- ======================= -->
+
+ <root>
+ <appender-ref ref="CONSOLE"/>
+ <appender-ref ref="FILE"/>
+ </root>
+
+</log4j:configuration>
Added:
trunk/integration-tests/src/test/resources/samples/Quickstart_esb_bpel_hello_world/src/org/jboss/soa/esb/samples/quickstart/helloworld/test/SendEsbMessage.java
===================================================================
---
trunk/integration-tests/src/test/resources/samples/Quickstart_esb_bpel_hello_world/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/src/org/jboss/soa/esb/samples/quickstart/helloworld/test/SendEsbMessage.java 2009-10-27
19:16:58 UTC (rev 204)
@@ -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());
+ }
+
+}