[jboss-svn-commits] JBL Code SVN: r11128 - in labs/jbossesb/trunk/product: core/listeners/src/org/jboss/soa/esb/actions/scripting and 13 other directories.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Thu Apr 19 13:19:19 EDT 2007


Author: tfennelly
Date: 2007-04-19 13:19:18 -0400 (Thu, 19 Apr 2007)
New Revision: 11128

Added:
   labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/config/mappers/GroovyListenerMapper.java
   labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/gateway/GroovyGateway.java
   labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/gateway/scripts/
   labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/gateway/scripts/MessageInjectionConsole.groovy
   labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/message/BasicMessageComposer.java
   labs/jbossesb/trunk/product/core/listeners/tests/src/org/jboss/soa/esb/listeners/gateway/GroovyGatewayUnitTest.java
   labs/jbossesb/trunk/product/core/listeners/tests/src/org/jboss/soa/esb/listeners/gateway/testgateway.groovy
   labs/jbossesb/trunk/product/samples/quickstarts/webservice_bpel/groovy/
Modified:
   labs/jbossesb/trunk/product/core/listeners/build.xml
   labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/actions/scripting/GroovyActionProcessor.java
   labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/config/ESBAwareGenerator.java
   labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/config/GatewayGenerator.java
   labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/gateway/JBossRemotingGatewayListener.java
   labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/message/UncomposedMessageDeliveryAdapter.java
   labs/jbossesb/trunk/product/core/listeners/tests/build.xml
   labs/jbossesb/trunk/product/core/listeners/tests/src/org/jboss/soa/esb/actions/scripting/GroovyActionProcessorUnitTest.java
   labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/dom/YADOMUtil.java
   labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/util/ClassUtil.java
   labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.1.xsd
   labs/jbossesb/trunk/product/samples/quickstarts/base-build.xml
   labs/jbossesb/trunk/product/samples/quickstarts/webservice_bpel/build.xml
   labs/jbossesb/trunk/product/samples/quickstarts/webservice_bpel/jboss-esb.xml
Log:
Added Groovy Gateway.

Modified: labs/jbossesb/trunk/product/core/listeners/build.xml
===================================================================
--- labs/jbossesb/trunk/product/core/listeners/build.xml	2007-04-19 16:52:02 UTC (rev 11127)
+++ labs/jbossesb/trunk/product/core/listeners/build.xml	2007-04-19 17:19:18 UTC (rev 11128)
@@ -96,13 +96,12 @@
 
     <target name="jar" depends="org.jboss.esb.listeners.compile" description="Assemble jar files">
     	<delete file="${org.jboss.esb.listeners.distrib.dir}/lib/${org.jboss.esb.listeners.jar.name}.jar" />
-        <jar    destfile="${org.jboss.esb.listeners.distrib.dir}/lib/${org.jboss.esb.listeners.jar.name}.jar" 
-                basedir="${org.jboss.esb.listeners.classes.dir}" 
-                includes="**/*.class"
-		        excludes="test/**,**/dependencies/*.class"
-                />
-    	
-    	<jar    destfile="${org.jboss.esb.listeners.distrib.dir}/lib/${org.jboss.esb.dependencies.jar.name}.jar" 
+        <jar destfile="${org.jboss.esb.listeners.distrib.dir}/lib/${org.jboss.esb.listeners.jar.name}.jar">
+            <fileset dir="${org.jboss.esb.listeners.classes.dir}" includes="**/*.class" excludes="test/**,**/dependencies/*.class" />
+            <fileset dir="${org.jboss.esb.listeners.src.dir}" excludes="**/*.java" />
+        </jar>
+
+        <jar    destfile="${org.jboss.esb.listeners.distrib.dir}/lib/${org.jboss.esb.dependencies.jar.name}.jar"
     	                basedir="${org.jboss.esb.listeners.classes.dir}" 
     	                includes="**/dependencies/*.class"
     			        excludes="test/**"

Modified: labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/actions/scripting/GroovyActionProcessor.java
===================================================================
--- labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/actions/scripting/GroovyActionProcessor.java	2007-04-19 16:52:02 UTC (rev 11127)
+++ labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/actions/scripting/GroovyActionProcessor.java	2007-04-19 17:19:18 UTC (rev 11128)
@@ -28,6 +28,8 @@
 import org.jboss.soa.esb.ConfigurationException;
 import org.jboss.soa.esb.actions.ActionPipelineProcessor;
 import org.jboss.soa.esb.actions.ActionLifecycleException;
+import org.jboss.soa.esb.actions.ActionUtils;
+import org.jboss.soa.esb.actions.ActionProcessingException;
 import org.jboss.internal.soa.esb.util.StreamUtils;
 import org.apache.log4j.Logger;
 
@@ -45,8 +47,12 @@
  * <p/>
  * The {@link Message message} is bound on the script under the name "message" and the
  * {@link ConfigTree configuration} is bound under the name "config".
