[jboss-svn-commits] JBL Code SVN: r21938 - in labs/jbossesb/workspace/skeagh: api/service/src/main/java/org/jboss/esb and 28 other directories.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Wed Aug 27 12:53:02 EDT 2008


Author: tfennelly
Date: 2008-08-27 12:53:01 -0400 (Wed, 27 Aug 2008)
New Revision: 21938

Added:
   labs/jbossesb/workspace/skeagh/api/service/src/main/java/org/jboss/esb/message/MessageTransformationException.java
   labs/jbossesb/workspace/skeagh/api/service/src/main/java/org/jboss/esb/message/MessageTransformer.java
   labs/jbossesb/workspace/skeagh/api/service/src/test/java/org/
   labs/jbossesb/workspace/skeagh/api/service/src/test/java/org/jboss/
   labs/jbossesb/workspace/skeagh/api/service/src/test/java/org/jboss/esb/
   labs/jbossesb/workspace/skeagh/api/service/src/test/java/org/jboss/esb/service/
   labs/jbossesb/workspace/skeagh/api/service/src/test/java/org/jboss/esb/service/ServiceNameTest.java
   labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/deploy/DeploymentResource.java
   labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/deploy/config/InboundRouterConfig.java
   labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/deploy/config/OutboundRouterConfig.java
   labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/deploy/config/ServiceConfig.java
   labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/deploy/config/digest/
   labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/deploy/config/digest/ConfigurationDigester.java
   labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/deploy/config/digest/CreateObject.java
   labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/deploy/config/digest/DefaultConfigurationDigester.java
   labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/deploy/config/digest/DigestUtil.java
   labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/deploy/config/digest/SetProperty.java
   labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/deploy/config/digest/package.html
   labs/jbossesb/workspace/skeagh/runtime/src/main/resources/META-INF/
   labs/jbossesb/workspace/skeagh/runtime/src/main/resources/META-INF/jbossesb/
   labs/jbossesb/workspace/skeagh/runtime/src/main/resources/META-INF/jbossesb/xsd/
   labs/jbossesb/workspace/skeagh/runtime/src/main/resources/META-INF/jbossesb/xsd/inrouters-smooks.xml
   labs/jbossesb/workspace/skeagh/runtime/src/main/resources/META-INF/jbossesb/xsd/jbossesb-5.0.xsd
   labs/jbossesb/workspace/skeagh/runtime/src/main/resources/META-INF/jbossesb/xsd/jbossesb-5.0.xsd-smooks.xml
   labs/jbossesb/workspace/skeagh/runtime/src/main/resources/META-INF/jbossesb/xsd/outrouters-smooks.xml
   labs/jbossesb/workspace/skeagh/runtime/src/main/resources/META-INF/jbossesb/xsd/resources-smooks.xml
   labs/jbossesb/workspace/skeagh/runtime/src/main/resources/META-INF/jbossesb/xsd/services-smooks.xml
   labs/jbossesb/workspace/skeagh/runtime/src/main/resources/META-INF/jbossesb/xsd/transformers-smooks.xml
   labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/
   labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/
   labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/
   labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/deploy/
   labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/deploy/config/
   labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/deploy/config/DefaultConfigurationDigesterTest.java
   labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/deploy/config/MyInRouter.java
   labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/deploy/config/MyMessageTransformer.java
   labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/deploy/config/MyOutRouter.java
   labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/deploy/config/MyTestService.java
   labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/deploy/config/XProtDeploymentResource.java
   labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/deploy/config/jbossesb-01.xml
   labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/deploy/config/jbossesb-02.xml
   labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/deploy/config/jbossesb-03.xml
   labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/deploy/config/jbossesb-inandoutrouters_01.xml
   labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/deploy/config/jbossesb-inrouters_01.xml
   labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/deploy/config/jbossesb-outrouters_01.xml
   labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/deploy/config/jbossesb-resources_01.xml
   labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/deploy/config/jbossesb-services_01.xml
   labs/jbossesb/workspace/skeagh/runtime/src/test/resources/META-INF/
   labs/jbossesb/workspace/skeagh/runtime/src/test/resources/META-INF/jbossesb/
   labs/jbossesb/workspace/skeagh/runtime/src/test/resources/META-INF/jbossesb/xsd/
   labs/jbossesb/workspace/skeagh/runtime/src/test/resources/META-INF/jbossesb/xsd/xprot/
   labs/jbossesb/workspace/skeagh/runtime/src/test/resources/META-INF/jbossesb/xsd/xprot/xprot.xsd
Removed:
   labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/deploy/config/ConfigurationDigester.java
   labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/deploy/config/DefaultConfigurationDigester.java
Modified:
   labs/jbossesb/workspace/skeagh/api/service/pom.xml
   labs/jbossesb/workspace/skeagh/api/service/src/main/java/org/jboss/esb/JBossESBException.java
   labs/jbossesb/workspace/skeagh/api/service/src/main/java/org/jboss/esb/context/DeploymentContext.java
   labs/jbossesb/workspace/skeagh/api/service/src/main/java/org/jboss/esb/service/ServiceName.java
   labs/jbossesb/workspace/skeagh/commons/src/main/java/org/jboss/esb/xml/XMLParseUtils.java
   labs/jbossesb/workspace/skeagh/commons/src/main/java/org/jboss/esb/xml/XsdDOMValidator.java
   labs/jbossesb/workspace/skeagh/runtime/pom.xml
   labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/deploy/config/ConfigurationUnit.java
Log:
Basic configuration model (extensible).
More changes and tests.

Modified: labs/jbossesb/workspace/skeagh/api/service/pom.xml
===================================================================
--- labs/jbossesb/workspace/skeagh/api/service/pom.xml	2008-08-27 16:32:17 UTC (rev 21937)
+++ labs/jbossesb/workspace/skeagh/api/service/pom.xml	2008-08-27 16:53:01 UTC (rev 21938)
@@ -13,4 +13,12 @@
     <version>${jboss.esb.version}</version>
     <url>http://www.jboss.org/jbossesb/</url>
 
+    <dependencies>
+        <dependency>
+            <groupId>jboss.jbossesb</groupId>
+            <artifactId>jbossesb-commons</artifactId>
+            <version>${jboss.esb.version}</version>
+        </dependency>
+    </dependencies>
+
 </project>
\ No newline at end of file

Modified: labs/jbossesb/workspace/skeagh/api/service/src/main/java/org/jboss/esb/JBossESBException.java
===================================================================
--- labs/jbossesb/workspace/skeagh/api/service/src/main/java/org/jboss/esb/JBossESBException.java	2008-08-27 16:32:17 UTC (rev 21937)
+++ labs/jbossesb/workspace/skeagh/api/service/src/main/java/org/jboss/esb/JBossESBException.java	2008-08-27 16:53:01 UTC (rev 21938)
@@ -20,6 +20,8 @@
 package org.jboss.esb;
 
 /**
+ * Base JBossESB Exception.
+ * 
  * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
  */
 public class JBossESBException extends Exception

Modified: labs/jbossesb/workspace/skeagh/api/service/src/main/java/org/jboss/esb/context/DeploymentContext.java
===================================================================
--- labs/jbossesb/workspace/skeagh/api/service/src/main/java/org/jboss/esb/context/DeploymentContext.java	2008-08-27 16:32:17 UTC (rev 21937)
+++ labs/jbossesb/workspace/skeagh/api/service/src/main/java/org/jboss/esb/context/DeploymentContext.java	2008-08-27 16:53:01 UTC (rev 21938)
@@ -27,6 +27,9 @@
  * <p/>
  * Mutable context scoped around the deployment unit to which the caller
  * is part of.
+ * <p/>
+ * Deployment resources are handled explicitly because we need to manage
+ * their lifecycle.
  *
  * @author <a href="mailto:Kevin.Conner at jboss.com">Kevin Conner</a>
  * @author <a href="mailto:tcunning at redhat.com">Tom Cunningham</a>
@@ -35,25 +38,62 @@
  */
 public class DeploymentContext implements ESBContext
 {
-
     /**
+     * List of deployment resource objects.
+     * <p/>
+     * Deployment resources are handled explicitly and are immutable.
+     */
+    private Map<String, Object> resources = new LinkedHashMap<String, Object>();
+    /**
      * Context Data Map.
      */
     private Map<Object, Object> contextMap = new LinkedHashMap<Object, Object>();
+    /**
+     * Context ThreadLocal.
+     */
+    private static ThreadLocal<DeploymentContext> contextTL = new ThreadLocal<DeploymentContext>();
 
     /**
-     * Get the {@link DeploymentContext} associated with the caller.
-     * @return The {@link DeploymentContext} associated with the caller.
+     * Set the {@link DeploymentContext} associated with the current thread.
+     * @param context The {@link DeploymentContext} associated with the current thread.
      */
+    public static void setDeploymentContext(final DeploymentContext context)
+    {
+        contextTL.set(context);
+    }
+
+    /**
+     * Get the {@link DeploymentContext} associated with the current thread.
+     * @return The {@link DeploymentContext} associated with the current thread.
+     */
     public static DeploymentContext getDeploymentContext()
     {
-        return null;
+        return contextTL.get();
     }
 
     /**
+     * Add a list of deployment resources to the context.
+     * @param resources A list of deployment resources associated with this deployment.
+     */
+    public final void addResources(final Map<String, Object> resources)
+    {
+        this.resources.putAll(resources);
+    }
+
+    /**
+     * Get the deployment resource Object from the context using the supplied id.
+     * @param id The resource ID.
+     * @return The resource object, otherwise null.
+     */
+    public final Object getResource(final String id)
+    {
+        return resources.get(id);
+    }
+
+    /**
      * Get the Object from the context using the supplied key.
      * @param key The context key.
-     * @return The Object bound under the supplied context key, otherwise false.
+     * @return The Object bound under the supplied context key, otherwise null.
      */
     public final Object get(final Object key)
     {

Added: labs/jbossesb/workspace/skeagh/api/service/src/main/java/org/jboss/esb/message/MessageTransformationException.java
===================================================================
--- labs/jbossesb/workspace/skeagh/api/service/src/main/java/org/jboss/esb/message/MessageTransformationException.java	                        (rev 0)
+++ labs/jbossesb/workspace/skeagh/api/service/src/main/java/org/jboss/esb/message/MessageTransformationException.java	2008-08-27 16:53:01 UTC (rev 21938)
@@ -0,0 +1,39 @@
+/*
+ * 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.esb.message;
+
+import org.jboss.esb.JBossESBException;
+
+/**
+ * Message Transformation Exception.
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+ */
+public class MessageTransformationException extends JBossESBException
+{
+    public MessageTransformationException(final String message)
+    {
+        super(message);
+    }
+
+    public MessageTransformationException(final String message, final Throwable cause)
+    {
+        super(message, cause);
+    }
+}


Property changes on: labs/jbossesb/workspace/skeagh/api/service/src/main/java/org/jboss/esb/message/MessageTransformationException.java
___________________________________________________________________
Name: svn:eol-style
   + native

Added: labs/jbossesb/workspace/skeagh/api/service/src/main/java/org/jboss/esb/message/MessageTransformer.java
===================================================================
--- labs/jbossesb/workspace/skeagh/api/service/src/main/java/org/jboss/esb/message/MessageTransformer.java	                        (rev 0)
+++ labs/jbossesb/workspace/skeagh/api/service/src/main/java/org/jboss/esb/message/MessageTransformer.java	2008-08-27 16:53:01 UTC (rev 21938)
@@ -0,0 +1,36 @@
+/*
+ * 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.esb.message;
+
+/**
+ * Message Transformer Interface.
+ *
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+ */
+public interface MessageTransformer
+{
+    /**
+     * Transform the message.
+     *
+     * @param message The message to be transformed.
+     * @throws MessageTransformationException An exception occured while transforming the message.
+     */
+    void transform(Message message) throws MessageTransformationException;
+}


Property changes on: labs/jbossesb/workspace/skeagh/api/service/src/main/java/org/jboss/esb/message/MessageTransformer.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/workspace/skeagh/api/service/src/main/java/org/jboss/esb/service/ServiceName.java
===================================================================
--- labs/jbossesb/workspace/skeagh/api/service/src/main/java/org/jboss/esb/service/ServiceName.java	2008-08-27 16:32:17 UTC (rev 21937)
+++ labs/jbossesb/workspace/skeagh/api/service/src/main/java/org/jboss/esb/service/ServiceName.java	2008-08-27 16:53:01 UTC (rev 21938)
@@ -19,6 +19,8 @@
  */
 package org.jboss.esb.service;
 
+import org.jboss.esb.util.AssertArgument;
+
 /**
  * Service Name.
  *
@@ -33,25 +35,36 @@
     /**
      * Service Category.
      */
-    private final String category;
+    private String category = null;
     /**
      * Service Name.
      */
-    private final String name;
+    private String name = null;
 
     /**
+     * Private default constructor.
+     */
+    private ServiceName()
+    {
+    }
+
+    /**
      * Public constructor.
+     *
      * @param category Service Category.
-     * @param name Service Name.
+     * @param name     Service Name.
      */
     public ServiceName(final String category, final String name)
     {
+        AssertArgument.isNotNullAndNotEmpty(category, "category");
+        AssertArgument.isNotNullAndNotEmpty(name, "name");
         this.category = category;
         this.name = name;
     }
 
     /**
      * Get the Service Category.
+     *
      * @return Service Category.
      */
     public final String getCategory()
@@ -61,10 +74,52 @@
 
     /**
      * Get the Service Name.
+     *
      * @return The Service Name.
      */
     public final String getName()
     {
         return name;
     }
+
+    /**
+     * ServiceName toString.
+     * @return The Service Category and Name concatenated.
+     */
+    public String toString()
+    {
+        return (category + ":" + name);
+    }
+
+    /**
+     * Equals method.
+     *
+     * @param obj Object to compare against.
+     * @return True if the object is a ServiceName with the same category and name values, otherwise false.
+     */
+    public final boolean equals(final Object obj)
+    {
+        if (obj == null)
+        {
+            return false;
+        } else if (obj == this)
+        {
+            return true;
+        } else if (!(obj instanceof ServiceName))
+        {
+            return false;
+        }
+
+        return (obj.hashCode() == hashCode());
+    }
+
+    /**
+     * Object hash method.
+     *
+     * @return Object hash value.
+     */
+    public final int hashCode()
+    {
+        return toString().hashCode();
+    }
 }

Added: labs/jbossesb/workspace/skeagh/api/service/src/test/java/org/jboss/esb/service/ServiceNameTest.java
===================================================================
--- labs/jbossesb/workspace/skeagh/api/service/src/test/java/org/jboss/esb/service/ServiceNameTest.java	                        (rev 0)
+++ labs/jbossesb/workspace/skeagh/api/service/src/test/java/org/jboss/esb/service/ServiceNameTest.java	2008-08-27 16:53:01 UTC (rev 21938)
@@ -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.esb.service;
+
+import junit.framework.TestCase;
+
+import java.util.HashMap;
+
+/**
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+ */
+public class ServiceNameTest extends TestCase
+{
+
+    public void test()
+    {
+        ServiceName sa1 = new ServiceName("ca", "na");
+        ServiceName sa2 = new ServiceName("ca", "na");
+        ServiceName sb1 = new ServiceName("cb", "nb");
+        ServiceName sb2 = new ServiceName("cb", "nb");
+        HashMap<ServiceName, String> map = new HashMap<ServiceName, String>();
+
+        assertFalse(sa1.equals(null));
+        assertFalse(sa1.equals("astring"));
+        assertFalse(sa1.equals(sb1));
+
+        assertEquals(sa1.hashCode(), sa2.hashCode());
+        assertTrue(sa1.equals(sa2));
+
+        map.put(sa1, "sa");
+        map.put(sb1, "sb");
+        assertEquals("sa", map.get(sa1));
+        assertEquals("sa", map.get(sa2));
+        assertEquals("sb", map.get(sb1));
+        assertEquals("sb", map.get(sb2));
+    }
+}


Property changes on: labs/jbossesb/workspace/skeagh/api/service/src/test/java/org/jboss/esb/service/ServiceNameTest.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: labs/jbossesb/workspace/skeagh/commons/src/main/java/org/jboss/esb/xml/XMLParseUtils.java
===================================================================
--- labs/jbossesb/workspace/skeagh/commons/src/main/java/org/jboss/esb/xml/XMLParseUtils.java	2008-08-27 16:32:17 UTC (rev 21937)
+++ labs/jbossesb/workspace/skeagh/commons/src/main/java/org/jboss/esb/xml/XMLParseUtils.java	2008-08-27 16:53:01 UTC (rev 21938)
@@ -19,10 +19,11 @@
  */
 package org.jboss.esb.xml;
 
-import org.w3c.dom.Document;
+import org.w3c.dom.*;
+import org.xml.sax.InputSource;
 import org.xml.sax.SAXException;
-import org.xml.sax.InputSource;
 
+import javax.xml.XMLConstants;
 import javax.xml.parsers.DocumentBuilder;
 import javax.xml.parsers.DocumentBuilderFactory;
 import javax.xml.parsers.ParserConfigurationException;
@@ -30,6 +31,10 @@
 import java.io.InputStream;
 import java.io.InputStreamReader;
 import java.io.Reader;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.util.List;
+import java.util.Set;
 
 /**
  * XML Parsing utilities.
@@ -51,8 +56,8 @@
      * @param stream Document stream.
      * @return Document instance.
      * @throws ParserConfigurationException Parser config error.
-     * @throws IOException Error reading document stream.
-     * @throws SAXException XML parse error.
+     * @throws IOException                  Error reading document stream.
+     * @throws SAXException                 XML parse error.
      */
     public static Document parse(final InputStream stream) throws ParserConfigurationException, IOException, SAXException
     {
@@ -66,8 +71,8 @@
      * @param reader Document stream.
      * @return Document instance.
      * @throws ParserConfigurationException Parser config error.
-     * @throws IOException Error reading document stream.
-     * @throws SAXException XML parse error.
+     * @throws IOException                  Error reading document stream.
+     * @throws SAXException                 XML parse error.
      */
     public static Document parse(Reader reader) throws ParserConfigurationException, SAXException, IOException
     {
@@ -79,4 +84,84 @@
 
         return docBuilder.parse(new InputSource(reader));
     }
+
+    /**
+     * Gather the namespaces from the supplied element and all child elements recursively.
+     * <p/>
+     * This method looks for the "xmlns:xxxx" attributes.
+     *
+     * @param element          The element to be iterated over.
+     * @param namespaceSources The list to which all found namespaces are to be added.
+     * @throws org.xml.sax.SAXException Unable to iterate the supplied element.
+     */
+    public static void gatherNamespaceDeclarations(final Element element, final List<URI> namespaceSources) throws SAXException
+    {
+        NamedNodeMap attributes = element.getAttributes();
+        int attributeCount = attributes.getLength();
+
+        for (int i = 0; i < attributeCount; i++)
+        {
+            Attr attribute = (Attr) attributes.item(i);
+            String namespace = attribute.getNamespaceURI();
+
+            if (XMLConstants.XMLNS_ATTRIBUTE_NS_URI.equals(namespace))
+            {
+                try
+                {
+                    namespaceSources.add(new URI(attribute.getValue()));
+                } catch (URISyntaxException e)
+                {
+                    throw new SAXException("Cannot gather namespaces.  Namespaces must be valid URIs.  Found Namespace: '" + attribute.getValue() + "'.", e);
+                }
+            }
+        }
+
+        NodeList childNodes = element.getChildNodes();
+        int childCount = childNodes.getLength();
+        for (int i = 0; i < childCount; i++)
+        {
+            Node child = childNodes.item(i);
+
+            if (child.getNodeType() == Node.ELEMENT_NODE)
+            {
+                gatherNamespaceDeclarations((Element) child, namespaceSources);
+            }
+        }
+    }
+
+    /**
+     * Gather the namespaces from the supplied element and all child elements recursively.
+     * <p/>
+     * This method gets namespaces from the element nodes.
+     *
+     * @param element    The element to be iterated over.
+     * @param namespaces The set to which all found namespaces are to be added.
+     * @throws org.xml.sax.SAXException Unable to iterate the supplied element.
+     */
+    public static void gatherElementNamespaces(final Element element, final Set<URI> namespaces) throws SAXException
+    {
+        URI namespace;
+
+        try
+        {
+            namespace = new URI(element.getNamespaceURI());
+        } catch (URISyntaxException e)
+        {
+            throw new SAXException("Cannot gather namespaces.  Namespaces must be valid URIs.  Found Namespace: '" + element.getNamespaceURI() + "'.", e);
+        }
+
+        namespaces.add(namespace);
+
+        NodeList childNodes = element.getChildNodes();
+        int childCount = childNodes.getLength();
+        for (int i = 0; i < childCount; i++)
+        {
+            Node child = childNodes.item(i);
+
+            if (child.getNodeType() == Node.ELEMENT_NODE)
+            {
+                gatherElementNamespaces((Element) child, namespaces);
+            }
+        }
+    }
 }

Modified: labs/jbossesb/workspace/skeagh/commons/src/main/java/org/jboss/esb/xml/XsdDOMValidator.java
===================================================================
--- labs/jbossesb/workspace/skeagh/commons/src/main/java/org/jboss/esb/xml/XsdDOMValidator.java	2008-08-27 16:32:17 UTC (rev 21937)
+++ labs/jbossesb/workspace/skeagh/commons/src/main/java/org/jboss/esb/xml/XsdDOMValidator.java	2008-08-27 16:53:01 UTC (rev 21938)
@@ -91,7 +91,7 @@
         }
 
         // Get the full namespace list...
