[jboss-svn-commits] JBL Code SVN: r17034 - in labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2: product/lib/ext and 15 other directories.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Wed Dec 5 06:07:34 EST 2007


Author: kevin.conner at jboss.com
Date: 2007-12-05 06:07:33 -0500 (Wed, 05 Dec 2007)
New Revision: 17034

Added:
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/lib/ext/wstx-lgpl-3.2.1.jar
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/internal/soa/esb/util/XMLHelper.java
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/internal/soa/esb/util/stax/
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/internal/soa/esb/util/stax/ElementContent.java
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/internal/soa/esb/util/stax/ParsingSupport.java
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/internal/soa/esb/util/stax/QNameHelper.java
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/internal/soa/esb/util/stax/StreamHelper.java
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/tests/src/org/jboss/internal/soa/esb/util/XMLHelperUnitTest.java
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/tests/src/org/jboss/internal/soa/esb/util/replaceSystemProperties_expected.xml
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/tests/src/org/jboss/internal/soa/esb/util/replaceSystemProperties_source.xml
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/tests/src/org/jboss/soa/esb/testutils/Element.java
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/tests/src/org/jboss/soa/esb/testutils/IdentitySAXHandler.java
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/tests/src/org/jboss/soa/esb/testutils/Node.java
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/tests/src/org/jboss/soa/esb/testutils/Text.java
Removed:
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/internal/soa/esb/util/stax/ElementContent.java
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/internal/soa/esb/util/stax/ParsingSupport.java
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/internal/soa/esb/util/stax/QNameHelper.java
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/internal/soa/esb/util/stax/StreamHelper.java
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/soap/lib/ext/ognl-2.6.9.jar
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/soap/lib/ext/stax-api-1.0.1.jar
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/soap/lib/ext/wstx-lgpl-3.2.1.jar
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/soap/lib/ext/xbean.jar
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/soap/lib/ext/xstream-1.1.3.jar
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/qa/quickstarts/src/org/jboss/soa/esb/quickstart/test/util/
Modified:
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/install/conf/esb.juddi.xml
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/install/conf/jbossesb-properties.xml
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/internal/soa/esb/dependencies/JuddiRMIService.java
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/common/JBossESBPropertyService.java
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/listeners/config/JBoss4ESBDeployer.java
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/tests/src/org/jboss/soa/esb/testutils/StringUtils.java
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/trailblazer/build.xml
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/trailblazer/client/src/org/jboss/soa/esb/samples/trailblazer/loanbroker/LoanBroker.java
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/smooks/src/main/java/org/jboss/soa/esb/actions/converters/SmooksService.java
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/smooks/src/main/resources/smooks.esb.xml
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/soap/build.xml
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/tools/console/management/build.xml
   labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/qa/quickstarts/src/org/jboss/soa/esb/quickstart/test/Helpers.java
Log:
Merged IR4

Modified: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/install/conf/esb.juddi.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/install/conf/esb.juddi.xml	2007-12-05 10:48:30 UTC (rev 17033)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/install/conf/esb.juddi.xml	2007-12-05 11:07:33 UTC (rev 17034)
@@ -20,7 +20,7 @@
   <entry key="juddi.i18n.countryCode">US</entry>
 
   <!-- The UDDI DiscoveryURL Prefix -->
-  <entry key="juddi.discoveryURL">http://localhost:8080/juddi/uddiget.jsp?</entry>
+  <entry key="juddi.discoveryURL">http://${jboss.bind.address}:8080/juddi/uddiget.jsp?</entry>
 
   <!-- The UDDI Operator Contact Email Address -->
   <entry key="juddi.operatorEmailAddress">admin at juddi.org</entry>
@@ -75,15 +75,15 @@
   <entry key="juddi.validator">org.apache.juddi.validator.DefaultValidator</entry>
 
   <!-- jUDDI Proxy Properties (used by RegistryProxy) -->
-  <entry key="juddi.proxy.adminURL">http://localhost:8080/juddi/admin</entry>
-  <entry key="juddi.proxy.inquiryURL">http://localhost:8080/juddi/inquiry</entry>
-  <entry key="juddi.proxy.publishURL">http://localhost:8080/juddi/publish</entry>
+  <entry key="juddi.proxy.adminURL">http://${jboss.bind.address}:8080/juddi/admin</entry>
+  <entry key="juddi.proxy.inquiryURL">http://${jboss.bind.address}:8080/juddi/inquiry</entry>
+  <entry key="juddi.proxy.publishURL">http://${jboss.bind.address}:8080/juddi/publish</entry>
   <entry key="juddi.proxy.transportClass">org.apache.juddi.proxy.AxisTransport</entry>
   <entry key="juddi.proxy.securityProvider">com.sun.net.ssl.internal.ssl.Provider</entry>
   <entry key="juddi.proxy.protocolHandler">com.sun.net.ssl.internal.www.protocol</entry>
 
   <!-- JNDI settings (used by RMITransport) -->
   <entry key="java.naming.factory.initial">org.jnp.interfaces.NamingContextFactory</entry>
-  <entry key="java.naming.provider.url">jnp://localhost:1099</entry>
+  <entry key="java.naming.provider.url">jnp://${jboss.bind.address}:1099</entry>
   <entry key="java.naming.factory.url.pkgs">org.jboss.naming</entry>
 </properties>

Modified: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/install/conf/jbossesb-properties.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/install/conf/jbossesb-properties.xml	2007-12-05 10:48:30 UTC (rev 17033)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/install/conf/jbossesb-properties.xml	2007-12-05 11:07:33 UTC (rev 17034)
@@ -32,7 +32,7 @@
   xsi:noNamespaceSchemaLocation="jbossesb-1_0.xsd">
     <properties name="core">
 		<property name="org.jboss.soa.esb.jndi.server.context.factory" value="org.jnp.interfaces.NamingContextFactory"/>
-		<property name="org.jboss.soa.esb.jndi.server.url" value="localhost"/>
+		<property name="org.jboss.soa.esb.jndi.server.url" value="${jboss.bind.address}:1099"/>
 		<property name="org.jboss.soa.esb.persistence.connection.factory" 	value="org.jboss.internal.soa.esb.persistence.format.MessageStoreFactoryImpl"/>
         <property name="org.jboss.soa.esb.loadbalancer.policy" value="org.jboss.soa.esb.listeners.ha.RoundRobin"/>
     </properties>

Copied: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/lib/ext/wstx-lgpl-3.2.1.jar (from rev 17033, labs/jbossesb/tags/JBESB_4_2_1_GA_CP_IR4/product/lib/ext/wstx-lgpl-3.2.1.jar)
===================================================================
(Binary files differ)

Modified: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/internal/soa/esb/dependencies/JuddiRMIService.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/internal/soa/esb/dependencies/JuddiRMIService.java	2007-12-05 10:48:30 UTC (rev 17033)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/internal/soa/esb/dependencies/JuddiRMIService.java	2007-12-05 11:07:33 UTC (rev 17034)
@@ -22,13 +22,13 @@
 
 package org.jboss.internal.soa.esb.dependencies;
 
-import java.io.BufferedOutputStream;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
 import java.io.File;
+import java.io.FileInputStream;
 import java.io.FileOutputStream;
-import java.net.URI;
+import java.io.InputStream;
 import java.net.URL;
-import java.util.Enumeration;
-import java.util.Hashtable;
 import java.util.Properties;
 
 import javax.naming.InitialContext;
@@ -36,6 +36,7 @@
 import org.apache.juddi.registry.rmi.JNDIRegistration;
 import org.apache.log4j.Logger;
 import org.jboss.internal.soa.esb.util.PropertiesHelper;
+import org.jboss.internal.soa.esb.util.XMLHelper;
 import org.jboss.system.ServiceMBeanSupport;
 import org.jboss.system.server.ServerConfig;
 import org.jboss.system.server.ServerConfigLocator;