+ * <p/>
+ * The script can also be supplied to this action as the message payload, allowing you to
+ * dynamically supply the action with script.
  *
  * @author Gregory Pierce.
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
  */
 public class GroovyActionProcessor implements ActionPipelineProcessor {
 
@@ -60,44 +66,49 @@
     }
 
     public void initialise() throws ActionLifecycleException {
-        InputStream scriptStream = null;
-        String scriptName = configTree.getAttribute("script");
+        String scriptPath = configTree.getAttribute("script");
 
-        if(scriptName == null) {
-            throw new ActionLifecycleException("Mandatory action property 'script' not specified.");
+        if(scriptPath == null) {
+            logger.info("No Groovy script specified on action config " + configTree.getAttribute("name")
+                    + ". Expecting Groovy script to be in message.");
+        } else {
+            try {
+                script = GroovyActionProcessor.getScriptFromClasspath(scriptPath);
+            } catch (IOException e) {
+                throw new ActionLifecycleException("Error reading script '" + scriptPath + "' stream.");
+            }
         }
+    }
 
-        scriptStream = getScriptStream(scriptName);
+    /**
+     * Get the input stream for the Groovy script (from the classpath).
+     * @param scriptPath The script classpath.
+     * @return An input
+     */
+    public static String getScriptFromClasspath(String scriptPath) throws IOException {
+        InputStream scriptStream;
+
+        scriptStream = Thread.currentThread().getContextClassLoader().getResourceAsStream(scriptPath);
         if(scriptStream == null) {
-            throw new ActionLifecycleException("Script '" + scriptName + "' not found on classpath.");
+            scriptStream = ClassUtil.getResourceAsStream(scriptPath, GroovyActionProcessor.class);
+            if(scriptStream == null) {
+                throw new IOException("Script '" + scriptPath + "' not found on classpath.");
+            }
         }
 
         try {
-            script = new String(StreamUtils.readStream(scriptStream));
-        } catch(Throwable t) {
-            throw new ActionLifecycleException("Error reading script '" + scriptName + "' stream.");
+            return new String(StreamUtils.readStream(scriptStream));
         } finally {
             try {
                 if(scriptStream != null) {
                     scriptStream.close();
                 }
             } catch (IOException e) {
-                throw new ActionLifecycleException("Failed to close script '" + scriptName + "' stream.");
+                throw new IOException("Failed to close script '" + scriptPath + "' stream.");
             }
         }
     }
 
-    private InputStream getScriptStream(String scriptName) {
-        InputStream scriptStream;
-
-        scriptStream = Thread.currentThread().getContextClassLoader().getResourceAsStream(scriptName);
-        if(scriptStream == null) {
-            scriptStream = ClassUtil.getResourceAsStream(scriptName, getClass());
-        }
-        
-        return scriptStream;
-    }
-
     public void destroy() throws ActionLifecycleException {
     }
     
@@ -106,7 +117,7 @@
      * scriptPath - The path to the script that will be run
      * script - the name of the script that will be run (include .groovy exception)
      */
-    public Message process(Message message) {
+    public Message process(Message message) throws ActionProcessingException {
         try {
             // create a Java/Groovy binding for the message object
             //
@@ -118,7 +129,7 @@
             binding.setVariable("config", configTree);
 
             GroovyShell shell = new GroovyShell(Thread.currentThread().getContextClassLoader(), binding);
-            Object returnVal = shell.evaluate(script);
+            Object returnVal = shell.evaluate(getScript(message));
 
             if(returnVal instanceof Message) {
                 return (Message) returnVal;
@@ -132,6 +143,22 @@
 		}
 	}
 
+    private String getScript(Message message) throws ActionProcessingException {
+        if(script != null) {
+            return script;
+        } else {
+            // So, the script is being passed in in the message...            
+            Object messageScript = ActionUtils.getTaskObject(message);
+            if(messageScript instanceof String) {
+                return (String)messageScript;
+            } else if(messageScript instanceof byte[]) {
+                return new String((byte[])messageScript);
+            } else {
+                throw new ActionProcessingException("Groovy script not specified in message.");
+            }
+        }
+    }
+
     public void processException(final Message message, final Throwable th) {
     }
 

Modified: labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/config/ESBAwareGenerator.java
===================================================================
--- labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/config/ESBAwareGenerator.java	2007-04-19 16:52:02 UTC (rev 11127)
+++ labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/config/ESBAwareGenerator.java	2007-04-19 17:19:18 UTC (rev 11128)
@@ -40,6 +40,7 @@
 import org.jboss.soa.esb.listeners.config.mappers.UntypedListenerMapper;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
+import org.apache.log4j.Logger;
 
 /**
  * ESB Aware Listeners Configuration Generator.
@@ -50,7 +51,9 @@
  */
 public class ESBAwareGenerator {
 
-	/**
+    private static final Logger logger = Logger.getLogger(ESBAwareGenerator.class);
+
+    /**
 	 * XMLBeans based configuration model instance.
 	 */
 	@SuppressWarnings("unused")
@@ -105,6 +108,12 @@
 			listenerConfigTree = FtpListenerMapper.map(root, (FtpListener)listener, model);
 		} else if (listener instanceof SqlListener) {
 			listenerConfigTree = SqlListenerMapper.map(root, (SqlListener)listener, model);
+        } else if (listener instanceof JbrListenerDocument.JbrListener) {
+            logger.error("JbossRemoting listener only supported in Gateway mode.");
+            return;
+        } else if (listener instanceof GroovyListenerDocument.GroovyListener) {
+            logger.error("Groovy listener only supported in Gateway mode.");
+            return;
 		} else {
 			listenerConfigTree = UntypedListenerMapper.map(root, listener, model);
 		}

Modified: labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/config/GatewayGenerator.java
===================================================================
--- labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/config/GatewayGenerator.java	2007-04-19 16:52:02 UTC (rev 11127)
+++ labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/config/GatewayGenerator.java	2007-04-19 17:19:18 UTC (rev 11128)
@@ -32,6 +32,7 @@
 import org.jboss.soa.esb.listeners.config.SqlListenerDocument.SqlListener;
 import org.jboss.soa.esb.listeners.config.JbrListenerDocument.JbrListener;
 import org.jboss.soa.esb.listeners.config.mappers.*;
+import org.jboss.soa.esb.listeners.config.GroovyListenerDocument.GroovyListener;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 
@@ -71,7 +72,6 @@
 		root = YADOMUtil.addElement(doc, "jbossesb-gateways");
 		root.setAttribute("parameterReloadSecs", model.getParameterReloadSecs());
 		
-		
 		// Iterate over all the gateway configs and map them to the gateway configuration...
 		List<Listener> gateways = model.getGatewayListeners();
 		for(Listener gateway : gateways) {
@@ -99,6 +99,8 @@
 			SqlListenerMapper.map(root, (SqlListener)gateway, model);
         } else if (gateway instanceof JbrListener) {
             JbrListenerMapper.map(root, (JbrListener)gateway, model);
+        } else if (gateway instanceof GroovyListener) {
+            GroovyListenerMapper.map(root, (GroovyListener)gateway, model);
         } else {
 			UntypedListenerMapper.map(root, gateway, model);
 		}

Added: labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/config/mappers/GroovyListenerMapper.java
===================================================================
--- labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/config/mappers/GroovyListenerMapper.java	                        (rev 0)
+++ labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/config/mappers/GroovyListenerMapper.java	2007-04-19 17:19:18 UTC (rev 11128)
@@ -0,0 +1,54 @@
+/*
+ * 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, JBoss Inc.
+ */
+package org.jboss.soa.esb.listeners.config.mappers;
+
+import org.w3c.dom.Element;
+import org.jboss.soa.esb.listeners.config.GroovyListenerDocument;
+import org.jboss.soa.esb.listeners.config.Generator;
+import org.jboss.soa.esb.listeners.gateway.GroovyGateway;
+import org.jboss.soa.esb.dom.YADOMUtil;
+import org.jboss.soa.esb.ConfigurationException;
+
+/**
+ * Config mapper class for the Groovy Listener.
+ * 
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+ */
+public class GroovyListenerMapper {
+
+    public static Element map(Element root, GroovyListenerDocument.GroovyListener listener, Generator.XMLBeansModel model) throws ConfigurationException {
+        Element listenerNode = YADOMUtil.addElement(root, listener.getName());
+
+        // Map the standard listener attributes - common across all listener types...
+        MapperUtil.mapDefaultAttributes(listener, listenerNode, model);
+        // Map the <property> elements targeted at the listener - from the listener itself.
+        MapperUtil.mapProperties(listener.getPropertyList(), listenerNode);
+
+        if(listener.getIsGateway()) {
+            listenerNode.setAttribute("gatewayClass", GroovyGateway.class.getName());
+        } else {
+            throw new ConfigurationException("Invalid <groovy-listener> config [" + listener.getName() + "].  <groovy-listener> is currently only supported as a gateway listener.");
+        }
+
+        listenerNode.setAttribute("script", listener.getScript());
+
+        return listenerNode;
+    }
+}


Property changes on: labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/config/mappers/GroovyListenerMapper.java
___________________________________________________________________
Name: svn:eol-style
   + native

Added: labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/gateway/GroovyGateway.java
===================================================================
--- labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/gateway/GroovyGateway.java	                        (rev 0)
+++ labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/gateway/GroovyGateway.java	2007-04-19 17:19:18 UTC (rev 11128)
@@ -0,0 +1,157 @@
+/*
+ * 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, JBoss Inc.
+ */
+package org.jboss.soa.esb.listeners.gateway;
+
+import org.jboss.soa.esb.listeners.lifecycle.AbstractThreadedManagedLifecycle;
+import org.jboss.soa.esb.listeners.lifecycle.ManagedLifecycleException;
+import org.jboss.soa.esb.listeners.message.UncomposedMessageDeliveryAdapter;
+import org.jboss.soa.esb.listeners.message.AbstractMessageComposer;
+import org.jboss.soa.esb.listeners.message.MessageDeliverException;
+import org.jboss.soa.esb.listeners.message.BasicMessageComposer;
+import org.jboss.soa.esb.helpers.ConfigTree;
+import org.jboss.soa.esb.ConfigurationException;
+import org.jboss.soa.esb.util.ClassUtil;
+import org.jboss.soa.esb.dom.YADOMUtil;
+import org.jboss.soa.esb.message.Message;
+import org.jboss.soa.esb.actions.scripting.GroovyActionProcessor;
+import org.jboss.soa.esb.actions.ActionUtils;
+import org.apache.log4j.Logger;
+import org.xml.sax.SAXException;
+
+import java.io.IOException;
+import java.io.InputStream;
+
+import groovy.lang.Script;
+import groovy.lang.GroovyShell;
+import groovy.lang.Binding;
+
+/**
+ * Gateway listener that start the supplied Groovy script.
+ * <p/>
+ * The Groovy script effectively becomes the gateway listener.  The script path (classpath)
+ * is specified in the "script" configuration property.
+ * <p/>
+ * The script is injected with references to the
+ * {@link org.w3c.dom.Document config} ("config"), a {@link org.jboss.soa.esb.listeners.message.UncomposedMessageDeliveryAdapter}
+ * instance for its target service ("deliveryAdapter"), and a reference to the gateway lifecycle instance ("gateway").
+ * <p/>
+ * <h3>Sample Config</h3>
+ * <pre>
+ *  &lt;groovy-listener name="soap-client" script="/org/jboss/scripts/MyScript.groovy" is-gateway="true" /&gt;
+ * </pre>
+ * <h3>Sample Script</h3>
+ * <pre>
+ *  def stopped = false;
+ *  println "Starting loop in listener..."
+ *  while(!stopped) {
+ *      print "."
+ *      stopped = gateway.{@link GroovyGateway#waitUntilStopped(long) waitUntilStopped}(200);
+ *  }
+ *  println ""
+ *  println "loop ended"
+ *
+ *  println "delivering message..."
+ *  {@link UncomposedMessageDeliveryAdapter deliveryAdapter}.deliverAsync({@link org.w3c.dom.Document config}.getAttribute("xxxx"));
+ * </pre>
+ *
+ *
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+ */
+public class GroovyGateway extends AbstractThreadedManagedLifecycle {
+
+    /**
+     * Logger.
+     */
+    private static Logger logger = Logger.getLogger(GroovyGateway.class);
+    /**
+     * Gateway script.
+     */
+    private Script script;
+
+    /**
+     * Construct the threaded managed lifecycle.
+     *
+     * @param config The configuration associated with this instance.
+     * @throws org.jboss.soa.esb.ConfigurationException
+     *          for configuration errors during initialisation.
+     */
+    public GroovyGateway(ConfigTree config) throws ConfigurationException {
+        super(config);
+        String scriptPath = config.getAttribute("script");
+
+        scriptPath = mapToPrebundledScript(scriptPath);
+        if(scriptPath == null) {
+            throw new ConfigurationException("No Groovy script specified on listener config " + config.getAttribute("name"));
+        } else {
+            try {
+                GroovyShell shell = new GroovyShell();
+                script = shell.parse(GroovyActionProcessor.getScriptFromClasspath(scriptPath));
+            } catch (IOException e) {
+                throw new ConfigurationException("Error reading script '" + scriptPath + "' stream.");
+            }
+        }
+    }
+
+    private String mapToPrebundledScript(String scriptName) {
+        try {
+            String scriptPath = ClassUtil.getPath(getClass().getPackage()) + "/scripts/" + scriptName;
+
+            if(!scriptPath.endsWith(".groovy")) {
+                scriptPath += ".groovy";
+            }
+            if(GroovyActionProcessor.getScriptFromClasspath(scriptPath) != null) {
+                return scriptPath;
+            }
+        } catch (IOException e) {
+            // Ignore...
+        }
+
+        return scriptName;
+    }
+
+    protected void doInitialise() throws ManagedLifecycleException {
+        try {
+            // Configure the groovy script....
+            Binding binding = new Binding();
+            binding.setVariable("config", getConfig());
+            binding.setVariable("gateway", this);
+            binding.setVariable("deliveryAdapter", createDeliveryAdapter());
+            script.setBinding(binding);
+        } catch (ConfigurationException e) {
+           throw new ManagedLifecycleException("Unable to construct message delivery adapter.", e);
+        }
+    }
+
+    protected void doRun() {
+        logger.info("Starting Groovy Gateway " + getConfig().getName());
+        script.run();
+        logger.info("Stopping Groovy Gateway " + getConfig().getName());
+    }
+
+    /**
+     * Factory method for adapter creation.
+     *
+     * @return The adapter instance.
+     * @throws ConfigurationException Configuration error.
+     */
+    protected UncomposedMessageDeliveryAdapter createDeliveryAdapter() throws ConfigurationException {
+        return UncomposedMessageDeliveryAdapter.getGatewayDeliveryAdapter(getConfig(), new BasicMessageComposer());
+    }
+}


Property changes on: labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/gateway/GroovyGateway.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/gateway/JBossRemotingGatewayListener.java
===================================================================
--- labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/gateway/JBossRemotingGatewayListener.java	2007-04-19 16:52:02 UTC (rev 11127)
+++ labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/gateway/JBossRemotingGatewayListener.java	2007-04-19 17:19:18 UTC (rev 11128)
@@ -405,32 +405,7 @@
      * @throws ConfigurationException Configuration error.
      */
     protected UncomposedMessageDeliveryAdapter createDeliveryAdapter() throws ConfigurationException {
-        String targetServiceCategory = getConfig().getAttribute(ListenerTagNames.TARGET_SERVICE_CATEGORY_TAG);
-        String targetServiceName = getConfig().getAttribute(ListenerTagNames.TARGET_SERVICE_NAME_TAG);
-        String composerClass = getConfig().getAttribute(ListenerTagNames.GATEWAY_COMPOSER_CLASS_TAG);
-
-        if (targetServiceCategory == null || targetServiceCategory.trim().equals("")) {
-            throw new ConfigurationException("Invalid gateway configuration.  '" + ListenerTagNames.TARGET_SERVICE_CATEGORY_TAG + "' not specified.");
-        }
-        if (targetServiceName == null || targetServiceName.trim().equals("")) {
-            throw new ConfigurationException("Invalid gateway configuration.  '" + ListenerTagNames.TARGET_SERVICE_NAME_TAG + "' not specified.");
-        }
-
-        try {
-            MessageComposer composer;
-
-            if (composerClass != null) {
-                composer = MessageComposer.Factory.getInstance(composerClass, getConfig());
-            } else {
-                composer = new JBossRemotingMessageComposer();
-            }
-
-            return new UncomposedMessageDeliveryAdapter(targetServiceCategory, targetServiceName, composer);
-        } catch (RegistryException e) {
-            throw new ConfigurationException("Remoting Listener configuration failed.", e);
-        } catch (MessageDeliverException e) {
-            throw new ConfigurationException("Remoting Listener configuration failed.", e);
-        }
+        return UncomposedMessageDeliveryAdapter.getGatewayDeliveryAdapter(getConfig(), new JBossRemotingMessageComposer());
     }
 
     /**

Added: labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/gateway/scripts/MessageInjectionConsole.groovy
===================================================================
--- labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/gateway/scripts/MessageInjectionConsole.groovy	                        (rev 0)
+++ labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/gateway/scripts/MessageInjectionConsole.groovy	2007-04-19 17:19:18 UTC (rev 11128)
@@ -0,0 +1,70 @@
+/*
+ * 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, JBoss Inc.
+ */
+import groovy.swing.SwingBuilder
+import java.awt.*
+
+/**
+ * Simple Groovy Gateway script that starts a Swing form through which you can
+ * inject messages into the target service.  Useful for testing and prototyping.
+ *
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+ */
+
+def targetService = "Target Service: " + deliveryAdapter.getDeliveryAdapter().getServiceCategory() + ":" + deliveryAdapter.getDeliveryAdapter().getServiceName()
+def numRows = 7
+def numCols = 50
+
+swing = new SwingBuilder()
+sendMessage = swing.action(name:'SendMessage', closure:this.&sendMessageToTarget, mnemonic:'R')
+
+frame = swing.frame(title:'Message Injection Console', size:[600,400], location:[200,200]) {
+    panel(layout:new BorderLayout()) {
+        panel(layout:new BorderLayout(), constraints: BorderLayout.NORTH) {
+            label(text: targetService, constraints: BorderLayout.NORTH)
+            label(text: 'Message In:', constraints: BorderLayout.WEST)
+            textArea(id:'messageInTB', columns: numCols, rows: numRows, constraints: BorderLayout.EAST)
+        }
+        panel(layout:new FlowLayout()) {
+            button(text: 'Send Message', action:sendMessage)
+	    comboBox(id: 'synchasync', items:["Asynchronous", "Synchronous"], selectedIndex:0);
+        }
+        panel(layout:new BorderLayout(), constraints: BorderLayout.SOUTH) {
+            label(text: 'Message Out:', constraints: BorderLayout.WEST)
+            textArea(id: 'messageOutTB', columns: numCols, rows: numRows, constraints: BorderLayout.EAST)
+        }
+    }
+}
+frame.pack()
+frame.show()
+
+def sendMessageToTarget(event) {
+    swing.messageOutTB.text = ""
+    if(swing.synchasync.selectedIndex == 0) {
+	    deliveryAdapter.deliverAsync(swing.messageInTB.text)
+    } else {
+	    swing.messageOutTB.text = deliveryAdapter.deliverSync(swing.messageInTB.text, 20000)
+    }
+}
+
+// Wait until the gateway is told to shutdown....
+while(!gateway.waitUntilStopped(500)) {
+}
+
+frame.dispose()
\ No newline at end of file

Added: labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/message/BasicMessageComposer.java
===================================================================
--- labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/message/BasicMessageComposer.java	                        (rev 0)
+++ labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/message/BasicMessageComposer.java	2007-04-19 17:19:18 UTC (rev 11128)
@@ -0,0 +1,40 @@
+/*
+ * 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, JBoss Inc.
+ */
+package org.jboss.soa.esb.listeners.message;
+
+import org.jboss.soa.esb.helpers.ConfigTree;
+import org.jboss.soa.esb.message.Message;
+import org.jboss.soa.esb.actions.ActionUtils;
+
+/**
+ * Basic Message Composer.
+ * <p/>
+ * Sets and gets the ESB unaware payload on the message using {@link ActionUtils}.
+ *
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+ */
+public class BasicMessageComposer extends AbstractMessageComposer {
+    public void setConfiguration(ConfigTree config) {
+    }
+
+    protected void populateMessage(Message message, Object messagePayload) throws MessageDeliverException {
+        ActionUtils.setTaskObject(message, messagePayload);
+    }
+}


Property changes on: labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/message/BasicMessageComposer.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/message/UncomposedMessageDeliveryAdapter.java
===================================================================
--- labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/message/UncomposedMessageDeliveryAdapter.java	2007-04-19 16:52:02 UTC (rev 11127)
+++ labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/message/UncomposedMessageDeliveryAdapter.java	2007-04-19 17:19:18 UTC (rev 11128)
@@ -21,6 +21,9 @@
 
 import org.jboss.soa.esb.services.registry.RegistryException;
 import org.jboss.soa.esb.message.Message;
+import org.jboss.soa.esb.helpers.ConfigTree;
+import org.jboss.soa.esb.listeners.ListenerTagNames;
+import org.jboss.soa.esb.ConfigurationException;
 import org.jboss.internal.soa.esb.assertion.AssertArgument;
 
 /**
@@ -126,4 +129,40 @@
     public MessageDeliveryAdapter getDeliveryAdapter() {
         return messageDeliveryAdapter;
     }
+
+    /**
+     * Utility factory method for creation of an uncomposed message delivery adapter from a gateway configuration.
+     * @param gatewayConfig The gateway configuration.
+     * @param defaultComposer The default message composer, used when the configuration doesn't specify a composer.
+     * @return The adapter instance.
+     * @throws ConfigurationException Invalid gateway configuration.
+     */
+    public static UncomposedMessageDeliveryAdapter getGatewayDeliveryAdapter(ConfigTree gatewayConfig, MessageComposer defaultComposer) throws ConfigurationException {
+        String targetServiceCategory = gatewayConfig.getAttribute(ListenerTagNames.TARGET_SERVICE_CATEGORY_TAG);
+        String targetServiceName = gatewayConfig.getAttribute(ListenerTagNames.TARGET_SERVICE_NAME_TAG);
+        String composerClass = gatewayConfig.getAttribute(ListenerTagNames.GATEWAY_COMPOSER_CLASS_TAG);
+
+        if (targetServiceCategory == null || targetServiceCategory.trim().equals("")) {
+            throw new ConfigurationException("Invalid gateway configuration.  '" + ListenerTagNames.TARGET_SERVICE_CATEGORY_TAG + "' not specified.");
+        }
+        if (targetServiceName == null || targetServiceName.trim().equals("")) {
+            throw new ConfigurationException("Invalid gateway configuration.  '" + ListenerTagNames.TARGET_SERVICE_NAME_TAG + "' not specified.");
+        }
+
+        try {
+            MessageComposer composer;
+
+            if (composerClass != null) {
+                composer = MessageComposer.Factory.getInstance(composerClass, gatewayConfig);
+            } else {
+                composer = defaultComposer;
+            }
+
+            return new UncomposedMessageDeliveryAdapter(targetServiceCategory, targetServiceName, composer);
+        } catch (RegistryException e) {
+            throw new ConfigurationException("Remoting Listener configuration failed.", e);
+        } catch (MessageDeliverException e) {
+            throw new ConfigurationException("Remoting Listener configuration failed.", e);
+        }
+    }
 }

Modified: labs/jbossesb/trunk/product/core/listeners/tests/build.xml
===================================================================
--- labs/jbossesb/trunk/product/core/listeners/tests/build.xml	2007-04-19 16:52:02 UTC (rev 11127)
+++ labs/jbossesb/trunk/product/core/listeners/tests/build.xml	2007-04-19 17:19:18 UTC (rev 11128)
@@ -117,8 +117,9 @@
         		<!-- using instrumented code for code coverage -->
                 <pathelement location="${org.jboss.esb.module.classes.instr.dir}"/>
                 <pathelement location="${org.jboss.esb.tests.classes.dir}"/>
-            	<!-- Need the tests src folder because there may be non-compiled test resources -->
+            	<!-- Need the module and test src folders because there may be non-compiled test resources -->
                 <pathelement location="${org.jboss.esb.module.tests.src.dir}"/>
+                <pathelement location="${org.jboss.esb.module.src.dir}"/>
                 <path refid="org.jboss.esb.tests.base.classpath"/>
             </classpath>
        	    <sysproperty key="org.jboss.esb.test.ftp.hostname" value="${org.jboss.esb.test.ftp.hostname}"/>

Modified: labs/jbossesb/trunk/product/core/listeners/tests/src/org/jboss/soa/esb/actions/scripting/GroovyActionProcessorUnitTest.java
===================================================================
--- labs/jbossesb/trunk/product/core/listeners/tests/src/org/jboss/soa/esb/actions/scripting/GroovyActionProcessorUnitTest.java	2007-04-19 16:52:02 UTC (rev 11127)
+++ labs/jbossesb/trunk/product/core/listeners/tests/src/org/jboss/soa/esb/actions/scripting/GroovyActionProcessorUnitTest.java	2007-04-19 17:19:18 UTC (rev 11128)
@@ -22,6 +22,8 @@
 import org.jboss.soa.esb.helpers.ConfigTree;
 import org.jboss.soa.esb.ConfigurationException;
 import org.jboss.soa.esb.actions.ActionLifecycleException;
+import org.jboss.soa.esb.actions.ActionProcessingException;
+import org.jboss.soa.esb.actions.ActionUtils;
 import org.jboss.soa.esb.message.Message;
 import org.jboss.soa.esb.message.format.MessageFactory;
 import junit.framework.TestCase;
@@ -32,7 +34,7 @@
  */
 public class GroovyActionProcessorUnitTest extends TestCase {
 
-    public void test() throws ConfigurationException, ActionLifecycleException {
+    public void test_script_file() throws ConfigurationException, ActionLifecycleException, ActionProcessingException {
         ConfigTree config = getConfig("test.groovy");
         String messageContents = "Hello World!";
 
@@ -41,6 +43,26 @@
         GroovyActionProcessor processor = new GroovyActionProcessor(config);
         Message message = MessageFactory.getInstance().getMessage();
 
+        assertProcessingOK(processor, message, messageContents);
+    }
+
+    public void test_script_inlined() throws ConfigurationException, ActionLifecycleException, ActionProcessingException {
+        ConfigTree config = new ConfigTree("<config/>");
+        String messageContents = "Hello World - Inlined!";
+
+        config.setAttribute("messageContents", messageContents);
+
+        GroovyActionProcessor processor = new GroovyActionProcessor(config);
+        Message message = MessageFactory.getInstance().getMessage();
+
+        // Set the script as the message task object...
+        ActionUtils.setTaskObject(message, "import org.jboss.soa.esb.message.*\n" +
+                "message.getBody().setContents(config.getAttribute(\"messageContents\").getBytes());");
+
+        assertProcessingOK(processor, message, messageContents);
+    }
+
+    private void assertProcessingOK(GroovyActionProcessor processor, Message message, String messageContents) throws ActionLifecycleException, ActionProcessingException {
         processor.initialise();
         processor.process(message);
         byte[] bodyContents = message.getBody().getContents();

Added: labs/jbossesb/trunk/product/core/listeners/tests/src/org/jboss/soa/esb/listeners/gateway/GroovyGatewayUnitTest.java
===================================================================
--- labs/jbossesb/trunk/product/core/listeners/tests/src/org/jboss/soa/esb/listeners/gateway/GroovyGatewayUnitTest.java	                        (rev 0)
+++ labs/jbossesb/trunk/product/core/listeners/tests/src/org/jboss/soa/esb/listeners/gateway/GroovyGatewayUnitTest.java	2007-04-19 17:19:18 UTC (rev 11128)
@@ -0,0 +1,114 @@
+/*
+ * 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, JBoss Inc.
+ */
+package org.jboss.soa.esb.listeners.gateway;
+
+import junit.framework.TestCase;
+import org.jboss.soa.esb.helpers.ConfigTree;
+import org.jboss.soa.esb.listeners.message.UncomposedMessageDeliveryAdapter;
+import org.jboss.soa.esb.listeners.message.BasicMessageComposer;
+import org.jboss.soa.esb.listeners.lifecycle.ManagedLifecycleException;
+import org.jboss.soa.esb.ConfigurationException;
+import org.jboss.soa.esb.actions.ActionUtils;
+import org.jboss.soa.esb.services.registry.RegistryException;
+import org.jboss.internal.soa.esb.couriers.MockCourier;
+import org.jboss.internal.soa.esb.couriers.MockCourierFactory;
+import org.jboss.internal.soa.esb.services.registry.MockRegistry;
+
+/**
+ * Tests for the Groovy Gateway.
+ *
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+ */
+public class GroovyGatewayUnitTest extends TestCase {
+
+    private MockCourier courier1;
+
+    protected void setUp() throws Exception {
+        MockCourierFactory.install();
+        MockRegistry.install();
+        courier1 = new MockCourier(true);
+        MockRegistry.register("x", "y", courier1);
+    }
+
+    protected void tearDown() throws Exception {
+        MockRegistry.uninstall();
+        MockCourierFactory.uninstall();
+    }
+
+    public void test() throws ConfigurationException, InterruptedException, ManagedLifecycleException {
+        ConfigTree config = new ConfigTree("<config/>");
+        final MockGroovyGateway groovyGateway;
+
+        config.setAttribute("script", "/org/jboss/soa/esb/listeners/gateway/testgateway.groovy");
+        groovyGateway = new MockGroovyGateway(config);
+
+        groovyGateway.doInitialise();
+        Thread thread = new Thread(new Runnable() {
+            public void run() {
+                groovyGateway.doRun();
+            }
+        });
+        thread.start();
+
+        Thread.sleep(2000);
+        assertTrue("Is already stopped", (courier1.message == null));
+        groovyGateway.stopped = true;
+        Thread.sleep(2000);
+        assertTrue("Is not stopped", (courier1.message != null));
+        assertEquals("Hi there!", ActionUtils.getTaskObject(courier1.message));
+    }
+
+    public void test_prebundled() throws ConfigurationException {
+        ConfigTree config = new ConfigTree("<config/>");
+        GroovyGateway groovyGateway;
+
+        config.setAttribute("script", "MessageInjectionConsole");
+        groovyGateway = new GroovyGateway(config);
+
+        config.setAttribute("script", "MessageInjectionConsole.groovy");
+        groovyGateway = new GroovyGateway(config);
+    }
+
+    private class MockGroovyGateway extends GroovyGateway {
+        private boolean stopped = false;
+
+        protected MockGroovyGateway(ConfigTree config) throws ConfigurationException {
+            super(config);
+        }
+
+        protected UncomposedMessageDeliveryAdapter createDeliveryAdapter() throws ConfigurationException {
+            try {
+                return new UncomposedMessageDeliveryAdapter("x", "y", new BasicMessageComposer());
+            } catch (RegistryException e) {
+                fail(e.getMessage());
+            }
+            return null;
+        }
+
+        public boolean waitUntilStopped(final long terminationPeriod) {
+            try {
+                Thread.sleep(terminationPeriod);
+            } catch (InterruptedException e) {
+                e.printStackTrace();
+            }
+            return stopped;
+        }
+    }
+}


Property changes on: labs/jbossesb/trunk/product/core/listeners/tests/src/org/jboss/soa/esb/listeners/gateway/GroovyGatewayUnitTest.java
___________________________________________________________________
Name: svn:eol-style
   + native

Added: labs/jbossesb/trunk/product/core/listeners/tests/src/org/jboss/soa/esb/listeners/gateway/testgateway.groovy
===================================================================
--- labs/jbossesb/trunk/product/core/listeners/tests/src/org/jboss/soa/esb/listeners/gateway/testgateway.groovy	                        (rev 0)
+++ labs/jbossesb/trunk/product/core/listeners/tests/src/org/jboss/soa/esb/listeners/gateway/testgateway.groovy	2007-04-19 17:19:18 UTC (rev 11128)
@@ -0,0 +1,12 @@
+def stopped = false;
+
+println "Starting loop in listener..."
+while(!stopped) {
+    print "."
+    stopped = gateway.waitUntilStopped(200);
+}
+println ""
+println "loop ended"
+
+println "delivering message..."
+deliveryAdapter.deliverAsync("Hi there!");
\ No newline at end of file

Modified: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/dom/YADOMUtil.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/dom/YADOMUtil.java	2007-04-19 16:52:02 UTC (rev 11127)
+++ labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/dom/YADOMUtil.java	2007-04-19 17:19:18 UTC (rev 11128)
@@ -21,10 +21,7 @@
 
 package org.jboss.soa.esb.dom;
 
-import java.io.File;
-import java.io.OutputStream;
-import java.io.InputStream;
-import java.io.IOException;
+import java.io.*;
 
 import javax.xml.parsers.DocumentBuilderFactory;
 import javax.xml.parsers.ParserConfigurationException;
@@ -77,6 +74,16 @@
 	}
 
     /**
+     * Parse the supplied XML String and return the associated W3C Document object.
+     *
+     * @param xml XML String.
+     * @return The W3C Document object associated with the input stream.
+     */
+    public static Document parse(String xml) throws SAXException, IOException {
+        return parseStream(new ByteArrayInputStream(xml.getBytes()), false, false);
+    }
+
+    /**
      * Parse the XML stream and return the associated W3C Document object.
      *
      * @param stream

Modified: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/util/ClassUtil.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/util/ClassUtil.java	2007-04-19 16:52:02 UTC (rev 11127)
+++ labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/util/ClassUtil.java	2007-04-19 17:19:18 UTC (rev 11128)
@@ -111,4 +111,18 @@
         
         return ClassLoader.getSystemResourceAsStream(resource) ;
     }
+
+    /**
+     * Get a package name and convert it to a path value, so it can be used
+     * in calls to methods like {@link #getResourceAsStream}.
+     * <p/>
+     * Adds a '/' prefix and converts all '." characters to '/'.  Doesn't add a
+     * trailing slash.
+     *
+     * @param packageObj The package.
+     * @return The package path.
+     */
+    public static String getPath(Package packageObj) {
+        return "/" + packageObj.getName().replace('.', '/');
+    }
 }

Modified: labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.1.xsd
===================================================================
--- labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.1.xsd	2007-04-19 16:52:02 UTC (rev 11127)
+++ labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.1.xsd	2007-04-19 17:19:18 UTC (rev 11128)
@@ -1,547 +1,767 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--Generated by Turbo XML 2.4.1.100. Conforms to w3c http://www.w3.org/2001/XMLSchema-->
-<xsd:schema 
-     xmlns:xsd="http://www.w3.org/2001/XMLSchema"
-	 xmlns:jesb="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.1.xsd"
-	 targetNamespace="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.1.xsd"
-	 elementFormDefault="qualified">
-	
-	<!-- 88888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888
-			Document root + some basic types.
-		 88888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888-->
-	
-	<xsd:element name="jbossesb">
-	    <xsd:annotation>
-	    	<xsd:documentation xml:lang="en">The jbossesb configuration for a single instance.</xsd:documentation>
-	    </xsd:annotation>
-		<xsd:complexType>
-			<xsd:sequence>
-			    <xsd:element ref="jesb:providers" minOccurs="0" maxOccurs="1"/>
-				<xsd:element ref="jesb:services" minOccurs="0" maxOccurs="1"/>
-			</xsd:sequence>
-			<xsd:attribute name="parameterReloadSecs" use="optional" default="180"/>
-		</xsd:complexType>
-	</xsd:element>
+<xsd:schema
+        xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+        xmlns:jesb="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.1.xsd"
+        targetNamespace="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.1.xsd"
+        elementFormDefault="qualified">
 
-	<xsd:element name="property">
-	    <xsd:annotation>
-	    	<xsd:documentation xml:lang="en">A simple name-value pair.</xsd:documentation>
-	    </xsd:annotation>
-		<xsd:complexType>
-			<xsd:complexContent>
-				<xsd:extension base="xsd:anyType">
-					<xsd:attribute name="name" use="required" type="xsd:string"/>
-					<xsd:attribute name="value" type="xsd:string"/>
-				</xsd:extension>
-			</xsd:complexContent>
-		</xsd:complexType>
-	</xsd:element>
-	
-	<!-- 88888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888
-			Provider and Bus base types.
-		 88888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888-->
+    <!-- 88888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888
+             Document root + some basic types.
+          88888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888-->
 
-	<xsd:element name="providers">
-	    <xsd:annotation>
-	    <xsd:documentation xml:lang="en">A container for the providers referenced in the jbossesb config file</xsd:documentation>
-	    </xsd:annotation>
-		<xsd:complexType>
-			<xsd:sequence>
-				<xsd:element ref="jesb:provider" maxOccurs="unbounded" minOccurs="1"/>
-			</xsd:sequence>
-		</xsd:complexType>
-	</xsd:element>
-	<xsd:complexType name="provider">
-	    <xsd:annotation>
-	    	<xsd:documentation xml:lang="en">A provider of a bus. So for instance you can have a jms-provider (JBossMQ) or an ftp-provider.</xsd:documentation>
-	    </xsd:annotation>
-		<xsd:sequence>
-			<xsd:element ref="jesb:property" minOccurs="0" maxOccurs="unbounded"/>
-			<xsd:element ref="jesb:bus" maxOccurs="unbounded" minOccurs="1"/>
-		</xsd:sequence>
-		<xsd:attribute name="name" use="required" type="xsd:string"/>
-	</xsd:complexType>
-	<xsd:element name="provider" type="jesb:provider"/>
-	
-	<xsd:complexType name="bus">
-	    <xsd:annotation>
-	    	<xsd:documentation xml:lang="en">A bus (also called "channel" by others) is a means by which Services communicate with each other (JMS, FTP, HTTP, etc).</xsd:documentation>
-	    </xsd:annotation>
-		<xsd:sequence>
-			<xsd:element ref="jesb:property" minOccurs="0" maxOccurs="unbounded"/>
-		</xsd:sequence>
-		<xsd:attribute name="busid" use="required" type="xsd:string">
-			<xsd:annotation>
-				<xsd:documentation xml:lang="en">An id such that this bus can be referenced by Service listn.</xsd:documentation><xsd:appinfo>
-			</xsd:appinfo></xsd:annotation>
-		</xsd:attribute>
-	</xsd:complexType>
-	<xsd:element name="bus" type="jesb:bus" />
-	
-	<!-- 88888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888
-			Service and Action types.
-		 88888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888-->
-	
-	<xsd:element name="services">
-	    <xsd:annotation>
-	    	<xsd:documentation xml:lang="en">A container for services.</xsd:documentation>
-	    </xsd:annotation>
-		<xsd:complexType>
-			<xsd:sequence>
-				<xsd:element ref="jesb:service" minOccurs="1" maxOccurs="unbounded"/>
-			</xsd:sequence>
-		</xsd:complexType>
-	</xsd:element>
-	<xsd:element name="service">
-	    <xsd:annotation>
-	    	<xsd:documentation xml:lang="en">A service has listener or gateways and a list of actions.</xsd:documentation>
-	    </xsd:annotation>
-		<xsd:complexType>
-			<xsd:sequence>
-				<xsd:element ref="jesb:listeners" minOccurs="1" maxOccurs="1"/>
-				<xsd:element ref="jesb:actions" minOccurs="0" maxOccurs="1"/>
-			</xsd:sequence>
-			<xsd:attribute name="category" use="required" type="xsd:string">
-				<xsd:annotation>
-					<xsd:documentation xml:lang="en">The service category which will be used to store a reference to this service in the registry.
-				</xsd:documentation></xsd:annotation>
-			</xsd:attribute>
-			<xsd:attribute name="name" use="required" type="xsd:string">
-				<xsd:annotation>
-					<xsd:documentation xml:lang="en">The service name which will be used to store a reference to this service in the registry.</xsd:documentation>
-					</xsd:annotation>
-			</xsd:attribute>
-			<xsd:attribute name="description" use="required" type="xsd:string">
-				<xsd:annotation>
-					<xsd:documentation xml:lang="en">The service description which stored with this service in the registry, so that the purpose of this service can be understood by a human.</xsd:documentation>
-				</xsd:annotation>
-			</xsd:attribute>
-		</xsd:complexType>
-	</xsd:element>
+    <xsd:element name="jbossesb">
+        <xsd:annotation>
+            <xsd:documentation xml:lang="en">The jbossesb configuration for a single instance.</xsd:documentation>
+        </xsd:annotation>
+        <xsd:complexType>
+            <xsd:sequence>
+                <xsd:element ref="jesb:providers" minOccurs="0" maxOccurs="1"/>
+                <xsd:element ref="jesb:services" minOccurs="0" maxOccurs="1"/>
+            </xsd:sequence>
+            <xsd:attribute name="parameterReloadSecs" use="optional" default="180"/>
+        </xsd:complexType>
+    </xsd:element>
 
-	<xsd:element name="actions">
-		<xsd:annotation>
-			<xsd:documentation xml:lang="en">A container for actions belonging to this service.</xsd:documentation>
-		</xsd:annotation>
-		<xsd:complexType>
-			<xsd:sequence>
-				<xsd:element ref="jesb:action" minOccurs="1" maxOccurs="unbounded"/>
-			</xsd:sequence>
-		</xsd:complexType>
-	</xsd:element>
-	<xsd:element name="action">
-		<xsd:annotation><xsd:documentation xml:lang="en">An action which will act on the message when it is received by the service.
-		Actions can be chained. Hence you can specify a list of actions. Action are 'pluggable' and can be custom code, however
-		JBossESB comes with a list of predefined actions.</xsd:documentation>
-		</xsd:annotation>
-		<xsd:complexType>
-			<xsd:sequence>
-				<xsd:element ref="jesb:property" minOccurs="0" maxOccurs="unbounded"/>
-			</xsd:sequence>
-			<xsd:attribute name="name" use="required" type="xsd:string">
-				<xsd:annotation>
-					<xsd:documentation xml:lang="en">The logical name of the action.</xsd:documentation>
-				</xsd:annotation>
-			</xsd:attribute>
-			<xsd:attribute name="class" use="required" type="xsd:string">
-				<xsd:annotation>
-				<xsd:documentation xml:lang="en">The full classname of the java class in which this action is defined.</xsd:documentation>
-				</xsd:annotation>
-			</xsd:attribute>
-			<xsd:attribute name="process" type="xsd:string">
-				<xsd:annotation>
-					<xsd:documentation xml:lang="en">The name of the method on the action that needs to be called when the message is received.</xsd:documentation>
-				</xsd:annotation>
-			</xsd:attribute>
-		</xsd:complexType>
-	</xsd:element>
+    <xsd:element name="property">
+        <xsd:annotation>
+            <xsd:documentation xml:lang="en">A simple name-value pair.</xsd:documentation>
+        </xsd:annotation>
+        <xsd:complexType>
+            <xsd:complexContent>
+                <xsd:extension base="xsd:anyType">
+                    <xsd:attribute name="name" use="required" type="xsd:string"/>
+                    <xsd:attribute name="value" type="xsd:string"/>
+                </xsd:extension>
+            </xsd:complexContent>
+        </xsd:complexType>
+    </xsd:element>
 
-	<!-- 88888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888
-			Listener base types.
-		 88888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888-->
+    <!-- 88888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888
+             Provider and Bus base types.
+          88888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888-->
 
-	<xsd:element name="listeners">
-	    <xsd:annotation>
-	    	<xsd:documentation xml:lang="en">A container for all listener for a service.</xsd:documentation>
-	    </xsd:annotation>
-		<xsd:complexType>
-			<xsd:sequence>
-				<xsd:element ref="jesb:listener" maxOccurs="unbounded" minOccurs="1"/>
-			</xsd:sequence>
-		</xsd:complexType>
-	</xsd:element>
-	<xsd:complexType name="listener">
-		<xsd:annotation>
-			<xsd:documentation xml:lang="en">A listener is a listener or a gateway. The listener defines to which bus
-			the service is listening. The service can simultaneniously listen to multiple buses.</xsd:documentation>
-		</xsd:annotation>
-		<xsd:sequence>
-			<xsd:element ref="jesb:property" minOccurs="0" maxOccurs="unbounded"/>
-		</xsd:sequence>
-		<xsd:attribute name="name" use="required" type="xsd:string">
-			<xsd:annotation>
-				<xsd:documentation xml:lang="en">The logical name of the listener.</xsd:documentation>
-			</xsd:annotation>
-		</xsd:attribute>
-		<xsd:attribute name="busidref" use="required" type="xsd:string">
-			<xsd:annotation>
-				<xsd:documentation xml:lang="en">A reference to an existing bus, as defined in the 'buses' section of this jbossesb config.</xsd:documentation>
-			</xsd:annotation>
-		</xsd:attribute>
-		<xsd:attribute name="maxThreads" use="required" type="xsd:int">
-				<xsd:annotation><xsd:documentation xml:lang="en">The number of threads which will be started for this listener.</xsd:documentation></xsd:annotation>
-		</xsd:attribute>
-		<xsd:attribute name="is-gateway" use="optional" type="xsd:boolean" default="false">
-			<xsd:annotation>
-				<xsd:documentation xml:lang="en">true if the listener is a gateway. A gateway is an ESB-Unware listener, while a
-					listener is ESB-aware and as such expects jbossesb formatted messages.</xsd:documentation>
-			</xsd:annotation>
-		</xsd:attribute>
-	</xsd:complexType>
-	<xsd:element name="listener" type="jesb:listener" />
+    <xsd:element name="providers">
+        <xsd:annotation>
+            <xsd:documentation xml:lang="en">A container for the providers referenced in the jbossesb config file
+            </xsd:documentation>
+        </xsd:annotation>
+        <xsd:complexType>
+            <xsd:sequence>
+                <xsd:element ref="jesb:provider" maxOccurs="unbounded" minOccurs="1"/>
+            </xsd:sequence>
+        </xsd:complexType>
+    </xsd:element>
+    <xsd:complexType name="provider">
+        <xsd:annotation>
+            <xsd:documentation xml:lang="en">A provider of a bus. So for instance you can have a jms-provider (JBossMQ)
+                or an ftp-provider.
+            </xsd:documentation>
+        </xsd:annotation>
+        <xsd:sequence>
+            <xsd:element ref="jesb:property" minOccurs="0" maxOccurs="unbounded"/>
+            <xsd:element ref="jesb:bus" maxOccurs="unbounded" minOccurs="1"/>
+        </xsd:sequence>
+        <xsd:attribute name="name" use="required" type="xsd:string"/>
+    </xsd:complexType>
+    <xsd:element name="provider" type="jesb:provider"/>
 
-	<!-- 88888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888
-			JMS Type Implementations.
-		 88888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888-->
+    <xsd:complexType name="bus">
+        <xsd:annotation>
+            <xsd:documentation xml:lang="en">A bus (also called "channel" by others) is a means by which Services
+                communicate with each other (JMS, FTP, HTTP, etc).
+            </xsd:documentation>
+        </xsd:annotation>
+        <xsd:sequence>
+            <xsd:element ref="jesb:property" minOccurs="0" maxOccurs="unbounded"/>
+        </xsd:sequence>
+        <xsd:attribute name="busid" use="required" type="xsd:string">
+            <xsd:annotation>
+                <xsd:documentation xml:lang="en">An id such that this bus can be referenced by Service listn.
+                </xsd:documentation>
+                <xsd:appinfo>
+                </xsd:appinfo>
+            </xsd:annotation>
+        </xsd:attribute>
+    </xsd:complexType>
+    <xsd:element name="bus" type="jesb:bus"/>
 
-	<xsd:element name="jms-message-filter">
-	    <xsd:annotation><xsd:documentation xml:lang="en">A JMS filter can add information to a Queue, or Topic. For example you
-	    can defined a message-selector. However, you can also push the queue name and type into this
-	    filter given you did not already specify them in the jms-bus.</xsd:documentation></xsd:annotation>
-		<xsd:complexType>
-			<xsd:attribute name="dest-name" use="required" type="xsd:string">
-				<xsd:annotation><xsd:documentation xml:lang="en">Name of the Queue of Topic.</xsd:documentation></xsd:annotation>
-			</xsd:attribute>
-			<xsd:attribute name="dest-type" use="required">
-				<xsd:annotation><xsd:documentation xml:lang="en">A Queue delivers a message once, a topic broadcasts a message to all registered listeners.</xsd:documentation></xsd:annotation>
-				<xsd:simpleType>
-					<xsd:restriction base = "xsd:NMTOKEN">
-						<xsd:enumeration value = "QUEUE"/>
-						<xsd:enumeration value = "TOPIC"/>
-					</xsd:restriction>
-				</xsd:simpleType>
-			</xsd:attribute>
-			<xsd:attribute name="selector" type="xsd:string">
-				<xsd:annotation><xsd:documentation xml:lang="en">A message-selector allows multiple listeners to register with the same queue/topic, but
-				they will filter on this message-selector.</xsd:documentation></xsd:annotation>
-			</xsd:attribute>
-		</xsd:complexType>
-	</xsd:element>
-	<xsd:element name="jms-bus" substitutionGroup="jesb:bus">
-		<xsd:annotation><xsd:documentation xml:lang="en">A JMS-Bus is a specific instance of a bus using the JMS protocol.</xsd:documentation></xsd:annotation>
-		<xsd:complexType>
-			<xsd:complexContent>
-				<xsd:extension base="jesb:bus">
-					<xsd:sequence>
-						<xsd:element ref="jesb:jms-message-filter" maxOccurs="1" minOccurs="0"/>
-					</xsd:sequence>
-				</xsd:extension>
-			</xsd:complexContent>
-		</xsd:complexType>
-	</xsd:element>
-	<xsd:element name="jms-provider" substitutionGroup="jesb:provider">
-		<xsd:annotation><xsd:documentation xml:lang="en">A specific instance of a provider, providing JMS.</xsd:documentation></xsd:annotation>
-		<xsd:complexType>
-			<xsd:complexContent>
-				<xsd:extension base="jesb:provider">
-					<xsd:attribute name="connection-factory" use="required" type="xsd:string">
-						<xsd:annotation><xsd:documentation xml:lang="en">The connection-factory used to lookup queues/topics in a naming directory (JNDI)</xsd:documentation></xsd:annotation>
-					</xsd:attribute>
-					<xsd:attribute name="jndi-context-factory" type="xsd:string">
-						<xsd:annotation><xsd:documentation xml:lang="en">The context factory class the JBossESB will use to do naming lookups.</xsd:documentation></xsd:annotation>
-					</xsd:attribute>
-					<xsd:attribute name="jndi-pkg-prefix" type="xsd:string">
-						<xsd:annotation><xsd:documentation xml:lang="en">The pkg-prefix which will be used to do naming lookups. It is left empty by default.</xsd:documentation></xsd:annotation>
-					</xsd:attribute>
-					<xsd:attribute name="jndi-URL" type="xsd:anyURI">
-						<xsd:annotation><xsd:documentation xml:lang="en">The URL used to do naming lookups.</xsd:documentation></xsd:annotation>
-					</xsd:attribute>
-				</xsd:extension>
-			</xsd:complexContent>
-		</xsd:complexType>
-	</xsd:element>
-	<xsd:element name="jms-listener" substitutionGroup="jesb:listener">
-		<xsd:annotation><xsd:documentation xml:lang="en">A specific listener using the jms protocol.</xsd:documentation></xsd:annotation>
-		<xsd:complexType>
-			<xsd:complexContent>
-				<xsd:extension base="jesb:listener">
-					<xsd:sequence>
-						<xsd:element ref="jesb:jms-message-filter" maxOccurs="1" minOccurs="0"/>
-					</xsd:sequence>
-				</xsd:extension>
-			</xsd:complexContent>
-		</xsd:complexType>
-	</xsd:element>
-	
-	<!-- 88888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888
-			FS Type Implementations.
-		 88888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888-->
-	<xsd:element name="fs-message-filter">
-	    <xsd:annotation><xsd:documentation xml:lang="en">A FS filter.</xsd:documentation></xsd:annotation>
-		<xsd:complexType>
-			<xsd:attribute name="directory" use="required" type="xsd:string">
-				<xsd:annotation><xsd:documentation xml:lang="en">The file share that is monitored for incoming new files.</xsd:documentation></xsd:annotation>
-			</xsd:attribute>
-			<xsd:attribute name="input-suffix" use="required" type="xsd:string">
-				<xsd:annotation><xsd:documentation xml:lang="en">The file suffix used to filter files targeted for comsumption by the ESB (note: add the dot, so something like '.esbIn').</xsd:documentation></xsd:annotation>
-			</xsd:attribute>
-			<xsd:attribute name="work-suffix" use="optional" type="xsd:string" default=".esbInProcess">
-				<xsd:annotation><xsd:documentation xml:lang="en">The file suffix used while the file is being process, so that another thread or process won't pick it up too.</xsd:documentation></xsd:annotation>
-			</xsd:attribute>
-			<xsd:attribute name="post-delete" use="optional" type="xsd:boolean" default="true">
-				<xsd:annotation><xsd:documentation xml:lang="en">If true, the file will be deleted after it is processed. Note that in that case post-directory and post-suffix have no effect.</xsd:documentation></xsd:annotation>
-			</xsd:attribute>
-			<xsd:attribute name="post-directory" use="optional" type="xsd:string" default="processed">
-				<xsd:annotation><xsd:documentation xml:lang="en">The file share to which the file will be moved after it is processed by the ESB</xsd:documentation></xsd:annotation>
-			</xsd:attribute>
-			<xsd:attribute name="post-suffix" use="optional" type="xsd:string" default=".esbDone">
-				<xsd:annotation><xsd:documentation xml:lang="en">The file suffix which will be added to the file name after it is processed.</xsd:documentation></xsd:annotation>
-			</xsd:attribute>
-			<xsd:attribute name="error-delete" use="optional" type="xsd:boolean" default="true">
-				<xsd:annotation><xsd:documentation xml:lang="en">If true, the file will be deleted if an error occurs during processing. Note that in that case error-directory and error-suffix have no effect.</xsd:documentation></xsd:annotation>
-			</xsd:attribute>
-			<xsd:attribute name="error-directory" use="optional" type="xsd:string" default="processed">
-				<xsd:annotation><xsd:documentation xml:lang="en">The file share to which the file will be moved after when an error occurs during processing.</xsd:documentation></xsd:annotation>
-			</xsd:attribute>
-			<xsd:attribute name="error-suffix" use="optional" type="xsd:string" default=".esbERROR">
-				<xsd:annotation><xsd:documentation xml:lang="en">The file suffix which will be added to the file name after an error occurs during processing.</xsd:documentation></xsd:annotation>
-			</xsd:attribute>
-		</xsd:complexType>
-	</xsd:element>	
-	<xsd:element name="fs-bus" substitutionGroup="jesb:bus">
-		<xsd:annotation><xsd:documentation xml:lang="en">A Fs-Bus is a specific instance of a bus using the File protocol.</xsd:documentation></xsd:annotation>
-		<xsd:complexType>
-			<xsd:complexContent>
-				<xsd:extension base="jesb:bus">
-					<xsd:sequence>
-						<xsd:element ref="jesb:fs-message-filter" maxOccurs="1" minOccurs="0"/>
-					</xsd:sequence>
-				</xsd:extension>
-			</xsd:complexContent>
-		</xsd:complexType>
-	</xsd:element>	
-	<xsd:element name="fs-provider" substitutionGroup="jesb:provider">
-		<xsd:annotation><xsd:documentation xml:lang="en">A specific instance of a provider, providing a file system (local fileshare or NAS).</xsd:documentation></xsd:annotation>
-		<xsd:complexType>
-			<xsd:complexContent>
-				<xsd:extension base="jesb:provider"/>
-			</xsd:complexContent>
-		</xsd:complexType>
-	</xsd:element>
-	<xsd:element name="fs-listener" substitutionGroup="jesb:listener">
-		<xsd:annotation><xsd:documentation xml:lang="en">A specific listener using the file protocol.</xsd:documentation></xsd:annotation>
-		<xsd:complexType>
-			<xsd:complexContent>
-				<xsd:extension base="jesb:listener">
-					<xsd:sequence>
-						<xsd:element ref="jesb:fs-message-filter" maxOccurs="1" minOccurs="0"/>
-					</xsd:sequence>
-					<xsd:attribute name="poll-frequency-seconds" use="optional" default="10">
-					    <xsd:annotation>
-							<xsd:documentation xml:lang="en">The frequency with which this listener polls fs in seconds. Defaults to 10 seconds.</xsd:documentation>
-						</xsd:annotation>
-					    <xsd:simpleType>
-					    	<xsd:restriction base="xsd:integer">
-					    		<xsd:minExclusive value="0"/>
-					    	</xsd:restriction>
-					    </xsd:simpleType>
-					</xsd:attribute>
-				</xsd:extension>
-			</xsd:complexContent>
-		</xsd:complexType>
-	</xsd:element>
-	
-		<!-- 88888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888
-			FTP Type Implementations.
-		 88888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888-->
-	<xsd:element name="ftp-message-filter">
-	    <xsd:annotation><xsd:documentation xml:lang="en">A FTP filter.</xsd:documentation></xsd:annotation>
-		<xsd:complexType>
-			<xsd:attribute name="directory" use="required" type="xsd:string">
-				<xsd:annotation><xsd:documentation xml:lang="en">The ftp directory that is monitored for incoming new files.</xsd:documentation></xsd:annotation>
-			</xsd:attribute>
-			<xsd:attribute name="username" use="required" type="xsd:string">
-				<xsd:annotation><xsd:documentation xml:lang="en">The username used to access the ftp server</xsd:documentation></xsd:annotation>
-			</xsd:attribute>
-			<xsd:attribute name="password" use="required" type="xsd:string">
-				<xsd:annotation><xsd:documentation xml:lang="en">The password used to access the ftp server.</xsd:documentation></xsd:annotation>
-			</xsd:attribute>
-			<xsd:attribute name="input-suffix" use="required" type="xsd:string">
-				<xsd:annotation><xsd:documentation xml:lang="en">The file suffix used to filter files targeted for comsumption by the ESB (note: add the dot, so something like '.esbIn').</xsd:documentation></xsd:annotation>
-			</xsd:attribute>
-			<xsd:attribute name="work-suffix" use="optional" type="xsd:string" default=".esbInProcess">
-				<xsd:annotation><xsd:documentation xml:lang="en">The file suffix used while the file is being process, so that another thread or process won't pick it up too.</xsd:documentation></xsd:annotation>
-			</xsd:attribute>
-			<xsd:attribute name="post-delete" use="optional" type="xsd:boolean" default="true">
-				<xsd:annotation><xsd:documentation xml:lang="en">If true, the file will be deleted after it is processed. Note that in that case post-directory and post-suffix have no effect.</xsd:documentation></xsd:annotation>
-			</xsd:attribute>
-			<xsd:attribute name="post-directory" use="optional" type="xsd:string" default="processed">
-				<xsd:annotation><xsd:documentation xml:lang="en">The ftp directory to which the file will be moved after it is processed by the ESB</xsd:documentation></xsd:annotation>
-			</xsd:attribute>
-			<xsd:attribute name="post-suffix" use="optional" type="xsd:string" default=".esbDone">
-				<xsd:annotation><xsd:documentation xml:lang="en">The file suffix which will be added to the file name after it is processed.</xsd:documentation></xsd:annotation>
-			</xsd:attribute>
-			<xsd:attribute name="error-delete" use="optional" type="xsd:boolean" default="true">
-				<xsd:annotation><xsd:documentation xml:lang="en">If true, the file will be deleted if an error occurs during processing. Note that in that case error-directory and error-suffix have no effect.</xsd:documentation></xsd:annotation>
-			</xsd:attribute>
-			<xsd:attribute name="error-directory" use="optional" type="xsd:string" default="processed">
-				<xsd:annotation><xsd:documentation xml:lang="en">The ftp directory to which the file will be moved after when an error occurs during processing.</xsd:documentation></xsd:annotation>
-			</xsd:attribute>
-			<xsd:attribute name="error-suffix" use="optional" type="xsd:string" default=".esbERROR">
-				<xsd:annotation><xsd:documentation xml:lang="en">The file suffix which will be added to the file name after an error occurs during processing.</xsd:documentation></xsd:annotation>
-			</xsd:attribute>
-			<xsd:attribute name="passive" use="optional" type="xsd:boolean">
-				<xsd:annotation><xsd:documentation xml:lang="en">This is an ftp server setting which may vary per session.</xsd:documentation></xsd:annotation>
-			</xsd:attribute>
-			<xsd:attribute name="protocol" use="optional" default="ftp">
-				<xsd:annotation><xsd:documentation xml:lang="en">The protocol, can be sftp (SSH File Transfer Protocol), ftps (FTP over SLL) and ftp (to which it defaults).</xsd:documentation></xsd:annotation>
-				<xsd:simpleType>
-					<xsd:restriction base = "xsd:NMTOKEN">
-						<xsd:enumeration value = "ftp"/>
-						<xsd:enumeration value = "ftps"/>
-						<xsd:enumeration value = "sftp"/>
-					</xsd:restriction>
-				</xsd:simpleType>
-			</xsd:attribute>
-			<xsd:attribute name="certificate-url" use="optional" type="xsd:string">
-				<xsd:annotation><xsd:documentation xml:lang="en">The url to a certificate, which can be needed for secure protocols (sftp and ftps).</xsd:documentation></xsd:annotation>
-			</xsd:attribute>
-		</xsd:complexType>
-	</xsd:element>	
-	<xsd:element name="ftp-bus" substitutionGroup="jesb:bus">
-		<xsd:annotation><xsd:documentation xml:lang="en">A FTP-Bus is a specific instance of a bus using the FTP protocol.</xsd:documentation></xsd:annotation>
-		<xsd:complexType>
-			<xsd:complexContent>
-				<xsd:extension base="jesb:bus">
-					<xsd:sequence>
-						<xsd:element ref="jesb:ftp-message-filter" maxOccurs="1" minOccurs="0"/>
-					</xsd:sequence>
-				</xsd:extension>
-			</xsd:complexContent>
-		</xsd:complexType>
-	</xsd:element>	
-	<xsd:element name="ftp-provider" substitutionGroup="jesb:provider">
-		<xsd:annotation><xsd:documentation xml:lang="en">A specific instance of a provider, providing a ftp service.</xsd:documentation></xsd:annotation>
-		<xsd:complexType>
-			<xsd:complexContent>
-				<xsd:extension base="jesb:provider">
-					<xsd:attribute name="hostname" use="required" type="xsd:string">
-						<xsd:annotation><xsd:documentation xml:lang="en">The ftp hostname, as it can be resolved by DNS.</xsd:documentation></xsd:annotation>
-					</xsd:attribute>
-				</xsd:extension>
-			</xsd:complexContent>
-		</xsd:complexType>
-	</xsd:element>
-	<xsd:element name="ftp-listener" substitutionGroup="jesb:listener">
-		<xsd:annotation><xsd:documentation xml:lang="en">A specific listener using the ftp protocol.</xsd:documentation></xsd:annotation>
-		<xsd:complexType>
-			<xsd:complexContent>
-				<xsd:extension base="jesb:listener">
-					<xsd:sequence>
-						<xsd:element ref="jesb:ftp-message-filter" maxOccurs="1" minOccurs="0"/>
-					</xsd:sequence>
-					<xsd:attribute name="poll-frequency-seconds" use="optional" default="10">
-					    <xsd:annotation>
-							<xsd:documentation xml:lang="en">The frequency with which this listener polls ftp server in seconds. Defaults to 10 seconds.</xsd:documentation>
-						</xsd:annotation>
-						<xsd:simpleType>
-					    	<xsd:restriction base="xsd:integer">
-					    		<xsd:minExclusive value="0"/>
-					    	</xsd:restriction>
-					    </xsd:simpleType>
-					</xsd:attribute>
-				</xsd:extension>
-			</xsd:complexContent>
-		</xsd:complexType>
-	</xsd:element>
-	
-			<!-- 88888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888
-			SQL Type Implementations.
-		 88888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888-->
-	<xsd:element name="sql-message-filter">
-	    <xsd:annotation><xsd:documentation xml:lang="en">A SQL filter.</xsd:documentation></xsd:annotation>
-		<xsd:complexType>
-			<xsd:attribute name="tablename" use="required" type="xsd:string">
-				<xsd:annotation><xsd:documentation xml:lang="en">The table in which esb message are stored.</xsd:documentation></xsd:annotation>
-			</xsd:attribute>
-			<xsd:attribute name="message-id-column" use="optional" type="xsd:string" default="message_id">
-				<xsd:annotation><xsd:documentation xml:lang="en">A unique key (PK) in the table.</xsd:documentation></xsd:annotation>
-			</xsd:attribute>
-			<xsd:attribute name="message-column" use="optional" type="xsd:string" default="message">
-				<xsd:annotation><xsd:documentation xml:lang="en">The field that holds the serialized message.</xsd:documentation></xsd:annotation>
-			</xsd:attribute>
-			<xsd:attribute name="status-column" use="optional" type="xsd:string" default="status">
-				<xsd:annotation><xsd:documentation xml:lang="en">This column contents ('P', 'W', 'E' or 'D') indicates if the row is pending (P), in process (W),  in error(E) or done (D)  if postDelete and/or errorDelete are 'true' rows might be deleted</xsd:documentation></xsd:annotation>
-			</xsd:attribute>
-			<xsd:attribute name="insert-timestamp-column" use="optional" type="xsd:string" default="insert_timestamp">
-				<xsd:annotation><xsd:documentation xml:lang="en">Holds the timestamp when the record was inserted.</xsd:documentation></xsd:annotation>
-			</xsd:attribute>
-			<xsd:attribute name="post-delete" use="optional" type="xsd:boolean" default="true">
-				<xsd:annotation><xsd:documentation xml:lang="en">If true, records will be deleted after processing.((e.g. no rows with a 'D' for done, in column defined in 'status_column')</xsd:documentation></xsd:annotation>
-			</xsd:attribute>
-			<xsd:attribute name="error-delete" use="optional" type="xsd:boolean" default="true">
-				<xsd:annotation><xsd:documentation xml:lang="en">If true, records in error will be deleted after attempted picked up for processing.(e.g. no rows with a 'E' for error, in column defined in 'status_column')</xsd:documentation></xsd:annotation>
-			</xsd:attribute>
-		</xsd:complexType>
-	</xsd:element>	
-	<xsd:element name="sql-bus" substitutionGroup="jesb:bus">
-		<xsd:annotation><xsd:documentation xml:lang="en">A SQL-Bus is a specific instance of a bus using the SQL protocol.</xsd:documentation></xsd:annotation>
-		<xsd:complexType>
-			<xsd:complexContent>
-				<xsd:extension base="jesb:bus">
-					<xsd:sequence>
-						<xsd:element ref="jesb:sql-message-filter" maxOccurs="1" minOccurs="0"/>
-					</xsd:sequence>
-				</xsd:extension>
-			</xsd:complexContent>
-		</xsd:complexType>
-	</xsd:element>	
-	<xsd:element name="sql-provider" substitutionGroup="jesb:provider">
-		<xsd:annotation><xsd:documentation xml:lang="en">A specific instance of a provider, providing a db service.</xsd:documentation></xsd:annotation>
-		<xsd:complexType>
-			<xsd:complexContent>
-				<xsd:extension base="jesb:provider">
-					<xsd:attribute name="url" use="required" type="xsd:string">
-						<xsd:annotation><xsd:documentation xml:lang="en">The url needed to connect to the db.</xsd:documentation></xsd:annotation>
-					</xsd:attribute>
-					<xsd:attribute name="driver" use="required" type="xsd:string">
-						<xsd:annotation><xsd:documentation xml:lang="en">The driver needed to connect to the db.</xsd:documentation></xsd:annotation>
-					</xsd:attribute>
-					<xsd:attribute name="username" use="required" type="xsd:string">
-						<xsd:annotation><xsd:documentation xml:lang="en">The username used to access the database.</xsd:documentation></xsd:annotation>
-					</xsd:attribute>
-					<xsd:attribute name="password" use="optional" type="xsd:string">
-						<xsd:annotation><xsd:documentation xml:lang="en">The password used to access the database.</xsd:documentation></xsd:annotation>
-					</xsd:attribute>
-				</xsd:extension>
-			</xsd:complexContent>
-		</xsd:complexType>
-	</xsd:element>
-	<xsd:element name="sql-listener" substitutionGroup="jesb:listener">
-		<xsd:annotation><xsd:documentation xml:lang="en">A specific listener using the ftp protocol.</xsd:documentation></xsd:annotation>
-		<xsd:complexType>
-			<xsd:complexContent>
-				<xsd:extension base="jesb:listener">
-					<xsd:sequence>
-						<xsd:element ref="jesb:sql-message-filter" maxOccurs="1" minOccurs="0"/>
-					</xsd:sequence>
-					<xsd:attribute name="poll-frequency-seconds" use="optional" default="10">
-						<xsd:annotation>
-							<xsd:documentation xml:lang="en">The frequency with which this listener polls the db in seconds. Defaults to 10 seconds.</xsd:documentation>
-						</xsd:annotation>
-						<xsd:simpleType>
-					    	<xsd:restriction base="xsd:integer">
-					    		<xsd:minExclusive value="0"/>
-					    	</xsd:restriction>
-					    </xsd:simpleType>
-					</xsd:attribute>
-				</xsd:extension>
-			</xsd:complexContent>
-		</xsd:complexType>
-	</xsd:element>
+    <!-- 88888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888
+             Service and Action types.
+          88888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888-->
 
+    <xsd:element name="services">
+        <xsd:annotation>
+            <xsd:documentation xml:lang="en">A container for services.</xsd:documentation>
+        </xsd:annotation>
+        <xsd:complexType>
+            <xsd:sequence>
+                <xsd:element ref="jesb:service" minOccurs="1" maxOccurs="unbounded"/>
+            </xsd:sequence>
+        </xsd:complexType>
+    </xsd:element>
+    <xsd:element name="service">
+        <xsd:annotation>
+            <xsd:documentation xml:lang="en">A service has listener or gateways and a list of actions.
+            </xsd:documentation>
+        </xsd:annotation>
+        <xsd:complexType>
+            <xsd:sequence>
+                <xsd:element ref="jesb:listeners" minOccurs="1" maxOccurs="1"/>
+                <xsd:element ref="jesb:actions" minOccurs="0" maxOccurs="1"/>
+            </xsd:sequence>
+            <xsd:attribute name="category" use="required" type="xsd:string">
+                <xsd:annotation>
+                    <xsd:documentation xml:lang="en">The service category which will be used to store a reference to
+                        this service in the registry.
+                    </xsd:documentation>
+                </xsd:annotation>
+            </xsd:attribute>
+            <xsd:attribute name="name" use="required" type="xsd:string">
+                <xsd:annotation>
+                    <xsd:documentation xml:lang="en">The service name which will be used to store a reference to this
+                        service in the registry.
+                    </xsd:documentation>
+                </xsd:annotation>
+            </xsd:attribute>
+            <xsd:attribute name="description" use="required" type="xsd:string">
+                <xsd:annotation>
+                    <xsd:documentation xml:lang="en">The service description which stored with this service in the
+                        registry, so that the purpose of this service can be understood by a human.
+                    </xsd:documentation>
+                </xsd:annotation>
+            </xsd:attribute>
+        </xsd:complexType>
+    </xsd:element>
 
+    <xsd:element name="actions">
+        <xsd:annotation>
+            <xsd:documentation xml:lang="en">A container for actions belonging to this service.</xsd:documentation>
+        </xsd:annotation>
+        <xsd:complexType>
+            <xsd:sequence>
+                <xsd:element ref="jesb:action" minOccurs="1" maxOccurs="unbounded"/>
+            </xsd:sequence>
+        </xsd:complexType>
+    </xsd:element>
+    <xsd:element name="action">
+        <xsd:annotation>
+            <xsd:documentation xml:lang="en">An action which will act on the message when it is received by the service.
+                Actions can be chained. Hence you can specify a list of actions. Action are 'pluggable' and can be
+                custom code, however
+                JBossESB comes with a list of predefined actions.
+            </xsd:documentation>
+        </xsd:annotation>
+        <xsd:complexType>
+            <xsd:sequence>
+                <xsd:element ref="jesb:property" minOccurs="0" maxOccurs="unbounded"/>
+            </xsd:sequence>
+            <xsd:attribute name="name" use="required" type="xsd:string">
+                <xsd:annotation>
+                    <xsd:documentation xml:lang="en">The logical name of the action.</xsd:documentation>
+                </xsd:annotation>
+            </xsd:attribute>
+            <xsd:attribute name="class" use="required" type="xsd:string">
+                <xsd:annotation>
+                    <xsd:documentation xml:lang="en">The full classname of the java class in which this action is
+                        defined.
+                    </xsd:documentation>
+                </xsd:annotation>
+            </xsd:attribute>
+            <xsd:attribute name="process" type="xsd:string">
+                <xsd:annotation>
+                    <xsd:documentation xml:lang="en">The name of the method on the action that needs to be called when
+                        the message is received.
+                    </xsd:documentation>
+                </xsd:annotation>
+            </xsd:attribute>
+        </xsd:complexType>
+    </xsd:element>
+
     <!-- 88888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888
+             Listener base types.
+          88888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888-->
+
+    <xsd:element name="listeners">
+        <xsd:annotation>
+            <xsd:documentation xml:lang="en">A container for all listener for a service.</xsd:documentation>
+        </xsd:annotation>
+        <xsd:complexType>
+            <xsd:sequence>
+                <xsd:element ref="jesb:listener" maxOccurs="unbounded" minOccurs="1"/>
+            </xsd:sequence>
+        </xsd:complexType>
+    </xsd:element>
+    <xsd:complexType name="listener">
+        <xsd:annotation>
+            <xsd:documentation xml:lang="en">A listener is a listener or a gateway. The listener defines to which bus
+                the service is listening. The service can simultaneniously listen to multiple buses.
+            </xsd:documentation>
+        </xsd:annotation>
+        <xsd:sequence>
+            <xsd:element ref="jesb:property" minOccurs="0" maxOccurs="unbounded"/>
+        </xsd:sequence>
+        <xsd:attribute name="name" use="required" type="xsd:string">
+            <xsd:annotation>
+                <xsd:documentation xml:lang="en">The logical name of the listener.</xsd:documentation>
+            </xsd:annotation>
+        </xsd:attribute>
+        <xsd:attribute name="busidref" use="optional" type="xsd:string" default="$not-defined$">
+            <xsd:annotation>
+                <xsd:documentation xml:lang="en">A reference to an existing bus, as defined in the 'buses' section of
+                    this jbossesb config.
+                </xsd:documentation>
+            </xsd:annotation>
+        </xsd:attribute>
+        <xsd:attribute name="maxThreads" use="optional" type="xsd:int" default="1">
+            <xsd:annotation>
+                <xsd:documentation xml:lang="en">The number of threads which will be started for this listener.
+                </xsd:documentation>
+            </xsd:annotation>
+        </xsd:attribute>
+        <xsd:attribute name="is-gateway" use="optional" type="xsd:boolean" default="false">
+            <xsd:annotation>
+                <xsd:documentation xml:lang="en">true if the listener is a gateway. A gateway is an ESB-Unware listener,
+                    while a
+                    listener is ESB-aware and as such expects jbossesb formatted messages.
+                </xsd:documentation>
+            </xsd:annotation>
+        </xsd:attribute>
+    </xsd:complexType>
+    <xsd:element name="listener" type="jesb:listener"/>
+
+    <!-- 88888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888
+             JMS Type Implementations.
+          88888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888-->
+
+    <xsd:element name="jms-message-filter">
+        <xsd:annotation>
+            <xsd:documentation xml:lang="en">A JMS filter can add information to a Queue, or Topic. For example you
+                can defined a message-selector. However, you can also push the queue name and type into this
+                filter given you did not already specify them in the jms-bus.
+            </xsd:documentation>
+        </xsd:annotation>
+        <xsd:complexType>
+            <xsd:attribute name="dest-name" use="required" type="xsd:string">
+                <xsd:annotation>
+                    <xsd:documentation xml:lang="en">Name of the Queue of Topic.</xsd:documentation>
+                </xsd:annotation>
+            </xsd:attribute>
+            <xsd:attribute name="dest-type" use="required">
+                <xsd:annotation>
+                    <xsd:documentation xml:lang="en">A Queue delivers a message once, a topic broadcasts a message to
+                        all registered listeners.
+                    </xsd:documentation>
+                </xsd:annotation>
+                <xsd:simpleType>
+                    <xsd:restriction base="xsd:NMTOKEN">
+                        <xsd:enumeration value="QUEUE"/>
+                        <xsd:enumeration value="TOPIC"/>
+                    </xsd:restriction>
+                </xsd:simpleType>
+            </xsd:attribute>
+            <xsd:attribute name="selector" type="xsd:string">
+                <xsd:annotation>
+                    <xsd:documentation xml:lang="en">A message-selector allows multiple listeners to register with the
+                        same queue/topic, but
+                        they will filter on this message-selector.
+                    </xsd:documentation>
+                </xsd:annotation>
+            </xsd:attribute>
+        </xsd:complexType>
+    </xsd:element>
+    <xsd:element name="jms-bus" substitutionGroup="jesb:bus">
+        <xsd:annotation>
+            <xsd:documentation xml:lang="en">A JMS-Bus is a specific instance of a bus using the JMS protocol.
+            </xsd:documentation>
+        </xsd:annotation>
+        <xsd:complexType>
+            <xsd:complexContent>
+                <xsd:extension base="jesb:bus">
+                    <xsd:sequence>
+                        <xsd:element ref="jesb:jms-message-filter" maxOccurs="1" minOccurs="0"/>
+                    </xsd:sequence>
+                </xsd:extension>
+            </xsd:complexContent>
+        </xsd:complexType>
+    </xsd:element>
+    <xsd:element name="jms-provider" substitutionGroup="jesb:provider">
+        <xsd:annotation>
+            <xsd:documentation xml:lang="en">A specific instance of a provider, providing JMS.</xsd:documentation>
+        </xsd:annotation>
+        <xsd:complexType>
+            <xsd:complexContent>
+                <xsd:extension base="jesb:provider">
+                    <xsd:attribute name="connection-factory" use="required" type="xsd:string">
+                        <xsd:annotation>
+                            <xsd:documentation xml:lang="en">The connection-factory used to lookup queues/topics in a
+                                naming directory (JNDI)
+                            </xsd:documentation>
+                        </xsd:annotation>
+                    </xsd:attribute>
+                    <xsd:attribute name="jndi-context-factory" type="xsd:string">
+                        <xsd:annotation>
+                            <xsd:documentation xml:lang="en">The context factory class the JBossESB will use to do
+                                naming lookups.
+                            </xsd:documentation>
+                        </xsd:annotation>
+                    </xsd:attribute>
+                    <xsd:attribute name="jndi-pkg-prefix" type="xsd:string">
+                        <xsd:annotation>
+                            <xsd:documentation xml:lang="en">The pkg-prefix which will be used to do naming lookups. It
+                                is left empty by default.
+                            </xsd:documentation>
+                        </xsd:annotation>
+                    </xsd:attribute>
+                    <xsd:attribute name="jndi-URL" type="xsd:anyURI">
+                        <xsd:annotation>
+                            <xsd:documentation xml:lang="en">The URL used to do naming lookups.</xsd:documentation>
+                        </xsd:annotation>
+                    </xsd:attribute>
+                </xsd:extension>
+            </xsd:complexContent>
+        </xsd:complexType>
+    </xsd:element>
+    <xsd:element name="jms-listener" substitutionGroup="jesb:listener">
+        <xsd:annotation>
+            <xsd:documentation xml:lang="en">A specific listener using the jms protocol.</xsd:documentation>
+        </xsd:annotation>
+        <xsd:complexType>
+            <xsd:complexContent>
+                <xsd:extension base="jesb:listener">
+                    <xsd:sequence>
+                        <xsd:element ref="jesb:jms-message-filter" maxOccurs="1" minOccurs="0"/>
+                    </xsd:sequence>
+                </xsd:extension>
+            </xsd:complexContent>
+        </xsd:complexType>
+    </xsd:element>
+
+    <!-- 88888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888
+             FS Type Implementations.
+          88888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888-->
+    <xsd:element name="fs-message-filter">
+        <xsd:annotation>
+            <xsd:documentation xml:lang="en">A FS filter.</xsd:documentation>
+        </xsd:annotation>
+        <xsd:complexType>
+            <xsd:attribute name="directory" use="required" type="xsd:string">
+                <xsd:annotation>
+                    <xsd:documentation xml:lang="en">The file share that is monitored for incoming new files.
+                    </xsd:documentation>
+                </xsd:annotation>
+            </xsd:attribute>
+            <xsd:attribute name="input-suffix" use="required" type="xsd:string">
+                <xsd:annotation>
+                    <xsd:documentation xml:lang="en">The file suffix used to filter files targeted for comsumption by
+                        the ESB (note: add the dot, so something like '.esbIn').
+                    </xsd:documentation>
+                </xsd:annotation>
+            </xsd:attribute>
+            <xsd:attribute name="work-suffix" use="optional" type="xsd:string" default=".esbInProcess">
+                <xsd:annotation>
+                    <xsd:documentation xml:lang="en">The file suffix used while the file is being process, so that
+                        another thread or process won't pick it up too.
+                    </xsd:documentation>
+                </xsd:annotation>
+            </xsd:attribute>
+            <xsd:attribute name="post-delete" use="optional" type="xsd:boolean" default="true">
+                <xsd:annotation>
+                    <xsd:documentation xml:lang="en">If true, the file will be deleted after it is processed. Note that
+                        in that case post-directory and post-suffix have no effect.
+                    </xsd:documentation>
+                </xsd:annotation>
+            </xsd:attribute>
+            <xsd:attribute name="post-directory" use="optional" type="xsd:string" default="processed">
+                <xsd:annotation>
+                    <xsd:documentation xml:lang="en">The file share to which the file will be moved after it is
+                        processed by the ESB
+                    </xsd:documentation>
+                </xsd:annotation>
+            </xsd:attribute>
+            <xsd:attribute name="post-suffix" use="optional" type="xsd:string" default=".esbDone">
+                <xsd:annotation>
+                    <xsd:documentation xml:lang="en">The file suffix which will be added to the file name after it is
+                        processed.
+                    </xsd:documentation>
+                </xsd:annotation>
+            </xsd:attribute>
+            <xsd:attribute name="error-delete" use="optional" type="xsd:boolean" default="true">
+                <xsd:annotation>
+                    <xsd:documentation xml:lang="en">If true, the file will be deleted if an error occurs during
+                        processing. Note that in that case error-directory and error-suffix have no effect.
+                    </xsd:documentation>
+                </xsd:annotation>
+            </xsd:attribute>
+            <xsd:attribute name="error-directory" use="optional" type="xsd:string" default="processed">
+                <xsd:annotation>
+                    <xsd:documentation xml:lang="en">The file share to which the file will be moved after when an error
+                        occurs during processing.
+                    </xsd:documentation>
+                </xsd:annotation>
+            </xsd:attribute>
+            <xsd:attribute name="error-suffix" use="optional" type="xsd:string" default=".esbERROR">
+                <xsd:annotation>
+                    <xsd:documentation xml:lang="en">The file suffix which will be added to the file name after an error
+                        occurs during processing.
+                    </xsd:documentation>
+                </xsd:annotation>
+            </xsd:attribute>
+        </xsd:complexType>
+    </xsd:element>
+    <xsd:element name="fs-bus" substitutionGroup="jesb:bus">
+        <xsd:annotation>
+            <xsd:documentation xml:lang="en">A Fs-Bus is a specific instance of a bus using the File protocol.
+            </xsd:documentation>
+        </xsd:annotation>
+        <xsd:complexType>
+            <xsd:complexContent>
+                <xsd:extension base="jesb:bus">
+                    <xsd:sequence>
+                        <xsd:element ref="jesb:fs-message-filter" maxOccurs="1" minOccurs="0"/>
+                    </xsd:sequence>
+                </xsd:extension>
+            </xsd:complexContent>
+        </xsd:complexType>
+    </xsd:element>
+    <xsd:element name="fs-provider" substitutionGroup="jesb:provider">
+        <xsd:annotation>
+            <xsd:documentation xml:lang="en">A specific instance of a provider, providing a file system (local fileshare
+                or NAS).
+            </xsd:documentation>
+        </xsd:annotation>
+        <xsd:complexType>
+            <xsd:complexContent>
+                <xsd:extension base="jesb:provider"/>
+            </xsd:complexContent>
+        </xsd:complexType>
+    </xsd:element>
+    <xsd:element name="fs-listener" substitutionGroup="jesb:listener">
+        <xsd:annotation>
+            <xsd:documentation xml:lang="en">A specific listener using the file protocol.</xsd:documentation>
+        </xsd:annotation>
+        <xsd:complexType>
+            <xsd:complexContent>
+                <xsd:extension base="jesb:listener">
+                    <xsd:sequence>
+                        <xsd:element ref="jesb:fs-message-filter" maxOccurs="1" minOccurs="0"/>
+                    </xsd:sequence>
+                    <xsd:attribute name="poll-frequency-seconds" use="optional" default="10">
+                        <xsd:annotation>
+                            <xsd:documentation xml:lang="en">The frequency with which this listener polls fs in seconds.
+                                Defaults to 10 seconds.
+                            </xsd:documentation>
+                        </xsd:annotation>
+                        <xsd:simpleType>
+                            <xsd:restriction base="xsd:integer">
+                                <xsd:minExclusive value="0"/>
+                            </xsd:restriction>
+                        </xsd:simpleType>
+                    </xsd:attribute>
+                </xsd:extension>
+            </xsd:complexContent>
+        </xsd:complexType>
+    </xsd:element>
+
+    <!-- 88888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888
+             FTP Type Implementations.
+          88888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888-->
+    <xsd:element name="ftp-message-filter">
+        <xsd:annotation>
+            <xsd:documentation xml:lang="en">A FTP filter.</xsd:documentation>
+        </xsd:annotation>
+        <xsd:complexType>
+            <xsd:attribute name="directory" use="required" type="xsd:string">
+                <xsd:annotation>
+                    <xsd:documentation xml:lang="en">The ftp directory that is monitored for incoming new files.
+                    </xsd:documentation>
+                </xsd:annotation>
+            </xsd:attribute>
+            <xsd:attribute name="username" use="required" type="xsd:string">
+                <xsd:annotation>
+                    <xsd:documentation xml:lang="en">The username used to access the ftp server</xsd:documentation>
+                </xsd:annotation>
+            </xsd:attribute>
+            <xsd:attribute name="password" use="required" type="xsd:string">
+                <xsd:annotation>
+                    <xsd:documentation xml:lang="en">The password used to access the ftp server.</xsd:documentation>
+                </xsd:annotation>
+            </xsd:attribute>
+            <xsd:attribute name="input-suffix" use="required" type="xsd:string">
+                <xsd:annotation>
+                    <xsd:documentation xml:lang="en">The file suffix used to filter files targeted for comsumption by
+                        the ESB (note: add the dot, so something like '.esbIn').
+                    </xsd:documentation>
+                </xsd:annotation>
+            </xsd:attribute>
+            <xsd:attribute name="work-suffix" use="optional" type="xsd:string" default=".esbInProcess">
+                <xsd:annotation>
+                    <xsd:documentation xml:lang="en">The file suffix used while the file is being process, so that
+                        another thread or process won't pick it up too.
+                    </xsd:documentation>
+                </xsd:annotation>
+            </xsd:attribute>
+            <xsd:attribute name="post-delete" use="optional" type="xsd:boolean" default="true">
+                <xsd:annotation>
+                    <xsd:documentation xml:lang="en">If true, the file will be deleted after it is processed. Note that
+                        in that case post-directory and post-suffix have no effect.
+                    </xsd:documentation>
+                </xsd:annotation>
+            </xsd:attribute>
+            <xsd:attribute name="post-directory" use="optional" type="xsd:string" default="processed">
+                <xsd:annotation>
+                    <xsd:documentation xml:lang="en">The ftp directory to which the file will be moved after it is
+                        processed by the ESB
+                    </xsd:documentation>
+                </xsd:annotation>
+            </xsd:attribute>
+            <xsd:attribute name="post-suffix" use="optional" type="xsd:string" default=".esbDone">
+                <xsd:annotation>
+                    <xsd:documentation xml:lang="en">The file suffix which will be added to the file name after it is
+                        processed.
+                    </xsd:documentation>
+                </xsd:annotation>
+            </xsd:attribute>
+            <xsd:attribute name="error-delete" use="optional" type="xsd:boolean" default="true">
+                <xsd:annotation>
+                    <xsd:documentation xml:lang="en">If true, the file will be deleted if an error occurs during
+                        processing. Note that in that case error-directory and error-suffix have no effect.
+                    </xsd:documentation>
+                </xsd:annotation>
+            </xsd:attribute>
+            <xsd:attribute name="error-directory" use="optional" type="xsd:string" default="processed">
+                <xsd:annotation>
+                    <xsd:documentation xml:lang="en">The ftp directory to which the file will be moved after when an
+                        error occurs during processing.
+                    </xsd:documentation>
+                </xsd:annotation>
+            </xsd:attribute>
+            <xsd:attribute name="error-suffix" use="optional" type="xsd:string" default=".esbERROR">
+                <xsd:annotation>
+                    <xsd:documentation xml:lang="en">The file suffix which will be added to the file name after an error
+                        occurs during processing.
+                    </xsd:documentation>
+                </xsd:annotation>
+            </xsd:attribute>
+            <xsd:attribute name="passive" use="optional" type="xsd:boolean">
+                <xsd:annotation>
+                    <xsd:documentation xml:lang="en">This is an ftp server setting which may vary per session.
+                    </xsd:documentation>
+                </xsd:annotation>
+            </xsd:attribute>
+            <xsd:attribute name="protocol" use="optional" default="ftp">
+                <xsd:annotation>
+                    <xsd:documentation xml:lang="en">The protocol, can be sftp (SSH File Transfer Protocol), ftps (FTP
+                        over SLL) and ftp (to which it defaults).
+                    </xsd:documentation>
+                </xsd:annotation>
+                <xsd:simpleType>
+                    <xsd:restriction base="xsd:NMTOKEN">
+                        <xsd:enumeration value="ftp"/>
+                        <xsd:enumeration value="ftps"/>
+                        <xsd:enumeration value="sftp"/>
+                    </xsd:restriction>
+                </xsd:simpleType>
+            </xsd:attribute>
+            <xsd:attribute name="certificate-url" use="optional" type="xsd:string">
+                <xsd:annotation>
+                    <xsd:documentation xml:lang="en">The url to a certificate, which can be needed for secure protocols
+                        (sftp and ftps).
+                    </xsd:documentation>
+                </xsd:annotation>
+            </xsd:attribute>
+        </xsd:complexType>
+    </xsd:element>
+    <xsd:element name="ftp-bus" substitutionGroup="jesb:bus">
+        <xsd:annotation>
+            <xsd:documentation xml:lang="en">A FTP-Bus is a specific instance of a bus using the FTP protocol.
+            </xsd:documentation>
+        </xsd:annotation>
+        <xsd:complexType>
+            <xsd:complexContent>
+                <xsd:extension base="jesb:bus">
+                    <xsd:sequence>
+                        <xsd:element ref="jesb:ftp-message-filter" maxOccurs="1" minOccurs="0"/>
+                    </xsd:sequence>
+                </xsd:extension>
+            </xsd:complexContent>
+        </xsd:complexType>
+    </xsd:element>
+    <xsd:element name="ftp-provider" substitutionGroup="jesb:provider">
+        <xsd:annotation>
+            <xsd:documentation xml:lang="en">A specific instance of a provider, providing a ftp service.
+            </xsd:documentation>
+        </xsd:annotation>
+        <xsd:complexType>
+            <xsd:complexContent>
+                <xsd:extension base="jesb:provider">
+                    <xsd:attribute name="hostname" use="required" type="xsd:string">
+                        <xsd:annotation>
+                            <xsd:documentation xml:lang="en">The ftp hostname, as it can be resolved by DNS.
+                            </xsd:documentation>
+                        </xsd:annotation>
+                    </xsd:attribute>
+                </xsd:extension>
+            </xsd:complexContent>
+        </xsd:complexType>
+    </xsd:element>
+    <xsd:element name="ftp-listener" substitutionGroup="jesb:listener">
+        <xsd:annotation>
+            <xsd:documentation xml:lang="en">A specific listener using the ftp protocol.</xsd:documentation>
+        </xsd:annotation>
+        <xsd:complexType>
+            <xsd:complexContent>
+                <xsd:extension base="jesb:listener">
+                    <xsd:sequence>
+                        <xsd:element ref="jesb:ftp-message-filter" maxOccurs="1" minOccurs="0"/>
+                    </xsd:sequence>
+                    <xsd:attribute name="poll-frequency-seconds" use="optional" default="10">
+                        <xsd:annotation>
+                            <xsd:documentation xml:lang="en">The frequency with which this listener polls ftp server in
+                                seconds. Defaults to 10 seconds.
+                            </xsd:documentation>
+                        </xsd:annotation>
+                        <xsd:simpleType>
+                            <xsd:restriction base="xsd:integer">
+                                <xsd:minExclusive value="0"/>
+                            </xsd:restriction>
+                        </xsd:simpleType>
+                    </xsd:attribute>
+                </xsd:extension>
+            </xsd:complexContent>
+        </xsd:complexType>
+    </xsd:element>
+
+    <!-- 88888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888
+             SQL Type Implementations.
+          88888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888-->
+    <xsd:element name="sql-message-filter">
+        <xsd:annotation>
+            <xsd:documentation xml:lang="en">A SQL filter.</xsd:documentation>
+        </xsd:annotation>
+        <xsd:complexType>
+            <xsd:attribute name="tablename" use="required" type="xsd:string">
+                <xsd:annotation>
+                    <xsd:documentation xml:lang="en">The table in which esb message are stored.</xsd:documentation>
+                </xsd:annotation>
+            </xsd:attribute>
+            <xsd:attribute name="message-id-column" use="optional" type="xsd:string" default="message_id">
+                <xsd:annotation>
+                    <xsd:documentation xml:lang="en">A unique key (PK) in the table.</xsd:documentation>
+                </xsd:annotation>
+            </xsd:attribute>
+            <xsd:attribute name="message-column" use="optional" type="xsd:string" default="message">
+                <xsd:annotation>
+                    <xsd:documentation xml:lang="en">The field that holds the serialized message.</xsd:documentation>
+                </xsd:annotation>
+            </xsd:attribute>
+            <xsd:attribute name="status-column" use="optional" type="xsd:string" default="status">
+                <xsd:annotation>
+                    <xsd:documentation xml:lang="en">This column contents ('P', 'W', 'E' or 'D') indicates if the row is
+                        pending (P), in process (W), in error(E) or done (D) if postDelete and/or errorDelete are 'true'
+                        rows might be deleted
+                    </xsd:documentation>
+                </xsd:annotation>
+            </xsd:attribute>
+            <xsd:attribute name="insert-timestamp-column" use="optional" type="xsd:string" default="insert_timestamp">
+                <xsd:annotation>
+                    <xsd:documentation xml:lang="en">Holds the timestamp when the record was inserted.
+                    </xsd:documentation>
+                </xsd:annotation>
+            </xsd:attribute>
+            <xsd:attribute name="post-delete" use="optional" type="xsd:boolean" default="true">
+                <xsd:annotation>
+                    <xsd:documentation xml:lang="en">If true, records will be deleted after processing.((e.g. no rows
+                        with a 'D' for done, in column defined in 'status_column')
+                    </xsd:documentation>
+                </xsd:annotation>
+            </xsd:attribute>
+            <xsd:attribute name="error-delete" use="optional" type="xsd:boolean" default="true">
+                <xsd:annotation>
+                    <xsd:documentation xml:lang="en">If true, records in error will be deleted after attempted picked up
+                        for processing.(e.g. no rows with a 'E' for error, in column defined in 'status_column')
+                    </xsd:documentation>
+                </xsd:annotation>
+            </xsd:attribute>
+        </xsd:complexType>
+    </xsd:element>
+    <xsd:element name="sql-bus" substitutionGroup="jesb:bus">
+        <xsd:annotation>
+            <xsd:documentation xml:lang="en">A SQL-Bus is a specific instance of a bus using the SQL protocol.
+            </xsd:documentation>
+        </xsd:annotation>
+        <xsd:complexType>
+            <xsd:complexContent>
+                <xsd:extension base="jesb:bus">
+                    <xsd:sequence>
+                        <xsd:element ref="jesb:sql-message-filter" maxOccurs="1" minOccurs="0"/>
+                    </xsd:sequence>
+                </xsd:extension>
+            </xsd:complexContent>
+        </xsd:complexType>
+    </xsd:element>
+    <xsd:element name="sql-provider" substitutionGroup="jesb:provider">
+        <xsd:annotation>
+            <xsd:documentation xml:lang="en">A specific instance of a provider, providing a db service.
+            </xsd:documentation>
+        </xsd:annotation>
+        <xsd:complexType>
+            <xsd:complexContent>
+                <xsd:extension base="jesb:provider">
+                    <xsd:attribute name="url" use="required" type="xsd:string">
+                        <xsd:annotation>
+                            <xsd:documentation xml:lang="en">The url needed to connect to the db.</xsd:documentation>
+                        </xsd:annotation>
+                    </xsd:attribute>
+                    <xsd:attribute name="driver" use="required" type="xsd:string">
+                        <xsd:annotation>
+                            <xsd:documentation xml:lang="en">The driver needed to connect to the db.</xsd:documentation>
+                        </xsd:annotation>
+                    </xsd:attribute>
+                    <xsd:attribute name="username" use="required" type="xsd:string">
+                        <xsd:annotation>
+                            <xsd:documentation xml:lang="en">The username used to access the database.
+                            </xsd:documentation>
+                        </xsd:annotation>
+                    </xsd:attribute>
+                    <xsd:attribute name="password" use="optional" type="xsd:string">
+                        <xsd:annotation>
+                            <xsd:documentation xml:lang="en">The password used to access the database.
+                            </xsd:documentation>
+                        </xsd:annotation>
+                    </xsd:attribute>
+                </xsd:extension>
+            </xsd:complexContent>
+        </xsd:complexType>
+    </xsd:element>
+    <xsd:element name="sql-listener" substitutionGroup="jesb:listener">
+        <xsd:annotation>
+            <xsd:documentation xml:lang="en">A specific listener using the ftp protocol.</xsd:documentation>
+        </xsd:annotation>
+        <xsd:complexType>
+            <xsd:complexContent>
+                <xsd:extension base="jesb:listener">
+                    <xsd:sequence>
+                        <xsd:element ref="jesb:sql-message-filter" maxOccurs="1" minOccurs="0"/>
+                    </xsd:sequence>
+                    <xsd:attribute name="poll-frequency-seconds" use="optional" default="10">
+                        <xsd:annotation>
+                            <xsd:documentation xml:lang="en">The frequency with which this listener polls the db in
+                                seconds. Defaults to 10 seconds.
+                            </xsd:documentation>
+                        </xsd:annotation>
+                        <xsd:simpleType>
+                            <xsd:restriction base="xsd:integer">
+                                <xsd:minExclusive value="0"/>
+                            </xsd:restriction>
+                        </xsd:simpleType>
+                    </xsd:attribute>
+                </xsd:extension>
+            </xsd:complexContent>
+        </xsd:complexType>
+    </xsd:element>
+
+    <!-- 88888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888
     JBoss Remoting Type Implementations.
     88888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888-->
     <xsd:element name="jbr-bus" substitutionGroup="jesb:bus">
@@ -569,18 +789,21 @@
                 <xsd:extension base="jesb:provider">
                     <xsd:attribute name="protocol" use="required">
                         <xsd:annotation>
-                            <xsd:documentation xml:lang="en">Jboss Remoting Listener/Server protocol.</xsd:documentation>
+                            <xsd:documentation xml:lang="en">Jboss Remoting Listener/Server protocol.
+                            </xsd:documentation>
                         </xsd:annotation>
                         <xsd:simpleType>
-                            <xsd:restriction base = "xsd:NMTOKEN">
-                                <xsd:enumeration value = "http"/>
-                                <xsd:enumeration value = "socket"/>
+                            <xsd:restriction base="xsd:NMTOKEN">
+                                <xsd:enumeration value="http"/>
+                                <xsd:enumeration value="socket"/>
                             </xsd:restriction>
                         </xsd:simpleType>
                     </xsd:attribute>
                     <xsd:attribute name="host" type="xsd:string">
                         <xsd:annotation>
-                            <xsd:documentation xml:lang="en">JBoss Remoting Server bind address.  When not specified, defaults to InetAddress.getLocalHost().getHostName().</xsd:documentation>
+                            <xsd:documentation xml:lang="en">JBoss Remoting Server bind address. When not specified,
+                                defaults to InetAddress.getLocalHost().getHostName().
+                            </xsd:documentation>
                         </xsd:annotation>
                     </xsd:attribute>
                 </xsd:extension>
@@ -598,4 +821,26 @@
         </xsd:complexType>
     </xsd:element>
 
+    <!-- 88888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888
+    Groovy Gateway Type Implementations.
+    88888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888-->
+    <xsd:element name="groovy-listener" substitutionGroup="jesb:listener">
+        <xsd:annotation>
+            <xsd:documentation xml:lang="en">Groovy Listener.</xsd:documentation>
+        </xsd:annotation>
+        <xsd:complexType>
+            <xsd:complexContent>
+                <xsd:extension base="jesb:listener">
+                    <xsd:attribute name="script" use="required" type="xsd:string">
+                        <xsd:annotation>
+                            <xsd:documentation xml:lang="en">The path (classpath) to the Groovy Gateway script. Or, the
+                                alias for the pre-packaged Groovy Gateway script.
+                            </xsd:documentation>
+                        </xsd:annotation>
+                    </xsd:attribute>
+                </xsd:extension>
+            </xsd:complexContent>
+        </xsd:complexType>
+    </xsd:element>
+
 </xsd:schema>
\ No newline at end of file

Modified: labs/jbossesb/trunk/product/samples/quickstarts/base-build.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/base-build.xml	2007-04-19 16:52:02 UTC (rev 11127)
+++ labs/jbossesb/trunk/product/samples/quickstarts/base-build.xml	2007-04-19 17:19:18 UTC (rev 11128)
@@ -67,6 +67,7 @@
             <fileset dir="build" includes="META-INF/**"/>
             <fileset dir="${basedir}" includes="jbm-queue-service.xml"/>
             <fileset dir="./" includes="${additional.deploys}"/>
+            <fileset dir="lib" includes="*.jar"/>
         </jar>
 
         <antcall target="deploy-esb-archive-before"/>

Modified: labs/jbossesb/trunk/product/samples/quickstarts/webservice_bpel/build.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/webservice_bpel/build.xml	2007-04-19 16:52:02 UTC (rev 11127)
+++ labs/jbossesb/trunk/product/samples/quickstarts/webservice_bpel/build.xml	2007-04-19 17:19:18 UTC (rev 11128)
@@ -1,6 +1,6 @@
 <project name="Quickstart_webservice_bpel" default="deploy" basedir=".">
 
-    <property name="additional.deploys" value="jbmq-service.xml"/>
+    <property name="additional.deploys" value="jbmq-service.xml,groovy/**"/>
 
     <!-- Import the base Ant build script... -->
     <import file="../base-build.xml"/>

Modified: labs/jbossesb/trunk/product/samples/quickstarts/webservice_bpel/jboss-esb.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/webservice_bpel/jboss-esb.xml	2007-04-19 16:52:02 UTC (rev 11127)
+++ labs/jbossesb/trunk/product/samples/quickstarts/webservice_bpel/jboss-esb.xml	2007-04-19 17:19:18 UTC (rev 11128)
@@ -19,6 +19,10 @@
                 <jms-message-filter dest-type="QUEUE" dest-name="queue/quickstart_webservice_bpel_esb"
                                     selector="service='shipper'"/>
             </jms-bus>
+            <jms-bus busid="GroovyService">
+                <jms-message-filter dest-type="QUEUE" dest-name="queue/quickstart_webservice_bpel_esb"
+                                    selector="service='groovyhelper'"/>
+            </jms-bus>
         </jms-provider>
 
         <jbr-provider name="JBR-Http-1" protocol="http" host="localhost">
@@ -82,6 +86,27 @@
                 </action>
             </actions>
         </service>
+
+        <service category="Helper_SOAPClient" name="Helper_SOAPClient" description="Groovy Helper Service">
+
+            <listeners>
+                <groovy-listener name="soap-client" script="MessageInjectionConsole" is-gateway="true" />
+
+                <jms-listener name="JMS-Helper-ESBListener" busidref="GroovyService"/>
+            </listeners>
+            <actions>
+                <action name="print-before" class="org.jboss.soa.esb.actions.SystemPrintln">
+                    <property name="message" value="[Quickstart_webservice_bpel] Message Before GroovyAction."/>
+                </action>
+
+                <action name="groovy" class="org.jboss.soa.esb.actions.scripting.GroovyActionProcessor" />
+
+                <action name="print-after" class="org.jboss.soa.esb.actions.SystemPrintln">
+                    <property name="message" value="[Quickstart_webservice_bpel] Message After GroovyAction."/>
+                </action>
+            </actions>
+        </service>
+
     </services>
 
 </jbossesb>




More information about the jboss-svn-commits mailing list