-        gatherNamespaces(document.getDocumentElement(), namespaces);
+        XMLParseUtils.gatherNamespaceDeclarations(document.getDocumentElement(), namespaces);
     }
 
     /**
@@ -164,48 +164,6 @@
     }
 
     /**
-     * Gather the namespaces from the supplied element and all child elements recursivelt.
-     *
-     * @param element          The element to be iterated over.
-     * @param namespaceSources The list to which all found namespaces are to be added.
-     * @throws SAXException Unable to iterate the supplied element.
-     */
-    private void gatherNamespaces(final Element element, final List<URI> namespaceSources) throws SAXException
-    {
-        NamedNodeMap attributes = element.getAttributes();
-        int attributeCount = attributes.getLength();
-
-        for (int i = 0; i < attributeCount; i++)
-        {
-            Attr attribute = (Attr) attributes.item(i);
-            String namespace = attribute.getNamespaceURI();
-
-            if (XMLConstants.XMLNS_ATTRIBUTE_NS_URI.equals(namespace))
-            {
-                try
-                {
-                    namespaceSources.add(new URI(attribute.getValue()));
-                } catch (URISyntaxException e)
-                {
-                    throw new SAXException("Cannot validate this document with this class.  Namespaces must be valid URIs.  Found Namespace: '" + attribute.getValue() + "'.", e);
-                }
-            }
-        }
-
-        NodeList childNodes = element.getChildNodes();
-        int childCount = childNodes.getLength();
-        for (int i = 0; i < childCount; i++)
-        {
-            Node child = childNodes.item(i);
-
-            if (child.getNodeType() == Node.ELEMENT_NODE)
-            {
-                gatherNamespaces((Element) child, namespaceSources);
-            }
-        }
-    }
-
-    /**
      * Get the namespace XSD for the specified namespace.
      * <p/>
      * Extracts the path element from the supplied namespace URI, prefixes

Modified: labs/jbossesb/workspace/skeagh/runtime/pom.xml
===================================================================
--- labs/jbossesb/workspace/skeagh/runtime/pom.xml	2008-08-27 16:32:17 UTC (rev 21937)
+++ labs/jbossesb/workspace/skeagh/runtime/pom.xml	2008-08-27 16:53:01 UTC (rev 21938)
@@ -29,5 +29,11 @@
             <artifactId>jbossesb-api-routing</artifactId>
             <version>${jboss.esb.version}</version>
         </dependency>
+        <dependency>
+            <groupId>org.milyn</groupId>
+            <artifactId>milyn-smooks-javabean</artifactId>
+            <version>1.1-SNAPSHOT</version>
+        </dependency>
     </dependencies>
+
 </project>
\ No newline at end of file

Added: labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/deploy/DeploymentResource.java
===================================================================
--- labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/deploy/DeploymentResource.java	                        (rev 0)
+++ labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/deploy/DeploymentResource.java	2008-08-27 16:53:01 UTC (rev 21938)
@@ -0,0 +1,73 @@
+/*
+ * 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.esb.deploy;
+
+/**
+ * ESB Deployment Resource.
+ *
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+ */
+public class DeploymentResource
+{
+    /**
+     * Deployment Resource ID.
+     */
+    private String id;
+    /**
+     * Deployment Resource Object.
+     */
+    private Object resourceObject;
+
+    /**
+     * Get the resource ID.
+     * @return The resource ID.
+     */
+    public final String getId()
+    {
+        return id;
+    }
+
+    /**
+     * Set the resource ID.
+     * @param id The resource ID.
+     */
+    public final void setId(final String id)
+    {
+        this.id = id;
+    }
+
+    /**
+     * Get the resource Object instance.
+     * @return The resource Object instance.
+     */
+    public final Object getResourceObject()
+    {
+        return resourceObject;
+    }
+
+    /**
+     * Set the resource Object instance.
+     * @param resourceObject The resource Object instance.
+     */
+    public final void setResourceObject(final Object resourceObject)
+    {
+        this.resourceObject = resourceObject;
+    }
+}


Property changes on: labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/deploy/DeploymentResource.java
___________________________________________________________________
Name: svn:eol-style
   + native

Deleted: labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/deploy/config/ConfigurationDigester.java
===================================================================
--- labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/deploy/config/ConfigurationDigester.java	2008-08-27 16:32:17 UTC (rev 21937)
+++ labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/deploy/config/ConfigurationDigester.java	2008-08-27 16:53:01 UTC (rev 21938)
@@ -1,51 +0,0 @@
-/*
- * 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.esb.deploy.config;
-
-import org.jboss.esb.deploy.DeploymentException;
-
-import java.io.IOException;
-import java.io.Reader;
-
-/**
- * Configuration Digester.
- *
- * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
- */
-public interface ConfigurationDigester
-{
-
-    /**
-     * JBoss ESB 5.0 Namespace URI.
-     */
-    public static final String XSD_v50 = "http://www.jboss.org/esb/jbossesb-5.0.xsd";
-
-    /**
-     * Digest the supplied configuration stream.
-     * <p/>
-     * Produces a {@link ConfigurationUnit} that can be added to a {@link org.jboss.esb.deploy.Deployment}.
-     *
-     * @param configStream The configuration Stream.
-     * @return A configuration unit.
-     * @throws IOException         Error reading the configuration stream.
-     * @throws DeploymentException Error in the supplied configuration data.
-     */
-    ConfigurationUnit digest(final Reader configStream) throws IOException, DeploymentException;
-}

Modified: labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/deploy/config/ConfigurationUnit.java
===================================================================
--- labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/deploy/config/ConfigurationUnit.java	2008-08-27 16:32:17 UTC (rev 21937)
+++ labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/deploy/config/ConfigurationUnit.java	2008-08-27 16:53:01 UTC (rev 21938)
@@ -27,6 +27,8 @@
 
 import java.util.LinkedHashMap;
 import java.util.Map;
+import java.util.List;
+import java.util.ArrayList;
 
 /**
  * JBoss ESB Configuration Unit.
@@ -36,84 +38,101 @@
 public class ConfigurationUnit
 {
     /**
+     * List of deployment resource objects.
+     */
+    private Map<String, Object> resources = new LinkedHashMap<String, Object>();
+    /**
      * List of Inbound routers defined in the configuration.
      */
-    private Map<ServiceName, InboundRouter> inboundRouters = new LinkedHashMap<ServiceName, InboundRouter>();
+    private Map<ServiceName, List<InboundRouterConfig>> inboundRouters = new LinkedHashMap<ServiceName, List<InboundRouterConfig>>();
     /**
      * List of Services defined in the configuration.
      */
-    private Map<ServiceName, Service> services = new LinkedHashMap<ServiceName, Service>();
+    private Map<ServiceName, ServiceConfig> services = new LinkedHashMap<ServiceName, ServiceConfig>();
     /**
      * List of Outbound routers defined in the configuration.
      */
-    private Map<ServiceName, OutboundRouter> outboundRouters = new LinkedHashMap<ServiceName, OutboundRouter>();
+    private Map<ServiceName, List<OutboundRouterConfig>> outboundRouters = new LinkedHashMap<ServiceName, List<OutboundRouterConfig>>();
 
     /**
      * Add an inbounder router for a service.
      *
-     * @param inboundRouter The inbound router instance.
-     * @param serviceName   The service that the inbound router is associated with.
+     * @param id The resource ID.
+     * @param resource  The resource.
      */
-    public void add(InboundRouter inboundRouter, ServiceName serviceName)
+    public final void addResource(final String id, final Object resource)
     {
-        AssertArgument.isNotNull(inboundRouter, "inboundRouter");
-        AssertArgument.isNotNull(serviceName, "serviceName");
-        inboundRouters.put(serviceName, inboundRouter);
+        AssertArgument.isNotNull(id, "id");
+        AssertArgument.isNotNull(resource, "resource");
+        resources.put(id, resource);
     }
 
     /**
-     * Add a service instance for a given service name.
-     *
-     * @param service     The Service instance.
-     * @param serviceName The Service name.
+     * Get the list of resources associated with this deployment configuration unit (mapped by id).
+     * @return The list of resources associated with this deployment configuration unit.
      */
-    public void add(Service service, ServiceName serviceName)
+    public final Map<String, Object> getResources()
     {
-        AssertArgument.isNotNull(service, "service");
-        AssertArgument.isNotNull(serviceName, "serviceName");
-        services.put(serviceName, service);
+        return resources;
     }
 
     /**
-     * Add an outbounder router for a service.
+     * Get the List of Inbound routers defined in the configuration (mapped by ServiceName).
      *
-     * @param outboundRouter The outbound router instance.
-     * @param serviceName    The Service name.
+     * @return The List of Inbound routers defined in the configuration.
      */
-    public void add(OutboundRouter outboundRouter, ServiceName serviceName)
+    public final Map<ServiceName, List<InboundRouterConfig>> getInboundRouters()
     {
-        AssertArgument.isNotNull(outboundRouter, "outboundRouter");
-        AssertArgument.isNotNull(serviceName, "serviceName");
-        outboundRouters.put(serviceName, outboundRouter);
+        return inboundRouters;
     }
 
     /**
      * Get the List of Inbound routers defined in the configuration (mapped by ServiceName).
      *
-     * @return The List of Inbound routers defined in the configuration.
+     * @param inboundRouters The List of Inbound routers defined in the configuration.
      */
-    public final Map<ServiceName, InboundRouter> getInboundRouters()
+    public final void setInboundRouters(final Map<ServiceName, List<InboundRouterConfig>> inboundRouters)
     {
-        return inboundRouters;
+        this.inboundRouters = inboundRouters;
     }
 
     /**
      * Get the List of Services defined in the configuration (mapped by ServiceName).
      *
-     * @return The List of Inbound routers defined in the configuration.
+     * @return The List of Services defined in the configuration.
      */