@@ -43,8 +44,6 @@
 public class JuddiRMIService extends ServiceMBeanSupport implements JuddiRMIServiceMBean
 {
    private Logger logger = Logger.getLogger(this.getClass());
-   public static final String JBOSS_BIND_ADDRESS_TOKEN = "jboss.bind.address";
-   
    public static final String PROPNAME_JAVA_NAMING_FACTORY_INITIAL = "java.naming.factory.initial";
    public static final String PROPNAME_JAVA_NAMING_PROVIDER_URL = "java.naming.provider.url";
    public static final String PROPNAME_JAVA_NAMING_FACTORY_URL_PKGS = "java.naming.factory.url.pkgs";
@@ -53,8 +52,6 @@
    private static final String JUDDI_PROPERTIES_RESOURCE_FILE = "esb.juddi.properties";
    private static final String JUDDI_PROPERTY_FILE_COMMENTS = "Auto generated property file, do not edit" ;
    
-   private Hashtable<String, String> tokenHash;
-   
    private String propertiesResourceFile ;
 
    public String getPropertiesResourceFile()
@@ -66,12 +63,6 @@
    {
       this.propertiesResourceFile = propertiesResourceFile;
    }
-
-   public void initializeTokenHash() {
-	   tokenHash = new Hashtable<String,String>();
-       String bindAddress = System.getProperty("jboss.bind.address");
-       tokenHash.put("${" + JBOSS_BIND_ADDRESS_TOKEN + "}", bindAddress);
-   }
    
    protected void startService() throws Exception
 	{
@@ -87,53 +78,42 @@
         }
         final File baseFile = new File(propertiesResourceFileVal) ;
 
-        final File xmlPropertyFile ;
+        final InputStream xmlPropertyIS ;
         if (baseFile.isAbsolute())
         {
-            xmlPropertyFile = baseFile;
+            xmlPropertyIS = new FileInputStream(baseFile);
         }
         else
         {
-            URL url = Thread.currentThread().getContextClassLoader().getResource(propertiesResourceFileVal);
-            URI uri = new URI(url.toString());
-            xmlPropertyFile = new File(uri) ;
+            final URL url = Thread.currentThread().getContextClassLoader().getResource(propertiesResourceFileVal);
+            xmlPropertyIS = url.openStream() ;
         }
+        final byte[] propertyFileContents ;
+        try {
+            final ByteArrayOutputStream baos = new ByteArrayOutputStream() ;
+            XMLHelper.replaceSystemProperties(XMLHelper.getXMLStreamReader(xmlPropertyIS),
+                XMLHelper.getXMLStreamWriter(baos)) ;
+            propertyFileContents = baos.toByteArray() ;
+        } finally {
+            xmlPropertyIS.close() ;
+        }
+        
         final ServerConfig serverConfig = ServerConfigLocator.locate() ;
         final File dataDir = serverConfig.getServerDataDir() ;
         final File juddiPropertyFile = new File(dataDir, JUDDI_PROPERTIES_RESOURCE_FILE) ;
         
-        final Properties xmlProperties = PropertiesHelper.translateXMLToText(xmlPropertyFile, juddiPropertyFile, JUDDI_PROPERTY_FILE_COMMENTS) ;
-        System.setProperty("juddi.propertiesFile", juddiPropertyFile.getAbsolutePath());
-        System.setProperty("javax.xml.registry.ConnectionFactoryClass","org.apache.ws.scout.registry.ConnectionFactoryImpl");
-        
-        // Support token replacement
-        initializeTokenHash(); 
-        for (Enumeration e = xmlProperties.keys(); e.hasMoreElements();) {
-        	String key = (String) e.nextElement();
-        	String value = xmlProperties.getProperty(key);
-        	for (String tokenKey : tokenHash.keySet()) {
-        		String tokenValue = tokenHash.get(tokenKey);
-        		if (value.contains(tokenKey)) {
-        			value = value.replace(tokenKey, tokenValue);
-        			System.setProperty(key, value);
-        			xmlProperties.setProperty(key, value);
-        		}
-        	}	
-        }
-        
-        // Rewrite for token replacement
-        FileOutputStream rewritePropertyOS = new FileOutputStream(juddiPropertyFile) ;
+        final ByteArrayInputStream bais = new ByteArrayInputStream(propertyFileContents) ;
+        final FileOutputStream juddiPropertyOS = new FileOutputStream(juddiPropertyFile) ;
+        final Properties xmlProperties ;
         try {
-        	rewritePropertyOS = new FileOutputStream(juddiPropertyFile);
-            final BufferedOutputStream bos = new BufferedOutputStream(rewritePropertyOS) ;
-            xmlProperties.store(bos, JUDDI_PROPERTY_FILE_COMMENTS) ;
-            bos.flush() ;
+            xmlProperties = PropertiesHelper.translateXMLToText(bais, juddiPropertyOS, JUDDI_PROPERTY_FILE_COMMENTS) ;
         } finally {
-        	rewritePropertyOS.close();
+            juddiPropertyOS.close() ;
         }
+        System.setProperty("juddi.propertiesFile", juddiPropertyFile.getAbsolutePath());
+        System.setProperty("javax.xml.registry.ConnectionFactoryClass","org.apache.ws.scout.registry.ConnectionFactoryImpl");
         
         // Read properties from file and if they exist - pass them on to juddi as system properties
-        // Do not pass back the properties back if 
         String factoryInitial =  xmlProperties.getProperty(PROPNAME_JAVA_NAMING_FACTORY_INITIAL, null);
         String providerURL = xmlProperties.getProperty(PROPNAME_JAVA_NAMING_PROVIDER_URL, null); 
         String factoryURLPkgs = xmlProperties.getProperty(PROPNAME_JAVA_NAMING_FACTORY_URL_PKGS, null);

Copied: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/internal/soa/esb/util/XMLHelper.java (from rev 17033, labs/jbossesb/tags/JBESB_4_2_1_GA_CP_IR4/product/rosetta/src/org/jboss/internal/soa/esb/util/XMLHelper.java)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/internal/soa/esb/util/XMLHelper.java	                        (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/internal/soa/esb/util/XMLHelper.java	2007-12-05 11:07:33 UTC (rev 17034)
@@ -0,0 +1,229 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. 
+ * See the copyright.txt 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 General Public License, v. 2.0.
+ * 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 General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package org.jboss.internal.soa.esb.util;
+
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.io.Reader;
+import java.io.Writer;
+
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLInputFactory;
+import javax.xml.stream.XMLOutputFactory;
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+import javax.xml.stream.XMLStreamWriter;
+
+import org.jboss.internal.soa.esb.util.stax.ParsingSupport;
+import org.jboss.internal.soa.esb.util.stax.StreamHelper;
+import org.jboss.util.StringPropertyReplacer;
+
+/**
+ * Helper class for manipulating XML documents.
+ * 
+ * @author <a href='mailto:kevin.conner at jboss.com'>Kevin Conner</a>
+ */
+public class XMLHelper
+{
+    /**
+     * The XML input factory.
+     */
+    private static final XMLInputFactory XML_INPUT_FACTORY = getXMLInputFactory() ;
+    /**
+     * The XML output factory.
+     */
+    private static final XMLOutputFactory XML_OUTPUT_FACTORY = XMLOutputFactory.newInstance() ;
+
+    /**
+     * Get the XML stream reader.
+     * @param reader The input reader.
+     * @return The XML stream reader.
+     * @throws XMLStreamException For errors obtaining an XML stream reader.
+     */
+    public static XMLStreamReader getXMLStreamReader(final Reader reader)
+        throws XMLStreamException
+    {
+        return XML_INPUT_FACTORY.createXMLStreamReader(reader) ;
+    }
+
+    /**
+     * Get the XML stream reader.
+     * @param is The input stream.
+     * @return The XML stream reader.
+     * @throws XMLStreamException For errors obtaining an XML stream reader.
+     */
+    public static XMLStreamReader getXMLStreamReader(final InputStream is)
+        throws XMLStreamException
+    {
+        return XML_INPUT_FACTORY.createXMLStreamReader(is) ;
+    }
+
+    /**
+     * Get the XML stream reader.
+     * @param is The input stream.
+     * @param encoding The input stream encoding.
+     * @return The XML stream reader.
+     * @throws XMLStreamException For errors obtaining an XML stream reader.
+     */
+    public static XMLStreamReader getXMLStreamReader(final InputStream is, final String encoding)
+        throws XMLStreamException
+    {
+        return XML_INPUT_FACTORY.createXMLStreamReader(is, encoding) ;
+    }
+
+    /**
+     * Get the XML stream writer.
+     * @param writer The output writer.
+     * @return The XML stream writer.
+     * @throws XMLStreamException For errors obtaining an XML stream writer.
+     */
+    public static XMLStreamWriter getXMLStreamWriter(final Writer writer)
+        throws XMLStreamException
+    {
+        return XML_OUTPUT_FACTORY.createXMLStreamWriter(writer) ;
+    }
+
+    /**
+     * Get the XML stream writer.
+     * @param os The output stream.
+     * @return The XML stream writer.
+     * @throws XMLStreamException For errors obtaining an XML stream writer.
+     */
+    public static XMLStreamWriter getXMLStreamWriter(final OutputStream os)
+        throws XMLStreamException
+    {
+        return XML_OUTPUT_FACTORY.createXMLStreamWriter(os) ;
+    }
+
+    /**
+     * Get the XML stream writer.
+     * @param os The output stream.
+     * @param encoding The output stream encoding.
+     * @return The XML stream writer.
+     * @throws XMLStreamException For errors obtaining an XML stream writer.
+     */
+    public static XMLStreamWriter getXMLStreamWriter(final OutputStream os, final String encoding)
+        throws XMLStreamException
+    {
+        return XML_OUTPUT_FACTORY.createXMLStreamWriter(os, encoding) ;
+    }
+    
+    /**
+     * Replace system property values within the attribute values/text elements.
+     * @param streamReader The XML stream reader.
+     * @param streamWriter The XMl stream writer.
+     * @throws XMLStreamException For errors during parsing.
+     */
+    public static void replaceSystemProperties(final XMLStreamReader streamReader,
+        final XMLStreamWriter streamWriter)
+        throws XMLStreamException
+    {
+        streamWriter.writeStartDocument() ;
+        
+        StreamHelper.skipToStartElement(streamReader) ;
+        final QName elementName = streamReader.getName() ;
+        final String uri = StreamHelper.writeStartElement(streamWriter, elementName) ;
+        
+        new SystemPropertyReplacementParser(streamReader, streamWriter) ;
+        
+        StreamHelper.writeEndElement(streamWriter, elementName.getPrefix(), uri) ;
+        
+        streamWriter.writeEndDocument() ;
+        streamWriter.flush() ;
+    }
+
+    /**
+     * Create the XML input factory.
+     * @return The XML input factory.
+     */
+    private static XMLInputFactory getXMLInputFactory()
+    {
+        final XMLInputFactory xmlInputFactory = XMLInputFactory.newInstance() ;
+        xmlInputFactory.setProperty(XMLInputFactory.IS_COALESCING, Boolean.TRUE) ;
+        return xmlInputFactory ;
+    }
+    
+    /**
+     * The parser class used to perform system property replacement.
+     * @author kevin
+     */
+    private static final class SystemPropertyReplacementParser extends ParsingSupport
+    {
+        /**
+         * The output writer.
+         */
+        private final XMLStreamWriter out ;
+        
+        /**
+         * Construct the parser.
+         * @param in The XML input stream.
+         * @param out The XML output stream.
+         * @throws XMLStreamException For errors during parsing.
+         */
+        SystemPropertyReplacementParser(final XMLStreamReader in, final XMLStreamWriter out)
+            throws XMLStreamException
+        {
+            this.out = out ;
+            parse(in) ;
+        }
+        
+        /**
+         * Set the text value of this element.
+         * @param in The current input stream.
+         * @param value The text value of this element.
+         * @throws XMLStreamException For errors during parsing.
+         */
+        protected void putValue(final XMLStreamReader in, final String value)
+            throws XMLStreamException
+        {
+            out.writeCharacters(StringPropertyReplacer.replaceProperties(value)) ;
+        }
+        
+        /**
+         * Add the attribute value.
+         * @param in The current input stream.
+         * @param attributeName The qualified attribute name.
+         * @param attributeValue The qualified attribute value.
+         * @throws XMLStreamException For errors during parsing.
+         */
+        protected void putAttribute(final XMLStreamReader in,
+            final QName attributeName, final String attributeValue)
+            throws XMLStreamException
+        {
+            StreamHelper.writeAttribute(out, attributeName, StringPropertyReplacer.replaceProperties(attributeValue)) ;
+        }
+        
+        /**
+         * Add the element.
+         * @param in The current input stream.
+         * @param elementName The qualified element name.
+         * @throws XMLStreamException For errors during parsing.
+         */
+        protected void putElement(final XMLStreamReader in,
+            final QName elementName)
+            throws XMLStreamException
+        {
+            final String uri = StreamHelper.writeStartElement(out, elementName) ;
+            new SystemPropertyReplacementParser(in, out) ;
+            StreamHelper.writeEndElement(out, elementName.getPrefix(), uri) ;
+        }
+    }
+}

Copied: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/internal/soa/esb/util/stax (from rev 17033, labs/jbossesb/tags/JBESB_4_2_1_GA_CP_IR4/product/rosetta/src/org/jboss/internal/soa/esb/util/stax)

Deleted: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/internal/soa/esb/util/stax/ElementContent.java
===================================================================
--- labs/jbossesb/tags/JBESB_4_2_1_GA_CP_IR4/product/rosetta/src/org/jboss/internal/soa/esb/util/stax/ElementContent.java	2007-12-05 10:48:30 UTC (rev 17033)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/internal/soa/esb/util/stax/ElementContent.java	2007-12-05 11:07:33 UTC (rev 17034)
@@ -1,63 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. 
- * See the copyright.txt 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 General Public License, v. 2.0.
- * 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 General Public License for more details.
- * You should have received a copy of the GNU General Public License,
- * v. 2.0 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
- * MA  02110-1301, USA.
- * 
- * (C) 2005-2006,
- * @author JBoss Inc.
- */
-package org.jboss.internal.soa.esb.util.stax;
-
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamWriter;
-
-/**
- * Utility class providing support for all elements.
- * @author kevin
- */
-public abstract class ElementContent extends ParsingSupport
-{
-    /**
-     * Write the contents of the element.
-     * @param out The output stream.
-     * @throws XMLStreamException For errors during output.
-     */
-    public void writeContent(final XMLStreamWriter out)
-        throws XMLStreamException
-    {
-        writeAttributes(out) ;
-        writeChildContent(out) ;
-    }
-    
-    /**
-     * Write the attributes of the element.
-     * @param out The output stream.
-     * @throws XMLStreamException For errors during output.
-     */
-    protected void writeAttributes(final XMLStreamWriter out)
-        throws XMLStreamException
-    {
-    }
-    
-    /**
-     * Write the child content of the element.
-     * @param out The output stream.
-     * @throws XMLStreamException For errors during output.
-     */
-    protected void writeChildContent(final XMLStreamWriter out)
-        throws XMLStreamException
-    {
-    }
-}

Copied: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/internal/soa/esb/util/stax/ElementContent.java (from rev 17033, labs/jbossesb/tags/JBESB_4_2_1_GA_CP_IR4/product/rosetta/src/org/jboss/internal/soa/esb/util/stax/ElementContent.java)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/internal/soa/esb/util/stax/ElementContent.java	                        (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/internal/soa/esb/util/stax/ElementContent.java	2007-12-05 11:07:33 UTC (rev 17034)
@@ -0,0 +1,63 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. 
+ * See the copyright.txt 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 General Public License, v. 2.0.
+ * 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 General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package org.jboss.internal.soa.esb.util.stax;
+
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamWriter;
+
+/**
+ * Utility class providing support for all elements.
+ * @author kevin
+ */
+public abstract class ElementContent extends ParsingSupport
+{
+    /**
+     * Write the contents of the element.
+     * @param out The output stream.
+     * @throws XMLStreamException For errors during output.
+     */
+    public void writeContent(final XMLStreamWriter out)
+        throws XMLStreamException
+    {
+        writeAttributes(out) ;
+        writeChildContent(out) ;
+    }
+    
+    /**
+     * Write the attributes of the element.
+     * @param out The output stream.
+     * @throws XMLStreamException For errors during output.
+     */
+    protected void writeAttributes(final XMLStreamWriter out)
+        throws XMLStreamException
+    {
+    }
+    
+    /**
+     * Write the child content of the element.
+     * @param out The output stream.
+     * @throws XMLStreamException For errors during output.
+     */
+    protected void writeChildContent(final XMLStreamWriter out)
+        throws XMLStreamException
+    {
+    }
+}

Deleted: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/internal/soa/esb/util/stax/ParsingSupport.java
===================================================================
--- labs/jbossesb/tags/JBESB_4_2_1_GA_CP_IR4/product/rosetta/src/org/jboss/internal/soa/esb/util/stax/ParsingSupport.java	2007-12-05 10:48:30 UTC (rev 17033)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/internal/soa/esb/util/stax/ParsingSupport.java	2007-12-05 11:07:33 UTC (rev 17034)
@@ -1,132 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. 
- * See the copyright.txt 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 General Public License, v. 2.0.
- * 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 General Public License for more details.
- * You should have received a copy of the GNU General Public License,
- * v. 2.0 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
- * MA  02110-1301, USA.
- * 
- * (C) 2005-2006,
- * @author JBoss Inc.
- */
-package org.jboss.internal.soa.esb.util.stax;
-
-import javax.xml.namespace.QName;
-import javax.xml.stream.XMLStreamConstants;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamReader;
-
-/**
- * Utility class providing support for parsing.
- * @author kevin
- */
-public abstract class ParsingSupport
-{
-    /**
-     * Is the configuration of this element valid?
-     * @return true if valid, false otherwise.
-     */
-    public boolean isValid()
-    {
-        return true ;
-    }
-    
-    /**
-     * Parse the contents of this element from the input stream.
-     * @param in The input stream.
-     */
-    protected final void parse(final XMLStreamReader in)
-        throws XMLStreamException
-    {
-        final int attributeCount = in.getAttributeCount() ;
-        for(int count = 0 ; count < attributeCount ; count++)
-        {
-            final QName attributeName = in.getAttributeName(count) ;
-            final String attributeValue = in.getAttributeValue(count) ;
-            putAttribute(in, attributeName, attributeValue) ;
-        }
-        
-        final QName name = in.getName() ;
-        boolean finished = false ;
-        
-        do
-        {
-            final int type = in.next() ;
-            switch(type)
-            {
-                case XMLStreamConstants.START_ELEMENT:
-                    final QName startElementName = in.getName() ;
-                    putElement(in, startElementName) ;
-                    in.require(XMLStreamConstants.END_ELEMENT, startElementName.getNamespaceURI(),
-                        startElementName.getLocalPart()) ;
-                    break ;
-                case XMLStreamConstants.END_ELEMENT:
-                    in.require(type, name.getNamespaceURI(), name.getLocalPart()) ;
-                    finished = true ;
-                    break ;
-                case XMLStreamConstants.CDATA:
-                case XMLStreamConstants.CHARACTERS:
-                    putValue(in, in.getText()) ;
-                    break ;
-                case XMLStreamConstants.COMMENT:
-                case XMLStreamConstants.DTD:
-                case XMLStreamConstants.ENTITY_DECLARATION:
-                case XMLStreamConstants.ENTITY_REFERENCE:
-                case XMLStreamConstants.SPACE:
-                case XMLStreamConstants.NOTATION_DECLARATION:
-                case XMLStreamConstants.PROCESSING_INSTRUCTION:
-                    // Ignore these
-                    break ;
-                case XMLStreamConstants.ATTRIBUTE:
-                case XMLStreamConstants.START_DOCUMENT:
-                case XMLStreamConstants.END_DOCUMENT:
-                case XMLStreamConstants.NAMESPACE:
-                    throw new XMLStreamException("Encountered unexpected event type: " + type) ;
-            }
-        }
-        while(!finished) ;
-    }
-    
-    /**
-     * Set the text value of this element.
-     * @param in The current input stream.
-     * @param value The text value of this element.
-     * @throws XMLStreamException For errors during parsing.
-     */
-    protected void putValue(final XMLStreamReader in, final String value)
-        throws XMLStreamException
-    {
-    }
-    
-    /**
-     * Add the attribute value.
-     * @param in The current input stream.
-     * @param attributeName The qualified attribute name.
-     * @param attributeValue The qualified attribute value.
-     * @throws XMLStreamException For errors during parsing.
-     */
-    protected void putAttribute(final XMLStreamReader in,
-        final QName attributeName, final String attributeValue)
-        throws XMLStreamException
-    {
-    }
-    
-    /**
-     * Add the element.
-     * @param in The current input stream.
-     * @param elementName The qualified element name.
-     * @throws XMLStreamException For errors during parsing.
-     */
-    protected abstract void putElement(final XMLStreamReader in,
-        final QName elementName)
-        throws XMLStreamException ;
-}

Copied: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/internal/soa/esb/util/stax/ParsingSupport.java (from rev 17033, labs/jbossesb/tags/JBESB_4_2_1_GA_CP_IR4/product/rosetta/src/org/jboss/internal/soa/esb/util/stax/ParsingSupport.java)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/internal/soa/esb/util/stax/ParsingSupport.java	                        (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/internal/soa/esb/util/stax/ParsingSupport.java	2007-12-05 11:07:33 UTC (rev 17034)
@@ -0,0 +1,132 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. 
+ * See the copyright.txt 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 General Public License, v. 2.0.
+ * 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 General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package org.jboss.internal.soa.esb.util.stax;
+
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLStreamConstants;
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+
+/**
+ * Utility class providing support for parsing.
+ * @author kevin
+ */
+public abstract class ParsingSupport
+{
+    /**
+     * Is the configuration of this element valid?
+     * @return true if valid, false otherwise.
+     */
+    public boolean isValid()
+    {
+        return true ;
+    }
+    
+    /**
+     * Parse the contents of this element from the input stream.
+     * @param in The input stream.
+     */
+    protected final void parse(final XMLStreamReader in)
+        throws XMLStreamException
+    {
+        final int attributeCount = in.getAttributeCount() ;
+        for(int count = 0 ; count < attributeCount ; count++)
+        {
+            final QName attributeName = in.getAttributeName(count) ;
+            final String attributeValue = in.getAttributeValue(count) ;
+            putAttribute(in, attributeName, attributeValue) ;
+        }
+        
+        final QName name = in.getName() ;
+        boolean finished = false ;
+        
+        do
+        {
+            final int type = in.next() ;
+            switch(type)
+            {
+                case XMLStreamConstants.START_ELEMENT:
+                    final QName startElementName = in.getName() ;
+                    putElement(in, startElementName) ;
+                    in.require(XMLStreamConstants.END_ELEMENT, startElementName.getNamespaceURI(),
+                        startElementName.getLocalPart()) ;
+                    break ;
+                case XMLStreamConstants.END_ELEMENT:
+                    in.require(type, name.getNamespaceURI(), name.getLocalPart()) ;
+                    finished = true ;
+                    break ;
+                case XMLStreamConstants.CDATA:
+                case XMLStreamConstants.CHARACTERS:
+                    putValue(in, in.getText()) ;
+                    break ;
+                case XMLStreamConstants.COMMENT:
+                case XMLStreamConstants.DTD:
+                case XMLStreamConstants.ENTITY_DECLARATION:
+                case XMLStreamConstants.ENTITY_REFERENCE:
+                case XMLStreamConstants.SPACE:
+                case XMLStreamConstants.NOTATION_DECLARATION:
+                case XMLStreamConstants.PROCESSING_INSTRUCTION:
+                    // Ignore these
+                    break ;
+                case XMLStreamConstants.ATTRIBUTE:
+                case XMLStreamConstants.START_DOCUMENT:
+                case XMLStreamConstants.END_DOCUMENT:
+                case XMLStreamConstants.NAMESPACE:
+                    throw new XMLStreamException("Encountered unexpected event type: " + type) ;
+            }
+        }
+        while(!finished) ;
+    }
+    
+    /**
+     * Set the text value of this element.
+     * @param in The current input stream.
+     * @param value The text value of this element.
+     * @throws XMLStreamException For errors during parsing.
+     */
+    protected void putValue(final XMLStreamReader in, final String value)
+        throws XMLStreamException
+    {
+    }
+    
+    /**
+     * Add the attribute value.
+     * @param in The current input stream.
+     * @param attributeName The qualified attribute name.
+     * @param attributeValue The qualified attribute value.
+     * @throws XMLStreamException For errors during parsing.
+     */
+    protected void putAttribute(final XMLStreamReader in,
+        final QName attributeName, final String attributeValue)
+        throws XMLStreamException
+    {
+    }
+    
+    /**
+     * Add the element.
+     * @param in The current input stream.
+     * @param elementName The qualified element name.
+     * @throws XMLStreamException For errors during parsing.
+     */
+    protected abstract void putElement(final XMLStreamReader in,
+        final QName elementName)
+        throws XMLStreamException ;
+}

Deleted: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/internal/soa/esb/util/stax/QNameHelper.java
===================================================================
--- labs/jbossesb/tags/JBESB_4_2_1_GA_CP_IR4/product/rosetta/src/org/jboss/internal/soa/esb/util/stax/QNameHelper.java	2007-12-05 10:48:30 UTC (rev 17033)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/internal/soa/esb/util/stax/QNameHelper.java	2007-12-05 11:07:33 UTC (rev 17034)
@@ -1,99 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. 
- * See the copyright.txt 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 General Public License, v. 2.0.
- * 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 General Public License for more details.
- * You should have received a copy of the GNU General Public License,
- * v. 2.0 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
- * MA  02110-1301, USA.
- * 
- * (C) 2005-2006,
- * @author JBoss Inc.
- */
-package org.jboss.internal.soa.esb.util.stax;
-
-import javax.xml.namespace.NamespaceContext;
-import javax.xml.namespace.QName;
-
-/**
- * Helper class for manipulating QNames.
- * @author kevin
- */
-public class QNameHelper
-{
-    /**
-     * Return a qualified representation of the qname.
-     * @param qname The qname.
-     * @return The qualified name.
-     */
-    public static String toQualifiedName(final QName qname)
-    {
-        return toQualifiedName(qname.getPrefix(), qname.getLocalPart()) ;
-    }
-    
-    /**
-     * Return a qualified representation of the prefix and local name.
-     * @param prefix The prefix.
-     * @param localName The local name.
-     * @return The qualified name.
-     */
-    public static String toQualifiedName(final String prefix, final String localName)
-    {
-        if ((prefix == null) || (prefix.length() == 0))
-        {
-            return localName ;
-        }
-        else
-        {
-            return prefix + ":" + localName ;
-        }
-    }
-    
-    /**
-     * Return the qname represented by the qualified name.
-     * @param namespaceContext The namespace context.
-     * @param qualifiedName The qualified name.
-     * @return The qname.
-     */
-    public static QName toQName(final NamespaceContext namespaceContext, final String qualifiedName)
-    {
-        final int index = qualifiedName.indexOf(':') ;
-        if (index == -1)
-        {
-            return new QName(qualifiedName) ;
-        }
-        else
-        {
-            final String prefix = qualifiedName.substring(0, index) ;
-            final String localName = qualifiedName.substring(index+1) ;
-            
-            final String namespaceURI = getNormalisedValue(namespaceContext.getNamespaceURI(prefix)) ;
-            return new QName(namespaceURI, localName, prefix) ;
-        }
-    }
-
-    /**
-     * Get the normalised value of the string.
-     * @param value The string value.
-     * @return The normalised value.
-     */
-    public static String getNormalisedValue(final String value)
-    {
-        if (value == null)
-        {
-            return "" ;
-        }
-        else
-        {
-            return value ;
-        }
-    }
-}

Copied: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/internal/soa/esb/util/stax/QNameHelper.java (from rev 17033, labs/jbossesb/tags/JBESB_4_2_1_GA_CP_IR4/product/rosetta/src/org/jboss/internal/soa/esb/util/stax/QNameHelper.java)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/internal/soa/esb/util/stax/QNameHelper.java	                        (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/internal/soa/esb/util/stax/QNameHelper.java	2007-12-05 11:07:33 UTC (rev 17034)
@@ -0,0 +1,99 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. 
+ * See the copyright.txt 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 General Public License, v. 2.0.
+ * 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 General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package org.jboss.internal.soa.esb.util.stax;
+
+import javax.xml.namespace.NamespaceContext;
+import javax.xml.namespace.QName;
+
+/**
+ * Helper class for manipulating QNames.
+ * @author kevin
+ */
+public class QNameHelper
+{
+    /**
+     * Return a qualified representation of the qname.
+     * @param qname The qname.
+     * @return The qualified name.
+     */
+    public static String toQualifiedName(final QName qname)
+    {
+        return toQualifiedName(qname.getPrefix(), qname.getLocalPart()) ;
+    }
+    
+    /**
+     * Return a qualified representation of the prefix and local name.
+     * @param prefix The prefix.
+     * @param localName The local name.
+     * @return The qualified name.
+     */
+    public static String toQualifiedName(final String prefix, final String localName)
+    {
+        if ((prefix == null) || (prefix.length() == 0))
+        {
+            return localName ;
+        }
+        else
+        {
+            return prefix + ":" + localName ;
+        }
+    }
+    
+    /**
+     * Return the qname represented by the qualified name.
+     * @param namespaceContext The namespace context.
+     * @param qualifiedName The qualified name.
+     * @return The qname.
+     */
+    public static QName toQName(final NamespaceContext namespaceContext, final String qualifiedName)
+    {
+        final int index = qualifiedName.indexOf(':') ;
+        if (index == -1)
+        {
+            return new QName(qualifiedName) ;
+        }
+        else
+        {
+            final String prefix = qualifiedName.substring(0, index) ;
+            final String localName = qualifiedName.substring(index+1) ;
+            
+            final String namespaceURI = getNormalisedValue(namespaceContext.getNamespaceURI(prefix)) ;
+            return new QName(namespaceURI, localName, prefix) ;
+        }
+    }
+
+    /**
+     * Get the normalised value of the string.
+     * @param value The string value.
+     * @return The normalised value.
+     */
+    public static String getNormalisedValue(final String value)
+    {
+        if (value == null)
+        {
+            return "" ;
+        }
+        else
+        {
+            return value ;
+        }
+    }
+}

Deleted: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/internal/soa/esb/util/stax/StreamHelper.java
===================================================================
--- labs/jbossesb/tags/JBESB_4_2_1_GA_CP_IR4/product/rosetta/src/org/jboss/internal/soa/esb/util/stax/StreamHelper.java	2007-12-05 10:48:30 UTC (rev 17033)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/internal/soa/esb/util/stax/StreamHelper.java	2007-12-05 11:07:33 UTC (rev 17034)
@@ -1,366 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. 
- * See the copyright.txt 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 General Public License, v. 2.0.
- * 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 General Public License for more details.
- * You should have received a copy of the GNU General Public License,
- * v. 2.0 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
- * MA  02110-1301, USA.
- * 
- * (C) 2005-2006,
- * @author JBoss Inc.
- */
-package org.jboss.internal.soa.esb.util.stax;
-
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Set;
-
-import javax.xml.namespace.NamespaceContext;
-import javax.xml.namespace.QName;
-import javax.xml.stream.XMLStreamConstants;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamReader;
-import javax.xml.stream.XMLStreamWriter;
-
-/**
- * Helper class for Stream operations.
- * @author kevin
- */
-public class StreamHelper
-{
-    /**
-     * Pseudo namespace used to unbind a prefix.
-     */
-    private static final String UNBOUND_NAMESPACE = "http://www.jboss.com/stax/parsing/unboundnamespace" ;
-    
-    /**
-     * Write a start element with appropriate namespace declarations if necessary
-     * @param out The output stream.
-     * @param elementName The element name.
-     * @return The previous namespace if written, null otherwise.
-     * @throws XMLStreamException for errors during writing.
-     */
-    public static String writeStartElement(final XMLStreamWriter out, final QName elementName)
-        throws XMLStreamException
-    {
-        final String namespaceURI = QNameHelper.getNormalisedValue(elementName.getNamespaceURI()) ;
-        final String localName = elementName.getLocalPart() ;
-        
-        final NamespaceContext namespaceContext = out.getNamespaceContext() ;
-        final boolean writeNamespace = (namespaceContext.getPrefix(namespaceURI) == null) ;
-        
-        if (writeNamespace)
-        {
-            final String prefix = QNameHelper.getNormalisedValue(elementName.getPrefix()) ;
-            final String origNamespace = QNameHelper.getNormalisedValue(namespaceContext.getNamespaceURI(prefix)) ;
-            if (prefix.length() == 0)
-            {
-                out.setDefaultNamespace(namespaceURI) ;
-                out.writeStartElement(namespaceURI, localName) ;
-                out.writeDefaultNamespace(namespaceURI) ;
-            }
-            else
-            {
-                out.setPrefix(prefix, namespaceURI) ;
-                out.writeStartElement(namespaceURI, localName) ;
-                out.writeNamespace(prefix, namespaceURI) ;
-            }
-            return origNamespace ;
-        }
-        else
-        {
-            out.writeStartElement(namespaceURI, localName) ;
-            return null ;
-        }
-    }
-    
-    /**
-     * Write an end element removing the namespace binding if necessary
-     * @param out The output stream.
-     * @param prefix The element prefix.
-     * @param namespaceURI The previous binding for the prefix.
-     * @throws XMLStreamException for errors during writing.
-     */
-    public static void writeEndElement(final XMLStreamWriter out, final String prefix,
-        final String namespaceURI)
-        throws XMLStreamException
-    {
-        out.writeEndElement() ;
-        if (namespaceURI != null)
-        {
-            final String resetNamespace = (namespaceURI.length() == 0 ? UNBOUND_NAMESPACE : namespaceURI) ;
-            
-            if (prefix.length() == 0)
-            {
-                out.setDefaultNamespace(resetNamespace) ;
-            }
-            else
-            {
-                out.setPrefix(prefix, resetNamespace) ;
-            }
-        }
-    }
-    
-    /**
-     * Write the element to the stream.
-     * @param out The output stream.
-     * @param elementName The name of the element.
-     * @param elementContent The element contents.
-     * @throws XMLStreamException Thrown for errors during writing.
-     */
-    public static void writeElement(final XMLStreamWriter out, final QName elementName,
-        final ElementContent elementContent)
-        throws XMLStreamException
-    {
-        final String origNamespace = writeStartElement(out, elementName) ;
-        elementContent.writeContent(out) ;
-        writeEndElement(out, elementName.getPrefix(), origNamespace) ;
-    }
-
-    /**
-     * Write the attributes to the stream.
-     * @param out The output stream.
-     * @param attributes The attributes.
-     * @throws XMLStreamException Thrown for errors during writing.
-     */
-    public static void writeAttributes(final XMLStreamWriter out, final Map<QName, Object> attributes)
-        throws XMLStreamException
-    {
-        final Set<Map.Entry<QName, Object>> entrySet = attributes.entrySet() ;
-        final Iterator<Map.Entry<QName, Object>> entryIter = entrySet.iterator() ;
-        while(entryIter.hasNext())
-        {
-            final Map.Entry<QName, Object> entry = entryIter.next() ;
-            final QName name = (QName)entry.getKey() ;
-            final Object value = entry.getValue() ;
-            writeAttribute(out, name, value) ;
-        }
-    }
-    
-    /**
-     * Write the attribute to the stream.
-     * @param out The output stream.
-     * @param attributeName The attribute name.
-     * @param attributeValue The attribute value.
-     * @throws XMLStreamException Thrown for errors during writing.
-     */
-    public static void writeAttribute(final XMLStreamWriter out, final QName attributeName,
-        final Object attributeValue)
-        throws XMLStreamException
-    {
-        if (attributeValue instanceof QName)
-        {
-            writeAttribute(out, attributeName, (QName)attributeValue) ;
-        }
-        else
-        {
-            writeAttribute(out, attributeName, attributeValue.toString()) ;
-        }
-    }
-    
-    /**
-     * Write the attribute to the stream.
-     * @param out The output stream.
-     * @param attributeName The attribute name.
-     * @param attributeValue The attribute value as a QName.
-     * @throws XMLStreamException Thrown for errors during writing.
-     */
-    public static void writeAttribute(final XMLStreamWriter out, final QName attributeName,
-        final QName attributeValue)
-        throws XMLStreamException
-    {
-        final String namespaceURI = QNameHelper.getNormalisedValue(attributeValue.getNamespaceURI()) ;
-        if (namespaceURI.length() == 0)
-        {
-            writeAttribute(out, attributeName, attributeValue.getLocalPart()) ;
-        }
-        else
-        {
-            final NamespaceContext namespaceContext = out.getNamespaceContext() ;
-            final String origPrefix = namespaceContext.getPrefix(namespaceURI) ;
-            
-            if (origPrefix == null)
-            {
-                final String prefix = QNameHelper.getNormalisedValue(attributeValue.getPrefix()) ;
-                writeNamespace(out, prefix, namespaceURI) ;
-                writeAttribute(out, attributeName, QNameHelper.toQualifiedName(attributeValue)) ;
-            }
-            else
-            {
-                writeAttribute(out, attributeName, QNameHelper.toQualifiedName(origPrefix, attributeValue.getLocalPart())) ;
-            }
-        }
-    }
-    
-    /**
-     * Write the attribute to the stream.
-     * @param out The output stream.
-     * @param attributeName The attribute name.
-     * @param attributeValue The attribute value.
-     * @throws XMLStreamException Thrown for errors during writing.
-     */
-    public static void writeAttribute(final XMLStreamWriter out, final QName attributeName,
-        final String attributeValue)
-        throws XMLStreamException
-    {
-        final String namespaceURI = QNameHelper.getNormalisedValue(attributeName.getNamespaceURI()) ;
-        final String localName = attributeName.getLocalPart() ;
-        
-        if (namespaceURI.length() == 0)
-        {
-            out.writeAttribute(localName, attributeValue) ;
-        }
-        else
-        {
-            final String prefix = QNameHelper.getNormalisedValue(attributeName.getPrefix()) ;
-            writeNamespace(out, prefix, namespaceURI) ;
-            out.writeAttribute(namespaceURI, localName, attributeValue) ;
-        }
-    }
-    
-    /**
-     * Write the QName to the stream as text.
-     * @param out The output stream.
-     * @param qName The qualified name.
-     * @throws XMLStreamException Thrown for errors during writing.
-     */
-    public static void writeQualifiedName(final XMLStreamWriter out, final QName qName)
-        throws XMLStreamException
-    {
-        final String namespaceURI = QNameHelper.getNormalisedValue(qName.getNamespaceURI()) ;
-        
-        if (namespaceURI.length() == 0)
-        {
-            out.writeCharacters(QNameHelper.toQualifiedName(qName)) ;
-        }
-        else
-        {
-            final NamespaceContext namespaceContext = out.getNamespaceContext() ;
-            final String origPrefix = namespaceContext.getPrefix(namespaceURI) ;
-            
-            if (origPrefix == null)
-            {
-                final String prefix = QNameHelper.getNormalisedValue(qName.getPrefix()) ;
-                writeNamespace(out, prefix, namespaceURI) ;
-                out.writeCharacters(QNameHelper.toQualifiedName(qName)) ;
-            }
-            else
-            {
-                out.writeCharacters(QNameHelper.toQualifiedName(origPrefix, qName.getLocalPart())) ;
-            }
-        }
-    }
-    
-    /**
-     * Write the namespace if necessary.
-     * @param out The output stream.
-     * @param prefix The namespace prefix.
-     * @param namespaceURI The namespaceURI.
-     * @throws XMLStreamException Thrown for errors during writing.
-     */
-    public static void writeNamespace(final XMLStreamWriter out, final String prefix, final String namespaceURI)
-        throws XMLStreamException
-    {
-        final NamespaceContext namespaceContext = out.getNamespaceContext() ;
-            
-        final boolean writeNamespace = (namespaceContext.getPrefix(namespaceURI) == null) ;
-        if (writeNamespace)
-        {
-            out.setPrefix(prefix, namespaceURI) ;
-            out.writeNamespace(prefix, namespaceURI) ;
-        }
-    }
-
-    /**
-     * Make sure the stream is at the start of the next element.
-     * @param streamReader The current stream reader.
-     * @throws XMLStreamException For parsing errors.
-     */
-    public static void skipToNextStartElement(final XMLStreamReader streamReader)
-        throws XMLStreamException
-    {
-        if (streamReader.hasNext())
-        {
-            streamReader.nextTag() ;
-            if (streamReader.isEndElement())
-            {
-                throw new XMLStreamException("Unexpected end element: " + streamReader.getName()) ;
-            }
-        }
-        else
-        {
-            throw new XMLStreamException("Unexpected end of document reached") ;
-        }
-    }
-
-    /**
-     * Make sure the stream is at the start of an element.
-     * @param streamReader The current stream reader.
-     * @throws XMLStreamException For parsing errors.
-     */
-    public static void skipToStartElement(final XMLStreamReader streamReader)
-        throws XMLStreamException
-    {
-        while (!streamReader.isStartElement())
-        {
-            if (streamReader.hasNext())
-            {
-                streamReader.next() ;
-            }
-            else
-            {
-                throw new XMLStreamException("Unexpected end of document reached") ;
-            }
-        }
-    }
-
-    /**
-     * Check the next start tag is as expected.
-     * @param streamReader The stream reader.
-     * @param expected The expected qualified name.
-     * @throws XMLStreamException For errors during parsing.
-     */
-    public static void checkNextStartTag(final XMLStreamReader streamReader, final QName expected)
-        throws XMLStreamException
-    {
-        skipToNextStartElement(streamReader) ;
-        checkTag(streamReader, expected) ;
-    }
-    
-    /**
-     * Compare the element tag with the expected qualified name.
-     * @param streamReader The current stream reader.
-     * @param expected The expected qualified name.
-     * @throws XMLStreamException For errors during parsing.
-     */
-    public static void checkTag(final XMLStreamReader streamReader, final QName expected)
-        throws XMLStreamException
-    {
-        final QName elementName = streamReader.getName() ;
-        if (!expected.equals(elementName))
-        {
-            throw new XMLStreamException("Unexpected start element: " + elementName) ;
-        }
-    }
-
-    /**
-     * Check to see if the parent element is finished.
-     * @param streamReader The stream reader.
-     * @return true if it is finished, false otherwise.
-     * @throws XMLStreamException For errors during parsing.
-     */
-    public static boolean checkParentFinished(final XMLStreamReader streamReader)
-        throws XMLStreamException
-    {
-        return (streamReader.nextTag() == XMLStreamConstants.END_ELEMENT) ;
-    }
-}

Copied: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/internal/soa/esb/util/stax/StreamHelper.java (from rev 17033, labs/jbossesb/tags/JBESB_4_2_1_GA_CP_IR4/product/rosetta/src/org/jboss/internal/soa/esb/util/stax/StreamHelper.java)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/internal/soa/esb/util/stax/StreamHelper.java	                        (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/internal/soa/esb/util/stax/StreamHelper.java	2007-12-05 11:07:33 UTC (rev 17034)
@@ -0,0 +1,366 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. 
+ * See the copyright.txt 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 General Public License, v. 2.0.
+ * 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 General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package org.jboss.internal.soa.esb.util.stax;
+
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Set;
+
+import javax.xml.namespace.NamespaceContext;
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLStreamConstants;
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+import javax.xml.stream.XMLStreamWriter;
+
+/**
+ * Helper class for Stream operations.
+ * @author kevin
+ */
+public class StreamHelper
+{
+    /**
+     * Pseudo namespace used to unbind a prefix.
+     */
+    private static final String UNBOUND_NAMESPACE = "http://www.jboss.com/stax/parsing/unboundnamespace" ;
+    
+    /**
+     * Write a start element with appropriate namespace declarations if necessary
+     * @param out The output stream.
+     * @param elementName The element name.
+     * @return The previous namespace if written, null otherwise.
+     * @throws XMLStreamException for errors during writing.
+     */
+    public static String writeStartElement(final XMLStreamWriter out, final QName elementName)
+        throws XMLStreamException
+    {
+        final String namespaceURI = QNameHelper.getNormalisedValue(elementName.getNamespaceURI()) ;
+        final String localName = elementName.getLocalPart() ;
+        
+        final NamespaceContext namespaceContext = out.getNamespaceContext() ;
+        final boolean writeNamespace = (namespaceContext.getPrefix(namespaceURI) == null) ;
+        
+        if (writeNamespace)
+        {
+            final String prefix = QNameHelper.getNormalisedValue(elementName.getPrefix()) ;
+            final String origNamespace = QNameHelper.getNormalisedValue(namespaceContext.getNamespaceURI(prefix)) ;
+            if (prefix.length() == 0)
+            {
+                out.setDefaultNamespace(namespaceURI) ;
+                out.writeStartElement(namespaceURI, localName) ;
+                out.writeDefaultNamespace(namespaceURI) ;
+            }
+            else
+            {
+                out.setPrefix(prefix, namespaceURI) ;
+                out.writeStartElement(namespaceURI, localName) ;
+                out.writeNamespace(prefix, namespaceURI) ;
+            }
+            return origNamespace ;
+        }
+        else
+        {
+            out.writeStartElement(namespaceURI, localName) ;
+            return null ;
+        }
+    }
+    
+    /**
+     * Write an end element removing the namespace binding if necessary
+     * @param out The output stream.
+     * @param prefix The element prefix.
+     * @param namespaceURI The previous binding for the prefix.
+     * @throws XMLStreamException for errors during writing.
+     */
+    public static void writeEndElement(final XMLStreamWriter out, final String prefix,
+        final String namespaceURI)
+        throws XMLStreamException
+    {
+        out.writeEndElement() ;
+        if (namespaceURI != null)
+        {
+            final String resetNamespace = (namespaceURI.length() == 0 ? UNBOUND_NAMESPACE : namespaceURI) ;
+            
+            if (prefix.length() == 0)
+            {
+                out.setDefaultNamespace(resetNamespace) ;
+            }
+            else
+            {
+                out.setPrefix(prefix, resetNamespace) ;
+            }
+        }
+    }
+    
+    /**
+     * Write the element to the stream.
+     * @param out The output stream.
+     * @param elementName The name of the element.
+     * @param elementContent The element contents.
+     * @throws XMLStreamException Thrown for errors during writing.
+     */
+    public static void writeElement(final XMLStreamWriter out, final QName elementName,
+        final ElementContent elementContent)
+        throws XMLStreamException
+    {
+        final String origNamespace = writeStartElement(out, elementName) ;
+        elementContent.writeContent(out) ;
+        writeEndElement(out, elementName.getPrefix(), origNamespace) ;
+    }
+
+    /**
+     * Write the attributes to the stream.
+     * @param out The output stream.
+     * @param attributes The attributes.
+     * @throws XMLStreamException Thrown for errors during writing.
+     */
+    public static void writeAttributes(final XMLStreamWriter out, final Map<QName, Object> attributes)
+        throws XMLStreamException
+    {
+        final Set<Map.Entry<QName, Object>> entrySet = attributes.entrySet() ;
+        final Iterator<Map.Entry<QName, Object>> entryIter = entrySet.iterator() ;
+        while(entryIter.hasNext())
+        {
+            final Map.Entry<QName, Object> entry = entryIter.next() ;
+            final QName name = (QName)entry.getKey() ;
+            final Object value = entry.getValue() ;
+            writeAttribute(out, name, value) ;
+        }
+    }
+    
+    /**
+     * Write the attribute to the stream.
+     * @param out The output stream.
+     * @param attributeName The attribute name.
+     * @param attributeValue The attribute value.
+     * @throws XMLStreamException Thrown for errors during writing.
+     */
+    public static void writeAttribute(final XMLStreamWriter out, final QName attributeName,
+        final Object attributeValue)
+        throws XMLStreamException
+    {
+        if (attributeValue instanceof QName)
+        {
+            writeAttribute(out, attributeName, (QName)attributeValue) ;
+        }
+        else
+        {
+            writeAttribute(out, attributeName, attributeValue.toString()) ;
+        }
+    }
+    
+    /**
+     * Write the attribute to the stream.
+     * @param out The output stream.
+     * @param attributeName The attribute name.
+     * @param attributeValue The attribute value as a QName.
+     * @throws XMLStreamException Thrown for errors during writing.
+     */
+    public static void writeAttribute(final XMLStreamWriter out, final QName attributeName,
+        final QName attributeValue)
+        throws XMLStreamException
+    {
+        final String namespaceURI = QNameHelper.getNormalisedValue(attributeValue.getNamespaceURI()) ;
+        if (namespaceURI.length() == 0)
+        {
+            writeAttribute(out, attributeName, attributeValue.getLocalPart()) ;
+        }
+        else
+        {
+            final NamespaceContext namespaceContext = out.getNamespaceContext() ;
+            final String origPrefix = namespaceContext.getPrefix(namespaceURI) ;
+            
+            if (origPrefix == null)
+            {
+                final String prefix = QNameHelper.getNormalisedValue(attributeValue.getPrefix()) ;
+                writeNamespace(out, prefix, namespaceURI) ;
+                writeAttribute(out, attributeName, QNameHelper.toQualifiedName(attributeValue)) ;
+            }
+            else
+            {
+                writeAttribute(out, attributeName, QNameHelper.toQualifiedName(origPrefix, attributeValue.getLocalPart())) ;
+            }
+        }
+    }
+    
+    /**
+     * Write the attribute to the stream.
+     * @param out The output stream.
+     * @param attributeName The attribute name.
+     * @param attributeValue The attribute value.
+     * @throws XMLStreamException Thrown for errors during writing.
+     */
+    public static void writeAttribute(final XMLStreamWriter out, final QName attributeName,
+        final String attributeValue)
+        throws XMLStreamException
+    {
+        final String namespaceURI = QNameHelper.getNormalisedValue(attributeName.getNamespaceURI()) ;
+        final String localName = attributeName.getLocalPart() ;
+        
+        if (namespaceURI.length() == 0)
+        {
+            out.writeAttribute(localName, attributeValue) ;
+        }
+        else
+        {
+            final String prefix = QNameHelper.getNormalisedValue(attributeName.getPrefix()) ;
+            writeNamespace(out, prefix, namespaceURI) ;
+            out.writeAttribute(namespaceURI, localName, attributeValue) ;
+        }
+    }
+    
+    /**
+     * Write the QName to the stream as text.
+     * @param out The output stream.
+     * @param qName The qualified name.
+     * @throws XMLStreamException Thrown for errors during writing.
+     */
+    public static void writeQualifiedName(final XMLStreamWriter out, final QName qName)
+        throws XMLStreamException
+    {
+        final String namespaceURI = QNameHelper.getNormalisedValue(qName.getNamespaceURI()) ;
+        
+        if (namespaceURI.length() == 0)
+        {
+            out.writeCharacters(QNameHelper.toQualifiedName(qName)) ;
+        }
+        else
+        {
+            final NamespaceContext namespaceContext = out.getNamespaceContext() ;
+            final String origPrefix = namespaceContext.getPrefix(namespaceURI) ;
+            
+            if (origPrefix == null)
+            {
+                final String prefix = QNameHelper.getNormalisedValue(qName.getPrefix()) ;
+                writeNamespace(out, prefix, namespaceURI) ;
+                out.writeCharacters(QNameHelper.toQualifiedName(qName)) ;
+            }
+            else
+            {
+                out.writeCharacters(QNameHelper.toQualifiedName(origPrefix, qName.getLocalPart())) ;
+            }
+        }
+    }
+    
+    /**
+     * Write the namespace if necessary.
+     * @param out The output stream.
+     * @param prefix The namespace prefix.
+     * @param namespaceURI The namespaceURI.
+     * @throws XMLStreamException Thrown for errors during writing.
+     */
+    public static void writeNamespace(final XMLStreamWriter out, final String prefix, final String namespaceURI)
+        throws XMLStreamException
+    {
+        final NamespaceContext namespaceContext = out.getNamespaceContext() ;
+            
+        final boolean writeNamespace = (namespaceContext.getPrefix(namespaceURI) == null) ;
+        if (writeNamespace)
+        {
+            out.setPrefix(prefix, namespaceURI) ;
+            out.writeNamespace(prefix, namespaceURI) ;
+        }
+    }
+
+    /**
+     * Make sure the stream is at the start of the next element.
+     * @param streamReader The current stream reader.
+     * @throws XMLStreamException For parsing errors.
+     */
+    public static void skipToNextStartElement(final XMLStreamReader streamReader)
+        throws XMLStreamException
+    {
+        if (streamReader.hasNext())
+        {
+            streamReader.nextTag() ;
+            if (streamReader.isEndElement())
+            {
+                throw new XMLStreamException("Unexpected end element: " + streamReader.getName()) ;
+            }
+        }
+        else
+        {
+            throw new XMLStreamException("Unexpected end of document reached") ;
+        }
+    }
+
+    /**
+     * Make sure the stream is at the start of an element.
+     * @param streamReader The current stream reader.
+     * @throws XMLStreamException For parsing errors.
+     */
+    public static void skipToStartElement(final XMLStreamReader streamReader)
+        throws XMLStreamException
+    {
+        while (!streamReader.isStartElement())
+        {
+            if (streamReader.hasNext())
+            {
+                streamReader.next() ;
+            }
+            else
+            {
+                throw new XMLStreamException("Unexpected end of document reached") ;
+            }
+        }
+    }
+
+    /**
+     * Check the next start tag is as expected.
+     * @param streamReader The stream reader.
+     * @param expected The expected qualified name.
+     * @throws XMLStreamException For errors during parsing.
+     */
+    public static void checkNextStartTag(final XMLStreamReader streamReader, final QName expected)
+        throws XMLStreamException
+    {
+        skipToNextStartElement(streamReader) ;
+        checkTag(streamReader, expected) ;
+    }
+    
+    /**
+     * Compare the element tag with the expected qualified name.
+     * @param streamReader The current stream reader.
+     * @param expected The expected qualified name.
+     * @throws XMLStreamException For errors during parsing.
+     */
+    public static void checkTag(final XMLStreamReader streamReader, final QName expected)
+        throws XMLStreamException
+    {
+        final QName elementName = streamReader.getName() ;
+        if (!expected.equals(elementName))
+        {
+            throw new XMLStreamException("Unexpected start element: " + elementName) ;
+        }
+    }
+
+    /**
+     * Check to see if the parent element is finished.
+     * @param streamReader The stream reader.
+     * @return true if it is finished, false otherwise.
+     * @throws XMLStreamException For errors during parsing.
+     */
+    public static boolean checkParentFinished(final XMLStreamReader streamReader)
+        throws XMLStreamException
+    {
+        return (streamReader.nextTag() == XMLStreamConstants.END_ELEMENT) ;
+    }
+}

Modified: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/common/JBossESBPropertyService.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/common/JBossESBPropertyService.java	2007-12-05 10:48:30 UTC (rev 17033)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/common/JBossESBPropertyService.java	2007-12-05 11:07:33 UTC (rev 17034)
@@ -21,12 +21,19 @@
 package org.jboss.soa.esb.common;
 
 import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.InputStream;
+import java.net.URL;
 
 import javax.transaction.Status;
 import javax.transaction.TransactionManager;
 
 import org.apache.log4j.Logger;
+import org.jboss.internal.soa.esb.util.XMLHelper;
 import org.jboss.system.ServiceMBeanSupport;
+import org.jboss.system.server.ServerConfig;
+import org.jboss.system.server.ServerConfigLocator;
 import org.jboss.tm.TransactionManagerLocator;
 
 /**
@@ -36,6 +43,11 @@
 public class JBossESBPropertyService extends ServiceMBeanSupport implements JBossESBPropertyServiceMBean
 {
     /**
+     * The name of the ESB property file.
+     */
+    private static final String ESB_PROPERTY_FILE = "jbossesb-properties.xml";
+    
+    /**
      * The current property file name.
      */
     private String propertyFile ;
@@ -67,14 +79,31 @@
     {
         if (propertyFile != null)
         {
-            final File propertyFile = new File(this.propertyFile) ;
-            if (propertyFile.isAbsolute())
-            {
-                System.setProperty(Environment.PROPERTIES_FILE, "abs://" + propertyFile.getAbsolutePath());
+            final File baseFile = new File(this.propertyFile) ;
+            final InputStream xmlPropertyIS ;
+            if (!baseFile.isAbsolute()) {
+                final URL resourceURL = Thread.currentThread().getContextClassLoader().getResource(propertyFile) ;
+                xmlPropertyIS = resourceURL.openStream() ;
+            } else {
+                xmlPropertyIS = new FileInputStream(baseFile) ;
             }
-            else
-            {
-                System.setProperty(Environment.PROPERTIES_FILE, this.propertyFile);
+            
+            try {
+                final ServerConfig serverConfig = ServerConfigLocator.locate() ;
+                final File dataDir = serverConfig.getServerDataDir() ;
+                final File esbPropertyFile = new File(dataDir, ESB_PROPERTY_FILE) ;
+                
+                final FileOutputStream esbPropertyOS = new FileOutputStream(esbPropertyFile) ;
+                try {
+                    XMLHelper.replaceSystemProperties(XMLHelper.getXMLStreamReader(xmlPropertyIS),
+                        XMLHelper.getXMLStreamWriter(esbPropertyOS)) ;
+                } finally {
+                    esbPropertyOS.close() ;
+                }
+                
+                System.setProperty(Environment.PROPERTIES_FILE, "abs://" + esbPropertyFile.getAbsolutePath());
+            } finally {
+                xmlPropertyIS.close() ;
             }
         }
         // We also setup the transaction strategy here

Modified: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/listeners/config/JBoss4ESBDeployer.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/listeners/config/JBoss4ESBDeployer.java	2007-12-05 10:48:30 UTC (rev 17033)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/src/org/jboss/soa/esb/listeners/config/JBoss4ESBDeployer.java	2007-12-05 11:07:33 UTC (rev 17034)
@@ -24,6 +24,7 @@
 import java.io.File;
 import java.io.InputStream;
 import java.io.StringReader;
+import java.io.StringWriter;
 import java.net.URL;
 import java.util.HashMap;
 import java.util.HashSet;
@@ -43,6 +44,7 @@
 import org.jboss.deployment.DeploymentInfo;
 import org.jboss.deployment.SubDeployer;
 import org.jboss.deployment.SubDeployerSupport;
+import org.jboss.internal.soa.esb.util.XMLHelper;
 import org.jboss.logging.Logger;
 import org.jboss.metadata.MetaData;
 import org.jboss.metadata.XmlFileLoader;
@@ -315,9 +317,19 @@
             }
          }
 
-         InputStream inputStream = document.openStream();
-         String jbossEsbXml = Configuration.getStringFromStream(inputStream);
-         inputStream.close();
+         final InputStream inputStream = document.openStream();
+         final String jbossEsbXml ;
+         try
+         {
+             final StringWriter sw = new StringWriter() ;
+             XMLHelper.replaceSystemProperties(XMLHelper.getXMLStreamReader(inputStream),
+                 XMLHelper.getXMLStreamWriter(sw)) ;
+             jbossEsbXml = sw.toString();
+         }
+         finally
+         {
+             inputStream.close();
+         }
          
          addActionDependencies(di.shortName, jbossEsbXml, deps) ;
          

Copied: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/tests/src/org/jboss/internal/soa/esb/util/XMLHelperUnitTest.java (from rev 17033, labs/jbossesb/tags/JBESB_4_2_1_GA_CP_IR4/product/rosetta/tests/src/org/jboss/internal/soa/esb/util/XMLHelperUnitTest.java)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/tests/src/org/jboss/internal/soa/esb/util/XMLHelperUnitTest.java	                        (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/tests/src/org/jboss/internal/soa/esb/util/XMLHelperUnitTest.java	2007-12-05 11:07:33 UTC (rev 17034)
@@ -0,0 +1,67 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. 
+ * See the copyright.txt 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 General Public License, v. 2.0.
+ * 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 General Public License for more details.
+ * You should have received a copy of the GNU General Public License,
+ * v. 2.0 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package org.jboss.internal.soa.esb.util;
+
+import java.io.InputStream;
+import java.io.StringWriter;
+import java.util.Properties;
+
+import javax.xml.stream.XMLStreamReader;
+
+import org.jboss.soa.esb.testutils.StringUtils;
+
+import junit.framework.TestCase;
+
+/**
+ * Tests associated with the XML helper class.
+ * 
+ * @author <a href='mailto:kevin.conner at jboss.com'>Kevin Conner</a>
+ */
+public class XMLHelperUnitTest extends TestCase
+{
+    public void testReplaceSystemProperties()
+        throws Exception
+    {
+        final Properties props = System.getProperties() ;
+        props.setProperty("test.property.attributeValue1", " testAttributeValue1 ") ;
+        props.setProperty("test.property.attributeValue2", "testAttributeValue2") ;
+        props.setProperty("test.property.attributeValue3", "${test.property.attributeValue1}") ;
+        props.setProperty("test.property.attributeValue4", "<testAttr/>") ;
+        props.setProperty("test.property.textValue1", "testTextValue1") ;
+        props.setProperty("test.property.textValue2", "${test.property.textValue2}") ;
+        props.setProperty("test.property.textValue3", "<testText/>") ;
+        
+        final InputStream is = getClass().getResourceAsStream("replaceSystemProperties_source.xml") ;
+        final XMLStreamReader streamReader = XMLHelper.getXMLStreamReader(is) ;
+        final String encoding = streamReader.getEncoding() ;
+        
+        final StringWriter sw = new StringWriter() ;
+        
+        XMLHelper.replaceSystemProperties(streamReader,
+            XMLHelper.getXMLStreamWriter(sw)) ;
+        final String contents = sw.toString() ;
+        
+        final String expectedContents = StreamUtils.getResourceAsString("replaceSystemProperties_expected.xml", encoding) ;
+
+        final boolean match = StringUtils.compareXMLContent(expectedContents, contents) ;
+        assertTrue("System property replacement", match) ;
+    }
+}

Copied: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/tests/src/org/jboss/internal/soa/esb/util/replaceSystemProperties_expected.xml (from rev 17033, labs/jbossesb/tags/JBESB_4_2_1_GA_CP_IR4/product/rosetta/tests/src/org/jboss/internal/soa/esb/util/replaceSystemProperties_expected.xml)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/tests/src/org/jboss/internal/soa/esb/util/replaceSystemProperties_expected.xml	                        (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/tests/src/org/jboss/internal/soa/esb/util/replaceSystemProperties_expected.xml	2007-12-05 11:07:33 UTC (rev 17034)
@@ -0,0 +1,9 @@
+<?xml version='1.0' encoding='UTF-8'?><test attr=" testAttributeValue1 ">
+   testTextValue1
+   <inner xmlns="http://www.jboss.org/jbossesb/test/property-namespace" attr=" testAttributeValue2 ">
+      <inner:inner xmlns:inner="http://www.jboss.org/jbossesb/test/property-namespace2" inner:attr="${test.property.attributeValue1}" inner:attr2="&lt;testAttr/>">
+         ${test.property.textValue2}
+         &lt;testText/>
+      </inner:inner>
+   </inner>
+</test>

Copied: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/tests/src/org/jboss/internal/soa/esb/util/replaceSystemProperties_source.xml (from rev 17033, labs/jbossesb/tags/JBESB_4_2_1_GA_CP_IR4/product/rosetta/tests/src/org/jboss/internal/soa/esb/util/replaceSystemProperties_source.xml)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/tests/src/org/jboss/internal/soa/esb/util/replaceSystemProperties_source.xml	                        (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/tests/src/org/jboss/internal/soa/esb/util/replaceSystemProperties_source.xml	2007-12-05 11:07:33 UTC (rev 17034)
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<test attr="${test.property.attributeValue1}">
+   ${test.property.textValue1}
+   <inner xmlns="http://www.jboss.org/jbossesb/test/property-namespace" attr=" ${test.property.attributeValue2} ">
+      <inner:inner xmlns:inner="http://www.jboss.org/jbossesb/test/property-namespace2"
+         inner:attr="${test.property.attributeValue3}"
+         inner:attr2="${test.property.attributeValue4}">
+         ${test.property.textValue2}
+         ${test.property.textValue3}
+      </inner:inner>
+   </inner>
+</test>
\ No newline at end of file

Copied: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/tests/src/org/jboss/soa/esb/testutils/Element.java (from rev 17033, labs/jbossesb/tags/JBESB_4_2_1_GA_CP_IR4/product/rosetta/tests/src/org/jboss/soa/esb/testutils/Element.java)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/tests/src/org/jboss/soa/esb/testutils/Element.java	                        (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/tests/src/org/jboss/soa/esb/testutils/Element.java	2007-12-05 11:07:33 UTC (rev 17034)
@@ -0,0 +1,138 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.soa.esb.testutils;
+
+import java.util.ArrayList;
+import java.util.Comparator;
+import java.util.List;
+import java.util.Map;
+import java.util.TreeMap;
+
+import javax.xml.namespace.QName;
+
+import org.xml.sax.Attributes;
+
+/**
+ * Simple class representing an element.
+ * This is used to compare XML documents.
+ *
+ * @author Kevin Conner
+ */
+public class Element implements Node
+{
+    /**
+     * The QName comparator.
+     */
+    private static final Comparator<QName> QNAME_COMPARATOR = new QNameComparator() ;
+    
+    /**
+     * The name of the element.
+     */
+    private final QName name ;
+    /**
+     * Associated attributes.
+     */
+    private final Map<QName, String> attributes = new TreeMap<QName, String>(QNAME_COMPARATOR) ;
+    /**
+     * Children.
+     */
+    private final List<Node> children = new ArrayList<Node>() ;
+    
+    /**
+     * Construct the element.
+     * @param namespaceURI The namespace for the element.
+     * @param localName The local name of the element.
+     * @param attributes The associated attributes.
+     */
+    Element(final String namespaceURI, final String localName, final Attributes attributes)
+    {
+        name = new QName(namespaceURI, localName) ;
+        final int numAttributes = attributes.getLength() ;
+        for(int count = 0 ; count < numAttributes ; count++)
+        {
+            final String attrNamespaceURI = attributes.getURI(count) ;
+            final String attrLocalName = attributes.getLocalName(count) ;
+            final String attrValue = attributes.getValue(count) ;
+            
+            this.attributes.put(new QName(attrNamespaceURI, attrLocalName), attrValue) ;
+        }
+    }
+    
+    /**
+     * Add a child node.
+     * @param child The child node.
+     */
+    void addChild(final Node child)
+    {
+        children.add(child) ;
+    }
+    
+    /**
+     * Check for equality.
+     * @param obj the object to test against.
+     */
+    @Override
+    public boolean equals(final Object obj)
+    {
+        if (obj == null)
+        {
+            return false ;
+        }
+        
+        if (obj == this)
+        {
+            return true ;
+        }
+        
+        if (obj instanceof Element)
+        {
+            final Element rhs = (Element)obj ;
+            return (name.equals(rhs.name) && attributes.equals(rhs.attributes) &&
+                    children.equals(rhs.children)) ;
+        }
+        
+        return false ;
+    }
+    
+    /**
+     * The QName comparator class.
+     * @author kevin
+     */
+    private static final class QNameComparator implements Comparator<QName>
+    {
+        /**
+         * Compare the QNames.
+         * @param name1 The first QName.
+         * @param name2 The second QName.
+         * @return 
+         */
+        public int compare(final QName name1, final QName name2)
+        {
+            final int uriComparator = name1.getNamespaceURI().compareTo(name2.getNamespaceURI()) ;
+            if (uriComparator != 0)
+            {
+                return uriComparator ;
+            }
+            return name1.getLocalPart().compareTo(name2.getLocalPart());
+        }
+    }
+}

Copied: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/tests/src/org/jboss/soa/esb/testutils/IdentitySAXHandler.java (from rev 17033, labs/jbossesb/tags/JBESB_4_2_1_GA_CP_IR4/product/rosetta/tests/src/org/jboss/soa/esb/testutils/IdentitySAXHandler.java)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/tests/src/org/jboss/soa/esb/testutils/IdentitySAXHandler.java	                        (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/tests/src/org/jboss/soa/esb/testutils/IdentitySAXHandler.java	2007-12-05 11:07:33 UTC (rev 17034)
@@ -0,0 +1,138 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.soa.esb.testutils;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.xml.sax.Attributes;
+import org.xml.sax.SAXException;
+import org.xml.sax.helpers.DefaultHandler;
+
+/**
+ * Simple SAX parser creating an identity document for the incoming XML.
+ * Any leading and trailing whitespace is ignored in the document as are
+ * namespace prefixes.
+ *
+ * @author Kevin Conner
+ */
+public class IdentitySAXHandler extends DefaultHandler
+{
+    /**
+     * The root element.
+     */
+    private Element rootElement ;
+    /**
+     * The current element.
+     */
+    private Element currentElement ;
+    /**
+     * The stack of working elements.
+     */
+    private List<Element> stack = new ArrayList<Element>() ;
+    /**
+     * The current text value.
+     */
+    private StringBuilder currentText = new StringBuilder() ;
+
+    @Override
+    public void startElement(final String uri, final String localName,
+        final String name, final Attributes attributes)
+        throws SAXException
+    {
+        checkText() ;
+        
+        final Element element = new Element(uri, localName, attributes) ;
+        if (rootElement == null)
+        {
+            rootElement = element ;
+        }
+        
+        if (currentElement != null)
+        {
+            currentElement.addChild(element) ;
+            stack.add(currentElement) ;
+        }
+        currentElement = element ;
+    }
+    
+    @Override
+    public void endElement(final String uri, final String localName,
+        final String name)
+        throws SAXException
+    {
+        checkText() ;
+        
+        final int lastIndex = (stack.size() - 1) ;
+        if (lastIndex < 0)
+        {
+            currentElement = null ;
+        }
+        else
+        {
+            currentElement = stack.remove(lastIndex) ;
+        }
+    }
+    
+    @Override
+    public void characters(final char[] ch, final int start, final int length)
+        throws SAXException
+    {
+        currentText.append(ch, start, length) ;
+    }
+    
+    private void checkText()
+    {
+        final int textLength = currentText.length() ;
+        if (textLength > 0)
+        {
+            int start = 0 ;
+            while((start < textLength) && isXMLWhitespace(currentText.charAt(start)))
+            {
+                start++ ;
+            }
+            
+            int end = textLength-1 ;
+            while((end >= start) && isXMLWhitespace(currentText.charAt(end)))
+            {
+                end-- ;
+            }
+            
+            if (start <= end)
+            {
+                currentElement.addChild(new Text(currentText.substring(start, end+1))) ;
+            }
+            currentText.setLength(0) ;
+            currentText.trimToSize() ;
+        }
+    }
+    
+    private boolean isXMLWhitespace(final char ch)
+    {
+        return ((ch == ' ') || (ch == '\t') || (ch == '\r') || (ch == '\n')) ;
+    }
+    
+    public Element getRootElement()
+    {
+        return rootElement ;
+    }
+}

Copied: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/tests/src/org/jboss/soa/esb/testutils/Node.java (from rev 17033, labs/jbossesb/tags/JBESB_4_2_1_GA_CP_IR4/product/rosetta/tests/src/org/jboss/soa/esb/testutils/Node.java)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/tests/src/org/jboss/soa/esb/testutils/Node.java	                        (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/tests/src/org/jboss/soa/esb/testutils/Node.java	2007-12-05 11:07:33 UTC (rev 17034)
@@ -0,0 +1,31 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.soa.esb.testutils;
+
+/**
+ * Simple Node tagging XML nodes.
+ *
+ * @author Kevin Conner
+ */
+public interface Node
+{
+}

Modified: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/tests/src/org/jboss/soa/esb/testutils/StringUtils.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/tests/src/org/jboss/soa/esb/testutils/StringUtils.java	2007-12-05 10:48:30 UTC (rev 17033)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/tests/src/org/jboss/soa/esb/testutils/StringUtils.java	2007-12-05 11:07:33 UTC (rev 17034)
@@ -21,6 +21,16 @@
  */
 package org.jboss.soa.esb.testutils;
 
+import java.io.IOException;
+import java.io.StringReader;
+
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.parsers.SAXParser;
+import javax.xml.parsers.SAXParserFactory;
+
+import org.xml.sax.InputSource;
+import org.xml.sax.SAXException;
+
 /**
  * Utility methods for string manipulation and testing.
  * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
@@ -67,4 +77,47 @@
 		
 		return stringBuf.toString();
 	}
+	
+	/**
+	 * Compare the specified contents as XML.
+	 * @param content1 The first content.
+	 * @param content2 The second content.
+	 * @return true if equals, false otherwise.
+	 * @throws ParserConfigurationException
+	 * @throws SAXException
+	 * @throws IOException
+	 */
+        public static boolean compareXMLContent(final String content1, final String content2)
+            throws ParserConfigurationException, SAXException, IOException
+        {
+            try {
+                final SAXParserFactory parserFactory = SAXParserFactory.newInstance() ;
+                parserFactory.setNamespaceAware(true) ;
+    
+                final SAXParser parser = parserFactory.newSAXParser() ;
+                final IdentitySAXHandler handler1;
+                final IdentitySAXHandler handler2;
+    
+                try {
+                    handler1 = new IdentitySAXHandler() ;
+                    parser.parse(new InputSource(new StringReader(content1)), handler1) ;
+                } catch(SAXException e) {
+                    System.out.println("Failed to parse content1 [" + content1 + "].");
+                    throw e;
+                }
+    
+                try {
+                    handler2 = new IdentitySAXHandler() ;
+                    parser.parse(new InputSource(new StringReader(content2)), handler2) ;
+                } catch(SAXException e) {
+                    System.out.println("Failed to parse content2 [" + content2 + "].");
+                    throw e;
+                }
+    
+                return (handler1.getRootElement().equals(handler2.getRootElement())) ;
+            } catch(IOException e) {
+                e.printStackTrace();
+                throw e;
+            }
+        }
 }

Copied: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/tests/src/org/jboss/soa/esb/testutils/Text.java (from rev 17033, labs/jbossesb/tags/JBESB_4_2_1_GA_CP_IR4/product/rosetta/tests/src/org/jboss/soa/esb/testutils/Text.java)
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/tests/src/org/jboss/soa/esb/testutils/Text.java	                        (rev 0)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/rosetta/tests/src/org/jboss/soa/esb/testutils/Text.java	2007-12-05 11:07:33 UTC (rev 17034)
@@ -0,0 +1,72 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.soa.esb.testutils;
+
+
+/**
+ * Simple class representing a text element.
+ * This is used to compare XML documents.
+ *
+ * @author Kevin Conner
+ */
+public class Text implements Node
+{
+    /**
+     * The text content.
+     */
+    private final String text ;
+    
+    /**
+     * Construct the text element.
+     * @param text The text value.
+     */
+    Text(final String text)
+    {
+        this.text = text ;
+    }
+    
+    /**
+     * Check for equality.
+     * @param obj the object to test against.
+     */
+    @Override
+    public boolean equals(final Object obj)
+    {
+        if (obj == null)
+        {
+            return false ;
+        }
+        
+        if (obj == this)
+        {
+            return true ;
+        }
+        
+        if (obj instanceof Text)
+        {
+            final Text rhs = (Text)obj ;
+            return (text.equals(rhs.text)) ;
+        }
+        
+        return false ;
+    }
+}

Modified: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/trailblazer/build.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/trailblazer/build.xml	2007-12-05 10:48:30 UTC (rev 17033)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/trailblazer/build.xml	2007-12-05 11:07:33 UTC (rev 17034)
@@ -6,8 +6,6 @@
 	<property name="install.dir" value="${esb.home.dir}/install"/>
 	<property file="${install.dir}/deployment.properties"/>
 
-	<property name="org.jboss.esb.server.home" value="/jboss-4.2.0.GA"/>
-	<property name="org.jboss.esb.server.config" value="default"/>
 	<property name="trailblazer.dir" value="."/>
 
 	<!-- properties for the esb part of the trailblazer -->
@@ -39,38 +37,68 @@
 	<property environment="env" />
 
 	<property name="esb.lib.file" value="jbossesb-rosetta.jar"/>
-	<property name="soa.esb.lib.dist.dir" value="${esb.home.dir}/lib"/>
+	<property name="soa.esb.lib.dist.dir" value="${esb.home.dir}/../../lib"/>
 	<property name="soa.esb.lib.src.dir" value="../../build/jbossesb/lib"/>
+	<property name="esb.default.dir" value="../../server/default"/>
+	<property name="esb.sar.lib.dir" value="${esb.default.dir}/deploy/jbossesb.sar/lib"/>
 
+        <!-- Path to server -->
+        <available file="jbossws.sar"
+            filepath="${org.jboss.esb.server.home}/server/${org.jboss.esb.server.config}/deploy"
+            property="soa.esb.config.dir"
+            value="${org.jboss.esb.server.home}/server/${org.jboss.esb.server.config}"/>
+
+        <available file="jbossws.sar"
+           filepath="${esb.default.dir}/deploy"
+           property="soa.esb.config.dir"
+           value="${esb.default.dir}"/>
+
+	<!-- Path to ESB libs -->
 	<available file="${esb.lib.file}"
-            filepath="${soa.esb.lib.dist.dir}"
-            property="soa.esb.lib.dir"
-            value="${soa.esb.lib.dist.dir}"/>
+	    filepath="${soa.esb.config.dir}/deploy/jbossesb.sar/lib"
+	    property="soa.esb.lib.dir"
+	    value="${soa.esb.config.dir}/deploy/jbossesb.sar/lib"/>
 
-	<available file="${esb.lib.file}"
+	<!-- Path to log4j.jar -->
+	<available file="client"
+	    filepath="${org.jboss.esb.server.home}"
+	    property="log4j.lib.dir"
+ 	    value="${org.jboss.esb.server.home}/client"/>
+
+	<available file="log4j.jar"
+	    filepath="${soa.esb.lib.dist.dir}/ext"
+	    property="log4j.lib.dir"
+	    value="${soa.esb.lib.dist.dir}/ext"/>
+
+        <!-- Path to testutil.jar -->
+        <available file="test-util.jar"
             filepath="${soa.esb.lib.src.dir}"
-            property="soa.esb.lib.dir"
+            property="test.util.dir"
             value="${soa.esb.lib.src.dir}"/>
 
-	<property name="soa.esb.lib.ext.dir" value="${soa.esb.lib.dir}/ext"/>
+        <available file="test-util.jar"
+            filepath="${trailblazer.dir}/esb/lib/ext"
+            property="test.util.dir"
+            value="${trailblazer.dir}/esb/lib/ext"/>
 
 	<!-- classpath -->
 	<path id="esb.samples.trailblazer.esb.classpath">
-		<fileset dir="${soa.esb.lib.dir}/ext" includes="*.jar"/>
+		<fileset dir="${soa.esb.lib.dir}" includes="*.jar"/>
 		<fileset dir="${esb.lib.dir}/ext" includes="*.jar"/>
-		<fileset dir="${org.jboss.esb.server.home}/client" includes="jbossall-client.jar jbossws-client.jar mail.jar"/>
-		<fileset dir="${soa.esb.lib.dir}" includes="*.jar"/>
+		<fileset dir="${soa.esb.config.dir}/lib" includes="mail.jar antlr.jar"/>
 		<fileset dir="${esb.samples.trailblazer.client.lib.dir}/ext" includes="*.jar"/>
+		<fileset dir="${test.util.dir}" includes="test-util.jar"/>
+		<fileset dir="${log4j.lib.dir}" includes="log4j.jar"/>
 	</path>
 
 	<!-- classpath for running the listener-->
 	<path id="esb.samples.trailblazer.esb.classpath.run">
-		<fileset dir="${soa.esb.lib.ext.dir}"
+		<fileset dir="${soa.esb.lib.dir}"
 			includes="jaxr-api*.jar,scout*.jar,juddi*.jar"/>
 		<fileset dir="${esb.dest}/dist" includes="trailblazer-esb.jar"/>
 		<fileset dir="${esb.home.dir}/lib/ext" includes="*.jar" excludes="jaxr-api*.jar,scout*.jar,juddi*.jar"/>
-		<fileset dir="${soa.esb.lib.ext.dir}" includes="*.jar" excludes="jaxr-api*.jar,scout*.jar,juddi*.jar"/>
-		<fileset dir="${org.jboss.esb.server.home}/client" includes="jbossall-client.jar jbossws-client.jar mail.jar"/>
+		<fileset dir="${soa.esb.lib.dir}" includes="*.jar" excludes="jaxr-api*.jar,scout*.jar,juddi*.jar"/>
+		<fileset dir="${log4j.lib.dir}" includes="jbossall-client.jar jbossws-client.jar mail.jar"/>
 		<fileset dir="${soa.esb.lib.dir}" includes="*.jar"/>
 		<fileset dir="${esb.lib.dir}/ext" includes="*.jar"/>
 		<!-- for finding the jbossesb-properties.xml file -->
@@ -78,10 +106,10 @@
 	</path>
 
 	<path id="esb.samples.trailblazer.esb.classpath.client">
-		<fileset dir="${soa.esb.lib.ext.dir}"/>
+		<fileset dir="${soa.esb.lib.dir}"/>
 		<fileset dir="${esb.lib.dir}/ext" includes="*.jar"/>
-		<fileset dir="${org.jboss.esb.server.home}/client" includes="jboss-jaxrpc.jar jbossall-client.jar jbossws-client.jar mail.jar"/>
-		<fileset dir="${org.jboss.esb.server.home}/server/${org.jboss.esb.server.config}/deploy/jbossws.sar" includes="jboss-jaxrpc.jar"/>
+		<fileset dir="${log4j.lib.dir}" includes="jboss-jaxrpc.jar jbossall-client.jar jbossws-client.jar mail.jar log4j.jar"/>
+		<fileset dir="${soa.esb.config.dir}/deploy/jbossws.sar" includes="jboss-jaxrpc.jar"/>
 		<fileset dir="${soa.esb.lib.dir}" includes="*.jar"/>
 		<fileset dir="${esb.samples.trailblazer.client.lib.dir}/ext" includes="*.jar"/>
 		<fileset dir="${esb.dest}/dist" includes="trailblazer-esb.jar"/>

Modified: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/trailblazer/client/src/org/jboss/soa/esb/samples/trailblazer/loanbroker/LoanBroker.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/trailblazer/client/src/org/jboss/soa/esb/samples/trailblazer/loanbroker/LoanBroker.java	2007-12-05 10:48:30 UTC (rev 17033)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/samples/trailblazer/client/src/org/jboss/soa/esb/samples/trailblazer/loanbroker/LoanBroker.java	2007-12-05 11:07:33 UTC (rev 17034)
@@ -125,7 +125,7 @@
         }
     }
 
-    private int sendToCreditAgency(Customer customer) {d
+    private int sendToCreditAgency(Customer customer) {
         Message message = MessageFactory.getInstance().getMessage(MessageType.JBOSS_XML);
         Message replyMessage;
         int score = 0;

Modified: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/smooks/src/main/java/org/jboss/soa/esb/actions/converters/SmooksService.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/smooks/src/main/java/org/jboss/soa/esb/actions/converters/SmooksService.java	2007-12-05 10:48:30 UTC (rev 17033)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/smooks/src/main/java/org/jboss/soa/esb/actions/converters/SmooksService.java	2007-12-05 11:07:33 UTC (rev 17034)
@@ -20,19 +20,19 @@
 package org.jboss.soa.esb.actions.converters;
 
 import org.jboss.internal.soa.esb.util.PropertiesHelper;
+import org.jboss.internal.soa.esb.util.XMLHelper;
 import org.jboss.system.ServiceMBeanSupport;
 import org.jboss.system.server.ServerConfig;
 import org.jboss.system.server.ServerConfigLocator;
 import org.apache.log4j.Logger;
 
-import java.io.BufferedOutputStream;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
 import java.io.File;
 import java.io.FileInputStream;
 import java.io.FileOutputStream;
 import java.io.InputStream;
 import java.net.URL;
-import java.util.Enumeration;
-import java.util.Hashtable;
 import java.util.Properties;
 
 /**
@@ -51,20 +51,11 @@
     private static final String SMOOKS_PROPERTY_FILE = "smooks.esb.properties";
     private static final String SMOOKS_PROPERTY_FILE_COMMENTS = "Auto generated property file, do not edit" ;
 
-    private Hashtable<String, String> tokenHash;
-    
     /**
      * The smooks default property file.
      */
     private String propertyFile ;
     
-
-    public void initializeTokenHash() {
-    	tokenHash = new Hashtable<String,String>();
-        String bindAddress = System.getProperty("jboss.bind.address");
-        tokenHash.put("${jboss.bind.address}", bindAddress);
-    }
-    
     protected void startService() throws Exception {
         super.startService();
         
@@ -77,49 +68,28 @@
             } else {
                 xmlPropertyIS = new FileInputStream(baseFile) ;
             }
-            
+            final byte[] propertyFileContents ;
             try {
-                final ServerConfig serverConfig = ServerConfigLocator.locate() ;
-                final File dataDir = serverConfig.getServerDataDir() ;
-                final File smooksPropertyFile = new File(dataDir, SMOOKS_PROPERTY_FILE) ;
-                
-                final FileOutputStream smooksPropertyOS = new FileOutputStream(smooksPropertyFile) ;
-                Properties xmlProperties = null;
-                try {
-                	xmlProperties = PropertiesHelper.translateXMLToText(xmlPropertyIS, smooksPropertyOS, SMOOKS_PROPERTY_FILE_COMMENTS) ;
-                    SmooksConfiguration.setDefaultConfiguration(smooksPropertyFile.getAbsolutePath()) ;
-                    
-                } finally {
-                    smooksPropertyOS.close() ;
-                }
-                
-                // Support ${jboss.bind.address} replacement
-                initializeTokenHash(); 
-                for (Enumeration e = xmlProperties.keys(); e.hasMoreElements();) {
-                	String key = (String) e.nextElement();
-                	String value = xmlProperties.getProperty(key);
-                	for (String tokenKey : tokenHash.keySet()) {
-                		String tokenValue = tokenHash.get(tokenKey);
-                		if (value.contains(tokenKey)) {
-                			value = value.replace(tokenKey, tokenValue);
-                			xmlProperties.setProperty(key, value);
-                		}
-                	}	
-                }
-                
-                // Rewrite for token replacement
-                FileOutputStream rewritePropertyOS = new FileOutputStream(smooksPropertyFile) ;
-                try {
-                	rewritePropertyOS = new FileOutputStream(smooksPropertyFile);
-                    final BufferedOutputStream bos = new BufferedOutputStream(rewritePropertyOS) ;
-                    xmlProperties.store(bos, SMOOKS_PROPERTY_FILE_COMMENTS) ;
-                    bos.flush() ;
-                } finally {
-                	rewritePropertyOS.close();
-                }
+                final ByteArrayOutputStream baos = new ByteArrayOutputStream() ;
+                XMLHelper.replaceSystemProperties(XMLHelper.getXMLStreamReader(xmlPropertyIS),
+                    XMLHelper.getXMLStreamWriter(baos)) ;
+                propertyFileContents = baos.toByteArray() ;
             } finally {
                 xmlPropertyIS.close() ;
             }
+            
+            final ServerConfig serverConfig = ServerConfigLocator.locate() ;
+            final File dataDir = serverConfig.getServerDataDir() ;
+            final File smooksPropertyFile = new File(dataDir, SMOOKS_PROPERTY_FILE) ;
+            
+            final ByteArrayInputStream bais = new ByteArrayInputStream(propertyFileContents) ;
+            final FileOutputStream smooksPropertyOS = new FileOutputStream(smooksPropertyFile) ;
+            try {
+                PropertiesHelper.translateXMLToText(bais, smooksPropertyOS, SMOOKS_PROPERTY_FILE_COMMENTS) ;
+            } finally {
+                smooksPropertyOS.close() ;
+            }
+            SmooksConfiguration.setDefaultConfiguration(smooksPropertyFile.getAbsolutePath()) ;
         }
 
         Properties smooksEsbConfig = new SmooksConfiguration();

Modified: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/smooks/src/main/resources/smooks.esb.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/smooks/src/main/resources/smooks.esb.xml	2007-12-05 10:48:30 UTC (rev 17033)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/smooks/src/main/resources/smooks.esb.xml	2007-12-05 11:07:33 UTC (rev 17034)
@@ -9,7 +9,7 @@
     from the Transformation Admin Console.
   -->
   <!--
-  <entry key="console.url">http://localhost:8080/jboss-esb-console/transform/smooks-config.jsp</entry>
+  <entry key="console.url">http://${jboss.bind.address}:8080/jboss-esb-console/transform/smooks-config.jsp</entry>
   -->
 
   <!--
@@ -22,9 +22,9 @@
   <!--
     Context properties.
    
-    Defaults to JBoss AS on localhost.
+    Defaults to JBoss AS on ${jboss.bind.address}.
   -->
-  <entry key="java.naming.provider.url">localhost</entry>
+  <entry key="java.naming.provider.url">${jboss.bind.address}:1099</entry>
   <entry key="java.naming.factory.initial">org.jnp.interfaces.NamingContextFactory</entry>
   <!--
   <entry key="java.naming.factory.url.pkgs"></entry>

Modified: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/soap/build.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/soap/build.xml	2007-12-05 10:48:30 UTC (rev 17033)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/soap/build.xml	2007-12-05 11:07:33 UTC (rev 17034)
@@ -11,6 +11,9 @@
         <!-- JAXB Intros... -->
         <fileset dir="../../lib/ext" includes="jboss-jaxb-intros.jar"/>
 
+        <!-- StAX jars ... -->
+        <fileset dir="../../lib/ext" includes="xbean.jar stax-api-1.0.1.jar xstream-1.1.3.jar wstx-lgpl-3.2.1.jar ognl-2.6.9.jar"/>
+
         <!-- Adding the Smooks jars... -->
         <fileset dir="../smooks/lib/ext" includes="*.jar"/>
     </path>

Deleted: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/soap/lib/ext/ognl-2.6.9.jar
===================================================================
(Binary files differ)

Deleted: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/soap/lib/ext/stax-api-1.0.1.jar
===================================================================
(Binary files differ)

Deleted: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/soap/lib/ext/wstx-lgpl-3.2.1.jar
===================================================================
(Binary files differ)

Deleted: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/soap/lib/ext/xbean.jar
===================================================================
(Binary files differ)

Deleted: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/services/soap/lib/ext/xstream-1.1.3.jar
===================================================================
(Binary files differ)

Modified: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/tools/console/management/build.xml
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/tools/console/management/build.xml	2007-12-05 10:48:30 UTC (rev 17033)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/product/tools/console/management/build.xml	2007-12-05 11:07:33 UTC (rev 17034)
@@ -21,11 +21,19 @@
 			value="${esb.root.dir}/server/default/deploy/jbossesb.sar/lib">
 			<available type="dir" file="${esb.root.dir}/server/default/deploy/jbossesb.sar/lib"/>
 		</condition>	
-		
+		<condition property="server.lib.dir"
+			value="../../../server/default/lib">
+                        <available type="dir" file="../../../server/default/lib"
+/>
+                </condition>
+                <property name="server.lib.dir" value="${esb.lib.dir}"/>	
 		<path id="build.classpath">
 			<fileset dir="${esb.root.dir}/tools/console/management-web/lib">
 				<include name="*.jar"/>
 			</fileset>
+                        <fileset dir="${server.lib.dir}">
+                                <include name="*.jar"/>
+                        </fileset>
 			<fileset dir="${esb.lib.dir}">
 			<include name="*.jar"/>
 			</fileset>

Modified: labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/qa/quickstarts/src/org/jboss/soa/esb/quickstart/test/Helpers.java
===================================================================
--- labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/qa/quickstarts/src/org/jboss/soa/esb/quickstart/test/Helpers.java	2007-12-05 10:48:30 UTC (rev 17033)
+++ labs/jbossesb/workspace/platform/JBESB_4_2_1_SOA_4_2/qa/quickstarts/src/org/jboss/soa/esb/quickstart/test/Helpers.java	2007-12-05 11:07:33 UTC (rev 17034)
@@ -32,7 +32,7 @@
 import javax.xml.parsers.SAXParser;
 import javax.xml.parsers.SAXParserFactory;
 
-import org.jboss.soa.esb.quickstart.test.util.IdentitySAXHandler;
+import org.jboss.soa.esb.testutils.IdentitySAXHandler;
 import org.xml.sax.InputSource;
 import org.xml.sax.SAXException;
 




More information about the jboss-svn-commits mailing list