-    public final Map<ServiceName, Service> getServices()
+    public final Map<ServiceName, ServiceConfig> getServices()
     {
         return services;
     }
 
     /**
+     * Get the List of Services defined in the configuration (mapped by ServiceName).
+     *
+     * @param services The List of Services defined in the configuration.
+     */
+    public void setServices(Map<ServiceName, ServiceConfig> services)
+    {
+        this.services = services;
+    }
+
+    /**
      * Get the List of Outbound routers defined in the configuration (mapped by ServiceName).
      *
      * @return The List of Outbound routers defined in the configuration.
      */
-    public final Map<ServiceName, OutboundRouter> getOutboundRouters()
+    public final Map<ServiceName, List<OutboundRouterConfig>> getOutboundRouters()
     {
         return outboundRouters;
     }
+
+    /**
+     * Set the List of Outbound routers defined in the configuration (mapped by ServiceName).
+     *
+     * @param outboundRouters The List of Outbound routers defined in the configuration.
+     */
+    public final void setOutboundRouters(final Map<ServiceName, List<OutboundRouterConfig>> outboundRouters)
+    {
+        this.outboundRouters = outboundRouters;
+    }
 }

Deleted: labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/deploy/config/DefaultConfigurationDigester.java
===================================================================
--- labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/deploy/config/DefaultConfigurationDigester.java	2008-08-27 16:32:17 UTC (rev 21937)
+++ labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/deploy/config/DefaultConfigurationDigester.java	2008-08-27 16:53:01 UTC (rev 21938)
@@ -1,99 +0,0 @@
-/*
- * 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.esb.deploy.config;
-
-import org.jboss.esb.deploy.DeploymentException;
-import org.jboss.esb.util.AssertArgument;
-import org.jboss.esb.xml.XMLParseUtils;
-import org.jboss.esb.xml.XsdDOMValidator;
-import org.w3c.dom.Document;
-import org.xml.sax.SAXException;
-
-import javax.xml.parsers.ParserConfigurationException;
-import java.io.IOException;
-import java.io.Reader;
-
-/**
- * Default Configuration Digester.
- *
- * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
- */
-public class DefaultConfigurationDigester implements ConfigurationDigester
-{
-    /**
-     * Digest the supplied configuration stream.
-     * <p/>
-     * Produces a {@link ConfigurationUnit} that can be added to a {@link org.jboss.esb.deploy.Deployment}.
-     *
-     * @param configStream The configuration Stream.
-     * @return A configuration unit.
-     * @throws IOException         Error reading the configuration stream.
-     * @throws DeploymentException Error in the supplied configuration data.
-     */
-    public final ConfigurationUnit digest(final Reader configStream) throws IOException, DeploymentException
-    {
-        AssertArgument.isNotNull(configStream, "configStream");
-
-        try
-        {
-            Document configDoc = XMLParseUtils.parse(configStream);
-            return digest(configDoc);
-        } catch (ParserConfigurationException e)
-        {
-            throw new DeploymentException("Parser configuration error parsing JBoss ESB Configuration.", e);
-        } catch (SAXException e)
-        {
-            throw new DeploymentException("Configuration format error parsing JBoss ESB Configuration..", e);
-        }
-    }
-
-    /**
-     * Digest the supplied configuration document.
-     *
-     * @param configDoc The configuration document.
-     * @return A configuration unit.
-     * @throws SAXException Error digesting document.
-     */
-    private ConfigurationUnit digest(Document configDoc) throws SAXException, DeploymentException
-    {
-        XsdDOMValidator validator = new XsdDOMValidator(configDoc);
-
-        // Make sure it's a valid configuration...
-        if(!ConfigurationDigester.XSD_v50.equals(validator.getDefaultNamespace())) {
-            throw new DeploymentException("Invalid JBoss ESB Configuration.  Default Namespace expected to be '" + ConfigurationDigester.XSD_v50 + "'.  Default Namespace was '" + validator.getDefaultNamespace() + "'.");
-        }
-        try
-        {
-            validator.validate();
-        } catch (IOException e)
-        {
-            throw new DeploymentException("Error reading configuration schemas.", e);
-            // The XsdDOMValidator.validate() method throws a SAXException if there's an actual config validation error!
-        }
-
-        // It's a valid configuration, so lets extract the router (in/out) and service instances from it
-        // and create a ConfigurationUnit ...        
-        ConfigurationUnit configurationtUnit = new ConfigurationUnit();
-
-        // TODO....
-
-        return configurationtUnit;
-    }
-}

Added: labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/deploy/config/InboundRouterConfig.java
===================================================================
--- labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/deploy/config/InboundRouterConfig.java	                        (rev 0)
+++ labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/deploy/config/InboundRouterConfig.java	2008-08-27 16:53:01 UTC (rev 21938)
@@ -0,0 +1,82 @@
+/*
+ * 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.esb.deploy.config;
+
+import org.jboss.esb.message.MessageTransformer;
+import org.jboss.esb.routing.InboundRouter;
+
+import java.util.List;
+
+/**
+ * Inbound router deployment configuration.
+ *
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+ */
+public class InboundRouterConfig
+{
+    /**
+     * Router instance.
+     */
+    private InboundRouter router;
+    /**
+     * Router transformers.
+     */
+    private List<MessageTransformer> transformers;
+
+    /**
+     * Get router instance.
+     *
+     * @return The router instance.
+     */
+    public final InboundRouter getRouter()
+    {
+        return router;
+    }
+
+    /**
+     * Set router instance.
+     *
+     * @param router The router instance.
+     */
+    public final void setRouter(final InboundRouter router)
+    {
+        this.router = router;
+    }
+
+    /**
+     * Get message transformers.
+     *
+     * @return The message transformers.
+     */
+    public final List<MessageTransformer> getTransformers()
+    {
+        return transformers;
+    }
+
+    /**
+     * Set message transformers.
+     *
+     * @param transformers The message transformers.
+     */
+    public final void setTransformers(final List<MessageTransformer> transformers)
+    {
+        this.transformers = transformers;
+    }
+}


Property changes on: labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/deploy/config/InboundRouterConfig.java
___________________________________________________________________
Name: svn:eol-style
   + native

Added: labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/deploy/config/OutboundRouterConfig.java
===================================================================
--- labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/deploy/config/OutboundRouterConfig.java	                        (rev 0)
+++ labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/deploy/config/OutboundRouterConfig.java	2008-08-27 16:53:01 UTC (rev 21938)
@@ -0,0 +1,83 @@
+/*
+ * 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.esb.deploy.config;
+
+import org.jboss.esb.message.MessageTransformer;
+import org.jboss.esb.routing.InboundRouter;
+import org.jboss.esb.routing.OutboundRouter;
+
+import java.util.List;
+
+/**
+ * Outbound router deployment configuration.
+ *
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+ */
+public class OutboundRouterConfig
+{
+    /**
+     * Router instance.
+     */
+    private OutboundRouter router;
+    /**
+     * Router transformers.
+     */
+    private List<MessageTransformer> transformers;
+
+    /**
+     * Get router instance.
+     *
+     * @return The router instance.
+     */
+    public final OutboundRouter getRouter()
+    {
+        return router;
+    }
+
+    /**
+     * Set router instance.
+     *
+     * @param router The router instance.
+     */
+    public final void setRouter(final OutboundRouter router)
+    {
+        this.router = router;
+    }
+
+    /**
+     * Get message transformers.
+     *
+     * @return The message transformers.
+     */
+    public final List<MessageTransformer> getTransformers()
+    {
+        return transformers;
+    }
+
+    /**
+     * Set message transformers.
+     *
+     * @param transformers The message transformers.
+     */
+    public final void setTransformers(final List<MessageTransformer> transformers)
+    {
+        this.transformers = transformers;
+    }
+}
\ No newline at end of file


Property changes on: labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/deploy/config/OutboundRouterConfig.java
___________________________________________________________________
Name: svn:eol-style
   + native

Added: labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/deploy/config/ServiceConfig.java
===================================================================
--- labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/deploy/config/ServiceConfig.java	                        (rev 0)
+++ labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/deploy/config/ServiceConfig.java	2008-08-27 16:53:01 UTC (rev 21938)
@@ -0,0 +1,104 @@
+/*
+ * 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.esb.deploy.config;
+
+import org.jboss.esb.service.Service;
+import org.jboss.esb.service.ServiceName;
+
+/**
+ * Service Deployment Configuration.
+ *
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+ */
+public class ServiceConfig
+{
+    /**
+     * Service Name.
+     */
+    private ServiceName serviceName;
+    /**
+     * Service Description.
+     */
+    private String description;
+    /**
+     * Service Instance.
+     */
+    private Service service;
+
+    /**
+     * Get the Service Name.
+     *
+     * @return The Service Name.
+     */
+    public final ServiceName getServiceName()
+    {
+        return serviceName;
+    }
+
+    /**
+     * Set the Service Name.
+     *
+     * @param serviceName The Service Name.
+     */
+    public final void setServiceName(final ServiceName serviceName)
+    {
+        this.serviceName = serviceName;
+    }
+
+    /**
+     * Get the Service Description.
+     *
+     * @return The Service Description.
+     */
+    public final String getDescription()
+    {
+        return description;
+    }
+
+    /**
+     * Set the Service Description.
+     *
+     * @param description The Service Description.
+     */
+    public final void setDescription(final String description)
+    {
+        this.description = description;
+    }
+
+    /**
+     * Get the Service Instance.
+     *
+     * @return The Service Instance.
+     */
+    public final Service getService()
+    {
+        return service;
+    }
+
+    /**
+     * Set the Service Instance.
+     *
+     * @param service The Service Instance.
+     */
+    public final void setService(final Service service)
+    {
+        this.service = service;
+    }
+}


Property changes on: labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/deploy/config/ServiceConfig.java
___________________________________________________________________
Name: svn:eol-style
   + native

Copied: labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/deploy/config/digest/ConfigurationDigester.java (from rev 21885, labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/deploy/config/ConfigurationDigester.java)
===================================================================
--- labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/deploy/config/digest/ConfigurationDigester.java	                        (rev 0)
+++ labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/deploy/config/digest/ConfigurationDigester.java	2008-08-27 16:53:01 UTC (rev 21938)
@@ -0,0 +1,52 @@
+/*
+ * 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.esb.deploy.config.digest;
+
+import org.jboss.esb.deploy.DeploymentException;
+import org.jboss.esb.deploy.config.ConfigurationUnit;
+
+import java.io.IOException;
+import java.io.Reader;
+
+/**
+ * Configuration Digester.
+ *
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+ */
+public interface ConfigurationDigester
+{
+
+    /**
+     * JBoss ESB 5.0 Namespace URI.
+     */
+    public static final String XSD_v50 = "http://www.jboss.org/jbossesb/xsd/jbossesb-5.0.xsd";
+
+    /**
+     * Digest the supplied configuration stream.
+     * <p/>
+     * Produces a {@link org.jboss.esb.deploy.config.ConfigurationUnit} that can be added to a {@link org.jboss.esb.deploy.Deployment}.
+     *
+     * @param configStream The configuration Stream.
+     * @return A configuration unit.
+     * @throws IOException         Error reading the configuration stream.
+     * @throws DeploymentException Error in the supplied configuration data.
+     */
+    ConfigurationUnit digest(final Reader configStream) throws IOException, DeploymentException;
+}


Property changes on: labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/deploy/config/digest/ConfigurationDigester.java
___________________________________________________________________
Name: svn:eol-style
   + native

Added: labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/deploy/config/digest/CreateObject.java
===================================================================
--- labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/deploy/config/digest/CreateObject.java	                        (rev 0)
+++ labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/deploy/config/digest/CreateObject.java	2008-08-27 16:53:01 UTC (rev 21938)
@@ -0,0 +1,144 @@
+/*
+ * 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.esb.deploy.config.digest;
+
+import org.jboss.esb.classpath.ClassUtil;
+import org.milyn.SmooksException;
+import org.milyn.cdr.SmooksConfigurationException;
+import org.milyn.cdr.annotation.ConfigParam;
+import org.milyn.container.ExecutionContext;
+import org.milyn.delivery.annotation.Initialize;
+import org.milyn.delivery.dom.DOMVisitBefore;
+import org.milyn.javabean.repository.BeanRepositoryManager;
+import org.milyn.xml.DomUtils;
+import org.w3c.dom.Element;
+
+import java.lang.reflect.Constructor;
+
+/**
+ * Create an object and set it in the Smooks bean repository.
+ *
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+ */
+public class CreateObject implements DOMVisitBefore
+{
+    /**
+     * The name of the class.
+     */
+    @ConfigParam(use = ConfigParam.Use.OPTIONAL)
+    private String className;
+    /**
+     * The name of the attribute containing the class name.
+     */
+    @ConfigParam(use = ConfigParam.Use.OPTIONAL)
+    private String classAttrib;
+    /**
+     * The name of the attribute containing the class name.
+     */
+    @ConfigParam(name = "expectedType", use = ConfigParam.Use.OPTIONAL)
+    private String expectedTypeName;
+    private Class expectedType;
+
+    /**
+     * The beanId on which to bind the created class.
+     */
+    @ConfigParam
+    private String beanId;
+
+    /**
+     * Initialize the visitor.
+     */
+    @Initialize
+    public void initialize()
+    {
+        if (expectedTypeName != null)
+        {
+            try
+            {
+                expectedType = ClassUtil.forName(expectedTypeName, CreateObject.class);
+            } catch (ClassNotFoundException e)
+            {
+                throw new SmooksConfigurationException("Unable to load expected type class '" + expectedTypeName + "'.", e);
+            }
+        }
+    }
+
+    /**
+     * Visit Before event handler method.
+     *
+     * @param element          The element.
+     * @param executionContext The Smooks exec context.
+     * @throws SmooksException Error processing event.
+     */
+    public final void visitBefore(final Element element, final ExecutionContext executionContext) throws SmooksException
+    {
+        String objectClassName = null;
+
+        if (className != null)
+        {
+            objectClassName = className;
+        } else if (classAttrib != null)
+        {
+            objectClassName = DomUtils.getAttributeValue(element, classAttrib);
+            if (objectClassName == null)
+            {
+                throw new SmooksException("Class naming attribute '" + classAttrib + "' not specified on element '" + element + "'.");
+            }
+        } else
+        {
+            throw new SmooksException("One of the attributes 'className' or 'classAttrib' must be defined on the '" + CreateObject.class.getName() + "' resource.");
+        }
+
+        try
+        {
+            Class objectClass = ClassUtil.forName(objectClassName, CreateObject.class);
+            Constructor defaultConstructor;
+
+            if(expectedType != null && !expectedType.isAssignableFrom(objectClass)) {
+                throw new SmooksException("Class '" + objectClass.getName() + "' must implement/extend '" + expectedType.getName() + "'.");
+            }
+
+            try
+            {
+                defaultConstructor = objectClass.getDeclaredConstructor();
+            } catch (NoSuchMethodException e)
+            {
+                throw new SmooksException("Class '" + objectClassName + "' doesn't define a default constructor (public, protected or private).");
+            }
+
+            boolean isAccessible = defaultConstructor.isAccessible();
+
+            defaultConstructor.setAccessible(true);
+            try
+            {
+                Object objectInstance = defaultConstructor.newInstance();
+
+                // Store the bean in the Smooks bean repository...
+                BeanRepositoryManager.getBeanRepository(executionContext).addBean(beanId, objectInstance);
+            } finally
+            {
+                defaultConstructor.setAccessible(isAccessible);
+            }
+        } catch (Exception e)
+        {
+            throw new SmooksException("Unable to create class instance for class '" + objectClassName + "'.", e);
+        }
+    }
+}


Property changes on: labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/deploy/config/digest/CreateObject.java
___________________________________________________________________
Name: svn:eol-style
   + native

Copied: labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/deploy/config/digest/DefaultConfigurationDigester.java (from rev 21885, labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/deploy/config/DefaultConfigurationDigester.java)
===================================================================
--- labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/deploy/config/digest/DefaultConfigurationDigester.java	                        (rev 0)
+++ labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/deploy/config/digest/DefaultConfigurationDigester.java	2008-08-27 16:53:01 UTC (rev 21938)
@@ -0,0 +1,293 @@
+/*
+ * 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.esb.deploy.config.digest;
+
+import org.jboss.esb.deploy.DeploymentException;
+import org.jboss.esb.deploy.DeploymentResource;
+import org.jboss.esb.deploy.config.ConfigurationUnit;
+import org.jboss.esb.deploy.config.InboundRouterConfig;
+import org.jboss.esb.deploy.config.OutboundRouterConfig;
+import org.jboss.esb.deploy.config.ServiceConfig;
+import org.jboss.esb.util.AssertArgument;
+import org.jboss.esb.xml.XMLParseUtils;
+import org.jboss.esb.xml.XsdDOMValidator;
+import org.jboss.esb.service.ServiceName;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.NodeList;
+import org.w3c.dom.Node;
+import org.xml.sax.SAXException;
+import org.milyn.xml.DomUtils;
+
+import javax.xml.parsers.ParserConfigurationException;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.Reader;
+import java.util.List;
+import java.util.Map;
+import java.util.LinkedHashMap;
+
+/**
+ * Default Configuration Digester.
+ * <p/>
+ * Uses Smooks to digest the configurations in a namespace aware manner, allowing
+ * namespace based configuration extensions.
+ *
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+ */
+public class DefaultConfigurationDigester implements ConfigurationDigester
+{
+    /**
+     * Digest the supplied configuration stream.
+     * <p/>
+     * Produces a {@link org.jboss.esb.deploy.config.ConfigurationUnit} that can be added to a {@link org.jboss.esb.deploy.Deployment}.
+     *
+     * @param configStream The configuration Stream.
+     * @return A configuration unit.
+     * @throws IOException         Error reading the configuration stream.
+     * @throws DeploymentException Error in the supplied configuration data.
+     */
+    public final ConfigurationUnit digest(final InputStream configStream) throws IOException, DeploymentException
+    {
+        AssertArgument.isNotNull(configStream, "configStream");
+        return digest(new InputStreamReader(configStream));
+    }
+
+    /**
+     * Digest the supplied configuration stream.
+     * <p/>
+     * Produces a {@link ConfigurationUnit} that can be added to a {@link org.jboss.esb.deploy.Deployment}.
+     *
+     * @param configStream The configuration Stream.
+     * @return A configuration unit.
+     * @throws IOException         Error reading the configuration stream.
+     * @throws DeploymentException Error in the supplied configuration data.
+     */
+    public final ConfigurationUnit digest(final Reader configStream) throws IOException, DeploymentException
+    {
+        AssertArgument.isNotNull(configStream, "configStream");
+
+        try
+        {
+            Document configDoc = XMLParseUtils.parse(configStream);
+            return digest(configDoc);
+        } catch (ParserConfigurationException e)
+        {
+            throw new DeploymentException("Parser configuration error parsing JBoss ESB Configuration.", e);
+        } catch (SAXException e)
+        {
+            throw new DeploymentException("Configuration format error parsing JBoss ESB Configuration..", e);
+        }
+    }
+
+    /**
+     * Digest the supplied configuration document.
+     *
+     * @param configDoc The configuration document.
+     * @return A configuration unit.
+     * @throws SAXException        Error digesting document.
+     * @throws DeploymentException Error in the supplied configuration data.
+     */
+    private ConfigurationUnit digest(final Document configDoc) throws SAXException, DeploymentException
+    {
+        XsdDOMValidator validator = new XsdDOMValidator(configDoc);
+
+        // Make sure it's a valid configuration...
+        if (!ConfigurationDigester.XSD_v50.equals(validator.getDefaultNamespace().toString()))
+        {
+            throw new DeploymentException("Invalid JBoss ESB Configuration.  Default Namespace expected to be '" + ConfigurationDigester.XSD_v50 + "'.  Default Namespace was '" + validator.getDefaultNamespace() + "'.");
+        }
+        try
+        {
+            validator.validate();
+        } catch (IOException e)
+        {
+            throw new DeploymentException("Error reading configuration schemas.", e);
+            // The XsdDOMValidator.validate() method throws a SAXException if there's an actual config validation error!
+        }
+
+        // It's a valid configuration, so lets extract the resources, routers (in/out) and services from it
+        // and create a ConfigurationUnit ...
+        ConfigurationUnit configurationtUnit = new ConfigurationUnit();
+
+        digestResources(configDoc, configurationtUnit);
+        digestRouters(configDoc, configurationtUnit);
+        digestServices(configDoc, configurationtUnit);
+
+        return configurationtUnit;
+    }
+
+    /**
+     * Digest the resources defined on this pre-validated configuration.
+     *
+     * @param configDoc          The configuration document.
+     * @param configurationtUnit The configuration unit to which the resources are to be added.
+     * @throws DeploymentException Error in the supplied configuration data.
+     */
+    private void digestResources(final Document configDoc, final ConfigurationUnit configurationtUnit) throws DeploymentException
+    {
+        NodeList resourcesNodeList = configDoc.getElementsByTagName("resources");
+
+        if (resourcesNodeList != null && resourcesNodeList.getLength() > 0)
+        {
+            Element resources = (Element) resourcesNodeList.item(0);
+            try
+            {
+                List<Object> resourceObjects = DigestUtil.digestChildElements(resources);
+
+                for (Object resourceObject : resourceObjects)
+                {
+                    if (resourceObject instanceof DeploymentResource)
+                    {
+                        DeploymentResource deploymentResource = (DeploymentResource) resourceObject;
+                        configurationtUnit.addResource(deploymentResource.getId(), deploymentResource.getResourceObject());
+                    }
+                }
+            } catch (IOException e)
+            {
+                throw new DeploymentException("Error digesting configurations for child elements of '" + resources + "'.", e);
+            } catch (SAXException e)
+            {
+                throw new DeploymentException("Error digesting configurations for child elements of '" + resources + "'.", e);
+            }
+        }
+    }
+
+    /**
+     * Digest the router configurations.
+     *
+     * @param configDoc          The configuration document.
+     * @param configurationtUnit The configuration unit to which the routers are to be added.
+     */
+    private void digestRouters(final Document configDoc, final ConfigurationUnit configurationtUnit) throws DeploymentException
+    {
+        NodeList routingNodeList = configDoc.getElementsByTagName("routing");
+
+        if (routingNodeList != null && routingNodeList.getLength() > 0)
+        {
+            Element routing = (Element) routingNodeList.item(0);
+            NodeList inRoutersNodeList = routing.getElementsByTagName("inRouters");
+            NodeList outRoutersNodeList = routing.getElementsByTagName("outRouters");
+
+            if (inRoutersNodeList != null && inRoutersNodeList.getLength() > 0)
+            {
+                digestInRouters(configurationtUnit, inRoutersNodeList);
+            }
+            if (outRoutersNodeList != null && outRoutersNodeList.getLength() > 0)
+            {
+                digestOutRouters(configurationtUnit, outRoutersNodeList);
+            }
+        }
+    }
+
+    private void digestInRouters(ConfigurationUnit configurationtUnit, NodeList inRoutersNodeList)
+            throws DeploymentException
+    {
+        int inRoutersCount = inRoutersNodeList.getLength();
+        Map<ServiceName, List<InboundRouterConfig>> inboundRouters = new LinkedHashMap<ServiceName, List<InboundRouterConfig>>();
+
+        configurationtUnit.setInboundRouters(inboundRouters);
+        for (int i = 0; i < inRoutersCount; i++)
+        {
+            Element inRoutersElement = (Element) inRoutersNodeList.item(i);
+            try
+            {
+                Map<String, Object> inRoutersObjects = DigestUtil.digestElement(inRoutersElement);
+                ServiceName serviceName = (ServiceName) inRoutersObjects.get("serviceName");
+                List<InboundRouterConfig> inRouters = (List<InboundRouterConfig>) inRoutersObjects.get("inRouters");
+
+                if(inboundRouters.containsKey(serviceName)) {
+                    throw new DeploymentException("An <inRouters> section is defined multiple times for Service '" + serviceName + "'.  There should only be one.");
+                }
+                inboundRouters.put(serviceName, inRouters);
+            } catch (IOException e)
+            {
+                throw new DeploymentException("Error digesting configurations for child elements of '" + inRoutersElement + "'.", e);
+            } catch (SAXException e)
+            {
+                throw new DeploymentException("Error digesting configurations for child elements of '" + inRoutersElement + "'.", e);
+            }
+        }
+    }
+
+    private void digestOutRouters(ConfigurationUnit configurationtUnit, NodeList outRoutersNodeList) throws DeploymentException
+    {
+        int outRoutersCount = outRoutersNodeList.getLength();
+        Map<ServiceName, List<OutboundRouterConfig>> outboundRouters = new LinkedHashMap<ServiceName, List<OutboundRouterConfig>>();
+
+        configurationtUnit.setOutboundRouters(outboundRouters);
+        for (int i = 0; i < outRoutersCount; i++)
+        {
+            Element outRoutersElement = (Element) outRoutersNodeList.item(i);
+            try
+            {
+                Map<String, Object> outRoutersObjects = DigestUtil.digestElement(outRoutersElement);
+                ServiceName serviceName = (ServiceName) outRoutersObjects.get("serviceName");
+                List<OutboundRouterConfig> outRouters = (List<OutboundRouterConfig>) outRoutersObjects.get("outRouters");
+
+                if(outboundRouters.containsKey(serviceName)) {
+                    throw new DeploymentException("An <outRouters> section is defined multiple times for Service '" + serviceName + "'.  There should only be one.");
+                }
+                outboundRouters.put(serviceName, outRouters);
+            } catch (IOException e)
+            {
+                throw new DeploymentException("Error digesting configurations for child elements of '" + outRoutersElement + "'.", e);
+            } catch (SAXException e)
+            {
+                throw new DeploymentException("Error digesting configurations for child elements of '" + outRoutersElement + "'.", e);
+            }
+        }
+    }
+
+    /**
+     * Digest the service router configurations.
+     *
+     * @param configDoc          The configuration document.
+     * @param configurationtUnit The configuration unit to which the Services are to be added.
+     */
+    private void digestServices(final Document configDoc, final ConfigurationUnit configurationtUnit) throws DeploymentException
+    {
+        NodeList servicesNodeList = configDoc.getElementsByTagName("services");
+
+        if (servicesNodeList != null && servicesNodeList.getLength() > 0)
+        {
+            Element services = (Element) servicesNodeList.item(0);
+            try
+            {
+                Map<String, Object> servicesObjects = DigestUtil.digestElement(services);
+                List<ServiceConfig> serviceConfigList = (List<ServiceConfig>) servicesObjects.get("services");
+                Map<ServiceName, ServiceConfig> serviceConfigMap = new LinkedHashMap<ServiceName, ServiceConfig>();
+
+                configurationtUnit.setServices(serviceConfigMap);
+                for (ServiceConfig serviceConfig : serviceConfigList)
+                {
+                    serviceConfigMap.put(serviceConfig.getServiceName(), serviceConfig);
+                }
+            } catch (IOException e)
+            {
+                throw new DeploymentException("Error digesting configurations for child elements of '" + services + "'.", e);
+            } catch (SAXException e)
+            {
+                throw new DeploymentException("Error digesting configurations for child elements of '" + services + "'.", e);
+            }
+        }
+    }
+}


Property changes on: labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/deploy/config/digest/DefaultConfigurationDigester.java
___________________________________________________________________
Name: svn:eol-style
   + native

Added: labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/deploy/config/digest/DigestUtil.java
===================================================================
--- labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/deploy/config/digest/DigestUtil.java	                        (rev 0)
+++ labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/deploy/config/digest/DigestUtil.java	2008-08-27 16:53:01 UTC (rev 21938)
@@ -0,0 +1,235 @@
+/*
+ * 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.esb.deploy.config.digest;
+
+import org.jboss.esb.xml.XMLParseUtils;
+import org.milyn.Smooks;
+import org.milyn.event.report.HtmlReportGenerator;
+import org.milyn.container.ExecutionContext;
+import org.milyn.cdr.SmooksResourceConfigurationList;
+import org.milyn.cdr.XMLConfigDigester;
+import org.milyn.payload.JavaResult;
+import org.milyn.util.ClassUtil;
+import org.milyn.xml.DomUtils;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+import org.xml.sax.SAXException;
+
+import javax.xml.transform.dom.DOMSource;
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.FileWriter;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.util.*;
+
+/**
+ * Configuration digest utility class.
+ *
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+ */
+public abstract class DigestUtil
+{
+    /**
+     * SmooksResourceConfigurationLists, mapped by namespace.  Smooks is used to digest the individual
+     * configuration components by namespace.
+     */
+    private static Map<URI, SmooksResourceConfigurationList> smooksConfigListMap = new HashMap<URI, SmooksResourceConfigurationList>();
+    /**
+     * Digest report path.
+     */
+    private static String reportPath;
+
+    /**
+     * Private default constructor.
+     */
+    private DigestUtil()
+    {
+    }
+
+    /**
+     * Digest the child elements of the supplied config element to produce
+     * a list of configuration elements.
+     * <p/>
+     * The caller needs to sort out and validate the returned list.
+     *
+     * @param configurationElement The configuration element.
+     * @return List of configuration "objects".  Returns an empty
+     *         list if there are no child elements.
+     * @throws IOException  Error reading digests configuration.
+     * @throws SAXException Error parsing digest configuration.
+     */
+    public static List<Object> digestChildElements(final Element configurationElement) throws IOException, SAXException
+    {
+        return digestChildElements(configurationElement, null);
+    }
+
+    /**
+     * Digest the child elements of the supplied config element to produce
+     * a list of configuration elements.
+     * <p/>
+     * The caller needs to sort out and validate the returned list.
+     *
+     * @param configurationElement The configuration element.
+     * @param matchElementName     The name of the elements to be digested.  <code>null</code> to digest all elements.
+     * @return List of configuration "objects".  Returns an empty
+     *         list if there are no child elements.
+     * @throws IOException  Error reading digests configuration.
+     * @throws SAXException Error parsing digest configuration.
+     */
+    public static List<Object> digestChildElements(final Element configurationElement, final String matchElementName) throws IOException, SAXException
+    {
+        List<Object> configObjects = new ArrayList<Object>();
+        NodeList children = configurationElement.getChildNodes();
+        int childcount = children.getLength();
+
+        for (int i = 0; i < childcount; i++)
+        {
+            Node node = children.item(i);
+
+            if (node.getNodeType() == Node.ELEMENT_NODE)
+            {
+                Element subElement = (Element) node;
+
+                if (matchElementName == null || DomUtils.getName(subElement).equals(matchElementName))
+                {
+                    configObjects.addAll(digestElement(subElement).values());
+                }
+            }
+        }
+
+        return configObjects;
+    }
+
+    /**
+     * Set digest Report Path.
+     * <p/>
+     * This is just a debugging facility.  Temporarily set the path
+     * from within your test code. 
+     *
+     * @param reportPath Report path, or null to turn off reporting.
+     */
+    public static void setReportPath(final String reportPath)
+    {
+        DigestUtil.reportPath = reportPath;
+    }
+
+    /**
+     * Digest a configuration element and from it produce a list of configuration objects.
+     *
+     * @param configurationElement The configuration element.
+     * @return Digest configuration objects.
+     * @throws IOException  Error reading digests configuration.
+     * @throws SAXException Error parsing digest configuration.
+     */
+    public static Map<String, Object> digestElement(final Element configurationElement) throws IOException, SAXException
+    {
+        Smooks smooks = getSmooksInstance(configurationElement);
+        JavaResult result = new JavaResult();
+
+        if (smooks != null)
+        {
+            if (reportPath != null)
+            {
+                ExecutionContext execContext = smooks.createExecutionContext();
+                File reportPathFile = new File(reportPath);
+                File tsReportPathFile = new File(reportPathFile.getParentFile(), Long.toString(System.currentTimeMillis()) + "-" + reportPathFile.getName());
+
+                execContext.setEventListener(new HtmlReportGenerator(new FileWriter(tsReportPathFile)));
+                smooks.filter(new DOMSource(configurationElement), result, execContext);
+            } else
+            {
+                smooks.filter(new DOMSource(configurationElement), result);
+            }
+        }
+
+        return result.getResultMap();
+    }
+
+    /**
+     * Get the Smooks instance for the supplied namespaced element.
+     *
+     * @param element The namespaced element.
+     * @return The Smooks instance for the element namespace, otherwise null.
+     * @throws IOException  Error reading digests configuration.
+     * @throws SAXException Error parsing digest configuration.
+     */
+    private static Smooks getSmooksInstance(final Element element) throws IOException, SAXException
+    {
+        Smooks smooks = new Smooks();
+        Set<URI> namespaces = new LinkedHashSet<URI>();
+
+        XMLParseUtils.gatherElementNamespaces(element, namespaces);
+
+        for (URI namespace : namespaces)
+        {
+            SmooksResourceConfigurationList configList = getNamespaceConfig(namespace);
+
+            if (configList != null)
+            {
+                smooks.getApplicationContext().getStore().addSmooksResourceConfigurationList(configList);
+            }
+        }
+
+        return smooks;
+    }
+
+    /**
+     * Get the namespace configuration for the specified namespace URI.
+     *
+     * @param namespace The namespace URI.
+     * @return The SmooksResourceConfigurationList instance.
+     * @throws IOException  Error reading digests configuration.
+     * @throws SAXException Error parsing digest configuration.
+     */
+    private static SmooksResourceConfigurationList getNamespaceConfig(URI namespace) throws IOException, SAXException
+    {
+        SmooksResourceConfigurationList list = null;
+
+        list = smooksConfigListMap.get(namespace);
+        if (list == null)
+        {
+            synchronized (smooksConfigListMap)
+            {
+                String resPathString = "/META-INF" + namespace.getPath() + "-smooks.xml";
+                File resPath = new File(resPathString);
+                String baseURI = resPath.getParent().replace('\\', '/');
+                InputStream configStream = ClassUtil.getResourceAsStream(resPathString, DigestUtil.class);
+
+                if (configStream != null)
+                {
+                    try
+                    {
+                        list = XMLConfigDigester.digestConfig(ClassUtil.getResourceAsStream(resPathString, DigestUtil.class), baseURI);
+                    } catch (URISyntaxException e)
+                    {
+                        throw (IOException) (new IOException("Error while reading namespace digest configuration file '" + resPathString + "'.").initCause(e));
+                    }
+
+                    smooksConfigListMap.put(namespace, list);
+                }
+            }
+        }
+
+        return list;
+    }
+}


Property changes on: labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/deploy/config/digest/DigestUtil.java
___________________________________________________________________
Name: svn:eol-style
   + native

Added: labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/deploy/config/digest/SetProperty.java
===================================================================
--- labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/deploy/config/digest/SetProperty.java	                        (rev 0)
+++ labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/deploy/config/digest/SetProperty.java	2008-08-27 16:53:01 UTC (rev 21938)
@@ -0,0 +1,172 @@
+/*
+ * 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.esb.deploy.config.digest;
+
+import org.milyn.SmooksException;
+import org.milyn.cdr.annotation.ConfigParam;
+import org.milyn.container.ExecutionContext;
+import org.milyn.delivery.dom.DOMVisitBefore;
+import org.milyn.javabean.DataDecoder;
+import org.milyn.javabean.repository.BeanRepositoryManager;
+import org.milyn.xml.DomUtils;
+import org.w3c.dom.Element;
+
+import java.lang.reflect.Field;
+
+/**
+ * Set the value of a property  of a bean (from the Smooks bean repository).
+ *
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+ */
+public class SetProperty implements DOMVisitBefore
+{
+
+    /**
+     * The beanId on which to bind the created class.
+     */
+    @ConfigParam
+    private String beanId;
+
+    /**
+     * The name of the attribute containing the name of the class property to be set.
+     */
+    @ConfigParam(use = ConfigParam.Use.OPTIONAL)
+    private String property;
+
+    /**
+     * The name of the attribute containing the name of the class property to be set.
+     */
+    @ConfigParam(use = ConfigParam.Use.OPTIONAL)
+    private String nameAttrib;
+
+    /**
+     * The name of the attribute containing the value to be set.  If not specified,
+     * the value is taken from the element text.
+     */
+    @ConfigParam(use = ConfigParam.Use.OPTIONAL)
+    private String valueAttrib;
+
+    /**
+     * Visit Before event handler method.
+     *
+     * @param element          The element.
+     * @param executionContext The Smooks exec context.
+     * @throws SmooksException Error processing event.
+     */
+    public final void visitBefore(final Element element, final ExecutionContext executionContext) throws SmooksException
+    {
+        Object instance = getObject(executionContext);
+        Class objectClass = instance.getClass();
+        String propertyName = getPropertyName(element);
+
+        try
+        {
+            Field field = getPropertyField(propertyName, objectClass);
+            String value = getPropertyValue(element);
+
+            setPropertyValue(field, instance, value);
+        } catch (NoSuchFieldException e)
+        {
+            throw new SmooksException("Property '" + propertyName + "' unknown on class '" + objectClass + "' (or super class).", e);
+        } catch (IllegalAccessException e)
+        {
+            throw new SmooksException("Property '" + propertyName + "' cannot be set on class '" + objectClass + "'.", e);
+        }
+    }
+
+    private final void setPropertyValue(final Field field, Object instance, final String value) throws IllegalAccessException
+    {
+        boolean isAccessible = field.isAccessible();
+        DataDecoder decoder = DataDecoder.Factory.create(field.getType());
+
+        if (!isAccessible)
+        {
+            field.setAccessible(true);
+        }
+
+        try
+        {
+            field.set(instance, decoder.decode(value));
+        } finally
+        {
+            field.setAccessible(isAccessible);
+        }
+    }
+
+    private final String getPropertyValue(final Element element)
+    {
+        if (valueAttrib != null)
+        {
+            return DomUtils.getAttributeValue(element, valueAttrib);
+        } else
+        {
+            return DomUtils.getAllText(element, true);
+        }
+    }
+
+    private final Field getPropertyField(final String propertyName, final Class objectClass) throws NoSuchFieldException
+    {
+        try
+        {
+            return objectClass.getDeclaredField(propertyName);
+        } catch (NoSuchFieldException e)
+        {
+            Class superClass = objectClass.getSuperclass();
+            if (superClass != null)
+            {
+                return getPropertyField(propertyName, superClass);
+            }
+            throw e;
+        }
+    }
+
+    private Object getObject(ExecutionContext executionContext)
+    {
+        Object bean = BeanRepositoryManager.getBeanRepository(executionContext).getBean(beanId);
+
+        if (bean == null)
+        {
+            throw new SmooksException("Bean '" + beanId + "' not set in bean repository.  Need to create the bean using the '" + CreateObject.class.getName() + "' visitor.");
+        }
+        return bean;
+    }
+
+    private final String getPropertyName(final Element element)
+    {
+        String propertyName;
+
+        if (property != null)
+        {
+            propertyName = property;
+        } else if (nameAttrib != null)
+        {
+            propertyName = DomUtils.getAttributeValue(element, nameAttrib);
+            if (propertyName == null)
+            {
+                throw new SmooksException("Class property naming attribute '" + nameAttrib + "' not specified on element '" + element + "'.");
+            }
+        } else
+        {
+            throw new SmooksException("One of the attributes 'property' or 'nameAttrib' must be defined on the '" + SetProperty.class.getName() + "' resource.");
+        }
+
+        return propertyName;
+    }
+}
\ No newline at end of file


Property changes on: labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/deploy/config/digest/SetProperty.java
___________________________________________________________________
Name: svn:eol-style
   + native

Copied: labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/deploy/config/digest/package.html (from rev 21885, labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/deploy/config/package.html)
===================================================================
--- labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/deploy/config/digest/package.html	                        (rev 0)
+++ labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/deploy/config/digest/package.html	2008-08-27 16:53:01 UTC (rev 21938)
@@ -0,0 +1,8 @@
+<html>
+<head></head>
+<body>
+ESB Deployment Configuration Digest.
+
+<h2>Package Specification</h2>
+</body>
+</html>
\ No newline at end of file

Added: labs/jbossesb/workspace/skeagh/runtime/src/main/resources/META-INF/jbossesb/xsd/inrouters-smooks.xml
===================================================================
--- labs/jbossesb/workspace/skeagh/runtime/src/main/resources/META-INF/jbossesb/xsd/inrouters-smooks.xml	                        (rev 0)
+++ labs/jbossesb/workspace/skeagh/runtime/src/main/resources/META-INF/jbossesb/xsd/inrouters-smooks.xml	2008-08-27 16:53:01 UTC (rev 21938)
@@ -0,0 +1,56 @@
+<?xml version="1.0"?>
+<smooks-resource-list xmlns="http://www.milyn.org/xsd/smooks-1.1.xsd"
+                      xmlns:jb="http://www.milyn.org/xsd/smooks/javabean-1.1.xsd"
+                      default-selector-namespace="http://www.jboss.org/jbossesb/xsd/jbossesb-5.0.xsd">
+
+    <!--
+        Service Name ("serviceName")...
+    -->
+
+    <resource-config selector="inRouters">
+        <resource>org.jboss.esb.deploy.config.digest.CreateObject</resource>
+        <param name="beanId">serviceName</param>
+        <param name="className">org.jboss.esb.service.ServiceName</param>
+    </resource-config>
+
+    <resource-config selector="inRouters">
+        <resource>org.jboss.esb.deploy.config.digest.SetProperty</resource>
+        <param name="beanId">serviceName</param> <!-- Created above. -->
+        <param name="property">category</param>
+        <param name="valueAttrib">serviceCategory</param>
+    </resource-config>
+
+    <resource-config selector="inRouters">
+        <resource>org.jboss.esb.deploy.config.digest.SetProperty</resource>
+        <param name="beanId">serviceName</param> <!-- Created above. -->
+        <param name="property">name</param>
+        <param name="valueAttrib">serviceName</param>
+    </resource-config>
+
+    <!--
+        InRouters ("inRouters")...
+    -->
+
+    <jb:bindings beanId="inRouters" class="java.util.ArrayList" createOnElement="inRouters">
+        <jb:wiring beanIdRef="inRouterConfig" />
+    </jb:bindings>
+
+    <jb:bindings beanId="inRouterConfig" class="org.jboss.esb.deploy.config.InboundRouterConfig" createOnElement="inRouter">
+        <jb:wiring property="router" beanIdRef="inRouter" />
+        <jb:wiring property="transformers" beanIdRef="transformers" />
+    </jb:bindings>
+
+    <resource-config selector="inRouter">
+        <resource>org.jboss.esb.deploy.config.digest.CreateObject</resource>
+        <param name="beanId">inRouter</param> <!-- Wired in above. -->
+        <param name="classAttrib">class</param>
+        <param name="expectedType">org.jboss.esb.routing.InboundRouter</param>
+    </resource-config>
+
+    <resource-config selector="inRouter/property">
+        <resource>org.jboss.esb.deploy.config.digest.SetProperty</resource>
+        <param name="beanId">inRouter</param> <!-- Created above. -->
+        <param name="nameAttrib">name</param>
+    </resource-config>
+
+</smooks-resource-list>
\ No newline at end of file


Property changes on: labs/jbossesb/workspace/skeagh/runtime/src/main/resources/META-INF/jbossesb/xsd/inrouters-smooks.xml
___________________________________________________________________
Name: svn:mime-type
   + text/xml
Name: svn:eol-style
   + native

Added: labs/jbossesb/workspace/skeagh/runtime/src/main/resources/META-INF/jbossesb/xsd/jbossesb-5.0.xsd
===================================================================
--- labs/jbossesb/workspace/skeagh/runtime/src/main/resources/META-INF/jbossesb/xsd/jbossesb-5.0.xsd	                        (rev 0)
+++ labs/jbossesb/workspace/skeagh/runtime/src/main/resources/META-INF/jbossesb/xsd/jbossesb-5.0.xsd	2008-08-27 16:53:01 UTC (rev 21938)
@@ -0,0 +1,183 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema targetNamespace="http://www.jboss.org/jbossesb/xsd/jbossesb-5.0.xsd"
+           xmlns="http://www.jboss.org/jbossesb/xsd/jbossesb-5.0.xsd"
+           xmlns:xs="http://www.w3.org/2001/XMLSchema"
+           elementFormDefault="qualified">
+
+    <xs:element name="jbossesb" type="jbossesb"/>
+
+    <xs:complexType name="jbossesb">
+        <xs:sequence>
+            <xs:element name="resources" type="resources" minOccurs="0" maxOccurs="1"/>
+            <xs:element name="services" type="services" minOccurs="0" maxOccurs="1"/>
+            <xs:element name="routing" type="routing" minOccurs="0" maxOccurs="1"/>
+        </xs:sequence>
+    </xs:complexType>
+
+    <!--
+        Resources...
+    -->
+
+    <xs:complexType name="resources">
+        <xs:sequence>
+            <xs:element ref="abstractResource" minOccurs="1" maxOccurs="unbounded"/>
+        </xs:sequence>
+    </xs:complexType>
+
+    <xs:complexType name="abstractResource" abstract="true">
+        <xs:annotation>
+            <xs:documentation xml:lang="en">Deployment Resource.</xs:documentation>
+        </xs:annotation>
+        <xs:attribute name="id" use="required" type="xs:string"/>
+    </xs:complexType>
+    <xs:element name="abstractResource" type="abstractResource" abstract="true" />
+
+    <xs:element name="resource" substitutionGroup="abstractResource">
+        <xs:complexType>
+            <xs:complexContent>
+                <xs:extension base="abstractResource">
+                    <xs:sequence>
+                        <xs:element name="property" type="property" minOccurs="0" maxOccurs="unbounded"/>
+                    </xs:sequence>
+                    <xs:attribute name="class" type="xs:string" use="required" />
+                </xs:extension>
+            </xs:complexContent>
+        </xs:complexType>
+    </xs:element>
+
+    <!--
+        Transformers...
+    -->
+
+    <xs:complexType name="transformers">
+        <xs:sequence>
+            <xs:element ref="abstractTransformer" minOccurs="0" maxOccurs="unbounded"/>
+        </xs:sequence>
+    </xs:complexType>
+
+    <xs:complexType name="abstractTransformer" abstract="true"/>
+    <xs:element name="abstractTransformer" type="abstractTransformer" abstract="true" />
+
+    <xs:element name="transformer" substitutionGroup="abstractTransformer">
+        <xs:complexType>
+            <xs:complexContent>
+                <xs:extension base="abstractTransformer">
+                    <xs:sequence>
+                        <xs:element name="property" type="property" minOccurs="0" maxOccurs="unbounded"/>
+                    </xs:sequence>
+                    <xs:attribute name="class" type="xs:string" use="required" />
+                </xs:extension>
+            </xs:complexContent>
+        </xs:complexType>
+    </xs:element>
+
+    <!--
+        Services...
+    -->
+
+    <xs:complexType name="services">
+        <xs:sequence>
+            <xs:element name="service" type="service" minOccurs="1" maxOccurs="unbounded"/>
+        </xs:sequence>
+    </xs:complexType>
+
+    <xs:complexType name="service">
+        <xs:annotation>
+            <xs:documentation xml:lang="en">Basic Service Definition.</xs:documentation>
+        </xs:annotation>
+        <xs:sequence>
+            <xs:element name="property" type="property" minOccurs="0" maxOccurs="unbounded"/>
+        </xs:sequence>
+        <xs:attribute name="serviceCategory" use="required" type="xs:string"/>
+        <xs:attribute name="serviceName" use="required" type="xs:string"/>
+        <xs:attribute name="serviceDescription" use="required" type="xs:string"/>
+        <xs:attribute name="class" use="required" type="xs:string"/>
+    </xs:complexType>
+
+    <xs:complexType name="property">
+        <xs:annotation>
+            <xs:documentation xml:lang="en">Property</xs:documentation>
+        </xs:annotation>
+        <xs:complexContent>
+            <xs:extension base="xs:anyType">
+                <xs:attribute name="name" type="xs:string" use="required"/>
+            </xs:extension>
+        </xs:complexContent>
+    </xs:complexType>
+
+    <!--
+        Routing...
+    -->
+
+    <xs:complexType name="routing">
+        <xs:sequence>
+            <xs:element name="inRouters" type="inRouters" minOccurs="0" maxOccurs="unbounded"/>
+            <xs:element name="outRouters" type="outRouters" minOccurs="0" maxOccurs="unbounded"/>
+        </xs:sequence>
+    </xs:complexType>
+
+    <!--
+        In Routing...
+    -->
+
+    <xs:complexType name="inRouters">
+        <xs:sequence>
+            <xs:element ref="abstractInRouter" minOccurs="1" maxOccurs="unbounded"/>
+        </xs:sequence>
+        <xs:attribute name="serviceCategory" use="required" type="xs:string"/>
+        <xs:attribute name="serviceName" use="required" type="xs:string"/>
+    </xs:complexType>
+
+    <xs:complexType name="abstractInRouter" abstract="true">
+        <xs:sequence>
+            <xs:element name="transformers" type="transformers" minOccurs="0" maxOccurs="1"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:element name="abstractInRouter" type="abstractInRouter" abstract="true" />
+
+    <xs:element name="inRouter" substitutionGroup="abstractInRouter">
+        <xs:complexType>
+            <xs:complexContent>
+                <xs:extension base="abstractInRouter">
+                    <xs:sequence>
+                        <xs:element name="property" type="property" minOccurs="0" maxOccurs="unbounded"/>
+                    </xs:sequence>
+                    <xs:attribute name="class" type="xs:string" use="required" />
+                </xs:extension>
+            </xs:complexContent>
+        </xs:complexType>
+    </xs:element>
+
+    <!--
+        Out Routing...
+    -->
+
+    <xs:complexType name="outRouters">
+        <xs:sequence>
+            <xs:element ref="abstractOutRouter" minOccurs="1" maxOccurs="unbounded"/>
+        </xs:sequence>
+        <xs:attribute name="serviceCategory" use="required" type="xs:string"/>
+        <xs:attribute name="serviceName" use="required" type="xs:string"/>
+    </xs:complexType>
+
+    <xs:complexType name="abstractOutRouter" abstract="true">
+        <xs:sequence>
+            <xs:element name="transformers" type="transformers" minOccurs="0" maxOccurs="1"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:element name="abstractOutRouter" type="abstractOutRouter" abstract="true" />
+
+    <xs:element name="outRouter" substitutionGroup="abstractOutRouter">
+        <xs:complexType>
+            <xs:complexContent>
+                <xs:extension base="abstractOutRouter">
+                    <xs:sequence>
+                        <xs:element name="property" type="property" minOccurs="0" maxOccurs="unbounded"/>
+                    </xs:sequence>
+                    <xs:attribute name="class" type="xs:string" use="required" />
+                </xs:extension>
+            </xs:complexContent>
+        </xs:complexType>
+    </xs:element>
+
+</xs:schema>


Property changes on: labs/jbossesb/workspace/skeagh/runtime/src/main/resources/META-INF/jbossesb/xsd/jbossesb-5.0.xsd
___________________________________________________________________
Name: svn:mime-type
   + text/xml
Name: svn:eol-style
   + native

Added: labs/jbossesb/workspace/skeagh/runtime/src/main/resources/META-INF/jbossesb/xsd/jbossesb-5.0.xsd-smooks.xml
===================================================================
--- labs/jbossesb/workspace/skeagh/runtime/src/main/resources/META-INF/jbossesb/xsd/jbossesb-5.0.xsd-smooks.xml	                        (rev 0)
+++ labs/jbossesb/workspace/skeagh/runtime/src/main/resources/META-INF/jbossesb/xsd/jbossesb-5.0.xsd-smooks.xml	2008-08-27 16:53:01 UTC (rev 21938)
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<smooks-resource-list xmlns="http://www.milyn.org/xsd/smooks-1.1.xsd"
+                      xmlns:jb="http://www.milyn.org/xsd/smooks/javabean-1.1.xsd"
+                      default-selector-namespace="http://www.jboss.org/jbossesb/xsd/jbossesb-5.0.xsd">
+
+    <import file="resources-smooks.xml" />
+    <import file="inrouters-smooks.xml" />
+    <import file="outrouters-smooks.xml" />
+    <import file="transformers-smooks.xml" />
+    <import file="services-smooks.xml" />
+
+</smooks-resource-list>
\ No newline at end of file


Property changes on: labs/jbossesb/workspace/skeagh/runtime/src/main/resources/META-INF/jbossesb/xsd/jbossesb-5.0.xsd-smooks.xml
___________________________________________________________________
Name: svn:mime-type
   + text/xml
Name: svn:eol-style
   + native

Added: labs/jbossesb/workspace/skeagh/runtime/src/main/resources/META-INF/jbossesb/xsd/outrouters-smooks.xml
===================================================================
--- labs/jbossesb/workspace/skeagh/runtime/src/main/resources/META-INF/jbossesb/xsd/outrouters-smooks.xml	                        (rev 0)
+++ labs/jbossesb/workspace/skeagh/runtime/src/main/resources/META-INF/jbossesb/xsd/outrouters-smooks.xml	2008-08-27 16:53:01 UTC (rev 21938)
@@ -0,0 +1,56 @@
+<?xml version="1.0"?>
+<smooks-resource-list xmlns="http://www.milyn.org/xsd/smooks-1.1.xsd"
+                      xmlns:jb="http://www.milyn.org/xsd/smooks/javabean-1.1.xsd"
+                      default-selector-namespace="http://www.jboss.org/jbossesb/xsd/jbossesb-5.0.xsd">
+
+    <!--
+        Service Name ("serviceName")...
+    -->
+
+    <resource-config selector="outRouters">
+        <resource>org.jboss.esb.deploy.config.digest.CreateObject</resource>
+        <param name="beanId">serviceName</param>
+        <param name="className">org.jboss.esb.service.ServiceName</param>
+    </resource-config>
+
+    <resource-config selector="outRouters">
+        <resource>org.jboss.esb.deploy.config.digest.SetProperty</resource>
+        <param name="beanId">serviceName</param> <!-- Created above. -->
+        <param name="property">category</param>
+        <param name="valueAttrib">serviceCategory</param>
+    </resource-config>
+
+    <resource-config selector="outRouters">
+        <resource>org.jboss.esb.deploy.config.digest.SetProperty</resource>
+        <param name="beanId">serviceName</param> <!-- Created above. -->
+        <param name="property">name</param>
+        <param name="valueAttrib">serviceName</param>
+    </resource-config>
+
+    <!--
+        InRouters ("outRouters")...
+    -->
+
+    <jb:bindings beanId="outRouters" class="java.util.ArrayList" createOnElement="outRouters">
+        <jb:wiring beanIdRef="outRouterConfig" />
+    </jb:bindings>
+
+    <jb:bindings beanId="outRouterConfig" class="org.jboss.esb.deploy.config.OutboundRouterConfig" createOnElement="outRouter">
+        <jb:wiring property="router" beanIdRef="outRouter" />
+        <jb:wiring property="transformers" beanIdRef="transformers" />
+    </jb:bindings>
+
+    <resource-config selector="outRouter">
+        <resource>org.jboss.esb.deploy.config.digest.CreateObject</resource>
+        <param name="beanId">outRouter</param> <!-- Wired in above. -->
+        <param name="classAttrib">class</param>
+        <param name="expectedType">org.jboss.esb.routing.OutboundRouter</param>
+    </resource-config>
+
+    <resource-config selector="outRouter/property">
+        <resource>org.jboss.esb.deploy.config.digest.SetProperty</resource>
+        <param name="beanId">outRouter</param> <!-- Created above. -->
+        <param name="nameAttrib">name</param>
+    </resource-config>
+
+</smooks-resource-list>
\ No newline at end of file


Property changes on: labs/jbossesb/workspace/skeagh/runtime/src/main/resources/META-INF/jbossesb/xsd/outrouters-smooks.xml
___________________________________________________________________
Name: svn:mime-type
   + text/xml
Name: svn:eol-style
   + native

Added: labs/jbossesb/workspace/skeagh/runtime/src/main/resources/META-INF/jbossesb/xsd/resources-smooks.xml
===================================================================
--- labs/jbossesb/workspace/skeagh/runtime/src/main/resources/META-INF/jbossesb/xsd/resources-smooks.xml	                        (rev 0)
+++ labs/jbossesb/workspace/skeagh/runtime/src/main/resources/META-INF/jbossesb/xsd/resources-smooks.xml	2008-08-27 16:53:01 UTC (rev 21938)
@@ -0,0 +1,23 @@
+<?xml version="1.0"?>
+<smooks-resource-list xmlns="http://www.milyn.org/xsd/smooks-1.1.xsd"
+                      xmlns:jb="http://www.milyn.org/xsd/smooks/javabean-1.1.xsd"
+                      default-selector-namespace="http://www.jboss.org/jbossesb/xsd/jbossesb-5.0.xsd">
+
+    <jb:bindings beanId="deploymentResource" class="org.jboss.esb.deploy.DeploymentResource" createOnElement="resource">
+        <jb:value property="id" data="resource/@id" />
+        <jb:wiring property="resourceObject" beanIdRef="resourceObject" />
+    </jb:bindings>
+
+    <resource-config selector="resource">
+        <resource>org.jboss.esb.deploy.config.digest.CreateObject</resource>
+        <param name="beanId">resourceObject</param> <!-- Wired in above. -->
+        <param name="classAttrib">class</param>
+    </resource-config>
+
+    <resource-config selector="resource/property">
+        <resource>org.jboss.esb.deploy.config.digest.SetProperty</resource>
+        <param name="beanId">resourceObject</param> <!-- Created above. -->
+        <param name="nameAttrib">name</param>
+    </resource-config>
+
+</smooks-resource-list>
\ No newline at end of file


Property changes on: labs/jbossesb/workspace/skeagh/runtime/src/main/resources/META-INF/jbossesb/xsd/resources-smooks.xml
___________________________________________________________________
Name: svn:mime-type
   + text/xml
Name: svn:eol-style
   + native

Added: labs/jbossesb/workspace/skeagh/runtime/src/main/resources/META-INF/jbossesb/xsd/services-smooks.xml
===================================================================
--- labs/jbossesb/workspace/skeagh/runtime/src/main/resources/META-INF/jbossesb/xsd/services-smooks.xml	                        (rev 0)
+++ labs/jbossesb/workspace/skeagh/runtime/src/main/resources/META-INF/jbossesb/xsd/services-smooks.xml	2008-08-27 16:53:01 UTC (rev 21938)
@@ -0,0 +1,65 @@
+<?xml version="1.0"?>
+<smooks-resource-list xmlns="http://www.milyn.org/xsd/smooks-1.1.xsd"
+                      xmlns:jb="http://www.milyn.org/xsd/smooks/javabean-1.1.xsd"
+                      default-selector-namespace="http://www.jboss.org/jbossesb/xsd/jbossesb-5.0.xsd">
+
+    <!--
+        Services ("services")...
+    -->
+
+    <jb:bindings beanId="services" class="java.util.ArrayList" createOnElement="services">
+        <jb:wiring beanIdRef="serviceConfig" />
+    </jb:bindings>
+
+    <!--
+        ServiceConfig...
+    -->
+
+    <jb:bindings beanId="serviceConfig" class="org.jboss.esb.deploy.config.ServiceConfig" createOnElement="service">
+        <jb:wiring property="serviceName" beanIdRef="serviceName" />
+        <jb:value property="description" data="service/@serviceDescription" />
+        <jb:wiring property="service" beanIdRef="serviceInstance" />
+    </jb:bindings>
+
+    <!--
+        Service Name ("serviceName")...
+    -->
+
+    <resource-config selector="service">
+        <resource>org.jboss.esb.deploy.config.digest.CreateObject</resource>
+        <param name="beanId">serviceName</param>
+        <param name="className">org.jboss.esb.service.ServiceName</param>
+    </resource-config>
+
+    <resource-config selector="service">
+        <resource>org.jboss.esb.deploy.config.digest.SetProperty</resource>
+        <param name="beanId">serviceName</param> <!-- Created above. -->
+        <param name="property">category</param>
+        <param name="valueAttrib">serviceCategory</param>
+    </resource-config>
+
+    <resource-config selector="service">
+        <resource>org.jboss.esb.deploy.config.digest.SetProperty</resource>
+        <param name="beanId">serviceName</param> <!-- Created above. -->
+        <param name="property">name</param>
+        <param name="valueAttrib">serviceName</param>
+    </resource-config>
+
+    <!--
+        Service instance...
+    -->
+
+    <resource-config selector="service">
+        <resource>org.jboss.esb.deploy.config.digest.CreateObject</resource>
+        <param name="beanId">serviceInstance</param> <!-- Wired in above. -->
+        <param name="classAttrib">class</param>
+        <param name="expectedType">org.jboss.esb.service.Service</param>
+    </resource-config>
+
+    <resource-config selector="service/property">
+        <resource>org.jboss.esb.deploy.config.digest.SetProperty</resource>
+        <param name="beanId">serviceInstance</param> <!-- Created above. -->
+        <param name="nameAttrib">name</param>
+    </resource-config>
+
+</smooks-resource-list>
\ No newline at end of file


Property changes on: labs/jbossesb/workspace/skeagh/runtime/src/main/resources/META-INF/jbossesb/xsd/services-smooks.xml
___________________________________________________________________
Name: svn:mime-type
   + text/xml
Name: svn:eol-style
   + native

Added: labs/jbossesb/workspace/skeagh/runtime/src/main/resources/META-INF/jbossesb/xsd/transformers-smooks.xml
===================================================================
--- labs/jbossesb/workspace/skeagh/runtime/src/main/resources/META-INF/jbossesb/xsd/transformers-smooks.xml	                        (rev 0)
+++ labs/jbossesb/workspace/skeagh/runtime/src/main/resources/META-INF/jbossesb/xsd/transformers-smooks.xml	2008-08-27 16:53:01 UTC (rev 21938)
@@ -0,0 +1,23 @@
+<?xml version="1.0"?>
+<smooks-resource-list xmlns="http://www.milyn.org/xsd/smooks-1.1.xsd"
+                      xmlns:jb="http://www.milyn.org/xsd/smooks/javabean-1.1.xsd"
+                      default-selector-namespace="http://www.jboss.org/jbossesb/xsd/jbossesb-5.0.xsd">
+
+    <jb:bindings beanId="transformers" class="java.util.ArrayList" createOnElement="transformers">
+        <jb:wiring beanIdRef="transformer" />
+    </jb:bindings>
+
+    <resource-config selector="transformer">
+        <resource>org.jboss.esb.deploy.config.digest.CreateObject</resource>
+        <param name="beanId">transformer</param> <!-- Wired in above. -->
+        <param name="classAttrib">class</param>
+        <param name="expectedType">org.jboss.esb.message.MessageTransformer</param>
+    </resource-config>
+
+    <resource-config selector="transformer/property">
+        <resource>org.jboss.esb.deploy.config.digest.SetProperty</resource>
+        <param name="beanId">transformer</param> <!-- Created above. -->
+        <param name="nameAttrib">name</param>
+    </resource-config>
+
+</smooks-resource-list>
\ No newline at end of file


Property changes on: labs/jbossesb/workspace/skeagh/runtime/src/main/resources/META-INF/jbossesb/xsd/transformers-smooks.xml
___________________________________________________________________
Name: svn:mime-type
   + text/xml
Name: svn:eol-style
   + native

Added: labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/deploy/config/DefaultConfigurationDigesterTest.java
===================================================================
--- labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/deploy/config/DefaultConfigurationDigesterTest.java	                        (rev 0)
+++ labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/deploy/config/DefaultConfigurationDigesterTest.java	2008-08-27 16:53:01 UTC (rev 21938)
@@ -0,0 +1,196 @@
+/*
+ * 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.esb.deploy.config;
+
+import junit.framework.TestCase;
+import org.jboss.esb.deploy.DeploymentException;
+import org.jboss.esb.deploy.config.digest.DefaultConfigurationDigester;
+import org.jboss.esb.deploy.config.digest.DigestUtil;
+import org.jboss.esb.service.ServiceName;
+import org.jboss.esb.message.MessageTransformer;
+
+import java.io.IOException;
+import java.util.Map;
+import java.util.List;
+import java.net.URI;
+
+/**
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+ */
+public class DefaultConfigurationDigesterTest extends TestCase
+{
+
+    public void test_validation() throws DeploymentException, IOException
+    {
+        digest("jbossesb-01.xml");
+        digest("jbossesb-02.xml");
+        digest("jbossesb-03.xml");
+    }
+
+    public void test_resources_01() throws IOException, DeploymentException
+    {
+        ConfigurationUnit configUnit = digest("jbossesb-resources_01.xml");
+        Map<String, Object> resources = configUnit.getResources();
+
+        XProtDeploymentResource xprotRes = (XProtDeploymentResource) resources.get("xprotRes1");
+        assertNotNull(xprotRes);
+        assertEquals(1234, xprotRes.getXprotResPropA());
+        assertEquals(new Double(12.34), xprotRes.getXprotResPropB());
+        assertEquals(URI.create("http://acme.com"), xprotRes.getXprotResPropC());
+    }
+
+    public void test_inrouters_01() throws IOException, DeploymentException
+    {
+        test_inrouters("jbossesb-inrouters_01.xml");
+    }
+
+    public void test_outrouters_01() throws IOException, DeploymentException
+    {
+        test_outrouters("jbossesb-outrouters_01.xml");
+    }
+
+    public void test_inandoutrouters_01() throws IOException, DeploymentException
+    {
+        ConfigurationUnit configUnit = digest("jbossesb-inandoutrouters_01.xml");
+        test_inrouters(configUnit);
+        test_outrouters(configUnit);
+    }
+
+    private void test_inrouters(String config) throws IOException, DeploymentException
+    {
+        ConfigurationUnit configUnit = digest(config);
+        test_inrouters(configUnit);
+    }
+
+    private void test_inrouters(ConfigurationUnit configUnit)
+    {
+        Map<ServiceName, List<InboundRouterConfig>> inRouters = configUnit.getInboundRouters();
+
+        List<InboundRouterConfig> aRouterConfigs = inRouters.get(new ServiceName("service-cat", "service-a"));
+        assertNotNull(aRouterConfigs);
+        assertEquals(2, aRouterConfigs.size());
+
+        InboundRouterConfig routerConfig = aRouterConfigs.get(0);
+        assertEquals("1", ((MyInRouter) routerConfig.getRouter()).getMyparam());
+        List<MessageTransformer> transformers = routerConfig.getTransformers();
+        assertEquals(3, transformers.size());
+        assertEquals(1, ((MyMessageTransformer) transformers.get(0)).getSomeParam());
+        assertEquals(2, ((MyMessageTransformer) transformers.get(1)).getSomeParam());
+        assertEquals(3, ((MyMessageTransformer) transformers.get(2)).getSomeParam());
+
+        routerConfig = aRouterConfigs.get(1);
+        assertEquals("2", ((MyInRouter) routerConfig.getRouter()).getMyparam());
+        transformers = routerConfig.getTransformers();
+        assertEquals(2, transformers.size());
+        assertEquals(4, ((MyMessageTransformer) transformers.get(0)).getSomeParam());
+        assertEquals(5, ((MyMessageTransformer) transformers.get(1)).getSomeParam());
+
+        List<InboundRouterConfig> bRouterConfigs = inRouters.get(new ServiceName("service-cat", "service-b"));
+        assertNotNull(bRouterConfigs);
+        assertEquals(2, bRouterConfigs.size());
+        routerConfig = bRouterConfigs.get(0);
+        assertEquals("4", ((MyInRouter) routerConfig.getRouter()).getMyparam());
+        transformers = routerConfig.getTransformers();
+        assertEquals(1, transformers.size());
+        assertEquals(6, ((MyMessageTransformer) transformers.get(0)).getSomeParam());
+
+        routerConfig = bRouterConfigs.get(1);
+        assertEquals("5", ((MyInRouter) routerConfig.getRouter()).getMyparam());
+        assertEquals(5, ((MyInRouter) routerConfig.getRouter()).getMyOtherParam());
+        transformers = routerConfig.getTransformers();
+        assertNull(transformers);
+    }
+
+    private void test_outrouters(String config) throws IOException, DeploymentException
+    {
+        ConfigurationUnit configUnit = digest(config);
+        test_outrouters(configUnit);
+    }
+
+    private void test_outrouters(ConfigurationUnit configUnit)
+    {
+        Map<ServiceName, List<OutboundRouterConfig>> inRouters = configUnit.getOutboundRouters();
+
+        List<OutboundRouterConfig> aRouterConfigs = inRouters.get(new ServiceName("service-cat", "service-a"));
+        assertNotNull(aRouterConfigs);
+        assertEquals(2, aRouterConfigs.size());
+
+        OutboundRouterConfig routerConfig = aRouterConfigs.get(0);
+        assertEquals("1", ((MyOutRouter) routerConfig.getRouter()).getMyparam());
+        List<MessageTransformer> transformers = routerConfig.getTransformers();
+        assertEquals(3, transformers.size());
+        assertEquals(1, ((MyMessageTransformer) transformers.get(0)).getSomeParam());
+        assertEquals(2, ((MyMessageTransformer) transformers.get(1)).getSomeParam());
+        assertEquals(3, ((MyMessageTransformer) transformers.get(2)).getSomeParam());
+
+        routerConfig = aRouterConfigs.get(1);
+        assertEquals("2", ((MyOutRouter) routerConfig.getRouter()).getMyparam());
+        transformers = routerConfig.getTransformers();
+        assertEquals(2, transformers.size());
+        assertEquals(4, ((MyMessageTransformer) transformers.get(0)).getSomeParam());
+        assertEquals(5, ((MyMessageTransformer) transformers.get(1)).getSomeParam());
+
+        List<OutboundRouterConfig> bRouterConfigs = inRouters.get(new ServiceName("service-cat", "service-b"));
+        assertNotNull(bRouterConfigs);
+        assertEquals(2, bRouterConfigs.size());
+        routerConfig = bRouterConfigs.get(0);
+        assertEquals("4", ((MyOutRouter) routerConfig.getRouter()).getMyparam());
+        transformers = routerConfig.getTransformers();
+        assertEquals(1, transformers.size());
+        assertEquals(6, ((MyMessageTransformer) transformers.get(0)).getSomeParam());
+
+        routerConfig = bRouterConfigs.get(1);
+        assertEquals("5", ((MyOutRouter) routerConfig.getRouter()).getMyparam());
+        assertEquals(5, ((MyOutRouter) routerConfig.getRouter()).getMyOtherParam());
+        transformers = routerConfig.getTransformers();
+        assertNull(transformers);
+    }
+
+    public void test_services_01() throws DeploymentException, IOException
+    {
+        ConfigurationUnit configUnit = digest("jbossesb-services_01.xml");
+        Map<ServiceName, ServiceConfig> services = configUnit.getServices();
+
+        ServiceConfig serviceAConfig = services.get(new ServiceName("service-cat", "service-a"));
+        assertNotNull(serviceAConfig);
+        assertEquals("A Service", serviceAConfig.getDescription());
+        MyTestService serviceA = (MyTestService) serviceAConfig.getService();
+        assertNotNull(serviceA);
+        assertEquals("propValueA", serviceA.getProp1());
+
+        ServiceConfig serviceBConfig = services.get(new ServiceName("service-cat", "service-b"));
+        assertNotNull(serviceBConfig);
+        assertEquals("B Service", serviceBConfig.getDescription());
+        MyTestService serviceB = (MyTestService) serviceBConfig.getService();
+        assertNotNull(serviceB);
+        assertEquals("propValueB", serviceB.getProp1());
+    }
+
+    private ConfigurationUnit digest(String config) throws IOException, DeploymentException
+    {
+        DefaultConfigurationDigester digester = new DefaultConfigurationDigester();
+        return digester.digest(getClass().getResourceAsStream(config));
+    }
+
+    protected void tearDown() throws Exception
+    {
+        DigestUtil.setReportPath(null);                
+    }
+}


Property changes on: labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/deploy/config/DefaultConfigurationDigesterTest.java
___________________________________________________________________
Name: svn:eol-style
   + native

Added: labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/deploy/config/MyInRouter.java
===================================================================
--- labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/deploy/config/MyInRouter.java	                        (rev 0)
+++ labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/deploy/config/MyInRouter.java	2008-08-27 16:53:01 UTC (rev 21938)
@@ -0,0 +1,46 @@
+/*
+ * 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.esb.deploy.config;
+
+import org.jboss.esb.routing.InboundRouter;
+import org.jboss.esb.routing.MessageDispatcher;
+
+/**
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+ */
+public class MyInRouter implements InboundRouter
+{
+    private String myparam;
+    private int myOtherParam;
+
+    public void setDispatcher(MessageDispatcher dispatcher)
+    {
+    }
+
+    public String getMyparam()
+    {
+        return myparam;
+    }
+
+    public int getMyOtherParam()
+    {
+        return myOtherParam;
+    }
+}


Property changes on: labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/deploy/config/MyInRouter.java
___________________________________________________________________
Name: svn:eol-style
   + native

Added: labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/deploy/config/MyMessageTransformer.java
===================================================================
--- labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/deploy/config/MyMessageTransformer.java	                        (rev 0)
+++ labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/deploy/config/MyMessageTransformer.java	2008-08-27 16:53:01 UTC (rev 21938)
@@ -0,0 +1,41 @@
+/*
+ * 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.esb.deploy.config;
+
+import org.jboss.esb.message.MessageTransformer;
+import org.jboss.esb.message.Message;
+import org.jboss.esb.message.MessageTransformationException;
+
+/**
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+ */
+public class MyMessageTransformer implements MessageTransformer
+{
+    private int someParam;
+
+    public void transform(Message message) throws MessageTransformationException
+    {
+    }
+
+    public int getSomeParam()
+    {
+        return someParam;
+    }
+}


Property changes on: labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/deploy/config/MyMessageTransformer.java
___________________________________________________________________
Name: svn:eol-style
   + native

Added: labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/deploy/config/MyOutRouter.java
===================================================================
--- labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/deploy/config/MyOutRouter.java	                        (rev 0)
+++ labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/deploy/config/MyOutRouter.java	2008-08-27 16:53:01 UTC (rev 21938)
@@ -0,0 +1,50 @@
+/*
+ * 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.esb.deploy.config;
+
+import org.jboss.esb.routing.InboundRouter;
+import org.jboss.esb.routing.MessageDispatcher;
+import org.jboss.esb.routing.OutboundRouter;
+import org.jboss.esb.routing.RoutingException;
+import org.jboss.esb.message.Message;
+
+/**
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+ */
+public class MyOutRouter implements OutboundRouter
+{
+    private String myparam;
+
+    private int myOtherParam;
+
+    public void route(Message message) throws RoutingException
+    {
+    }
+
+    public String getMyparam()
+    {
+        return myparam;
+    }
+
+    public int getMyOtherParam()
+    {
+        return myOtherParam;
+    }
+}
\ No newline at end of file


Property changes on: labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/deploy/config/MyOutRouter.java
___________________________________________________________________
Name: svn:eol-style
   + native

Added: labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/deploy/config/MyTestService.java
===================================================================
--- labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/deploy/config/MyTestService.java	                        (rev 0)
+++ labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/deploy/config/MyTestService.java	2008-08-27 16:53:01 UTC (rev 21938)
@@ -0,0 +1,42 @@
+/*
+ * 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.esb.deploy.config;
+
+import org.jboss.esb.service.Service;
+import org.jboss.esb.service.ServiceException;
+import org.jboss.esb.message.Message;
+
+/**
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+ */
+public class MyTestService implements Service
+{
+    private String prop1;
+    
+    public Message process(Message message) throws ServiceException
+    {
+        return null;
+    }
+
+    public String getProp1()
+    {
+        return prop1;
+    }
+}


Property changes on: labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/deploy/config/MyTestService.java
___________________________________________________________________
Name: svn:eol-style
   + native

Added: labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/deploy/config/XProtDeploymentResource.java
===================================================================
--- labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/deploy/config/XProtDeploymentResource.java	                        (rev 0)
+++ labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/deploy/config/XProtDeploymentResource.java	2008-08-27 16:53:01 UTC (rev 21938)
@@ -0,0 +1,47 @@
+/*
+ * 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.esb.deploy.config;
+
+import java.net.URI;
+
+/**
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+ */
+public class XProtDeploymentResource
+{
+    private int xprotResPropA;
+    private Double xprotResPropB;
+    private URI xprotResPropC;
+
+    public int getXprotResPropA()
+    {
+        return xprotResPropA;
+    }
+
+    public Double getXprotResPropB()
+    {
+        return xprotResPropB;
+    }
+
+    public URI getXprotResPropC()
+    {
+        return xprotResPropC;
+    }
+}


Property changes on: labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/deploy/config/XProtDeploymentResource.java
___________________________________________________________________
Name: svn:eol-style
   + native

Added: labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/deploy/config/jbossesb-01.xml
===================================================================
--- labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/deploy/config/jbossesb-01.xml	                        (rev 0)
+++ labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/deploy/config/jbossesb-01.xml	2008-08-27 16:53:01 UTC (rev 21938)
@@ -0,0 +1,7 @@
+<jbossesb xmlns="http://www.jboss.org/jbossesb/xsd/jbossesb-5.0.xsd">
+    <services>
+        <service serviceCategory="service-cat" serviceName="service-a" serviceDescription="A Service" class="org.jboss.esb.deploy.config.MyTestService">
+            <property name="prop1">propValue</property>
+        </service>
+    </services>
+</jbossesb>
\ No newline at end of file


Property changes on: labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/deploy/config/jbossesb-01.xml
___________________________________________________________________
Name: svn:mime-type
   + text/xml
Name: svn:eol-style
   + native

Added: labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/deploy/config/jbossesb-02.xml
===================================================================
--- labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/deploy/config/jbossesb-02.xml	                        (rev 0)
+++ labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/deploy/config/jbossesb-02.xml	2008-08-27 16:53:01 UTC (rev 21938)
@@ -0,0 +1,10 @@
+<jbossesb xmlns="http://www.jboss.org/jbossesb/xsd/jbossesb-5.0.xsd" xmlns:xprot="http://www.jboss.org/jbossesb/xsd/xprot/xprot.xsd">
+    <routing>
+        <inRouters serviceCategory="service-cat" serviceName="service-a">
+            <xprot:xprotInRouter xprotInAttribX="s" />
+        </inRouters>
+        <outRouters serviceCategory="service-cat" serviceName="service-a">
+            <xprot:xprotOutRouter xprotOutAttribX="s"/>
+        </outRouters>
+    </routing>
+</jbossesb>
\ No newline at end of file


Property changes on: labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/deploy/config/jbossesb-02.xml
___________________________________________________________________
Name: svn:mime-type
   + text/xml
Name: svn:eol-style
   + native

Added: labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/deploy/config/jbossesb-03.xml
===================================================================
--- labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/deploy/config/jbossesb-03.xml	                        (rev 0)
+++ labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/deploy/config/jbossesb-03.xml	2008-08-27 16:53:01 UTC (rev 21938)
@@ -0,0 +1,16 @@
+<jbossesb xmlns="http://www.jboss.org/jbossesb/xsd/jbossesb-5.0.xsd" xmlns:xprot="http://www.jboss.org/jbossesb/xsd/xprot/xprot.xsd">
+    <services>
+        <service serviceCategory="service-cat" serviceName="service-a" serviceDescription="A Service" class="org.jboss.esb.deploy.config.MyTestService">
+            <property name="prop1">propValue</property>
+        </service>
+    </services>
+
+    <routing>
+        <inRouters serviceCategory="service-cat" serviceName="service-a">
+            <xprot:xprotInRouter xprotInAttribX="s" />
+        </inRouters>
+        <outRouters serviceCategory="service-cat" serviceName="service-a">
+            <xprot:xprotOutRouter xprotOutAttribX="s"/>
+        </outRouters>
+    </routing>
+</jbossesb>
\ No newline at end of file


Property changes on: labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/deploy/config/jbossesb-03.xml
___________________________________________________________________
Name: svn:mime-type
   + text/xml
Name: svn:eol-style
   + native

Added: labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/deploy/config/jbossesb-inandoutrouters_01.xml
===================================================================
--- labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/deploy/config/jbossesb-inandoutrouters_01.xml	                        (rev 0)
+++ labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/deploy/config/jbossesb-inandoutrouters_01.xml	2008-08-27 16:53:01 UTC (rev 21938)
@@ -0,0 +1,93 @@
+<jbossesb xmlns="http://www.jboss.org/jbossesb/xsd/jbossesb-5.0.xsd" xmlns:xprot="http://www.jboss.org/jbossesb/xsd/xprot/xprot.xsd">
+
+    <routing>
+
+        <inRouters serviceCategory="service-cat" serviceName="service-a">
+            <inRouter class="org.jboss.esb.deploy.config.MyInRouter">
+                <transformers>
+                    <transformer class="org.jboss.esb.deploy.config.MyMessageTransformer">
+                        <property name="someParam">1</property>
+                    </transformer>
+                    <transformer class="org.jboss.esb.deploy.config.MyMessageTransformer">
+                        <property name="someParam">2</property>
+                    </transformer>
+                    <transformer class="org.jboss.esb.deploy.config.MyMessageTransformer">
+                        <property name="someParam">3</property>
+                    </transformer>
+                </transformers>
+                <property name="myparam">1</property>
+            </inRouter>
+            <inRouter class="org.jboss.esb.deploy.config.MyInRouter">
+                <transformers>
+                    <transformer class="org.jboss.esb.deploy.config.MyMessageTransformer">
+                        <property name="someParam">4</property>
+                    </transformer>
+                    <transformer class="org.jboss.esb.deploy.config.MyMessageTransformer">
+                        <property name="someParam">5</property>
+                    </transformer>
+                </transformers>
+                <property name="myparam">2</property>
+            </inRouter>
+        </inRouters>
+
+        <inRouters serviceCategory="service-cat" serviceName="service-b">
+            <inRouter class="org.jboss.esb.deploy.config.MyInRouter">
+                <transformers>
+                    <transformer class="org.jboss.esb.deploy.config.MyMessageTransformer">
+                        <property name="someParam">6</property>
+                    </transformer>
+                </transformers>
+                <property name="myparam">4</property>
+            </inRouter>
+            <inRouter class="org.jboss.esb.deploy.config.MyInRouter">
+                <property name="myparam">5</property>
+                <property name="myOtherParam">5</property>
+            </inRouter>
+        </inRouters>
+
+        <outRouters serviceCategory="service-cat" serviceName="service-a">
+            <outRouter class="org.jboss.esb.deploy.config.MyOutRouter">
+                <transformers>
+                    <transformer class="org.jboss.esb.deploy.config.MyMessageTransformer">
+                        <property name="someParam">1</property>
+                    </transformer>
+                    <transformer class="org.jboss.esb.deploy.config.MyMessageTransformer">
+                        <property name="someParam">2</property>
+                    </transformer>
+                    <transformer class="org.jboss.esb.deploy.config.MyMessageTransformer">
+                        <property name="someParam">3</property>
+                    </transformer>
+                </transformers>
+                <property name="myparam">1</property>
+            </outRouter>
+            <outRouter class="org.jboss.esb.deploy.config.MyOutRouter">
+                <transformers>
+                    <transformer class="org.jboss.esb.deploy.config.MyMessageTransformer">
+                        <property name="someParam">4</property>
+                    </transformer>
+                    <transformer class="org.jboss.esb.deploy.config.MyMessageTransformer">
+                        <property name="someParam">5</property>
+                    </transformer>
+                </transformers>
+                <property name="myparam">2</property>
+            </outRouter>
+        </outRouters>
+        
+        <outRouters serviceCategory="service-cat" serviceName="service-b">
+            <outRouter class="org.jboss.esb.deploy.config.MyOutRouter">
+                <transformers>
+                    <transformer class="org.jboss.esb.deploy.config.MyMessageTransformer">
+                        <property name="someParam">6</property>
+                    </transformer>
+                </transformers>
+                <property name="myparam">4</property>
+            </outRouter>
+            <outRouter class="org.jboss.esb.deploy.config.MyOutRouter">
+                <property name="myparam">5</property>
+                <property name="myOtherParam">5</property>
+            </outRouter>
+        </outRouters>
+
+    </routing>
+
+</jbossesb>
\ No newline at end of file


Property changes on: labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/deploy/config/jbossesb-inandoutrouters_01.xml
___________________________________________________________________
Name: svn:mime-type
   + text/xml
Name: svn:eol-style
   + native

Added: labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/deploy/config/jbossesb-inrouters_01.xml
===================================================================
--- labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/deploy/config/jbossesb-inrouters_01.xml	                        (rev 0)
+++ labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/deploy/config/jbossesb-inrouters_01.xml	2008-08-27 16:53:01 UTC (rev 21938)
@@ -0,0 +1,49 @@
+<jbossesb xmlns="http://www.jboss.org/jbossesb/xsd/jbossesb-5.0.xsd" xmlns:xprot="http://www.jboss.org/jbossesb/xsd/xprot/xprot.xsd">
+
+    <routing>
+        
+        <inRouters serviceCategory="service-cat" serviceName="service-a">
+            <inRouter class="org.jboss.esb.deploy.config.MyInRouter">
+                <transformers>
+                    <transformer class="org.jboss.esb.deploy.config.MyMessageTransformer">
+                        <property name="someParam">1</property>
+                    </transformer>
+                    <transformer class="org.jboss.esb.deploy.config.MyMessageTransformer">
+                        <property name="someParam">2</property>
+                    </transformer>
+                    <transformer class="org.jboss.esb.deploy.config.MyMessageTransformer">
+                        <property name="someParam">3</property>
+                    </transformer>
+                </transformers>
+                <property name="myparam">1</property>
+            </inRouter>
+            <inRouter class="org.jboss.esb.deploy.config.MyInRouter">
+                <transformers>
+                    <transformer class="org.jboss.esb.deploy.config.MyMessageTransformer">
+                        <property name="someParam">4</property>
+                    </transformer>
+                    <transformer class="org.jboss.esb.deploy.config.MyMessageTransformer">
+                        <property name="someParam">5</property>
+                    </transformer>
+                </transformers>
+                <property name="myparam">2</property>
+            </inRouter>
+        </inRouters>
+        
+        <inRouters serviceCategory="service-cat" serviceName="service-b">
+            <inRouter class="org.jboss.esb.deploy.config.MyInRouter">
+                <transformers>
+                    <transformer class="org.jboss.esb.deploy.config.MyMessageTransformer">
+                        <property name="someParam">6</property>
+                    </transformer>
+                </transformers>
+                <property name="myparam">4</property>
+            </inRouter>
+            <inRouter class="org.jboss.esb.deploy.config.MyInRouter">
+                <property name="myparam">5</property>
+                <property name="myOtherParam">5</property>
+            </inRouter>
+        </inRouters>
+    </routing>
+    
+</jbossesb>
\ No newline at end of file


Property changes on: labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/deploy/config/jbossesb-inrouters_01.xml
___________________________________________________________________
Name: svn:mime-type
   + text/xml
Name: svn:eol-style
   + native

Added: labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/deploy/config/jbossesb-outrouters_01.xml
===================================================================
--- labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/deploy/config/jbossesb-outrouters_01.xml	                        (rev 0)
+++ labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/deploy/config/jbossesb-outrouters_01.xml	2008-08-27 16:53:01 UTC (rev 21938)
@@ -0,0 +1,46 @@
+<jbossesb xmlns="http://www.jboss.org/jbossesb/xsd/jbossesb-5.0.xsd" xmlns:xprot="http://www.jboss.org/jbossesb/xsd/xprot/xprot.xsd">
+
+    <routing>
+        <outRouters serviceCategory="service-cat" serviceName="service-a">
+            <outRouter class="org.jboss.esb.deploy.config.MyOutRouter">
+                <transformers>
+                    <transformer class="org.jboss.esb.deploy.config.MyMessageTransformer">
+                        <property name="someParam">1</property>
+                    </transformer>
+                    <transformer class="org.jboss.esb.deploy.config.MyMessageTransformer">
+                        <property name="someParam">2</property>
+                    </transformer>
+                    <transformer class="org.jboss.esb.deploy.config.MyMessageTransformer">
+                        <property name="someParam">3</property>
+                    </transformer>
+                </transformers>
+                <property name="myparam">1</property>
+            </outRouter>
+            <outRouter class="org.jboss.esb.deploy.config.MyOutRouter">
+                <transformers>
+                    <transformer class="org.jboss.esb.deploy.config.MyMessageTransformer">
+                        <property name="someParam">4</property>
+                    </transformer>
+                    <transformer class="org.jboss.esb.deploy.config.MyMessageTransformer">
+                        <property name="someParam">5</property>
+                    </transformer>
+                </transformers>
+                <property name="myparam">2</property>
+            </outRouter>
+        </outRouters>
+        <outRouters serviceCategory="service-cat" serviceName="service-b">
+            <outRouter class="org.jboss.esb.deploy.config.MyOutRouter">
+                <transformers>
+                    <transformer class="org.jboss.esb.deploy.config.MyMessageTransformer">
+                        <property name="someParam">6</property>
+                    </transformer>
+                </transformers>
+                <property name="myparam">4</property>
+            </outRouter>
+            <outRouter class="org.jboss.esb.deploy.config.MyOutRouter">
+                <property name="myparam">5</property>
+                <property name="myOtherParam">5</property>
+            </outRouter>
+        </outRouters>
+    </routing>
+</jbossesb>
\ No newline at end of file


Property changes on: labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/deploy/config/jbossesb-outrouters_01.xml
___________________________________________________________________
Name: svn:mime-type
   + text/xml
Name: svn:eol-style
   + native

Added: labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/deploy/config/jbossesb-resources_01.xml
===================================================================
--- labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/deploy/config/jbossesb-resources_01.xml	                        (rev 0)
+++ labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/deploy/config/jbossesb-resources_01.xml	2008-08-27 16:53:01 UTC (rev 21938)
@@ -0,0 +1,9 @@
+<jbossesb xmlns="http://www.jboss.org/jbossesb/xsd/jbossesb-5.0.xsd">
+    <resources>
+        <resource id="xprotRes1" class="org.jboss.esb.deploy.config.XProtDeploymentResource">
+            <property name="xprotResPropA">1234</property>
+            <property name="xprotResPropB">12.34</property>
+            <property name="xprotResPropC">http://acme.com</property>
+        </resource>
+    </resources>
+</jbossesb>
\ No newline at end of file


Property changes on: labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/deploy/config/jbossesb-resources_01.xml
___________________________________________________________________
Name: svn:mime-type
   + text/xml
Name: svn:eol-style
   + native

Added: labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/deploy/config/jbossesb-services_01.xml
===================================================================
--- labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/deploy/config/jbossesb-services_01.xml	                        (rev 0)
+++ labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/deploy/config/jbossesb-services_01.xml	2008-08-27 16:53:01 UTC (rev 21938)
@@ -0,0 +1,10 @@
+<jbossesb xmlns="http://www.jboss.org/jbossesb/xsd/jbossesb-5.0.xsd">
+    <services>
+        <service serviceCategory="service-cat" serviceName="service-a" serviceDescription="A Service" class="org.jboss.esb.deploy.config.MyTestService">
+            <property name="prop1">propValueA</property>
+        </service>
+        <service serviceCategory="service-cat" serviceName="service-b" serviceDescription="B Service" class="org.jboss.esb.deploy.config.MyTestService">
+            <property name="prop1">propValueB</property>
+        </service>
+    </services>
+</jbossesb>
\ No newline at end of file


Property changes on: labs/jbossesb/workspace/skeagh/runtime/src/test/java/org/jboss/esb/deploy/config/jbossesb-services_01.xml
___________________________________________________________________
Name: svn:mime-type
   + text/xml
Name: svn:eol-style
   + native

Added: labs/jbossesb/workspace/skeagh/runtime/src/test/resources/META-INF/jbossesb/xsd/xprot/xprot.xsd
===================================================================
--- labs/jbossesb/workspace/skeagh/runtime/src/test/resources/META-INF/jbossesb/xsd/xprot/xprot.xsd	                        (rev 0)
+++ labs/jbossesb/workspace/skeagh/runtime/src/test/resources/META-INF/jbossesb/xsd/xprot/xprot.xsd	2008-08-27 16:53:01 UTC (rev 21938)
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+           xmlns:jbossesb="http://www.jboss.org/jbossesb/xsd/jbossesb-5.0.xsd"
+           xmlns:xprot="http://www.jboss.org/jbossesb/xsd/xprot/xprot.xsd"
+           targetNamespace="http://www.jboss.org/jbossesb/xsd/xprot/xprot.xsd"
+           elementFormDefault="qualified">
+
+    <xs:import namespace="http://www.jboss.org/jbossesb/xsd/jbossesb-5.0.xsd" />
+
+    <xs:element name="xprotInRouter" substitutionGroup="jbossesb:abstractInRouter">
+        <xs:complexType>
+            <xs:complexContent>
+                <xs:extension base="jbossesb:abstractInRouter">
+                    <xs:attribute name="xprotInAttribX" type="xs:string" use="required" />
+                </xs:extension>
+            </xs:complexContent>
+        </xs:complexType>
+    </xs:element>
+
+    <xs:element name="xprotOutRouter" substitutionGroup="jbossesb:abstractOutRouter">
+        <xs:complexType>
+            <xs:complexContent>
+                <xs:extension base="jbossesb:abstractOutRouter">
+                    <xs:attribute name="xprotOutAttribX" type="xs:string" use="required" />
+                </xs:extension>
+            </xs:complexContent>
+        </xs:complexType>
+    </xs:element>
+
+</xs:schema>
\ No newline at end of file


Property changes on: labs/jbossesb/workspace/skeagh/runtime/src/test/resources/META-INF/jbossesb/xsd/xprot/xprot.xsd
___________________________________________________________________
Name: svn:mime-type
   + text/xml
Name: svn:eol-style
   + native




More information about the jboss-svn-commits mailing list