[jboss-svn-commits] JBL Code SVN: r15726 - in labs/jbossesb/trunk: product/rosetta/src/org/jboss/soa/esb/actions and 21 other directories.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Wed Oct 10 14:15:39 EDT 2007


Author: kevin.conner at jboss.com
Date: 2007-10-10 14:15:39 -0400 (Wed, 10 Oct 2007)
New Revision: 15726

Added:
   labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/actions/StoreMessageToFile.java
   labs/jbossesb/trunk/qa/quickstarts/
   labs/jbossesb/trunk/qa/quickstarts/build.xml
   labs/jbossesb/trunk/qa/quickstarts/jndi.properties
   labs/jbossesb/trunk/qa/quickstarts/quickstarts.properties
   labs/jbossesb/trunk/qa/quickstarts/resources/
   labs/jbossesb/trunk/qa/quickstarts/resources/jndi.properties
   labs/jbossesb/trunk/qa/quickstarts/resources/transformedmessageCSV2XML.log
   labs/jbossesb/trunk/qa/quickstarts/resources/transformedmessageDateManipulation.log
   labs/jbossesb/trunk/qa/quickstarts/resources/transformedmessageEDI2XMLGroovyXSL.log
   labs/jbossesb/trunk/qa/quickstarts/resources/transformedmessageXML2POJO.log
   labs/jbossesb/trunk/qa/quickstarts/resources/transformedmessageXML2Simple.log
   labs/jbossesb/trunk/qa/quickstarts/src/
   labs/jbossesb/trunk/qa/quickstarts/src/org/jboss/soa/esb/quickstart/test/util/
   labs/jbossesb/trunk/qa/quickstarts/src/org/jboss/soa/esb/quickstart/test/util/Element.java
   labs/jbossesb/trunk/qa/quickstarts/src/org/jboss/soa/esb/quickstart/test/util/IdentitySAXHandler.java
   labs/jbossesb/trunk/qa/quickstarts/src/org/jboss/soa/esb/quickstart/test/util/Node.java
   labs/jbossesb/trunk/qa/quickstarts/src/org/jboss/soa/esb/quickstart/test/util/Text.java
Removed:
   labs/jbossesb/trunk/product/samples/quickstarts/tests/
   labs/jbossesb/trunk/qa/quickstarts/build.xml
   labs/jbossesb/trunk/qa/quickstarts/create.sql
   labs/jbossesb/trunk/qa/quickstarts/jndi.properties
   labs/jbossesb/trunk/qa/quickstarts/quickstarts.properties
   labs/jbossesb/trunk/qa/quickstarts/src/
   labs/jbossesb/trunk/qa/quickstarts/src/org/jboss/soa/esb/quickstart/test/MoreActionTest.java
   labs/jbossesb/trunk/qa/quickstarts/src/resources/
Modified:
   labs/jbossesb/trunk/integration-build.xml
   labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/actions/SystemPrintln.java
   labs/jbossesb/trunk/product/samples/quickstarts/helloworld/jboss-esb.xml
   labs/jbossesb/trunk/product/samples/quickstarts/helloworld/src/org/jboss/soa/esb/samples/quickstart/helloworld/MyJMSListenerAction.java
   labs/jbossesb/trunk/product/samples/quickstarts/helloworld_action/jboss-esb.xml
   labs/jbossesb/trunk/product/samples/quickstarts/helloworld_action/src/org/jboss/soa/esb/samples/quickstart/helloworldaction/MyJMSListenerAction.java
   labs/jbossesb/trunk/product/samples/quickstarts/helloworld_file_action/jboss-esb-unfiltered.xml
   labs/jbossesb/trunk/product/samples/quickstarts/scripting_groovy/jboss-esb.xml
   labs/jbossesb/trunk/product/samples/quickstarts/transform_CSV2XML/jboss-esb.xml
   labs/jbossesb/trunk/product/samples/quickstarts/transform_EDI2XML_Groovy_XSLT/jboss-esb.xml
   labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2POJO/jboss-esb.xml
   labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2XML_date_manipulation/SampleOrder.xml
   labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2XML_date_manipulation/jboss-esb.xml
   labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2XML_date_manipulation/smooks-res.xml
   labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2XML_date_manipulation/src/org/jboss/soa/esb/samples/quickstart/transformxml2xmldatemanipulation/test/OrderDate.java
   labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2XML_simple/jboss-esb.xml
   labs/jbossesb/trunk/product/samples/quickstarts/wiretap/jboss-esb.xml
   labs/jbossesb/trunk/qa/build.xml
   labs/jbossesb/trunk/qa/junit/build.xml
   labs/jbossesb/trunk/qa/log4j.xml
   labs/jbossesb/trunk/qa/quickstarts/src/org/jboss/soa/esb/quickstart/test/BPMOrchestrationTest.java
   labs/jbossesb/trunk/qa/quickstarts/src/org/jboss/soa/esb/quickstart/test/DynamicRouterTest.java
   labs/jbossesb/trunk/qa/quickstarts/src/org/jboss/soa/esb/quickstart/test/FunCBRTest.java
   labs/jbossesb/trunk/qa/quickstarts/src/org/jboss/soa/esb/quickstart/test/HelloWorldActionTest.java
   labs/jbossesb/trunk/qa/quickstarts/src/org/jboss/soa/esb/quickstart/test/HelloWorldDBRegistrationTest.java
   labs/jbossesb/trunk/qa/quickstarts/src/org/jboss/soa/esb/quickstart/test/HelloWorldFileActionTest.java
   labs/jbossesb/trunk/qa/quickstarts/src/org/jboss/soa/esb/quickstart/test/HelloWorldSQLActionTest.java
   labs/jbossesb/trunk/qa/quickstarts/src/org/jboss/soa/esb/quickstart/test/HelloWorldTest.java
   labs/jbossesb/trunk/qa/quickstarts/src/org/jboss/soa/esb/quickstart/test/Helpers.java
   labs/jbossesb/trunk/qa/quickstarts/src/org/jboss/soa/esb/quickstart/test/RecipientlistTest.java
   labs/jbossesb/trunk/qa/quickstarts/src/org/jboss/soa/esb/quickstart/test/ScriptingGroovyTest.java
   labs/jbossesb/trunk/qa/quickstarts/src/org/jboss/soa/esb/quickstart/test/SimpleCBRTest.java
   labs/jbossesb/trunk/qa/quickstarts/src/org/jboss/soa/esb/quickstart/test/StaticRouterTest.java
   labs/jbossesb/trunk/qa/quickstarts/src/org/jboss/soa/esb/quickstart/test/TransformCSV2XMLTest.java
   labs/jbossesb/trunk/qa/quickstarts/src/org/jboss/soa/esb/quickstart/test/TransformDateManipulationTest.java
   labs/jbossesb/trunk/qa/quickstarts/src/org/jboss/soa/esb/quickstart/test/TransformEDI2XMLGroovyXSLTTest.java
   labs/jbossesb/trunk/qa/quickstarts/src/org/jboss/soa/esb/quickstart/test/TransformXML2PojoTest.java
   labs/jbossesb/trunk/qa/quickstarts/src/org/jboss/soa/esb/quickstart/test/TransformXMLSimpleTest.java
   labs/jbossesb/trunk/qa/quickstarts/src/org/jboss/soa/esb/quickstart/test/WebserviceAdapterTest.java
   labs/jbossesb/trunk/qa/quickstarts/src/org/jboss/soa/esb/quickstart/test/WebserviceBPELTest.java
   labs/jbossesb/trunk/qa/quickstarts/src/org/jboss/soa/esb/quickstart/test/WiretapTest.java
Log:
Integrate QSes into CI: JBESB-837

Modified: labs/jbossesb/trunk/integration-build.xml
===================================================================
--- labs/jbossesb/trunk/integration-build.xml	2007-10-10 18:02:46 UTC (rev 15725)
+++ labs/jbossesb/trunk/integration-build.xml	2007-10-10 18:15:39 UTC (rev 15726)
@@ -2,19 +2,20 @@
     <property name="clean.jms.dest" location="clean.jms"/>
 
     <target name="integration" description="Run Continuous Integration." depends="clean">
+        <!--
+         If you are adding something here then you are probably
+         in the wrong location.  This is just a wrapper for the
+         product/qa configurations.  All changes should be made
+         within those build.xml files.
+        -->
         <ant dir="product" target="ci-integration"/>
-        <!--  
-        <ant dir="product/samples/quickstarts/tests" target="qs-test"/>
-        -->
         <ant dir="qa" target="ci-test"/>
     </target>
 
     <target name="clean" description="Clean the distribution">
         <delete file="${clean.jms.dest}"/>
+        <!-- Reversed order for clean -->
+        <ant dir="qa" target="clean"/>
         <ant dir="product" target="clean"/>
-        <!--  
-        <ant dir="product/samples/quickstarts/tests" target="qs-clean"/>
-        -->
-        <ant dir="qa" target="clean"/>
     </target>
 </project>

Added: labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/actions/StoreMessageToFile.java
===================================================================
--- labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/actions/StoreMessageToFile.java	                        (rev 0)
+++ labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/actions/StoreMessageToFile.java	2007-10-10 18:15:39 UTC (rev 15726)
@@ -0,0 +1,260 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and others contributors as indicated 
+ * by the @authors tag. All rights reserved. 
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors. 
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006
+ */
+package org.jboss.soa.esb.actions;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.StringReader;
+import java.util.concurrent.locks.Lock;
+import java.util.concurrent.locks.ReentrantLock;
+
+import org.apache.log4j.Logger;
+import org.jboss.soa.esb.helpers.ConfigTree;
+import org.jboss.soa.esb.listeners.message.ActionProcessingPipeline;
+import org.jboss.soa.esb.message.Body;
+import org.jboss.soa.esb.message.Message;
+
+/**
+ * Simple action that checks to see if the message should be stored into a file.
+ * This action is primarily used for testing the quickstarts.
+ * 
+ * @author Kevin Conner
+ */
+public class StoreMessageToFile extends AbstractActionPipelineProcessor
+{
+    /**
+     * The logger for this class.
+     */
+    private static final Logger LOG =  Logger.getLogger(StoreMessageToFile.class) ;
+    
+    /**
+     * The newline string.
+     */
+    private static final String NEWLINE =  System.getProperty("line.separator") ;
+    
+    /**
+     * The lock protecting file write access.
+     */
+    private static final Lock globalLock = new ReentrantLock() ;
+    
+    /**
+     * The filename parameter.
+     */
+    public static final String FILENAME = "filename" ;
+    /**
+     * The message content location.
+     */
+    public static final String LOCATION = "location" ;
+    /**
+     * Whether it is raw or not.
+     */
+    public static final String RAW = "raw" ;
+    
+    /**
+     * The name of the filename when stored in a message property.
+     */
+    public static final String PROPERTY_JBESB_FILENAME = "jbesbfilename" ;
+    /**
+     * The start of the filename when it is embedded in the contents.
+     */
+    public static final String MESSAGE_CONTENT_FILENAME_START = "[jbesb-filename]" ;
+    /**
+     * The end of the filename when it is embedded in the contents.
+     */
+    public static final String MESSAGE_CONTENT_FILENAME_END = "[/jbesb-filename]" ;
+
+    /**
+     * Create the action with the specified configuration.
+     * 
+     * @param config The action configuration.
+     */
+    public StoreMessageToFile(final ConfigTree config)
+    {
+        filename = config.getAttribute(FILENAME) ;
+        location = config.getAttribute(LOCATION) ;
+        raw = Boolean.parseBoolean(config.getAttribute(RAW, "false")) ;
+    }
+
+    /**
+     * Process the message.
+     * 
+     * @param message The current message.
+     * @throws ActionProcessingPipeline for errors in processing.
+     */
+    public Message process(final Message message)
+        throws ActionProcessingException
+    {
+        final Body body = message.getBody() ;
+        final Object contents ;
+        if (location == null)
+        {
+            contents = body.get() ;
+        }
+        else
+        {
+            contents = body.get(location) ;
+        }
+        
+        if (contents == null)
+        {
+            LOG.debug("Message contents null") ;
+        }
+        else
+        {
+            final String messageVal ;
+            if (contents instanceof byte[])
+            {
+                messageVal = new String((byte[])contents) ;
+            }
+            else
+            {
+                messageVal = contents.toString() ;
+            }
+
+            if (LOG.isDebugEnabled())
+            {
+                LOG.debug("Message value: " + messageVal) ;
+            }
+            
+            final String storeFilename ;
+            if (filename != null)
+            {
+                storeFilename = filename ;
+            }
+            else
+            {
+                final Object jbesbfilename = message.getProperties().getProperty(PROPERTY_JBESB_FILENAME) ;
+                if (jbesbfilename != null)
+                {
+                    storeFilename = jbesbfilename.toString() ;
+                }
+                else
+                {
+                    final int startIndex = messageVal.indexOf(MESSAGE_CONTENT_FILENAME_START) ;
+                    if (startIndex != -1)
+                    {
+                        final int endIndex = messageVal.indexOf(MESSAGE_CONTENT_FILENAME_END) ;
+                        if ((endIndex != -1) && (endIndex > startIndex))
+                        {
+                            storeFilename = messageVal.substring(startIndex + MESSAGE_CONTENT_FILENAME_START.length(), endIndex) ;
+                        }
+                        else
+                        {
+                            storeFilename = null ;
+                        }
+                    }
+                    else
+                    {
+                        storeFilename = null ;
+                    }
+                }
+            }
+            
+            if (storeFilename == null)
+            {
+                LOG.debug("Store filename is null") ;
+            }
+            else
+            {
+                final File outputFile ;
+                final File storeFile = new File(storeFilename) ;
+                if (storeFile.isAbsolute())
+                {
+                    outputFile = storeFile ;
+                }
+                else
+                {
+                    final String tmpDir = System.getProperty("java.io.tmpdir") ;
+                    outputFile = new File(tmpDir, storeFilename) ;
+                }
+                try
+                {
+                    if (LOG.isDebugEnabled())
+                    {
+                        LOG.debug("Storing message in filename: " + outputFile.getCanonicalPath()) ;
+                    }
+                    
+                    globalLock.lock() ;
+                    try
+                    {
+                        final FileWriter fw = new FileWriter(outputFile, true) ;
+                        try
+                        {
+                            if (raw)
+                            {
+                                fw.write(messageVal) ;
+                            }
+                            else
+                            {
+                                // We put everything on one line due to the limitations of the test helper class
+                                final StringReader sr = new StringReader(messageVal) ;
+                                final BufferedReader br = new BufferedReader(sr) ;
+                                while(true)
+                                {
+                                    final String line = br.readLine();
+                                    if (line == null)
+                                    {
+                                        break ;
+                                    }
+                                    fw.write(line) ;
+                                }
+                                fw.write(NEWLINE) ;
+                            }
+                            fw.flush();
+                        }
+                        finally
+                        {
+                            try
+                            {
+                                fw.close() ;
+                            }
+                            catch(final Throwable th) {} // ignore
+                        }
+                    }
+                    finally
+                    {
+                        globalLock.unlock() ;
+                    }
+                }
+                catch (final IOException ioe)
+                {
+                    LOG.warn("Error accessing file", ioe) ;
+                }
+            }
+        }
+        
+        return message;
+    }
+
+    /**
+     * The filename to create.
+     */
+    private final String filename ;
+    /**
+     * The location of the message.
+     */
+    private final String location ;
+    /**
+     * True if we output the raw contents.
+     */
+    private final boolean raw ;
+}


Property changes on: labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/actions/StoreMessageToFile.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/actions/SystemPrintln.java
===================================================================
--- labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/actions/SystemPrintln.java	2007-10-10 18:02:46 UTC (rev 15725)
+++ labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/actions/SystemPrintln.java	2007-10-10 18:15:39 UTC (rev 15726)
@@ -39,7 +39,6 @@
 	public static final String PRE_MESSAGE = "message";
 	public static final String FULL_MESSAGE = "printfull";
 	public static final String PRINT_STREAM = "outputstream";
-    public static final String TMP_FILE = "tmpFile";
     public static final String DEFAULT_PRE_MESSAGE = "Message structure";
     
     private Logger log = Logger.getLogger(this.getClass());
@@ -112,34 +111,6 @@
 				}
 			}
 		}
-        
-		String filename = null;
-        //write the file out to a tmp dir
-        if (messageStr!=null && messageStr.contains("[jbesb-filename]")) {
-            int start = messageStr.indexOf("[jbesb-filename]") + 16;
-            int end   = messageStr.indexOf("[/jbesb-filename]");
-            filename = messageStr.substring(start, end);
-
-        } else if (messageStr != null && message.getProperties().getProperty("jbesbfilename") != null) {
-        	filename = (String) message.getProperties().getProperty("jbesbfilename");
-        }
-        
-        if (filename != null) {
-        	String tmpDir="";
-	        if (!filename.startsWith(File.separator)) {
-	            tmpDir = System.getProperty("java.io.tmpdir") + File.separator;
-	        }
-	        stream.println("Writing " + tmpDir + filename);
-	        File file = new File(tmpDir + filename);
-	        try {
-	            FileOutputStream outputStream = new FileOutputStream(file, true);
-	            outputStream.write(messageStr.getBytes());
-	            outputStream.close();
-	        } catch (Exception e) {
-	            log.error("Can not write to file " + file.getPath());
-	            log.error(e.getMessage(), e);
-	        }
-        }
 		return message;
 	}
 

Modified: labs/jbossesb/trunk/product/samples/quickstarts/helloworld/jboss-esb.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/helloworld/jboss-esb.xml	2007-10-10 18:02:46 UTC (rev 15725)
+++ labs/jbossesb/trunk/product/samples/quickstarts/helloworld/jboss-esb.xml	2007-10-10 18:15:39 UTC (rev 15726)
@@ -46,6 +46,7 @@
                     <action name="action2" class="org.jboss.soa.esb.actions.SystemPrintln">
                       <property name="printfull" value="true"/>
                     </action>
+                    <action name="testStore" class="org.jboss.soa.esb.actions.StoreMessageToFile"/>
             </actions>
         </service>
       </services>

Modified: labs/jbossesb/trunk/product/samples/quickstarts/helloworld/src/org/jboss/soa/esb/samples/quickstart/helloworld/MyJMSListenerAction.java
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/helloworld/src/org/jboss/soa/esb/samples/quickstart/helloworld/MyJMSListenerAction.java	2007-10-10 18:02:46 UTC (rev 15725)
+++ labs/jbossesb/trunk/product/samples/quickstarts/helloworld/src/org/jboss/soa/esb/samples/quickstart/helloworld/MyJMSListenerAction.java	2007-10-10 18:15:39 UTC (rev 15726)
@@ -35,7 +35,7 @@
   public Message displayMessage(Message message) throws Exception{
 		
 		  System.out.println("&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&");		  		  
-		  System.out.println("Body: " + new String(message.getBody().getByteArray()));
+		  System.out.println("Body: " + message.getBody().get().toString()) ;
 		  System.out.println("&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&");
 		  return message; 
         		

Modified: labs/jbossesb/trunk/product/samples/quickstarts/helloworld_action/jboss-esb.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/helloworld_action/jboss-esb.xml	2007-10-10 18:02:46 UTC (rev 15725)
+++ labs/jbossesb/trunk/product/samples/quickstarts/helloworld_action/jboss-esb.xml	2007-10-10 18:15:39 UTC (rev 15726)
@@ -51,6 +51,7 @@
   	               
                		<property name="exceptionMethod" value="exceptionHandler"/>
   			   </action>
+                    <action name="testStore" class="org.jboss.soa.esb.actions.StoreMessageToFile"/>
                <action name="notificationAction" 
                		class="org.jboss.soa.esb.actions.Notifier">
                		<property name="okMethod" value="notifyOK" />

Modified: labs/jbossesb/trunk/product/samples/quickstarts/helloworld_action/src/org/jboss/soa/esb/samples/quickstart/helloworldaction/MyJMSListenerAction.java
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/helloworld_action/src/org/jboss/soa/esb/samples/quickstart/helloworldaction/MyJMSListenerAction.java	2007-10-10 18:02:46 UTC (rev 15725)
+++ labs/jbossesb/trunk/product/samples/quickstarts/helloworld_action/src/org/jboss/soa/esb/samples/quickstart/helloworldaction/MyJMSListenerAction.java	2007-10-10 18:15:39 UTC (rev 15726)
@@ -36,7 +36,7 @@
 
   public Message displayMessage(Message message) throws Exception{		
 		  logHeader();
-		  System.out.println("Body: " + new String(message.getBody().getByteArray()));
+		  System.out.println("Body: " + message.getBody().get().toString());
 		  logFooter();
 		  return message;         	
 	}
@@ -46,12 +46,12 @@
 	   Body msgBody = message.getBody();
 //	   Call theCall = msgHeader.getCall();
 //	   EPR theEpr = theCall.getFrom();
-	   String contents = new String(msgBody.getByteArray());
+	   String contents = msgBody.get().toString();
 	   StringBuffer sb = new StringBuffer();
 	   sb.append("\nBEFORE**\n");
 	   sb.append(contents);
 	   sb.append("\nAFTER**\n");
-	   msgBody.setByteArray(sb.toString().getBytes());
+	   msgBody.add(sb.toString());
 	   return message;
    }
    
@@ -60,7 +60,7 @@
 	   System.out.println("!ERROR!");
 	   System.out.println(exception.getMessage());
 	   System.out.println("For Message: ");
-	   System.out.println(message.getBody().getByteArray());
+	   System.out.println(message.getBody().get());
 	   logFooter();
    }
 	

Modified: labs/jbossesb/trunk/product/samples/quickstarts/helloworld_file_action/jboss-esb-unfiltered.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/helloworld_file_action/jboss-esb-unfiltered.xml	2007-10-10 18:02:46 UTC (rev 15725)
+++ labs/jbossesb/trunk/product/samples/quickstarts/helloworld_file_action/jboss-esb-unfiltered.xml	2007-10-10 18:15:39 UTC (rev 15726)
@@ -61,6 +61,9 @@
                    	<action name="dump" class="org.jboss.soa.esb.actions.SystemPrintln">
                    		<property name="printfull" value="true"/>
                    	</action>
+                   	<action name="testStore" class="org.jboss.soa.esb.actions.StoreMessageToFile">
+                   	    <property name="location" value="org.jboss.soa.esb.message.content.bytes"/>
+                   	</action>
             </actions>
         </service>
       </services>

Modified: labs/jbossesb/trunk/product/samples/quickstarts/scripting_groovy/jboss-esb.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/scripting_groovy/jboss-esb.xml	2007-10-10 18:02:46 UTC (rev 15725)
+++ labs/jbossesb/trunk/product/samples/quickstarts/scripting_groovy/jboss-esb.xml	2007-10-10 18:15:39 UTC (rev 15726)
@@ -50,6 +50,7 @@
 			   <action name="groovyMessagePlay" class="org.jboss.soa.esb.actions.scripting.GroovyActionProcessor">
 				    <property name="script" value="/scripts/messagePlay.groovy" />
 			   </action>			   
+			   <action name="testStore" class="org.jboss.soa.esb.actions.StoreMessageToFile"/>
             </actions>
         </service>
       </services>

Modified: labs/jbossesb/trunk/product/samples/quickstarts/transform_CSV2XML/jboss-esb.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/transform_CSV2XML/jboss-esb.xml	2007-10-10 18:02:46 UTC (rev 15725)
+++ labs/jbossesb/trunk/product/samples/quickstarts/transform_CSV2XML/jboss-esb.xml	2007-10-10 18:15:39 UTC (rev 15726)
@@ -63,6 +63,9 @@
 					<action name="print-after-xml-transform" class="org.jboss.soa.esb.actions.SystemPrintln">
 			            <property name="message" value=">>>> Message after Smooks intermediate xml -> target xml : " />
 				 </action>	
+	                    <action name="testStore" class="org.jboss.soa.esb.actions.StoreMessageToFile">
+	                        <property name="raw" value="true"/>
+			    </action>
 			</actions>
 				
 		</service>

Modified: labs/jbossesb/trunk/product/samples/quickstarts/transform_EDI2XML_Groovy_XSLT/jboss-esb.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/transform_EDI2XML_Groovy_XSLT/jboss-esb.xml	2007-10-10 18:02:46 UTC (rev 15725)
+++ labs/jbossesb/trunk/product/samples/quickstarts/transform_EDI2XML_Groovy_XSLT/jboss-esb.xml	2007-10-10 18:15:39 UTC (rev 15726)
@@ -36,6 +36,9 @@
 				<action name="print-after" class="org.jboss.soa.esb.actions.SystemPrintln">
 					<property name="message" value="[transform_EDI2XML_Groovy_XSLT] Message after transformation" />
 				</action>
+				<action name="testStore" class="org.jboss.soa.esb.actions.StoreMessageToFile">
+					<property name="raw" value="true"/>
+				</action>
 			</actions>
 		</service>
 	</services>

Modified: labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2POJO/jboss-esb.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2POJO/jboss-esb.xml	2007-10-10 18:02:46 UTC (rev 15725)
+++ labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2POJO/jboss-esb.xml	2007-10-10 18:15:39 UTC (rev 15726)
@@ -55,6 +55,9 @@
 		<action name="println-xml2pojo" class="org.jboss.soa.esb.actions.SystemPrintln">
 			<property name="message" value=">>>> Message after Smooks intermediate xml -> target xml : " />
 		</action>           	   
+		<action name="testStore" class="org.jboss.soa.esb.actions.StoreMessageToFile">
+		    <property name="raw" value="true"/>
+		</action>
             </actions>
         </service>
       </services>

Modified: labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2XML_date_manipulation/SampleOrder.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2XML_date_manipulation/SampleOrder.xml	2007-10-10 18:02:46 UTC (rev 15725)
+++ labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2XML_date_manipulation/SampleOrder.xml	2007-10-10 18:15:39 UTC (rev 15726)
@@ -1,4 +1,4 @@
-<Order orderId="1" orderDate="Wed Nov 15 13:45:28 EST 2006" statusCode="0" netAmount="59.97" totalAmount="64.92" tax="4.95">
+<Order orderId="1" orderDate="Wed Nov 15 13:45:28 2006" statusCode="0" netAmount="59.97" totalAmount="64.92" tax="4.95">
 	<Customer userName="user1" firstName="Harry" lastName="Fletcher" state="SD"/>
 	<OrderLines>
 		<OrderLine position="1" quantity="1">

Modified: labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2XML_date_manipulation/jboss-esb.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2XML_date_manipulation/jboss-esb.xml	2007-10-10 18:02:46 UTC (rev 15725)
+++ labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2XML_date_manipulation/jboss-esb.xml	2007-10-10 18:15:39 UTC (rev 15726)
@@ -38,6 +38,9 @@
                     <property name="message"
                               value="[transform_XML2XML_date_manipulation] Message after transformation"/>
                 </action>
+                <action name="testStore" class="org.jboss.soa.esb.actions.StoreMessageToFile">
+                    <property name="raw" value="true"/>
+                </action>
             </actions>
         </service>
     </services>

Modified: labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2XML_date_manipulation/smooks-res.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2XML_date_manipulation/smooks-res.xml	2007-10-10 18:02:46 UTC (rev 15725)
+++ labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2XML_date_manipulation/smooks-res.xml	2007-10-10 18:15:39 UTC (rev 15726)
@@ -16,7 +16,7 @@
 	
     <resource-config selector="decoder:LongDate">
         <resource>org.milyn.javabean.decoders.DateDecoder</resource>
-        <param name="format">EEE MMM dd HH:mm:ss z yyyy</param>
+        <param name="format">EEE MMM dd HH:mm:ss yyyy</param>
     </resource-config>
 
     <!--
@@ -27,7 +27,6 @@
         <resource type="xsl"><![CDATA[<OrderDate>
                <day><smooks-bean:select ognl="orderDate.day"/></day>
                <time><smooks-bean:select ognl="orderDate.time"/></time>
-               <zone><smooks-bean:select ognl="orderDate.zone"/></zone>
                <month><smooks-bean:select ognl="orderDate.month"/></month>
                <year><smooks-bean:select ognl="orderDate.year"/></year>
             </OrderDate>]]></resource>

Modified: labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2XML_date_manipulation/src/org/jboss/soa/esb/samples/quickstart/transformxml2xmldatemanipulation/test/OrderDate.java
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2XML_date_manipulation/src/org/jboss/soa/esb/samples/quickstart/transformxml2xmldatemanipulation/test/OrderDate.java	2007-10-10 18:02:46 UTC (rev 15725)
+++ labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2XML_date_manipulation/src/org/jboss/soa/esb/samples/quickstart/transformxml2xmldatemanipulation/test/OrderDate.java	2007-10-10 18:15:39 UTC (rev 15726)
@@ -36,12 +36,14 @@
 	
 	/**
 	 * Formatters for encoding the date in the transformation.
+	 * N.B. These are not thread safe.
+	 * 
+	 * TimeZone information has been removed to allow for consistent testing.
 	 */
 	private static SimpleDateFormat dayFormat = new SimpleDateFormat("dd");
 	private static SimpleDateFormat timeFormat = new SimpleDateFormat("HH:mm");
 	private static SimpleDateFormat monthFormat = new SimpleDateFormat("MM");
 	private static SimpleDateFormat yearFormat = new SimpleDateFormat("yy");
-	private static SimpleDateFormat timezoneFormat = new SimpleDateFormat("Z");
 	
 	public void setOrderDate(Date orderDate) {
         this.orderDate = orderDate;
@@ -61,7 +63,4 @@
 	public String getYear() {
 		return yearFormat.format(orderDate.getTime());
 	}
-	public String getZone() {
-		return timezoneFormat.format(orderDate.getTime());
-	}	
 }

Modified: labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2XML_simple/jboss-esb.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2XML_simple/jboss-esb.xml	2007-10-10 18:02:46 UTC (rev 15725)
+++ labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2XML_simple/jboss-esb.xml	2007-10-10 18:15:39 UTC (rev 15726)
@@ -36,6 +36,9 @@
 				<action name="print-after" class="org.jboss.soa.esb.actions.SystemPrintln">
 					<property name="message" value="[transform_XML2XML_simple] Message after transformation" />
 				</action>
+				<action name="testStore" class="org.jboss.soa.esb.actions.StoreMessageToFile">
+					<property name="raw" value="true"/>
+				</action>
 			</actions>
 		</service>
 	</services>

Modified: labs/jbossesb/trunk/product/samples/quickstarts/wiretap/jboss-esb.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/wiretap/jboss-esb.xml	2007-10-10 18:02:46 UTC (rev 15725)
+++ labs/jbossesb/trunk/product/samples/quickstarts/wiretap/jboss-esb.xml	2007-10-10 18:15:39 UTC (rev 15726)
@@ -79,6 +79,7 @@
                        </NotificationList>
                     </property>
                 </action>                                       
+            <action name="testStore" class="org.jboss.soa.esb.actions.StoreMessageToFile" /> 
             </actions>   
         </service>
 
@@ -101,6 +102,7 @@
                    </NotificationList>
                 </property>
             </action>
+            <action name="testStore" class="org.jboss.soa.esb.actions.StoreMessageToFile" /> 
                           
             </actions>
         </service>

Modified: labs/jbossesb/trunk/qa/build.xml
===================================================================
--- labs/jbossesb/trunk/qa/build.xml	2007-10-10 18:02:46 UTC (rev 15725)
+++ labs/jbossesb/trunk/qa/build.xml	2007-10-10 18:15:39 UTC (rev 15726)
@@ -16,6 +16,7 @@
 	<property file="${org.jboss.esb.properties}"/>
 	
 	<property file="test.properties" />
+	<property name="org.jboss.esb.test.quickstarts.dir" location="${product.dir}/build/jbossesb/samples/quickstarts"/>
 
 	<property name="junit.jar" location="lib/ext/junit-4.1.jar"/>
 	<macrodef name="runant">
@@ -57,26 +58,24 @@
 	
 	<target name="test.junit" depends="esb.init" description="Run JUnit based QA tests.">
 		<ant dir="junit" target="test" />
+		<ant dir="quickstarts" target="all-test" />
 	</target>
 
 	<target name="ci-test.junit" depends="esb.init" description="Run JUnit based QA tests.">
-        <ant dir="junit" target="ci-test" />
+		<ant dir="junit" target="ci-test" />
+		<ant dir="quickstarts" target="ci-test" />
 	</target>
 
 	<target name="clean" description="Clean the QA env">
 		<echo message="Cleaning..."/>
 		
 		<delete dir="${basedir}/build" />
-		<delete>
-                    <fileset dir="." includes="qatests.log unittest.log"/>
-		</delete>
-                <!-- hardcoded in at least one test -->
-		<delete dir="${basedir}/product" />
+		<ant dir="quickstarts" target="ci-clean" />
 	</target>
 	
 	<target name="start-server" depends="esb.setup-esb">
 		<echo>server ${org.jboss.esb.server.home} ${org.jboss.esb.test.server.config}</echo>
-        <start-server serverHome="${org.jboss.esb.server.home}"
+		<start-server serverHome="${org.jboss.esb.server.home}"
 			serverConfig="${org.jboss.esb.test.server.config}"/>
 		<wait-on-server/>
 	</target>

Modified: labs/jbossesb/trunk/qa/junit/build.xml
===================================================================
--- labs/jbossesb/trunk/qa/junit/build.xml	2007-10-10 18:02:46 UTC (rev 15725)
+++ labs/jbossesb/trunk/qa/junit/build.xml	2007-10-10 18:15:39 UTC (rev 15726)
@@ -140,7 +140,6 @@
              fork="true">
 
          <sysproperty key="jbosstest.deploy.dir" value="${qa.build.lib}"/>
-         <sysproperty key="build.testlog" value="${qa.build.testlog}"/>
          <sysproperty key="jbosstest.threadcount" value="${jbosstest.threadcount}"/>
          <sysproperty key="jbosstest.iterationcount" value="${jbosstest.iterationcount}"/>
          <sysproperty key="jbosstest.beancount" value="${jbosstest.beancount}"/>
@@ -221,7 +220,6 @@
          <jvmarg value="-Xmx${qa.junit.memory}"/>
 
       	 <sysproperty key="jbosstest.deploy.dir" value="${qa.build.lib}"/>
-         <sysproperty key="build.testlog" value="${qa.build.testlog}"/>
          <sysproperty key="jbosstest.threadcount" value="${jbosstest.threadcount}"/>
          <sysproperty key="jbosstest.iterationcount" value="${jbosstest.iterationcount}"/>
          <sysproperty key="jbosstest.beancount" value="${jbosstest.beancount}"/>
@@ -235,10 +233,6 @@
          <sysproperty key="org.jboss.soa.esb.jndi.server.url" value="${org.jboss.soa.esb.jndi.server.url}"/>
 
          <!-- Sys Props from the deployment.properties file... -->
-         <sysproperty key="org.jboss.esb.db.driver" value="${org.jboss.esb.db.driver}"/>
-         <sysproperty key="org.jboss.esb.db.url" value="${org.jboss.esb.db.url}"/>
-         <sysproperty key="org.jboss.esb.db.user" value="${org.jboss.esb.db.user}"/>
-         <sysproperty key="org.jboss.esb.db.password" value="${org.jboss.esb.db.password}"/>
          <sysproperty key="org.jboss.esb.test.ftp.hostname" value="${org.jboss.esb.test.ftp.hostname}"/>
          <sysproperty key="org.jboss.esb.test.ftp.user" value="${org.jboss.esb.test.ftp.user}"/>
          <sysproperty key="org.jboss.esb.test.ftp.pwd" value="${org.jboss.esb.test.ftp.pwd}"/>
@@ -246,11 +240,6 @@
 
       </junit>
 
-      <!-- Remove all "fixed-up" listener configuration files -->
-      <delete>
-         <fileset dir="${qa.junit.src}" includes="**/*.conftmp"/>
-      </delete>
-
       <!-- Report on the tests (format results) ... -->
       <junitreport todir="${qa.junit.report}">
          <fileset dir="${qa.junit.report}">
@@ -318,11 +307,6 @@
          <sysproperty key="org.jboss.esb.db.password" value="${org.jboss.esb.db.password}"/>
       </junit>
 
-      <!-- Remove all "fixed-up" listener configuration files -->
-      <delete>
-         <fileset dir="${qa.junit.src}" includes="**/*.conftmp"/>
-      </delete>
-
       <!-- Report on the tests (format results) ... -->
       <junitreport todir="${qa.junit.report}">
          <fileset dir="${qa.junit.report}">

Modified: labs/jbossesb/trunk/qa/log4j.xml
===================================================================
--- labs/jbossesb/trunk/qa/log4j.xml	2007-10-10 18:02:46 UTC (rev 15725)
+++ labs/jbossesb/trunk/qa/log4j.xml	2007-10-10 18:15:39 UTC (rev 15726)
@@ -37,7 +37,7 @@
    <!-- A size based file rolling appender -->
    <appender name="FILE" class="org.jboss.logging.appender.RollingFileAppender">
      <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
-     <param name="File" value="build/logs/qatests.log"/>
+     <param name="File" value="../build/logs/qatests.log"/>
      <param name="Append" value="false"/>
      <param name="MaxFileSize" value="500KB"/>
      <param name="MaxBackupIndex" value="1"/>

Copied: labs/jbossesb/trunk/qa/quickstarts (from rev 15230, labs/jbossesb/trunk/product/samples/quickstarts/tests)

Deleted: labs/jbossesb/trunk/qa/quickstarts/build.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/tests/build.xml	2007-09-19 09:27:53 UTC (rev 15230)
+++ labs/jbossesb/trunk/qa/quickstarts/build.xml	2007-10-10 18:15:39 UTC (rev 15726)
@@ -1,451 +0,0 @@
-<?xml version="1.0"?>
-<project name="JUnit" default="test" basedir=".">
-   <property file="jndi.properties"/>
-   <property name="ant.file.esb-config" location="../../../" />
-   <property file="quickstarts.properties"/>
-   <import file="../../../esb-config.xml"/>
-	
-   <property name="lib.ext" location="../../../lib/ext"/>
-   <property name="product.build" location="../../../build"/>
-   <property name="product.lib" location="${product.build}/jbossesb/lib"/>
-   <property name="coverage" location="${product.build}/tests/coverage"/>
-   <property name="qa.build" location="../build"/>
-   <property name="qa.build.lib" location="../build/lib"/>
-   <property name="qa.build.reports" location="../build/reports"/>
-   <property name="qa.build.testlog" location="../build/log"/>
-   <property name="qa.lib" location="../../../../qa/lib"/>
-   <property name="qa.build.stylesheets" location="${qa.build}/stylesheets"/>
-   <property name="qa.source.stylesheets" location="../stylesheets"/>
-   <property name="qa.junit.src" location="src"/>
-   <property name="qa.junit.versioned.src" location="versioned-scoped-src"/>
-   <property name="qa.junit.classes" location="${qa.build}/junit/classes"/>
-   <property name="qa.junit.versioned.classes" location="${qa.build}/junit/versioned-classes"/>
-   <property name="qa.junit.resources" location="resources"/>
-   <property name="qa.junit.report" location="${qa.build}/junit/report"/>
-   <property name="qa.junit.memory" value="128m"/>
-
-   <property file="${org.jboss.esb.properties}"/>
-   <property name="org.jboss.esb.test.ftp.hostname" value="ftp.ncl.ac.uk"/>
-   <property name="org.jboss.esb.test.ftp.user" value="anonymous"/>
-   <property name="org.jboss.esb.test.ftp.pwd" value="cunningt@"/>
-   <property name="org.jboss.esb.test.ftp.dir" value="/pub/DNS"/>
-
-	<property name="junit.jar" location="${lib.ext}/junit-4.1.jar"/>
-	<macrodef name="runant">
-		<attribute name="target"/>
-		<attribute name="failonerror" default="true"/>
-		<attribute name="resultproperty" default="product.java.resultproperty"/>
-		<sequential>
-			<java classname="org.apache.tools.ant.launch.Launcher"
-			    classpath="${ant.library.dir}/ant-launcher.jar"
-			    fork="true" failonerror="@{failonerror}"
-				resultproperty="@{resultproperty}">
-				<sysproperty key="ant.home" value="${ant.home}"/>
-				<sysproperty key="ant.library.dir" value="${ant.library.dir}"/>
-	                        <sysproperty key="org.jboss.esb.properties" value="${org.jboss.esb.properties}"/>
-				<arg value="-cp"/>
-				<arg value="${junit.jar}"/>
-				<arg value="-f"/>
-				<arg value="${ant.file}"/>
-				<arg value="@{target}"/>
-			</java>
-		</sequential>
-	</macrodef>
-	
-   <path id="base.cp">
-      <fileset dir="${qa.lib}/ext" includes="*.jar"/>
-      <fileset dir="${product.lib}/ext" includes="*.jar"/>
-      <pathelement location="../"/>
-   </path>
-
-   <path id="qa.junit.cp">
-      <fileset dir="..">
-	<include name="**/*.jar"/>
-      </fileset> 
-      <dirset dir="..">
-	<include name="*/build/classes/"/>
-      </dirset>
-      <fileset dir="${lib.ext}" includes="*.jar"/>
-      <fileset dir="${product.lib}" includes="*.jar"/>
-      <path refid="base.cp"/>
-   </path>
-
-   <path id="qa.junit.emma.cp">
-      <fileset dir="${coverage}/all" includes="jbossesb-instr-all.jar"/>
-      <path refid="base.cp"/>
-   </path>
-
-   <target name="clean" depends="clean-esb">
-      <delete dir="build"/>
-      <delete dir="output"/>
-   </target>
-
-   <target name="dropdb" 
-            description="drop database">
-        <echo>Drop database</echo>
-            <exec executable="mysql" >
-                    <arg value="--user=root" />
-                    <arg value="--password=" />
-                    <arg value="--execute=drop database test_sql_gateway" />
-            </exec>
-      </target>
-
-    <target name="createdb"
-            description="createdb">
-        <echo>Create database and test table</echo>
-            <exec executable="mysql" input="create.sql" >
-                    <arg value="--user=root" />
-                    <arg value="--password=" />
-            </exec>
-      </target>
-
-   <target name="test" depends="compile, prompt, execute"/>
-	
-   <target name="all-test" depends="compile, execute"/>
-	
-	<target name="qs-test">
-	    <echo>Running quickstart tests</echo>
-		<antcall target="ci-test"/>
-	</target>
-	
-	<target name="qs-clean">
-			<antcall target="clean"/>
-		</target>
-	
-	<target name="ci-test" description="run integration tests">
-		<antcall target="start-server"/>
-		<runant target="all-test"
-			failonerror="false" resultproperty="qs.product.resultproperty"/>
-		<antcall target="stop-server"/>
-	
-		<condition property="qs.product.tests.failed">
-			<not>
-				<equals arg1="0" arg2="${qs.product.resultproperty}"/>
-			</not>
-		</condition>
-	    <fail if="qs.product.tests.failed" message="Product Quick Start Test failure"/>
-	</target>
-	
-	<target name="start-server" depends="esb.setup-esb">
-		<echo>server: ${org.jboss.esb.server.home}/server/${org.jboss.esb.test.server.config}</echo>
-		<start-server serverHome="${org.jboss.esb.server.home}"
-			serverConfig="${org.jboss.esb.test.server.config}"/>
-		<wait-on-server/>
-	</target>
-	
-	<target name="stop-server" depends="esb.init">
-		<echo>server: ${org.jboss.esb.server.home}/server/${org.jboss.esb.test.server.config}</echo>
-		<stop-server serverHome="${org.jboss.esb.server.home}"/>
-		<wait-on-shutdown serverHome="${org.jboss.esb.server.home}"
-			serverConfig="${org.jboss.esb.test.server.config}"/>
-	</target>
-
-   <target name="test-properties">
-	<available file="../conf/quickstarts.properties"
-		property="quickstart.props.present"/>
-   </target>
-
-   <target name="copy-properties" unless="quickstart.props.present">
-	<copy file="quickstarts.properties" todir="../conf"/>
-   </target>
-
-   <target name="compile" depends="compile-esb,test-properties,copy-properties">
-      <echo message="Compiling JUnit based Quickstart tests..."/>
-
-      <echo message="${toString:qa.junit.cp}"/>
-
-      <!-- Build the tests... -->
-      <mkdir dir="${qa.junit.classes}"/>
-
-      <javac srcdir="${qa.junit.src}" destdir="${qa.junit.classes}" classpathref="qa.junit.cp" debug="on"/>
-
-   </target>
-
-   <target name="clean-esb">
-  	<macrodef name="quickstart-clean">
-		<attribute name="quickstartdir"/>
-		<sequential>
-                       <ant antfile="build.xml"
-			dir="@{quickstartdir}"
- 			target="clean"/>
-		</sequential>
-	</macrodef> 
-	<quickstart-clean quickstartdir="../bpm_orchestration1"/>
-    <quickstart-clean quickstartdir="../dynamic_router"/>
-   	<quickstart-clean quickstartdir="../fun_cbr"/>
-   	<quickstart-clean quickstartdir="../helloworld"/>
-	<quickstart-clean quickstartdir="../helloworld_action"/>
-	<quickstart-clean quickstartdir="../helloworld_db_registration"/>
-	<quickstart-clean quickstartdir="../helloworld_file_action"/>
-	<quickstart-clean quickstartdir="../helloworld_sql_action"/>
-        <quickstart-clean quickstartdir="../recipient_list"/>
-	<quickstart-clean quickstartdir="../scripting_groovy"/>
-	<quickstart-clean quickstartdir="../simple_cbr"/>
-	<quickstart-clean quickstartdir="../static_router"/>
-	<quickstart-clean quickstartdir="../transform_CSV2XML"/>
-	<quickstart-clean quickstartdir="../transform_EDI2XML_Groovy_XSLT"/>
-	<quickstart-clean quickstartdir="../transform_XML2POJO"/>
-	<quickstart-clean quickstartdir="../transform_XML2XML_date_manipulation"/>
-	<quickstart-clean quickstartdir="../transform_XML2XML_simple"/>
-	<quickstart-clean quickstartdir="../webservice_bpel"/>
-    <quickstart-clean quickstartdir="../wiretap"/>
-   </target>
-
-   <target name="compile-esb">
-	<echo>Compile ESB Packages</echo>
-	<mkdir dir="output/lib"/>
-	<macrodef name="output-esb">
-		<attribute name="quickstartdir"/>
-		<sequential>	
-                        <ant antfile="build.xml"
-                                dir="@{quickstartdir}">
-                                <target name="prepare-deployment"/>
-                        </ant>
-        		<copy todir="output/lib">
-                	<fileset dir="@{quickstartdir}/build">
-                       		 <include name="*.esb"/>
-                	</fileset>
-        		</copy>
-		</sequential>
-	</macrodef>
-	
-   	<output-esb quickstartdir="../bpm_orchestration1"/>
-   	<output-esb quickstartdir="../dynamic_router"/>
-   	<output-esb quickstartdir="../fun_cbr"/>
-   	<output-esb quickstartdir="../helloworld"/>
-	<output-esb quickstartdir="../helloworld_action"/>
-	<output-esb quickstartdir="../helloworld_db_registration"/>
-	<output-esb quickstartdir="../helloworld_file_action"/>
-	<output-esb quickstartdir="../helloworld_sql_action"/>
-	<output-esb quickstartdir="../recipient_list"/>
-	<output-esb quickstartdir="../scripting_groovy"/>
-	<output-esb quickstartdir="../simple_cbr"/>
-	<output-esb quickstartdir="../static_router"/>
-	<output-esb quickstartdir="../transform_CSV2XML"/>
-	<output-esb quickstartdir="../transform_EDI2XML_Groovy_XSLT"/>
-	<output-esb quickstartdir="../transform_XML2POJO"/>
-	<output-esb quickstartdir="../transform_XML2XML_date_manipulation"/>
-	<output-esb quickstartdir="../transform_XML2XML_simple"/>
-	<!--
-	<output-esb quickstartdir="../webservice_bpel"/> 	
-	-->
-    <output-esb quickstartdir="../wiretap"/>
-   </target>
-
-   <target name="compile-versioned">
-      <echo message="Running JUnit based QA tests..."/>
-
-      <path id="qa.junit.versioned.cp">
-         <path refid="base.cp"/>
-         <fileset dir="${product.lib}" includes="*.jar"/>
-         <pathelement location="${qa.junit.classes}"/>
-      </path>
-
-      <!-- Build the tests... -->
-      <mkdir dir="${qa.junit.versioned.classes}"/>
-      <javac srcdir="${qa.junit.versioned.src}" destdir="${qa.junit.versioned.classes}" classpathref="qa.junit.versioned.cp" debug="on"/>
-   </target>
-
-   <target name="one-test" if="test"
-           description="Execute all tests in the given test directory.">
-      <mkdir dir="${qa.build.reports}"/>
-      <mkdir dir="${qa.build.testlog}"/>
-      <!-- Remove the test.log so each run has a fresh log -->
-      <delete file="${qa.build.testlog}/test.log"/>
-      <junit dir="."
-             printsummary="yes"
-             haltonerror="false"
-             haltonfailure="false"
-             fork="true">
-
-         <sysproperty key="jbosstest.deploy.dir" value="${qa.build.lib}"/>
-         <sysproperty key="build.testlog" value="${qa.build.testlog}"/>
-         <sysproperty key="jbosstest.threadcount" value="${jbosstest.threadcount}"/>
-         <sysproperty key="jbosstest.iterationcount" value="${jbosstest.iterationcount}"/>
-         <sysproperty key="jbosstest.beancount" value="${jbosstest.beancount}"/>
-
-         <classpath>
-            <pathelement location="${qa.junit.classes}"/>
-            <path refid="qa.junit.cp"/>
-            <pathelement location="${qa.junit.src}"/>
-            <!-- jndi.properties and other client prop files -->
-            <pathelement location="${qa.junit.resources}/server"/>
-         </classpath>
-
-         <formatter type="plain" usefile="true"/>
-         <formatter type="xml" usefile="true"/>
-
-         <batchtest todir="${qa.build.reports}"
-                    haltonerror="false"
-                    haltonfailure="false"
-                    fork="true">
-
-            <fileset dir="${qa.junit.classes}">
-               <include name="org/jboss/soa/esb/${test}/unit/*TestCase.class"/>
-            </fileset>
-         </batchtest>
-      </junit>
-   </target>
-
-   <target name="compile-stylesheets">
-      <mkdir dir="${qa.build.stylesheets}"/>
-      <copy todir="${qa.build.stylesheets}" filtering="yes">
-         <fileset dir="${qa.source.stylesheets}">
-            <include name="**/*"/>
-         </fileset>
-      </copy>
-   </target>
-
-
-   <target name="tests-report-html" depends="compile-stylesheets">
-      <mkdir dir="${qa.build.reports}/html"/>
-
-      <junitreport todir="${qa.build.reports}">
-         <fileset dir="${qa.build.reports}">
-            <include name="TEST-*.xml"/>
-         </fileset>
-         <report format="frames"
-                 todir="${qa.build.reports}/html"
-                 styledir="${qa.build.stylesheets}"
-                 />
-      </junitreport>
-   </target>
-
-
-   <target name="execute">
-      <!-- Run the tests... -->
-      <property name="tests.filter" value="*"/>
-      <mkdir dir="${qa.junit.report}"/>
-      <property name="org.jboss.soa.esb.paramsRepository.file.root" location="src"/>
-      <junit printsummary="yes" haltonerror="yes" haltonfailure="yes" showoutput="yes" fork="no">
-         <formatter type="plain" usefile="false"/>
-         <formatter type="xml"/>
-         <batchtest todir="${qa.junit.report}">
-            <fileset dir="${qa.junit.src}">
-	       <include name="**/${tests.filter}TestCase.java"/>
-               <include name="**/${tests.filter}Test.java"/>
-               <exclude name="${tests.exclude}"/>
-            </fileset>
-         </batchtest>
-         <classpath>
-	    <pathelement location="../quickstarts/**/classes"/>
-            <pathelement location="${qa.junit.classes}"/>
-            <path refid="qa.junit.cp"/>
-            <pathelement location="${qa.junit.src}"/>
-         </classpath>
-         <jvmarg value="-Xmx${qa.junit.memory}"/>
-
-         <!-- Listener Sys Props... -->
-         <sysproperty key="org.jboss.soa.esb.paramsRepository.file.root"
-                      value="${org.jboss.soa.esb.paramsRepository.file.root}"/>
-
-         <!-- Sys Props from the test.properties file... -->
-         <sysproperty key="org.jboss.soa.esb.jndi.server.type" value="${org.jboss.soa.esb.jndi.server.type}"/>
-         <sysproperty key="org.jboss.soa.esb.jndi.server.url" value="${org.jboss.soa.esb.jndi.server.url}"/>
-
-	<sysproperty key="java.naming.factory.initial" value="${java.naming.factory.initial}"/>
-	<sysproperty key="java.naming.provider.url" value="${java.naming.provider.url}"/>
-	<sysproperty key="java.naming.factory.url.pkgs" value="org.jboss.naming"/>
- 
-
-         <!-- Sys Props from the deployment.properties file... -->
-         <sysproperty key="org.jboss.esb.db.driver" value="${org.jboss.esb.db.driver}"/>
-         <sysproperty key="org.jboss.esb.db.url" value="${org.jboss.esb.db.url}"/>
-         <sysproperty key="org.jboss.esb.db.user" value="${org.jboss.esb.db.user}"/>
-         <sysproperty key="org.jboss.esb.db.password" value="${org.jboss.esb.db.password}"/>
-         <sysproperty key="org.jboss.esb.test.ftp.hostname" value="${org.jboss.esb.test.ftp.hostname}"/>
-         <sysproperty key="org.jboss.esb.test.ftp.user" value="${org.jboss.esb.test.ftp.user}"/>
-         <sysproperty key="org.jboss.esb.test.ftp.pwd" value="${org.jboss.esb.test.ftp.pwd}"/>
-         <sysproperty key="org.jboss.esb.test.ftp.dir" value="${org.jboss.esb.test.ftp.dir}"/>
-
-      </junit>
-
-      <!-- Remove all "fixed-up" listener configuration files -->
-      <delete>
-         <fileset dir="${qa.junit.src}" includes="**/*.conftmp"/>
-      </delete>
-
-      <!-- Report on the tests (format results) ... -->
-      <junitreport todir="${qa.junit.report}">
-         <fileset dir="${qa.junit.report}">
-            <include name="*.xml"/>
-         </fileset>
-         <report format="frames" todir="${qa.junit.report}"/>
-         <report format="noframes" todir="${qa.junit.report}"/>
-      </junitreport>
-
-   </target>
-
-   <target name="test-emma" depends="compile-emma, prompt, execute-emma"/>
-   <target name="ci-test-emma" depends="compile-emma, execute-emma"/>
-
-   <target name="compile-emma">
-      <echo message="Running JUnit based QA tests (with ema enabled) ..."/>
-      <!-- Build the tests... -->
-      <mkdir dir="${qa.junit.classes}"/>
-      <javac srcdir="${qa.junit.src}" destdir="${qa.junit.classes}" classpathref="qa.junit.emma.cp" debug="on"/>
-   </target>
-
-   <target name="prompt">
-      <property name="tests.exclude" value="**/*IntegrationTest.java"/>
-      <echo message=""/>
-      <echo message=""/>
-      <input message='Which tests? (Press return to run all tests - Wildcards Supported - already assumes test cases end with the "Test" suffix)'
-             addproperty="tests.filter"
-             defaultvalue="*"/>
-   </target>
-
-   <target name="execute-emma">
-      <!-- Run the tests... -->
-      <property name="tests.filter" value="*"/>
-      <mkdir dir="${qa.junit.report}"/>
-      <junit printsummary="yes" haltonerror="yes" haltonfailure="yes" showoutput="yes" fork="true">
-         <formatter type="plain" usefile="false"/>
-         <formatter type="xml"/>
-         <batchtest todir="${qa.junit.report}">
-            <fileset dir="${qa.junit.src}">
-               <include name="**/${tests.filter}Test*.java"/>
-            </fileset>
-         </batchtest>
-         <classpath>
-            <pathelement location="${qa.junit.classes}"/>
-            <path refid="qa.junit.emma.cp"/>
-            <pathelement location="${qa.junit.src}"/>
-         </classpath>
-
-         <jvmarg value="-Xmx${qa.junit.memory}"/>
-         <!-- emma jvm args -->
-         <jvmarg value="-Demma.coverage.out.file=${coverage}/all/coverage.emma"/>
-         <jvmarg value="-Demma.coverage.out.merge=true"/>
-
-         <!-- Listener Sys Props... -->
-         <sysproperty key="org.jboss.soa.esb.paramsRepository.file.root" value="junit/src"/>
-
-         <!-- Sys Props from the test.properties file... -->
-         <sysproperty key="org.jboss.soa.esb.jndi.server.type" value="${org.jboss.soa.esb.jndi.server.type}"/>
-         <sysproperty key="org.jboss.soa.esb.jndi.server.url" value="${org.jboss.soa.esb.jndi.server.url}"/>
-
-         <!-- Sys Props from the deployment.properties file... -->
-         <sysproperty key="org.jboss.esb.db.driver" value="${org.jboss.esb.db.driver}"/>
-         <sysproperty key="org.jboss.esb.db.url" value="${org.jboss.esb.db.url}"/>
-         <sysproperty key="org.jboss.esb.db.user" value="${org.jboss.esb.db.user}"/>
-         <sysproperty key="org.jboss.esb.db.password" value="${org.jboss.esb.db.password}"/>
-      </junit>
-
-      <!-- Remove all "fixed-up" listener configuration files -->
-      <delete>
-         <fileset dir="${qa.junit.src}" includes="**/*.conftmp"/>
-      </delete>
-
-      <!-- Report on the tests (format results) ... -->
-      <junitreport todir="${qa.junit.report}">
-         <fileset dir="${qa.junit.report}">
-            <include name="*.xml"/>
-         </fileset>
-         <report format="frames" todir="${qa.junit.report}"/>
-         <report format="noframes" todir="${qa.junit.report}"/>
-      </junitreport>
-
-   </target>
-
-</project>

Copied: labs/jbossesb/trunk/qa/quickstarts/build.xml (from rev 15724, labs/jbossesb/trunk/product/samples/quickstarts/tests/build.xml)
===================================================================
--- labs/jbossesb/trunk/qa/quickstarts/build.xml	                        (rev 0)
+++ labs/jbossesb/trunk/qa/quickstarts/build.xml	2007-10-10 18:15:39 UTC (rev 15726)
@@ -0,0 +1,391 @@
+<?xml version="1.0"?>
+<project name="JUnit" default="test" basedir=".">
+   <property file="quickstarts.properties"/>
+
+   <property name="product.dir" location="../../product"/>
+   <property name="product.build" location="${product.dir}/build"/>
+   <property name="product.lib" location="${product.build}/jbossesb/lib"/>
+   <property name="product.lib.ext" location="${product.lib}/ext"/>
+   <property name="org.jboss.esb.test.quickstarts.dir" location="${product.build}/jbossesb/samples/quickstarts"/>
+   <property name="coverage" location="${product.build}/tests/coverage"/>
+   <property name="qa.dir" location=".."/>
+   <property name="qa.build" location="${qa.dir}/build"/>
+   <property name="qa.build.reports" location="${qa.build}/reports"/>
+   <property name="qa.lib" location="${qa.dir}/lib"/>
+   <property name="qa.build.stylesheets" location="${qa.build}/stylesheets"/>
+   <property name="qa.source.stylesheets" location="${qa.dir}/stylesheets"/>
+   <property name="qa.quickstarts.src" location="src"/>
+   <property name="qa.quickstarts.build" location="${qa.build}/quickstarts"/>
+   <property name="qa.quickstarts.build.lib" location="${qa.quickstarts.build}/lib"/>
+   <property name="qa.quickstarts.classes" location="${qa.quickstarts.build}/classes"/>
+   <property name="qa.junit.resources" location="resources"/>
+   <property name="qa.quickstarts.report" location="${qa.quickstarts.build}/report"/>
+   <property name="qa.quickstarts.memory" value="128m"/>
+
+   <property name="qa.quickstarts.server.home" location="${org.jboss.esb.server.home}"/>
+
+   <property name="org.jboss.soa.esb.paramsRepository.file.root" location="src"/>
+
+   <property name="junit.jar" location="${product.lib.ext}/junit-4.1.jar"/>
+   <macrodef name="runant">
+      <attribute name="target"/>
+      <attribute name="failonerror" default="true"/>
+      <attribute name="resultproperty" default="product.java.resultproperty"/>
+      <sequential>
+         <java classname="org.apache.tools.ant.launch.Launcher"
+            classpath="${ant.library.dir}/ant-launcher.jar"
+            fork="true" failonerror="@{failonerror}"
+            resultproperty="@{resultproperty}">
+            <sysproperty key="ant.home" value="${ant.home}"/>
+            <sysproperty key="ant.library.dir" value="${ant.library.dir}"/>
+            <sysproperty key="org.jboss.esb.properties" value="${org.jboss.esb.properties}"/>
+            <arg value="-cp"/>
+            <arg value="${junit.jar}"/>
+            <arg value="-f"/>
+            <arg value="${ant.file}"/>
+            <arg value="@{target}"/>
+         </java>
+      </sequential>
+   </macrodef>
+
+   <path id="base.cp">
+      <fileset dir="${qa.lib}/ext" includes="*.jar"/>
+      <fileset dir="${product.lib}/ext" includes="*.jar"/>
+      <pathelement location="${qa.dir}/"/>
+   </path>
+
+   <path id="qa.quickstarts.cp">
+      <!-- include qs specific jars -->
+      <fileset dir="${org.jboss.esb.test.quickstarts.dir}">
+         <include name="bpm_orchestration1/lib/**/*.jar"/>
+         <include name="dynamic_router/lib/**/*.jar"/>
+         <include name="fun_cbr/lib/**/*.jar"/>
+         <include name="helloworld/lib/**/*.jar"/>
+         <include name="helloworld_action/lib/**/*.jar"/>
+         <include name="helloworld_db_registration/lib/**/*.jar"/>
+         <include name="helloworld_file_action/lib/**/*.jar"/>
+         <include name="helloworld_sql_action/lib/**/*.jar"/>
+         <include name="recipient_list/lib/**/*.jar"/>
+         <include name="scripting_groovy/lib/**/*.jar"/>
+         <include name="simple_cbr/lib/**/*.jar"/>
+         <include name="static_router/lib/**/*.jar"/>
+         <include name="transform_CSV2XML/lib/**/*.jar"/>
+         <include name="transform_EDI2XML_Groovy_XSLT/lib/**/*.jar"/>
+         <include name="transform_XML2POJO/lib/**/*.jar"/>
+         <include name="transform_XML2XML_date_manipulation/lib/**/*.jar"/>
+         <include name="transform_XML2XML_simple/lib/**/*.jar"/>
+         <include name="wiretap/lib/**/*.jar"/>
+      </fileset>
+
+      <!-- include qs specific classes -->
+      <dirset dir="${org.jboss.esb.test.quickstarts.dir}">
+         <include name="bpm_orchestration1/build/classes"/>
+         <include name="dynamic_router/build/classes"/>
+         <include name="fun_cbr/build/classes"/>
+         <include name="helloworld/build/classes"/>
+         <include name="helloworld_action/build/classes"/>
+         <include name="helloworld_db_registration/build/classes"/>
+         <include name="helloworld_file_action/build/classes"/>
+         <include name="helloworld_sql_action/build/classes"/>
+         <include name="recipient_list/build/classes"/>
+         <include name="scripting_groovy/build/classes"/>
+         <include name="simple_cbr/build/classes"/>
+         <include name="static_router/build/classes"/>
+         <include name="transform_CSV2XML/build/classes"/>
+         <include name="transform_EDI2XML_Groovy_XSLT/build/classes"/>
+         <include name="transform_XML2POJO/build/classes"/>
+         <include name="transform_XML2XML_date_manipulation/build/classes"/>
+         <include name="transform_XML2XML_simple/build/classes"/>
+         <include name="wiretap/build/classes"/>
+      </dirset>
+   	
+      <fileset dir="${product.lib.ext}" includes="*.jar"/>
+      <fileset dir="${product.lib}" includes="*.jar"/>
+      <pathelement location="${qa.junit.resources}"/>
+      <path refid="base.cp"/>
+   </path>
+
+   <path id="qa.quickstarts.emma.cp">
+      <fileset dir="${coverage}/all" includes="jbossesb-instr-all.jar"/>
+      <path refid="base.cp"/>
+   </path>
+	
+   <macrodef name="exec-quickstart">
+      <attribute name="quickstart"/>
+      <attribute name="target"/>
+      <sequential>
+         <ant antfile="build.xml"
+            dir="${org.jboss.esb.test.quickstarts.dir}/@{quickstart}"
+            target="@{target}" inheritAll="false">
+            <property name="quickstart.jbossesb.ftp.hostname" value="${org.jboss.esb.test.ftp.hostname}"/>
+            <property name="quickstart.jbossesb.ftp.username" value="${org.jboss.esb.test.ftp.user}"/>
+            <property name="quickstart.jbossesb.ftp.password" value="${org.jboss.esb.test.ftp.pwd}"/>
+            <property name="quickstart.jbossesb.ftp.directory" value="${org.jboss.esb.test.ftp.dir}"/>
+            <property name="org.jboss.esb.server.home" location="${qa.quickstarts.server.home}"/>
+            <property name="org.jboss.esb.server.config" value="${org.jboss.esb.server.config}"/>
+         </ant>
+      </sequential>
+	</macrodef> 
+
+   <target name="init">
+      <available property="quickstarts.exist" type="dir"
+         file="${org.jboss.esb.test.quickstarts.dir}"/>
+   </target>
+
+   <target name="clean" depends="init, clean-esb"/>
+
+   <target name="one-test">
+      <runant target="internal-one-test"/>
+   </target>
+   
+   <target name="internal-one-test" depends="compile, prompt, execute"/>
+	
+   <target name="test">
+   	  <runant target="ci-test"/>
+   </target>
+	
+   <target name="ci-test" depends="compile, execute"/>
+
+   <target name="ci-clean" depends="init, clean-esb"/>
+	
+   <target name="compile" depends="compile-esb">
+      <echo message="Compiling JUnit based Quickstart tests..."/>
+
+
+      <!-- Build the tests... -->
+      <mkdir dir="${qa.quickstarts.classes}"/>
+
+      <javac srcdir="${qa.quickstarts.src}" destdir="${qa.quickstarts.classes}" classpathref="qa.quickstarts.cp" debug="on"/>
+
+   </target>
+
+   <target name="clean-esb" if="quickstarts.exist">
+      <exec-quickstart quickstart="bpm_orchestration1" target="clean"/>
+      <exec-quickstart quickstart="dynamic_router" target="clean"/>
+      <exec-quickstart quickstart="fun_cbr" target="clean"/>
+      <exec-quickstart quickstart="helloworld" target="clean"/>
+      <exec-quickstart quickstart="helloworld_action" target="clean"/>
+      <exec-quickstart quickstart="helloworld_db_registration" target="clean"/>
+      <exec-quickstart quickstart="helloworld_file_action" target="clean"/>
+      <exec-quickstart quickstart="helloworld_sql_action" target="clean"/>
+      <exec-quickstart quickstart="recipient_list" target="clean"/>
+      <exec-quickstart quickstart="scripting_groovy" target="clean"/>
+      <exec-quickstart quickstart="simple_cbr" target="clean"/>
+      <exec-quickstart quickstart="static_router" target="clean"/>
+      <exec-quickstart quickstart="transform_CSV2XML" target="clean"/>
+      <exec-quickstart quickstart="transform_EDI2XML_Groovy_XSLT" target="clean"/>
+      <exec-quickstart quickstart="transform_XML2POJO" target="clean"/>
+      <exec-quickstart quickstart="transform_XML2XML_date_manipulation" target="clean"/>
+      <exec-quickstart quickstart="transform_XML2XML_simple" target="clean"/>
+      <exec-quickstart quickstart="wiretap" target="clean"/>
+   </target>
+
+   <target name="compile-esb">
+      <echo>Compile ESB Packages</echo>
+      <exec-quickstart quickstart="bpm_orchestration1" target="prepare-deployment"/>
+      <exec-quickstart quickstart="dynamic_router" target="prepare-deployment"/>
+      <exec-quickstart quickstart="fun_cbr" target="prepare-deployment"/>
+      <exec-quickstart quickstart="helloworld" target="prepare-deployment"/>
+      <exec-quickstart quickstart="helloworld_action" target="prepare-deployment"/>
+      <exec-quickstart quickstart="helloworld_db_registration" target="prepare-deployment"/>
+      <exec-quickstart quickstart="helloworld_file_action" target="prepare-deployment"/>
+      <exec-quickstart quickstart="helloworld_sql_action" target="prepare-deployment"/>
+      <exec-quickstart quickstart="recipient_list" target="prepare-deployment"/>
+      <exec-quickstart quickstart="scripting_groovy" target="prepare-deployment"/>
+      <exec-quickstart quickstart="simple_cbr" target="prepare-deployment"/>
+      <exec-quickstart quickstart="static_router" target="prepare-deployment"/>
+      <exec-quickstart quickstart="transform_CSV2XML" target="prepare-deployment"/>
+      <exec-quickstart quickstart="transform_EDI2XML_Groovy_XSLT" target="prepare-deployment"/>
+      <exec-quickstart quickstart="transform_XML2POJO" target="prepare-deployment"/>
+      <exec-quickstart quickstart="transform_XML2XML_date_manipulation" target="prepare-deployment"/>
+      <exec-quickstart quickstart="transform_XML2XML_simple" target="prepare-deployment"/>
+      <exec-quickstart quickstart="wiretap" target="prepare-deployment"/>
+
+      <copy todir="${qa.quickstarts.build.lib}" flatten="true">
+         <fileset dir="${org.jboss.esb.test.quickstarts.dir}">
+            <include name="bpm_orchestration1/build/*.esb"/>
+            <include name="dynamic_router/build/*.esb"/>
+            <include name="fun_cbr/build/*.esb"/>
+            <include name="helloworld/build/*.esb"/>
+            <include name="helloworld_action/build/*.esb"/>
+            <include name="helloworld_db_registration/build/*.esb"/>
+            <include name="helloworld_file_action/build/*.esb"/>
+            <include name="helloworld_sql_action/build/*.esb"/>
+            <include name="recipient_list/build/*.esb"/>
+            <include name="scripting_groovy/build/*.esb"/>
+            <include name="simple_cbr/build/*.esb"/>
+            <include name="static_router/build/*.esb"/>
+            <include name="transform_CSV2XML/build/*.esb"/>
+            <include name="transform_EDI2XML_Groovy_XSLT/build/*.esb"/>
+            <include name="transform_XML2POJO/build/*.esb"/>
+            <include name="transform_XML2XML_date_manipulation/build/*.esb"/>
+            <include name="transform_XML2XML_simple/build/*.esb"/>
+            <include name="wiretap/build/*.esb"/>
+         </fileset>
+      </copy>
+   </target>
+
+   <target name="compile-stylesheets">
+      <mkdir dir="${qa.build.stylesheets}"/>
+      <copy todir="${qa.build.stylesheets}" filtering="yes">
+         <fileset dir="${qa.source.stylesheets}">
+            <include name="**/*"/>
+         </fileset>
+      </copy>
+   </target>
+
+
+   <target name="tests-report-html" depends="compile-stylesheets">
+      <mkdir dir="${qa.build.reports}/html"/>
+
+      <junitreport todir="${qa.build.reports}">
+         <fileset dir="${qa.build.reports}">
+            <include name="TEST-*.xml"/>
+         </fileset>
+         <report format="frames"
+                 todir="${qa.build.reports}/html"
+                 styledir="${qa.build.stylesheets}"
+                 />
+      </junitreport>
+   </target>
+
+
+   <target name="execute">
+      <!-- Run the tests... -->
+      <property name="tests.filter" value="*"/>
+      <mkdir dir="${qa.quickstarts.report}"/>
+      <junit printsummary="yes" haltonerror="yes" haltonfailure="yes" showoutput="yes" fork="true">
+         <formatter type="plain" usefile="false"/>
+         <formatter type="xml"/>
+         <batchtest todir="${qa.quickstarts.report}">
+            <fileset dir="${qa.quickstarts.src}">
+               <include name="**/${tests.filter}Test.java"/>
+               <exclude name="${tests.exclude}"/>
+               <exclude name="**/HelloWorldSQLActionTest.java"/>
+               <exclude name="**/RecipientlistTest.java"/>
+               <exclude name="**/FunCBRTest.java"/>
+               <exclude name="**/BPMOrchestrationTest.java"/>
+               <exclude name="**/SimpleCBRTest.java"/>
+               <exclude name="**/DynamicRouterTest.java"/>
+               <exclude name="**/StaticRouterTest.java"/>
+               <exclude name="**/WebserviceAdapterTest.java"/>
+               <exclude name="**/HelloWorldDBRegistrationTest.java"/>
+               <exclude name="**/WebserviceBPELTest.java"/>
+            </fileset>
+         </batchtest>
+         <classpath>
+            <pathelement location="${qa.quickstarts.classes}"/>
+            <path refid="qa.quickstarts.cp"/>
+            <pathelement location="${qa.quickstarts.src}"/>
+         </classpath>
+         <jvmarg value="-Xmx${qa.quickstarts.memory}"/>
+
+      	 <sysproperty key="jbosstest.deploy.dir" value="${qa.quickstarts.build.lib}"/>
+         <sysproperty key="jbosstest.threadcount" value="${jbosstest.threadcount}"/>
+         <sysproperty key="jbosstest.iterationcount" value="${jbosstest.iterationcount}"/>
+         <sysproperty key="jbosstest.beancount" value="${jbosstest.beancount}"/>
+
+      	
+         <!-- Listener Sys Props... -->
+         <sysproperty key="org.jboss.soa.esb.paramsRepository.file.root"
+                      value="${org.jboss.soa.esb.paramsRepository.file.root}"/>
+
+         <!-- Sys Props from the test.properties file... -->
+         <sysproperty key="org.jboss.soa.esb.jndi.server.type" value="${org.jboss.soa.esb.jndi.server.type}"/>
+         <sysproperty key="org.jboss.soa.esb.jndi.server.url" value="${org.jboss.soa.esb.jndi.server.url}"/>
+
+         <!-- Sys Props from the deployment.properties file... -->
+         <sysproperty key="org.jboss.esb.test.ftp.hostname" value="${org.jboss.esb.test.ftp.hostname}"/>
+         <sysproperty key="org.jboss.esb.test.ftp.user" value="${org.jboss.esb.test.ftp.user}"/>
+         <sysproperty key="org.jboss.esb.test.ftp.pwd" value="${org.jboss.esb.test.ftp.pwd}"/>
+         <sysproperty key="org.jboss.esb.test.ftp.dir" value="${org.jboss.esb.test.ftp.dir}"/>
+         <sysproperty key="org.jboss.esb.test.quickstarts.dir" value="${org.jboss.esb.test.quickstarts.dir}"/>
+
+      </junit>
+
+      <!-- Report on the tests (format results) ... -->
+      <junitreport todir="${qa.quickstarts.report}">
+         <fileset dir="${qa.quickstarts.report}">
+            <include name="*.xml"/>
+         </fileset>
+         <report format="frames" todir="${qa.quickstarts.report}"/>
+         <report format="noframes" todir="${qa.quickstarts.report}"/>
+      </junitreport>
+
+   </target>
+
+   <target name="test-emma" depends="compile-emma, prompt, execute-emma"/>
+   <target name="ci-test-emma" depends="compile-emma, execute-emma"/>
+
+   <target name="compile-emma">
+      <echo message="Running JUnit based QA tests (with ema enabled) ..."/>
+      <!-- Build the tests... -->
+      <mkdir dir="${qa.quickstarts.classes}"/>
+      <javac srcdir="${qa.quickstarts.src}" destdir="${qa.quickstarts.classes}" classpathref="qa.quickstarts.emma.cp" debug="on"/>
+   </target>
+
+   <target name="prompt">
+      <property name="tests.exclude" value="**/*IntegrationTest.java"/>
+      <echo message=""/>
+      <echo message=""/>
+      <input message='Which tests? (Press return to run all tests - Wildcards Supported - already assumes test cases end with the "Test" suffix)'
+             addproperty="tests.filter"
+             defaultvalue="*"/>
+   </target>
+
+   <target name="execute-emma">
+      <!-- Run the tests... -->
+      <property name="tests.filter" value="*"/>
+      <mkdir dir="${qa.quickstarts.report}"/>
+      <junit printsummary="yes" haltonerror="yes" haltonfailure="yes" showoutput="yes" fork="true">
+         <formatter type="plain" usefile="false"/>
+         <formatter type="xml"/>
+         <batchtest todir="${qa.quickstarts.report}">
+            <fileset dir="${qa.quickstarts.src}">
+               <include name="**/${tests.filter}Test.java"/>
+            </fileset>
+         </batchtest>
+         <classpath>
+            <pathelement location="${qa.quickstarts.classes}"/>
+            <path refid="qa.quickstarts.emma.cp"/>
+            <pathelement location="${qa.quickstarts.src}"/>
+         </classpath>
+
+         <jvmarg value="-Xmx${qa.quickstarts.memory}"/>
+         <!-- emma jvm args -->
+         <jvmarg value="-Demma.coverage.out.file=${coverage}/all/coverage.emma"/>
+         <jvmarg value="-Demma.coverage.out.merge=true"/>
+
+
+         <sysproperty key="jbosstest.deploy.dir" value="${qa.quickstarts.build.lib}"/>
+         <sysproperty key="jbosstest.threadcount" value="${jbosstest.threadcount}"/>
+         <sysproperty key="jbosstest.iterationcount" value="${jbosstest.iterationcount}"/>
+         <sysproperty key="jbosstest.beancount" value="${jbosstest.beancount}"/>
+     	
+         <!-- Listener Sys Props... -->
+         <sysproperty key="org.jboss.soa.esb.paramsRepository.file.root"
+                      value="${org.jboss.soa.esb.paramsRepository.file.root}"/>
+
+         <!-- Sys Props from the test.properties file... -->
+         <sysproperty key="org.jboss.soa.esb.jndi.server.type" value="${org.jboss.soa.esb.jndi.server.type}"/>
+         <sysproperty key="org.jboss.soa.esb.jndi.server.url" value="${org.jboss.soa.esb.jndi.server.url}"/>
+
+         <!-- Sys Props from the deployment.properties file... -->
+         <sysproperty key="org.jboss.esb.test.ftp.hostname" value="${org.jboss.esb.test.ftp.hostname}"/>
+         <sysproperty key="org.jboss.esb.test.ftp.user" value="${org.jboss.esb.test.ftp.user}"/>
+         <sysproperty key="org.jboss.esb.test.ftp.pwd" value="${org.jboss.esb.test.ftp.pwd}"/>
+         <sysproperty key="org.jboss.esb.test.ftp.dir" value="${org.jboss.esb.test.ftp.dir}"/>
+      </junit>
+
+      <!-- Report on the tests (format results) ... -->
+      <junitreport todir="${qa.quickstarts.report}">
+         <fileset dir="${qa.quickstarts.report}">
+            <include name="*.xml"/>
+         </fileset>
+         <report format="frames" todir="${qa.quickstarts.report}"/>
+         <report format="noframes" todir="${qa.quickstarts.report}"/>
+      </junitreport>
+
+   </target>
+
+</project>

Deleted: labs/jbossesb/trunk/qa/quickstarts/create.sql
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/tests/create.sql	2007-09-19 09:27:53 UTC (rev 15230)
+++ labs/jbossesb/trunk/qa/quickstarts/create.sql	2007-10-10 18:15:39 UTC (rev 15726)
@@ -1,10 +0,0 @@
--- drop database test_sql_gateway;
-create database test_sql_gateway;
-use test_sql_gateway;
-create table gateway_table
-(
-unique_id serial
-,data_column text
-,status_col text
-);
-create unique index  uid_index  on gateway_table (unique_id);

Deleted: labs/jbossesb/trunk/qa/quickstarts/jndi.properties
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/tests/jndi.properties	2007-09-19 09:27:53 UTC (rev 15230)
+++ labs/jbossesb/trunk/qa/quickstarts/jndi.properties	2007-10-10 18:15:39 UTC (rev 15726)
@@ -1,5 +0,0 @@
-java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
-java.naming.provider.url=jnp://localhost:1099
-java.naming.factory.url.pkgs=org.jboss.naming
-java.naming.factory.url.pkgs=org.jnp.interfaces
-

Copied: labs/jbossesb/trunk/qa/quickstarts/jndi.properties (from rev 15724, labs/jbossesb/trunk/product/samples/quickstarts/tests/jndi.properties)
===================================================================
--- labs/jbossesb/trunk/qa/quickstarts/jndi.properties	                        (rev 0)
+++ labs/jbossesb/trunk/qa/quickstarts/jndi.properties	2007-10-10 18:15:39 UTC (rev 15726)
@@ -0,0 +1,5 @@
+java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
+java.naming.provider.url=jnp://localhost:1099
+java.naming.factory.url.pkgs=org.jboss.naming
+java.naming.factory.url.pkgs=org.jnp.interfaces
+

Deleted: labs/jbossesb/trunk/qa/quickstarts/quickstarts.properties
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/tests/quickstarts.properties	2007-09-19 09:27:53 UTC (rev 15230)
+++ labs/jbossesb/trunk/qa/quickstarts/quickstarts.properties	2007-10-10 18:15:39 UTC (rev 15726)
@@ -1,4 +0,0 @@
-jbossesb.ftp.hostname=localhost:10021
-jbossesb.ftp.username=esb
-jbossesb.ftp.password=esb
-jbossesb.ftp.directory=/

Copied: labs/jbossesb/trunk/qa/quickstarts/quickstarts.properties (from rev 15724, labs/jbossesb/trunk/product/samples/quickstarts/tests/quickstarts.properties)
===================================================================
--- labs/jbossesb/trunk/qa/quickstarts/quickstarts.properties	                        (rev 0)
+++ labs/jbossesb/trunk/qa/quickstarts/quickstarts.properties	2007-10-10 18:15:39 UTC (rev 15726)
@@ -0,0 +1,24 @@
+#
+# If you wish to run these test from within this directory then the
+# following configuration entries need to be completed correctly.
+#
+# The parameters below are defaulted for the server created as part of
+# the qa configuration.  To run with this configuration go up to qa directory
+# and start the server with the command 'ant start-server'.
+#
+# To run the tests execute 'ant' once the appropriate server is running.
+#
+# These parameters are overridden as part of the normal CI build
+
+# server information for running the quickstarts
+org.jboss.esb.server.home=../build/jbossesb-test/jbossesb-server
+org.jboss.esb.server.config=default
+
+# jbossesb location containing quickstarts
+org.jboss.esb.test.quickstarts.dir=../../product/build/jbossesb/samples/quickstarts
+
+# ftp properties
+org.jboss.esb.test.ftp.hostname=localhost:10021
+org.jboss.esb.test.ftp.user=esb
+org.jboss.esb.test.ftp.pwd=esb
+org.jboss.esb.test.ftp.dir=/

Added: labs/jbossesb/trunk/qa/quickstarts/resources/jndi.properties
===================================================================
--- labs/jbossesb/trunk/qa/quickstarts/resources/jndi.properties	                        (rev 0)
+++ labs/jbossesb/trunk/qa/quickstarts/resources/jndi.properties	2007-10-10 18:15:39 UTC (rev 15726)
@@ -0,0 +1,3 @@
+java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
+java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
+java.naming.provider.url=jnp://localhost:1099
\ No newline at end of file


Property changes on: labs/jbossesb/trunk/qa/quickstarts/resources/jndi.properties
___________________________________________________________________
Name: svn:mime-type
   + text/plain
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbossesb/trunk/qa/quickstarts/resources/transformedmessageCSV2XML.log
===================================================================
--- labs/jbossesb/trunk/qa/quickstarts/resources/transformedmessageCSV2XML.log	                        (rev 0)
+++ labs/jbossesb/trunk/qa/quickstarts/resources/transformedmessageCSV2XML.log	2007-10-10 18:15:39 UTC (rev 15726)
@@ -0,0 +1,12 @@
+<Order netAmount="59.97" orderDate="Wed Nov 15 13:45:28 EST 2006"
+    orderId="1" statusCode="0" tax="4.95" totalAmount="64.92">
+  <Customer firstName="Harry" lastName="Fletcher" state="SD" userName="user1"/>
+  <OrderLines>
+    <OrderLine posistion="1" quantity="1">
+      <Product price="" productId="364" title=""/>
+    </OrderLine>
+    <OrderLine posistion="1" quantity="1">
+      <Product price="" productId="364" title=""/>
+    </OrderLine>
+  </OrderLines>
+</Order>

Added: labs/jbossesb/trunk/qa/quickstarts/resources/transformedmessageDateManipulation.log
===================================================================
--- labs/jbossesb/trunk/qa/quickstarts/resources/transformedmessageDateManipulation.log	                        (rev 0)
+++ labs/jbossesb/trunk/qa/quickstarts/resources/transformedmessageDateManipulation.log	2007-10-10 18:15:39 UTC (rev 15726)
@@ -0,0 +1,17 @@
+<Order netAmount="59.97" orderId="1" statusCode="0" tax="4.95" totalAmount="64.92">
+  <Customer firstName="Harry" lastName="Fletcher" state="SD" userName="user1"/>
+  <OrderDate>
+    <day>15</day>
+    <time>13:45</time>
+    <month>11</month>
+    <year>06</year>
+  </OrderDate>
+  <OrderLines>
+    <OrderLine position="1" quantity="1">
+      <Product price="29.98" productId="364" title="The 40-Year-Old Virgin "/>
+    </OrderLine>
+    <OrderLine position="2" quantity="1">
+      <Product price="29.99" productId="299" title="Pulp Fiction"/>
+    </OrderLine>
+  </OrderLines>
+</Order>

Added: labs/jbossesb/trunk/qa/quickstarts/resources/transformedmessageEDI2XMLGroovyXSL.log
===================================================================
--- labs/jbossesb/trunk/qa/quickstarts/resources/transformedmessageEDI2XMLGroovyXSL.log	                        (rev 0)
+++ labs/jbossesb/trunk/qa/quickstarts/resources/transformedmessageEDI2XMLGroovyXSL.log	2007-10-10 18:15:39 UTC (rev 15726)
@@ -0,0 +1,9 @@
+<Order date="11-15-06" netAmount="59.97" orderId="1" statusCode="0"
+    tax="4.95" totalAmount="64.92">
+  <Customer firstName="Harry" lastName="Fletcher" state="South Dakota"
+    userName="user1"/>
+  <OrderLines>
+    <order-item price="29.98" product-id="364" quantity="1">The 40-Year-Old Virgin</order-item>
+    <order-item price="29.99" product-id="299" quantity="1">Pulp Fiction</order-item>
+  </OrderLines>
+</Order>

Added: labs/jbossesb/trunk/qa/quickstarts/resources/transformedmessageXML2POJO.log
===================================================================
--- labs/jbossesb/trunk/qa/quickstarts/resources/transformedmessageXML2POJO.log	                        (rev 0)
+++ labs/jbossesb/trunk/qa/quickstarts/resources/transformedmessageXML2POJO.log	2007-10-10 18:15:39 UTC (rev 15726)
@@ -0,0 +1,14 @@
+<Order netAmount="59.97" orderDate="Wed Nov 15 13:45:28 EST 2006"
+  orderId="1" statusCode="0" tax="4.95" totalAmount="64.92">
+    <Customer firstName="Harry" lastName="Fletcher" state="SD"
+      userName="user1"/>
+    <OrderLines>
+        <OrderLine position="1" quantity="1">
+            <Product price="29.98" productId="364"
+              title="The 40-Year-Old Virgin "/>
+        </OrderLine>
+        <OrderLine position="2" quantity="1">
+            <Product price="29.99" productId="299" title="Pulp Fiction"/>
+        </OrderLine>
+    </OrderLines>
+</Order>

Added: labs/jbossesb/trunk/qa/quickstarts/resources/transformedmessageXML2Simple.log
===================================================================
--- labs/jbossesb/trunk/qa/quickstarts/resources/transformedmessageXML2Simple.log	                        (rev 0)
+++ labs/jbossesb/trunk/qa/quickstarts/resources/transformedmessageXML2Simple.log	2007-10-10 18:15:39 UTC (rev 15726)
@@ -0,0 +1,7 @@
+<Order netAmount="59.97" orderDate="Wed Nov 15 13:45:28 EST 2006" orderId="1" statusCode="0" tax="4.95" totalAmount="64.92">
+	<Customer firstName="Harry" lastName="Fletcher" state="SD" userName="user1"></Customer>
+	<OrderLines>
+		<line-item><product>364</product><price>29.98</price><quantity>1</quantity></line-item>
+		<line-item><product>299</product><price>29.99</price><quantity>1</quantity></line-item>
+	</OrderLines>
+</Order>

Copied: labs/jbossesb/trunk/qa/quickstarts/src (from rev 15724, labs/jbossesb/trunk/product/samples/quickstarts/tests/src)

Modified: labs/jbossesb/trunk/qa/quickstarts/src/org/jboss/soa/esb/quickstart/test/BPMOrchestrationTest.java
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/tests/src/org/jboss/soa/esb/quickstart/test/BPMOrchestrationTest.java	2007-10-10 16:19:46 UTC (rev 15724)
+++ labs/jbossesb/trunk/qa/quickstarts/src/org/jboss/soa/esb/quickstart/test/BPMOrchestrationTest.java	2007-10-10 18:15:39 UTC (rev 15726)
@@ -1,3 +1,24 @@
+/*
+ * 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.quickstart.test;
 
 import junit.framework.Test;

Modified: labs/jbossesb/trunk/qa/quickstarts/src/org/jboss/soa/esb/quickstart/test/DynamicRouterTest.java
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/tests/src/org/jboss/soa/esb/quickstart/test/DynamicRouterTest.java	2007-10-10 16:19:46 UTC (rev 15724)
+++ labs/jbossesb/trunk/qa/quickstarts/src/org/jboss/soa/esb/quickstart/test/DynamicRouterTest.java	2007-10-10 18:15:39 UTC (rev 15726)
@@ -1,3 +1,24 @@
+/*
+ * 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.quickstart.test;
 
 import java.io.File;
@@ -5,6 +26,7 @@
 
 import junit.framework.Test;
 
+import org.jboss.soa.esb.actions.StoreMessageToFile;
 import org.jboss.soa.esb.samples.quickstart.dynamicRouter.test.ReceiveJMSMessage;
 import org.jboss.soa.esb.samples.quickstart.dynamicRouter.test.SendJMSMessage;
 import org.jboss.test.JBossTestCase;
@@ -40,14 +62,14 @@
         /* Verify that the message file is complete */
         boolean fileComplete = Helpers.checkFileContent(LOG_FILE, EXPECTED_RECORD_COUNT);
         if (!fileComplete) {
-        		Hashtable temp = Helpers.getMessageString(LOG_FILE);
+        		Hashtable<String, String> temp = Helpers.getMessageString(LOG_FILE);
         		File target = new File(LOG_FILE);
         		target.delete();
                 fail ("Event file " + LOG_FILE + " not complete - expected " + EXPECTED_RECORD_COUNT 
                 		+ " records - found " + temp.size() + ", test marked as failing");
         }
         
-		Hashtable theTable = Helpers.getMessageString(LOG_FILE);
+		Hashtable<String, String> theTable = Helpers.getMessageString(LOG_FILE);
 
 		String theMessage1 = (String) theTable.get("Message1");
 		String theMessage2 = (String) theTable.get("Message2");
@@ -72,7 +94,7 @@
 		
 	    	SendJMSMessage sm = new SendJMSMessage();
     		sm.setupConnection();
-		sm.sendAMessage(JMS_MESSAGE + Helpers.START_TAG + FILE_NAME + Helpers.END_TAG);
+		sm.sendAMessage(JMS_MESSAGE + StoreMessageToFile.MESSAGE_CONTENT_FILENAME_START + FILE_NAME + StoreMessageToFile.MESSAGE_CONTENT_FILENAME_END);
 	    	sm.stop();
 	}
 

Modified: labs/jbossesb/trunk/qa/quickstarts/src/org/jboss/soa/esb/quickstart/test/FunCBRTest.java
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/tests/src/org/jboss/soa/esb/quickstart/test/FunCBRTest.java	2007-10-10 16:19:46 UTC (rev 15724)
+++ labs/jbossesb/trunk/qa/quickstarts/src/org/jboss/soa/esb/quickstart/test/FunCBRTest.java	2007-10-10 18:15:39 UTC (rev 15726)
@@ -1,3 +1,24 @@
+/*
+ * 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.quickstart.test;
 
 import junit.framework.Test;

Modified: labs/jbossesb/trunk/qa/quickstarts/src/org/jboss/soa/esb/quickstart/test/HelloWorldActionTest.java
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/tests/src/org/jboss/soa/esb/quickstart/test/HelloWorldActionTest.java	2007-10-10 16:19:46 UTC (rev 15724)
+++ labs/jbossesb/trunk/qa/quickstarts/src/org/jboss/soa/esb/quickstart/test/HelloWorldActionTest.java	2007-10-10 18:15:39 UTC (rev 15726)
@@ -26,6 +26,7 @@
 
 import junit.framework.Test;
 
+import org.jboss.soa.esb.actions.StoreMessageToFile;
 import org.jboss.soa.esb.samples.quickstart.helloworldaction.test.SendJMSMessage;
 import org.jboss.test.JBossTestCase;
 
@@ -39,6 +40,7 @@
 
 public class HelloWorldActionTest extends JBossTestCase {
 	private static final String JMS_MESSAGE = "HelloWorldActionTest message";
+	private static final String RESPONSE_MESSAGE = "BEFORE**" + JMS_MESSAGE + "AFTER**" ;
 	private static final String FILE_NAME = "HelloWorldActionTest.log";
 	private static final String LOG_FILE = Helpers.getTempDir(FILE_NAME) + FILE_NAME;
 	private static final int EXPECTED_RECORD_COUNT = 1;
@@ -48,6 +50,12 @@
 	}
 
 	public void testMessage() throws Exception {
+                final File logFile = new File(LOG_FILE) ;
+                if (logFile.exists())
+                {
+                    assertTrue("Deleting logfile", logFile.delete()) ;
+                }
+                
 		sendMessage();
 
 		/* Verify that the message file is created */
@@ -61,26 +69,23 @@
 		boolean fileComplete = Helpers.checkFileContent(LOG_FILE,
 				EXPECTED_RECORD_COUNT);
 		if (!fileComplete) {
-			Hashtable temp = Helpers.getMessageString(LOG_FILE);
-			File target = new File(LOG_FILE);
-			target.delete();
+			Hashtable<String, String> temp = Helpers.getMessageString(LOG_FILE);
 			fail("Event file " + LOG_FILE + " not complete - expected "
 					+ EXPECTED_RECORD_COUNT + " records - found " + temp.size()
 					+ ", test marked as failing");
 		}
 
-		Hashtable theTable = Helpers.getMessageString(LOG_FILE);
+		Hashtable<String, String> theTable = Helpers.getMessageString(LOG_FILE);
 		String theMessage = (String) theTable.get("Message1");
-		assertEquals("The strings should match", theMessage, JMS_MESSAGE);
-		File target = new File(LOG_FILE);
-		target.delete();
+		assertEquals("The strings should match", RESPONSE_MESSAGE, theMessage);
+                assertTrue("Deleting logfile", logFile.delete()) ;
 	}
 
 	public void sendMessage() throws Exception {
 		SendJMSMessage sm = new SendJMSMessage();
 		sm.setupConnection();
-		sm.sendAMessage(JMS_MESSAGE + Helpers.START_TAG + FILE_NAME
-				+ Helpers.END_TAG);
+		sm.sendAMessage(JMS_MESSAGE + StoreMessageToFile.MESSAGE_CONTENT_FILENAME_START + FILE_NAME
+				+ StoreMessageToFile.MESSAGE_CONTENT_FILENAME_END);
 		sm.stop();
 	}
 

Modified: labs/jbossesb/trunk/qa/quickstarts/src/org/jboss/soa/esb/quickstart/test/HelloWorldDBRegistrationTest.java
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/tests/src/org/jboss/soa/esb/quickstart/test/HelloWorldDBRegistrationTest.java	2007-10-10 16:19:46 UTC (rev 15724)
+++ labs/jbossesb/trunk/qa/quickstarts/src/org/jboss/soa/esb/quickstart/test/HelloWorldDBRegistrationTest.java	2007-10-10 18:15:39 UTC (rev 15726)
@@ -26,6 +26,7 @@
 
 import junit.framework.Test;
 
+import org.jboss.soa.esb.actions.StoreMessageToFile;
 import org.jboss.soa.esb.samples.quickstart.helloworlddbregistration.test.SendJMSMessage;
 import org.jboss.test.JBossTestCase;
 
@@ -61,7 +62,7 @@
 		boolean fileComplete = Helpers.checkFileContent(LOG_FILE,
 				EXPECTED_RECORD_COUNT);
 		if (!fileComplete) {
-			Hashtable temp = Helpers.getMessageString(LOG_FILE);
+			Hashtable<String, String> temp = Helpers.getMessageString(LOG_FILE);
 			File target = new File(LOG_FILE);
 			target.delete();
 			fail("Event file " + LOG_FILE + " not complete - expected "
@@ -69,7 +70,7 @@
 					+ ", test marked as failing");
 		}
 
-		Hashtable theTable = Helpers.getMessageString(LOG_FILE);
+		Hashtable<String, String> theTable = Helpers.getMessageString(LOG_FILE);
 		String theMessage = (String) theTable.get("Message1");
 		assertEquals("The strings should match", theMessage, JMS_MESSAGE);
 		File target = new File(LOG_FILE);
@@ -79,8 +80,8 @@
 	public void sendMessage() throws Exception {
 		SendJMSMessage sm = new SendJMSMessage();
 		sm.setupConnection();
-		sm.sendAMessage(JMS_MESSAGE + Helpers.START_TAG + FILE_NAME
-				+ Helpers.END_TAG);
+		sm.sendAMessage(JMS_MESSAGE + StoreMessageToFile.MESSAGE_CONTENT_FILENAME_START + FILE_NAME
+				+ StoreMessageToFile.MESSAGE_CONTENT_FILENAME_END);
 		sm.stop();
 	}
 

Modified: labs/jbossesb/trunk/qa/quickstarts/src/org/jboss/soa/esb/quickstart/test/HelloWorldFileActionTest.java
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/tests/src/org/jboss/soa/esb/quickstart/test/HelloWorldFileActionTest.java	2007-10-10 16:19:46 UTC (rev 15724)
+++ labs/jbossesb/trunk/qa/quickstarts/src/org/jboss/soa/esb/quickstart/test/HelloWorldFileActionTest.java	2007-10-10 18:15:39 UTC (rev 15726)
@@ -1,3 +1,24 @@
+/*
+ * 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.quickstart.test;
 
 import java.io.BufferedWriter;
@@ -7,6 +28,7 @@
 
 import junit.framework.Test;
 
+import org.jboss.soa.esb.actions.StoreMessageToFile;
 import org.jboss.test.JBossTestCase;
 
 /**
@@ -21,11 +43,12 @@
      	private static final String FILE_NAME = "HelloWorldFileActionTest.log";
     	private static final String LOG_FILE = Helpers.getTempDir(FILE_NAME) + FILE_NAME;
     	private static final int EXPECTED_RECORD_COUNT = 1;
-    	private static final String INPUT_DIRECTORY = "../helloworld_file_action/build/dirs/input/";
+    	private static final String INPUT_DIRECTORY = "helloworld_file_action/build/dirs/input/";
         private static final String INPUT_FILE_NAME = "MyInput.dat";
-    	private static final String OUTPUT_DIRECTORY = "../helloworld_file_action/build/dirs/output/";
+    	private static final String OUTPUT_DIRECTORY = "helloworld_file_action/build/dirs/output/";
         private static final String OUTPUT_FILE_NAME = OUTPUT_DIRECTORY + "MyInput.dat.sentToEsb";
        	private static final String FILE_CONTENTS = "Hello World In A File";       
+        private static final String RESPONSE_CONTENTS = "BEFORE"+FILE_CONTENTS+"AFTER";       
 
 	public HelloWorldFileActionTest(String name)
 	{
@@ -34,12 +57,19 @@
 
 	public void testMessage() throws Exception
 	{
-		createFileAction();
+                final File logFile = new File(LOG_FILE) ;
+                if (logFile.exists())
+                {
+                    assertTrue("Deleting logfile", logFile.delete()) ;
+                }
+                final String outputFileName = Helpers.getQuickstartLocation(OUTPUT_FILE_NAME) ;
+                
+                createFileAction();
 		
 		/* Verify that the output file is created */
-		boolean fileExists = Helpers.checkForFile(OUTPUT_FILE_NAME);
+		boolean fileExists = Helpers.checkForFile(outputFileName);
 		if (!fileExists) {
-			fail("File " + OUTPUT_FILE_NAME
+			fail("File " + outputFileName
 					+ " not created - test marked as failing");
 		}
 		
@@ -49,40 +79,50 @@
 			fail("Event file " + LOG_FILE
 					+ " not created - test marked as failing");
 		}
+                
+                /* Verify that the log file is complete */
+                boolean logFileComplete = Helpers.checkFileContent(LOG_FILE,
+                                EXPECTED_RECORD_COUNT);
+                if (!logFileComplete) {
+                        Hashtable<String, String> temp = Helpers.getMessageString(LOG_FILE);
+                        fail("File Action Output file " + LOG_FILE + " not complete - expected "
+                                        + EXPECTED_RECORD_COUNT + " records - found " + temp.size()
+                                        + ", test marked as failing");
+                }
 		
 		/* Check the log file */
-		Hashtable theTable = Helpers.getFileActionMessageString(LOG_FILE);
+		Hashtable<String, String> theTable = Helpers.getMessageString(LOG_FILE);
 		String theMessage = (String) theTable.get("Message1");
-		assertEquals("The strings in the log file should match", theMessage + "\n", FILE_CONTENTS  + Helpers.START_TAG + FILE_NAME + Helpers.END_TAG);
-		File target = new File(LOG_FILE);
-		target.delete();
+		assertEquals("The strings in the log file should match", RESPONSE_CONTENTS, theMessage);
 		
 		/* Verify that the output file is complete */
-		boolean fileComplete = Helpers.checkFileContent(OUTPUT_FILE_NAME,
+		boolean fileComplete = Helpers.checkFileContent(outputFileName,
 				EXPECTED_RECORD_COUNT);
 		if (!fileComplete) {
-			Hashtable temp = Helpers.getMessageString(OUTPUT_FILE_NAME);
-			fail("File Action Output file " + OUTPUT_FILE_NAME + " not complete - expected "
+			Hashtable<String, String> temp = Helpers.getMessageString(outputFileName);
+			fail("File Action Output file " + outputFileName + " not complete - expected "
 					+ EXPECTED_RECORD_COUNT + " records - found " + temp.size()
 					+ ", test marked as failing");
 		}
 		
-		theTable = Helpers.getMessageString(OUTPUT_FILE_NAME);
+		theTable = Helpers.getMessageString(outputFileName);
 		theMessage = (String) theTable.get("Message1");
-		assertEquals("The strings in output file should match", theMessage, FILE_CONTENTS);
+		assertEquals("The strings in output file should match", FILE_CONTENTS, theMessage);
 		
+                assertTrue("Deleting logfile", logFile.delete()) ;
 	} /* method */
 
 	public void createFileAction() throws Exception
 	{
-		String tempStr = FILE_CONTENTS + Helpers.START_TAG + FILE_NAME + Helpers.END_TAG;	
-    	File x = new File(INPUT_DIRECTORY + "/" + INPUT_FILE_NAME);
+		String tempStr = FILE_CONTENTS + StoreMessageToFile.MESSAGE_CONTENT_FILENAME_START + FILE_NAME + StoreMessageToFile.MESSAGE_CONTENT_FILENAME_END;
+		final String inputDirectory = Helpers.getQuickstartLocation(INPUT_DIRECTORY) ;
+    	File x = new File(inputDirectory, INPUT_FILE_NAME);
     	try {
     		BufferedWriter out = new BufferedWriter(new FileWriter(x));
     		out.write(tempStr.toCharArray());
     		out.close();
     	} catch (Exception e) {
-    		System.out.println("Error while writing the file: " + INPUT_DIRECTORY + "/" + INPUT_FILE_NAME);
+    		System.out.println("Error while writing the file: " + x.getAbsolutePath());
     		System.out.println(e.getMessage());
     	}	
 	} /* method */

Modified: labs/jbossesb/trunk/qa/quickstarts/src/org/jboss/soa/esb/quickstart/test/HelloWorldSQLActionTest.java
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/tests/src/org/jboss/soa/esb/quickstart/test/HelloWorldSQLActionTest.java	2007-10-10 16:19:46 UTC (rev 15724)
+++ labs/jbossesb/trunk/qa/quickstarts/src/org/jboss/soa/esb/quickstart/test/HelloWorldSQLActionTest.java	2007-10-10 18:15:39 UTC (rev 15726)
@@ -1,3 +1,24 @@
+/*
+ * 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.quickstart.test;
 
 import junit.framework.Test;
@@ -2,2 +23,3 @@
 
+import org.jboss.soa.esb.actions.StoreMessageToFile;
 import org.jboss.test.JBossTestCase;
@@ -80,8 +102,8 @@
 			// Could not connect to the database
 		}
 
-		String loggingInfo = Helpers.START_TAG + LOG_FILE + Helpers.END_TAG;
-		Vector theRecords = new Vector();
+		String loggingInfo = StoreMessageToFile.MESSAGE_CONTENT_FILENAME_START + LOG_FILE + StoreMessageToFile.MESSAGE_CONTENT_FILENAME_END;
+		Vector<String> theRecords = new Vector<String>();
 		
 		String tempStr = "insert into gateway_table values(0,'data 111111 " + loggingInfo + " ','p')";
 		theRecords.add(tempStr);

Modified: labs/jbossesb/trunk/qa/quickstarts/src/org/jboss/soa/esb/quickstart/test/HelloWorldTest.java
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/tests/src/org/jboss/soa/esb/quickstart/test/HelloWorldTest.java	2007-10-10 16:19:46 UTC (rev 15724)
+++ labs/jbossesb/trunk/qa/quickstarts/src/org/jboss/soa/esb/quickstart/test/HelloWorldTest.java	2007-10-10 18:15:39 UTC (rev 15726)
@@ -26,6 +26,7 @@
 
 import junit.framework.Test;
 
+import org.jboss.soa.esb.actions.StoreMessageToFile;
 import org.jboss.soa.esb.samples.quickstart.helloworld.test.SendJMSMessage;
 import org.jboss.test.JBossTestCase;
 
@@ -52,6 +53,12 @@
 	}
 
 	public void testMessage() throws Exception {
+	        final File logFile = new File(LOG_FILE) ;
+	        if (logFile.exists())
+	        {
+	            assertTrue("Deleting logfile", logFile.delete()) ;
+	        }
+	        
 		sendMessage();
 
 		/* Verify that the message file is created */
@@ -65,26 +72,23 @@
 		boolean fileComplete = Helpers.checkFileContent(LOG_FILE,
 				EXPECTED_RECORD_COUNT);
 		if (!fileComplete) {
-			Hashtable temp = Helpers.getMessageString(LOG_FILE);
-			File target = new File(LOG_FILE);
-			target.delete();
+			Hashtable<String, String> temp = Helpers.getMessageString(LOG_FILE);
 			fail("Event file " + LOG_FILE + " not complete - expected "
 					+ EXPECTED_RECORD_COUNT + " records - found " + temp.size()
 					+ ", test marked as failing");
 		}
 
-		Hashtable theTable = Helpers.getMessageString(LOG_FILE);
+		Hashtable<String, String> theTable = Helpers.getMessageString(LOG_FILE);
 		String theMessage = (String) theTable.get("Message1");
-		assertEquals("The strings should match", theMessage, JMS_MESSAGE);
-		File target = new File(LOG_FILE);
-		target.delete();
+		assertEquals("The strings should match", JMS_MESSAGE, theMessage);
+                assertTrue("Deleting logfile", logFile.delete()) ;
 	}
 
 	public void sendMessage() throws Exception {
 		SendJMSMessage sm = new SendJMSMessage();
 		sm.setupConnection();
-		sm.sendAMessage(JMS_MESSAGE + Helpers.START_TAG + FILE_NAME
-				+ Helpers.END_TAG);
+		sm.sendAMessage(JMS_MESSAGE + StoreMessageToFile.MESSAGE_CONTENT_FILENAME_START + FILE_NAME
+				+ StoreMessageToFile.MESSAGE_CONTENT_FILENAME_END) ;
 		sm.stop();
 	}
 

Modified: labs/jbossesb/trunk/qa/quickstarts/src/org/jboss/soa/esb/quickstart/test/Helpers.java
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/tests/src/org/jboss/soa/esb/quickstart/test/Helpers.java	2007-10-10 16:19:46 UTC (rev 15724)
+++ labs/jbossesb/trunk/qa/quickstarts/src/org/jboss/soa/esb/quickstart/test/Helpers.java	2007-10-10 18:15:39 UTC (rev 15726)
@@ -25,8 +25,18 @@
 import java.io.File;
 import java.io.FileReader;
 import java.io.IOException;
+import java.io.StringReader;
 import java.util.Hashtable;
 
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.parsers.SAXParser;
+import javax.xml.parsers.SAXParserFactory;
+
+import org.jboss.soa.esb.actions.StoreMessageToFile;
+import org.jboss.soa.esb.quickstart.test.util.IdentitySAXHandler;
+import org.xml.sax.InputSource;
+import org.xml.sax.SAXException;
+
 import junit.framework.Assert;
 
 /**
@@ -35,23 +45,34 @@
  */
 
 public class Helpers {
-	public static final String RESOURCE_DIR = "src" + File.separator + "resources";
-	public static final String START_TAG = "[jbesb-filename]";
-	public static final String END_TAG = "[/jbesb-filename]\n";
 	public static final int FILE_TIMER = 3000;
 	public static final int FILE_COUNTER = 5;
 
 	/* Read the message files into a hash */
-	public static Hashtable getMessageString(String fileName) {
+	public static Hashtable<String, String> getMessageString(String fileName) {
 		Hashtable<String,String> returnTable = new Hashtable<String,String>();
 		int theCounter = 1;
 		try {
 			BufferedReader in = new BufferedReader(new FileReader(fileName));
 			String str;
 			while ((str = in.readLine()) != null) {
-				int startTag = str.indexOf(START_TAG);
-				String returnString = str.substring(0, startTag);
-				returnTable.put("Message" + theCounter++, returnString);
+				final int startTag = str.indexOf(StoreMessageToFile.MESSAGE_CONTENT_FILENAME_START);
+				if (startTag == -1) {
+				    break ;
+				}
+				final int endTag = str.indexOf(StoreMessageToFile.MESSAGE_CONTENT_FILENAME_END) ;
+				final String returnString ;
+				if (endTag > startTag) {
+				    final int endIndex = endTag + StoreMessageToFile.MESSAGE_CONTENT_FILENAME_END.length() ;
+				    if (endIndex < str.length()-1) {
+				        returnString = str.substring(0, startTag) + str.substring(endIndex) ;
+				    } else {
+				        returnString = str.substring(0, startTag) ;
+				    }
+				} else {
+				    returnString = str ;
+				}
+	                        returnTable.put("Message" + theCounter++, returnString);
 			}
 			in.close();
 		} catch (IOException e) {
@@ -61,7 +82,7 @@
 	} /* method */
 
 	/* Read the message files into a hash- used by HelloWorldFileActionTest */
-	public static Hashtable getFileActionMessageString(String fileName) {
+	public static Hashtable<String, String> getFileActionMessageString(String fileName) {
 		Hashtable<String,String> returnTable = new Hashtable<String,String>();
 		int theCounter = 1;
 		try {
@@ -82,8 +103,9 @@
 		boolean wasFileFound = false;
 		/* Look for file, if it's there, set the boolean and return, if it's
 		 * not, wait and try again */
+		final File file = new File(fileName) ;
 		for (int i = 0; i < FILE_COUNTER; i++) {
-			boolean exists = (new File(fileName)).exists();
+			boolean exists = file.exists();
 			if (exists) {
 				wasFileFound = true;
 				break;
@@ -104,7 +126,7 @@
 		/* Determine the number of records in the file, if it's not correct
 		 * wait and try again */
 		for (int i = 0; i < FILE_COUNTER; i++) {
-			Hashtable theTable = Helpers.getMessageString(fileName);
+			Hashtable<String, String> theTable = getMessageString(fileName);
 			int theKeys = theTable.size();
 			if (theKeys == recordCount){
 				correctFileSize = true;
@@ -127,4 +149,59 @@
         return tmpDir;
     }
 
+    public static String getQuickstartLocation(final String location)
+        throws IOException
+    {
+        final File quickstartDir = new File(System.getProperty("org.jboss.esb.test.quickstarts.dir"), location) ;
+        return quickstartDir.getCanonicalPath() ;
+    }
+    
+    public static boolean compareXMLContent(final String content1, final String content2)
+        throws ParserConfigurationException, SAXException, IOException
+    {
+        final SAXParserFactory parserFactory = SAXParserFactory.newInstance() ;
+        parserFactory.setNamespaceAware(true) ;
+        
+        final SAXParser parser = parserFactory.newSAXParser() ;
+        
+        final IdentitySAXHandler handler1 = new IdentitySAXHandler() ;
+        parser.parse(new InputSource(new StringReader(content1)), handler1) ;
+        
+        final IdentitySAXHandler handler2 = new IdentitySAXHandler() ;
+        parser.parse(new InputSource(new StringReader(content2)), handler2) ;
+        
+        return (handler1.getRootElement().equals(handler2.getRootElement())) ;
+    }
+    
+    public static void main(final String[] args)
+    {
+        final String content =
+            "<test attr='1'>\n" +
+            "    <inner inner1Attr='1'>\r\n" +
+            "        innerContent1 \n" +
+            "    </inner>\n" +
+            "    testContent\n" +
+            "    <inner inner2Attr='2'>\r\n" +
+            "        innerContent2\n" +
+            "    </inner>\n" +
+            "    <inner3 inner3Attr='3'>\r\n" +
+            "        innerContent3\n" +
+            "    </inner3>\n" +
+            " </test>" ;
+        final SAXParserFactory parserFactory = SAXParserFactory.newInstance() ;
+        parserFactory.setNamespaceAware(true) ;
+        
+        try
+        {
+            final SAXParser parser = parserFactory.newSAXParser() ;
+            
+            final IdentitySAXHandler handler1 = new IdentitySAXHandler() ;
+            parser.parse(new InputSource(new StringReader(content)), handler1) ;
+        }
+        catch (final Throwable th)
+        {
+            th.printStackTrace() ;
+        }
+    }
+
 } /* class */

Deleted: labs/jbossesb/trunk/qa/quickstarts/src/org/jboss/soa/esb/quickstart/test/MoreActionTest.java
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/tests/src/org/jboss/soa/esb/quickstart/test/MoreActionTest.java	2007-10-10 16:19:46 UTC (rev 15724)
+++ labs/jbossesb/trunk/qa/quickstarts/src/org/jboss/soa/esb/quickstart/test/MoreActionTest.java	2007-10-10 18:15:39 UTC (rev 15726)
@@ -1,35 +0,0 @@
-package org.jboss.soa.esb.quickstart.test;
-
-import junit.framework.Test;
-
-import org.jboss.test.JBossTestCase;
-
-
-/**
- * Sample client for the jboss container.
- *
- * @author <a href="mailto:tcunning at redhat.com">Tom Cunningham</a>
- */
-public class MoreActionTest
-        extends JBossTestCase
-{
-	public MoreActionTest(String name)
-	{
-		super(name);
-	}
-
-	public void testMessage() throws Exception
-	{
-		sendMessage();
-		Thread.sleep(10000); // wait for message to post.
-	}
-
-	public void sendMessage() throws Exception
-	{
-	}
-
-   public static Test suite() throws Exception
-   {
-      return getDeploySetup(MoreActionTest.class, "Quickstart_more_action.esb");
-   }
-}

Modified: labs/jbossesb/trunk/qa/quickstarts/src/org/jboss/soa/esb/quickstart/test/RecipientlistTest.java
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/tests/src/org/jboss/soa/esb/quickstart/test/RecipientlistTest.java	2007-10-10 16:19:46 UTC (rev 15724)
+++ labs/jbossesb/trunk/qa/quickstarts/src/org/jboss/soa/esb/quickstart/test/RecipientlistTest.java	2007-10-10 18:15:39 UTC (rev 15726)
@@ -1,3 +1,24 @@
+/*
+ * 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.quickstart.test;
 
 import java.io.File;
@@ -5,6 +26,7 @@
 
 import junit.framework.Test;
 
+import org.jboss.soa.esb.actions.StoreMessageToFile;
 import org.jboss.soa.esb.samples.quickstart.recipientList.test.SendCBRJMSMessage;
 import org.jboss.soa.esb.samples.quickstart.recipientList.test.SendStaticRouterJMSMessage;
 import org.jboss.test.JBossTestCase;
@@ -47,14 +69,14 @@
         /* Verify that the message file is complete */
         boolean fileComplete = Helpers.checkFileContent(LOG_FILE, EXPECTED_RECORD_COUNT);
         if (!fileComplete) {
-        		Hashtable temp = Helpers.getMessageString(LOG_FILE);
+        		Hashtable<String, String> temp = Helpers.getMessageString(LOG_FILE);
         		File target = new File(LOG_FILE);
         		target.delete();
                 fail ("Event file " + LOG_FILE + " not complete - expected " + EXPECTED_RECORD_COUNT 
                 		+ " records - found " + temp.size() + ", test marked as failing");
         }
 
-		Hashtable theTable = Helpers.getMessageString(LOG_FILE);
+		Hashtable<String, String> theTable = Helpers.getMessageString(LOG_FILE);
 
 		String theMessage1 = (String) theTable.get("Message1");
 		String theMessage2 = (String) theTable.get("Message2");
@@ -71,16 +93,16 @@
 	public void sendCBRJMSMessage() throws Exception {
 		SendCBRJMSMessage sm = new SendCBRJMSMessage();
 		sm.setupConnection();
-		sm.sendAMessage(JMS_CBR_MESSAGE + Helpers.START_TAG + FILE_NAME
-				+ Helpers.END_TAG);
+		sm.sendAMessage(JMS_CBR_MESSAGE + StoreMessageToFile.MESSAGE_CONTENT_FILENAME_START + FILE_NAME
+				+ StoreMessageToFile.MESSAGE_CONTENT_FILENAME_END);
 		sm.stop();
 	}
 
 	public void sendStaticRouterJMSMessage() throws Exception {
 		SendStaticRouterJMSMessage sm = new SendStaticRouterJMSMessage();
 		sm.setupConnection();
-		sm.sendAMessage(JMS_MESSAGE + Helpers.START_TAG + FILE_NAME
-				+ Helpers.END_TAG);
+		sm.sendAMessage(JMS_MESSAGE + StoreMessageToFile.MESSAGE_CONTENT_FILENAME_START + FILE_NAME
+				+ StoreMessageToFile.MESSAGE_CONTENT_FILENAME_END);
 		sm.stop();
 	}
 

Modified: labs/jbossesb/trunk/qa/quickstarts/src/org/jboss/soa/esb/quickstart/test/ScriptingGroovyTest.java
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/tests/src/org/jboss/soa/esb/quickstart/test/ScriptingGroovyTest.java	2007-10-10 16:19:46 UTC (rev 15724)
+++ labs/jbossesb/trunk/qa/quickstarts/src/org/jboss/soa/esb/quickstart/test/ScriptingGroovyTest.java	2007-10-10 18:15:39 UTC (rev 15726)
@@ -1,7 +1,33 @@
+/*
+ * 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.quickstart.test;
 
+import java.io.File;
+import java.util.Hashtable;
+
 import junit.framework.Test;
 
+import org.jboss.soa.esb.actions.StoreMessageToFile;
+import org.jboss.soa.esb.samples.quickstart.scriptinggroovy.test.SendJMSMessage;
 import org.jboss.test.JBossTestCase;
 
 
@@ -14,6 +40,15 @@
 public class ScriptingGroovyTest
         extends JBossTestCase
 {
+    private static final String JMS_MESSAGE = "ScriptingGroovyTest message";
+
+    private static final String FILE_NAME = "ScriptingGroovyTest.log";
+
+    private static final String LOG_FILE = Helpers.getTempDir(FILE_NAME)
+                    + FILE_NAME;
+
+    private static final int EXPECTED_RECORD_COUNT = 1;
+
 	public ScriptingGroovyTest(String name)
 	{
 		super(name);
@@ -21,12 +56,44 @@
 
 	public void testMessage() throws Exception
 	{
-		sendMessage();
-		Thread.sleep(10000); // wait for message to post.
+            final File logFile = new File(LOG_FILE) ;
+            if (logFile.exists())
+            {
+                assertTrue("Deleting logfile", logFile.delete()) ;
+            }
+            
+            sendMessage();
+
+            /* Verify that the message file is created */
+            boolean fileExists = Helpers.checkForFile(LOG_FILE);
+            if (!fileExists) {
+                    fail("Event file " + LOG_FILE
+                                    + " not created - test marked as failing");
+            }
+
+            /* Verify that the message file is complete */
+            boolean fileComplete = Helpers.checkFileContent(LOG_FILE,
+                            EXPECTED_RECORD_COUNT);
+            if (!fileComplete) {
+                    Hashtable<String, String> temp = Helpers.getMessageString(LOG_FILE);
+                    fail("Event file " + LOG_FILE + " not complete - expected "
+                                    + EXPECTED_RECORD_COUNT + " records - found " + temp.size()
+                                    + ", test marked as failing");
+            }
+
+            Hashtable<String, String> theTable = Helpers.getMessageString(LOG_FILE);
+            String theMessage = (String) theTable.get("Message1");
+            assertEquals("The strings should match", JMS_MESSAGE, theMessage);
+            assertTrue("Deleting logfile", logFile.delete()) ;
 	}
 
 	public void sendMessage() throws Exception
 	{
+            SendJMSMessage sm = new SendJMSMessage();
+            sm.setupConnection();
+            sm.sendAMessage(JMS_MESSAGE + StoreMessageToFile.MESSAGE_CONTENT_FILENAME_START + FILE_NAME
+                            + StoreMessageToFile.MESSAGE_CONTENT_FILENAME_END) ;
+            sm.stop();
 	}
 
    public static Test suite() throws Exception

Modified: labs/jbossesb/trunk/qa/quickstarts/src/org/jboss/soa/esb/quickstart/test/SimpleCBRTest.java
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/tests/src/org/jboss/soa/esb/quickstart/test/SimpleCBRTest.java	2007-10-10 16:19:46 UTC (rev 15724)
+++ labs/jbossesb/trunk/qa/quickstarts/src/org/jboss/soa/esb/quickstart/test/SimpleCBRTest.java	2007-10-10 18:15:39 UTC (rev 15726)
@@ -1,3 +1,24 @@
+/*
+ * 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.quickstart.test;
 
 import junit.framework.Test;

Modified: labs/jbossesb/trunk/qa/quickstarts/src/org/jboss/soa/esb/quickstart/test/StaticRouterTest.java
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/tests/src/org/jboss/soa/esb/quickstart/test/StaticRouterTest.java	2007-10-10 16:19:46 UTC (rev 15724)
+++ labs/jbossesb/trunk/qa/quickstarts/src/org/jboss/soa/esb/quickstart/test/StaticRouterTest.java	2007-10-10 18:15:39 UTC (rev 15726)
@@ -1,3 +1,24 @@
+/*
+ * 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.quickstart.test;
 
 import junit.framework.Test;

Modified: labs/jbossesb/trunk/qa/quickstarts/src/org/jboss/soa/esb/quickstart/test/TransformCSV2XMLTest.java
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/tests/src/org/jboss/soa/esb/quickstart/test/TransformCSV2XMLTest.java	2007-10-10 16:19:46 UTC (rev 15724)
+++ labs/jbossesb/trunk/qa/quickstarts/src/org/jboss/soa/esb/quickstart/test/TransformCSV2XMLTest.java	2007-10-10 18:15:39 UTC (rev 15726)
@@ -1,7 +1,28 @@
+/*
+ * 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.quickstart.test;
 
 import java.io.File;
-import java.util.Hashtable;
+import java.io.InputStream;
 
 import junit.framework.Test;
 
@@ -19,7 +40,6 @@
 	private static final String FILE_NAME = "transformedmessageCSV2XML.log";
 	private static final String LOG_FILE = Helpers.getTempDir(FILE_NAME)
 		+ FILE_NAME;
-	private static final String EXPECTED_RESULT_FILE = Helpers.RESOURCE_DIR + File.separator + FILE_NAME;
 	
 	
 	public TransformCSV2XMLTest(String name)
@@ -29,10 +49,11 @@
 
 	public void testMessage() throws Exception
 	{
-		File checkFile = new File(LOG_FILE);
-		if (checkFile.exists()) {
-			checkFile.delete();
-		}
+                final File logFile = new File(LOG_FILE) ;
+                if (logFile.exists())
+                {
+                    assertTrue("Deleting logfile", logFile.delete()) ;
+                }
 		
 		sendMessage();
 
@@ -44,24 +65,22 @@
 		}
 		
 		// Make sure the file matches expected output
-		File expectedResult = new File(EXPECTED_RESULT_FILE);
+		final InputStream is = getClass().getClassLoader().getResourceAsStream(FILE_NAME) ;
 		File target = new File(LOG_FILE);
 		String targetString = FileUtil.readTextFile(target);
-		String expectedString = FileUtil.readTextFile(expectedResult);
-		targetString.trim();
-		expectedString.trim();
-		assertEquals("File string should match expected result", targetString, expectedString);
+		String expectedString = FileUtil.readStream(is);
+                final boolean match = Helpers.compareXMLContent(expectedString, targetString) ;
+                assertTrue("Unexpected response: " + targetString, match) ;
 				
-		target.delete();
+                assertTrue("Deleting logfile", logFile.delete()) ;
 	}
 
 	public void sendMessage() throws Exception
 	{
         SendJMSMessage sm = new SendJMSMessage();
         sm.setupConnection();
-        sm.sendAMessage("../transform_CSV2XML/SampleOrder.csv");
+        sm.sendAMessage(Helpers.getQuickstartLocation("transform_CSV2XML/SampleOrder.csv"));
         sm.stop();
-        Thread.sleep(8000); // wait for message to post.
 	}
 
    public static Test suite() throws Exception

Modified: labs/jbossesb/trunk/qa/quickstarts/src/org/jboss/soa/esb/quickstart/test/TransformDateManipulationTest.java
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/tests/src/org/jboss/soa/esb/quickstart/test/TransformDateManipulationTest.java	2007-10-10 16:19:46 UTC (rev 15724)
+++ labs/jbossesb/trunk/qa/quickstarts/src/org/jboss/soa/esb/quickstart/test/TransformDateManipulationTest.java	2007-10-10 18:15:39 UTC (rev 15726)
@@ -1,6 +1,28 @@
+/*
+ * 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.quickstart.test;
 
 import java.io.File;
+import java.io.InputStream;
 
 import junit.framework.Test;
 
@@ -20,7 +42,6 @@
 	private static final String FILE_NAME = "transformedmessageDateManipulation.log";
 	private static final String LOG_FILE = Helpers.getTempDir(FILE_NAME)
 		+ FILE_NAME;
-	private static final String EXPECTED_RESULT_FILE = Helpers.RESOURCE_DIR + File.separator + FILE_NAME;
 	
 	public TransformDateManipulationTest(String name)
 	{
@@ -29,10 +50,11 @@
 
 	public void testMessage() throws Exception
 	{
-		File checkFile = new File(LOG_FILE);
-		if (checkFile.exists()) {
-			checkFile.delete();
-		}
+                final File logFile = new File(LOG_FILE) ;
+                if (logFile.exists())
+                {
+                    assertTrue("Deleting logfile", logFile.delete()) ;
+                }
 		
 		sendMessage();
 
@@ -44,25 +66,22 @@
 		}
 		
 		// Make sure the file matches expected output
-		File expectedResult = new File(EXPECTED_RESULT_FILE);
+		final InputStream is = getClass().getClassLoader().getResourceAsStream(FILE_NAME) ;
 		File target = new File(LOG_FILE);
 		String targetString = FileUtil.readTextFile(target);
-		String expectedString = FileUtil.readTextFile(expectedResult);
-		targetString.trim();
-		expectedString.trim();
-		assertEquals("File string should match expected result", targetString, expectedString);
+		String expectedString = FileUtil.readStream(is);
+                final boolean match = Helpers.compareXMLContent(expectedString, targetString) ;
+                assertTrue("Unexpected response: " + targetString, match) ;
 				
-		target.delete();
+                assertTrue("Deleting logfile", logFile.delete()) ;
 	}
 
 	public void sendMessage() throws Exception
 	{
-		Thread.sleep(5000);
 		SendJMSMessage sm = new SendJMSMessage();
         sm.setupConnection();
-        sm.sendAMessage("../transform_XML2XML_date_manipulation/SampleOrder.xml");
+        sm.sendAMessage(Helpers.getQuickstartLocation("transform_XML2XML_date_manipulation/SampleOrder.xml"));
         sm.stop();
-        Thread.sleep(8000); // wait for message to post.
 	}
 
    public static Test suite() throws Exception

Modified: labs/jbossesb/trunk/qa/quickstarts/src/org/jboss/soa/esb/quickstart/test/TransformEDI2XMLGroovyXSLTTest.java
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/tests/src/org/jboss/soa/esb/quickstart/test/TransformEDI2XMLGroovyXSLTTest.java	2007-10-10 16:19:46 UTC (rev 15724)
+++ labs/jbossesb/trunk/qa/quickstarts/src/org/jboss/soa/esb/quickstart/test/TransformEDI2XMLGroovyXSLTTest.java	2007-10-10 18:15:39 UTC (rev 15726)
@@ -1,6 +1,28 @@
+/*
+ * 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.quickstart.test;
 
 import java.io.File;
+import java.io.InputStream;
 
 import junit.framework.Test;
 
@@ -20,7 +42,6 @@
 	private static final String FILE_NAME = "transformedmessageEDI2XMLGroovyXSL.log";
 	private static final String LOG_FILE = Helpers.getTempDir(FILE_NAME)
 		+ FILE_NAME;
-	private static final String EXPECTED_RESULT_FILE = Helpers.RESOURCE_DIR + File.separator + FILE_NAME;
 	
 	
 	public TransformEDI2XMLGroovyXSLTTest(String name)
@@ -30,10 +51,11 @@
 
 	public void testMessage() throws Exception
 	{
-		File checkFile = new File(LOG_FILE);
-		if (checkFile.exists()) {
-			checkFile.delete();
-		}
+                final File logFile = new File(LOG_FILE) ;
+                if (logFile.exists())
+                {
+                    assertTrue("Deleting logfile", logFile.delete()) ;
+                }
 		
 		sendMessage();
 
@@ -45,25 +67,22 @@
 		}
 		
 		// Make sure the file matches expected output
-		File expectedResult = new File(EXPECTED_RESULT_FILE);
+		final InputStream is = getClass().getClassLoader().getResourceAsStream(FILE_NAME) ;
 		File target = new File(LOG_FILE);
 		String targetString = FileUtil.readTextFile(target);
-		String expectedString = FileUtil.readTextFile(expectedResult);
-		targetString.trim();
-		expectedString.trim();
-		assertEquals("File string should match expected result", targetString, expectedString);
+		String expectedString = FileUtil.readStream(is);
+                final boolean match = Helpers.compareXMLContent(expectedString, targetString) ;
+                assertTrue("Unexpected response: " + targetString, match) ;
 				
-		target.delete();
+                assertTrue("Deleting logfile", logFile.delete()) ;
 	}
 
 	public void sendMessage() throws Exception
 	{
-		Thread.sleep(5000);
 		SendJMSMessage sm = new SendJMSMessage();
         sm.setupConnection();
-        sm.sendAMessage("../transform_EDI2XML_Groovy_XSLT/SampleOrder.edi");
+        sm.sendAMessage(Helpers.getQuickstartLocation("transform_EDI2XML_Groovy_XSLT/SampleOrder.edi"));
         sm.stop();
-        Thread.sleep(8000); // wait for message to post.
 	}
 
    public static Test suite() throws Exception

Modified: labs/jbossesb/trunk/qa/quickstarts/src/org/jboss/soa/esb/quickstart/test/TransformXML2PojoTest.java
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/tests/src/org/jboss/soa/esb/quickstart/test/TransformXML2PojoTest.java	2007-10-10 16:19:46 UTC (rev 15724)
+++ labs/jbossesb/trunk/qa/quickstarts/src/org/jboss/soa/esb/quickstart/test/TransformXML2PojoTest.java	2007-10-10 18:15:39 UTC (rev 15726)
@@ -1,6 +1,7 @@
 package org.jboss.soa.esb.quickstart.test;
 
 import java.io.File;
+import java.io.InputStream;
 
 import junit.framework.Test;
 
@@ -20,7 +21,6 @@
 	private static final String FILE_NAME = "transformedmessageXML2POJO.log";
 	private static final String LOG_FILE = Helpers.getTempDir(FILE_NAME)
 		+ FILE_NAME;
-	private static final String EXPECTED_RESULT_FILE = Helpers.RESOURCE_DIR + File.separator + FILE_NAME;
 
 	
 	public TransformXML2PojoTest(String name)
@@ -30,11 +30,12 @@
 
 	public void testMessage() throws Exception
 	{
-		File checkFile = new File(LOG_FILE);
-		if (checkFile.exists()) {
-			checkFile.delete();
-		}
-		
+                final File logFile = new File(LOG_FILE) ;
+                if (logFile.exists())
+                {
+                    assertTrue("Deleting logfile", logFile.delete()) ;
+                }
+                
 		sendMessage();
 
 		/* Verify that the message file is created */
@@ -45,27 +46,24 @@
 		}
 		
 		// Make sure the file matches expected output
-		File expectedResult = new File(EXPECTED_RESULT_FILE);
+		final InputStream is = getClass().getClassLoader().getResourceAsStream(FILE_NAME) ;
 		File target = new File(LOG_FILE);
 		String targetString = FileUtil.readTextFile(target);
-		String expectedString = FileUtil.readTextFile(expectedResult);
-		targetString.trim();
-		expectedString.trim();
-		assertEquals("File string should match expected result", targetString, expectedString);
+		String expectedString = FileUtil.readStream(is);
+		final boolean match = Helpers.compareXMLContent(expectedString, targetString) ;
+                assertTrue("Unexpected response: " + targetString, match) ;
 				
-		//target.delete();
+                assertTrue("Deleting logfile", logFile.delete()) ;
 	}
 
 	public void sendMessage() throws Exception
 	{
-		Thread.sleep(5000);
 		SendJMSMessage sm = new SendJMSMessage();
         sm.setupConnection();
-        String fileContent = sm.readAsciiFile("../transform_XML2POJO/SampleOrder.xml");
+        String fileContent = sm.readAsciiFile(Helpers.getQuickstartLocation("transform_XML2POJO/SampleOrder.xml"));
         System.out.println("FILECONTENT[" + fileContent + "]");
         sm.sendAMessage(fileContent);
         sm.stop();
-        Thread.sleep(8000); // wait for message to post.
 	}
 
    public static Test suite() throws Exception

Modified: labs/jbossesb/trunk/qa/quickstarts/src/org/jboss/soa/esb/quickstart/test/TransformXMLSimpleTest.java
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/tests/src/org/jboss/soa/esb/quickstart/test/TransformXMLSimpleTest.java	2007-10-10 16:19:46 UTC (rev 15724)
+++ labs/jbossesb/trunk/qa/quickstarts/src/org/jboss/soa/esb/quickstart/test/TransformXMLSimpleTest.java	2007-10-10 18:15:39 UTC (rev 15726)
@@ -1,6 +1,28 @@
+/*
+ * 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.quickstart.test;
 
 import java.io.File;
+import java.io.InputStream;
 
 import junit.framework.Test;
 
@@ -19,7 +41,6 @@
 	private static final String FILE_NAME = "transformedmessageXML2Simple.log";
 	private static final String LOG_FILE = Helpers.getTempDir(FILE_NAME)
 		+ FILE_NAME;
-	private static final String EXPECTED_RESULT_FILE = Helpers.RESOURCE_DIR + File.separator + FILE_NAME;
 
 	public TransformXMLSimpleTest(String name)
 	{
@@ -28,10 +49,11 @@
 
 	public void testMessage() throws Exception
 	{
-		File checkFile = new File(LOG_FILE);
-		if (checkFile.exists()) {
-			checkFile.delete();
-		}
+                final File logFile = new File(LOG_FILE) ;
+                if (logFile.exists())
+                {
+                    assertTrue("Deleting logfile", logFile.delete()) ;
+                }
 		
 		sendMessage();
 
@@ -43,24 +65,22 @@
 		}
 		
 		// Make sure the file matches expected output
-		File expectedResult = new File(EXPECTED_RESULT_FILE);
+		final InputStream is = getClass().getClassLoader().getResourceAsStream(FILE_NAME) ;
 		File target = new File(LOG_FILE);
 		String targetString = FileUtil.readTextFile(target);
-		String expectedString = FileUtil.readTextFile(expectedResult);
-		targetString.trim();
-		expectedString.trim();
-		assertEquals("File string should match expected result", targetString, expectedString);
-				
+		String expectedString = FileUtil.readStream(is);
+                final boolean match = Helpers.compareXMLContent(expectedString, targetString) ;
+                assertTrue("Unexpected response: " + targetString, match) ;
+                
+                assertTrue("Deleting logfile", logFile.delete()) ;
 	}
 
 	public void sendMessage() throws Exception
 	{
-		Thread.sleep(5000);
 		SendJMSMessage sm = new SendJMSMessage();
         sm.setupConnection();
-        sm.sendAMessage("../transform_XML2XML_simple/SampleOrder.xml");
+        sm.sendAMessage(Helpers.getQuickstartLocation("transform_XML2XML_simple/SampleOrder.xml"));
         sm.stop();
-        Thread.sleep(8000); // wait for message to post.
 	}
 
    public static Test suite() throws Exception

Modified: labs/jbossesb/trunk/qa/quickstarts/src/org/jboss/soa/esb/quickstart/test/WebserviceAdapterTest.java
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/tests/src/org/jboss/soa/esb/quickstart/test/WebserviceAdapterTest.java	2007-10-10 16:19:46 UTC (rev 15724)
+++ labs/jbossesb/trunk/qa/quickstarts/src/org/jboss/soa/esb/quickstart/test/WebserviceAdapterTest.java	2007-10-10 18:15:39 UTC (rev 15726)
@@ -1,3 +1,24 @@
+/*
+ * 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.quickstart.test;
 
 import junit.framework.Test;

Modified: labs/jbossesb/trunk/qa/quickstarts/src/org/jboss/soa/esb/quickstart/test/WebserviceBPELTest.java
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/tests/src/org/jboss/soa/esb/quickstart/test/WebserviceBPELTest.java	2007-10-10 16:19:46 UTC (rev 15724)
+++ labs/jbossesb/trunk/qa/quickstarts/src/org/jboss/soa/esb/quickstart/test/WebserviceBPELTest.java	2007-10-10 18:15:39 UTC (rev 15726)
@@ -1,3 +1,24 @@
+/*
+ * 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.quickstart.test;
 
 import junit.framework.Test;

Modified: labs/jbossesb/trunk/qa/quickstarts/src/org/jboss/soa/esb/quickstart/test/WiretapTest.java
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/tests/src/org/jboss/soa/esb/quickstart/test/WiretapTest.java	2007-10-10 16:19:46 UTC (rev 15724)
+++ labs/jbossesb/trunk/qa/quickstarts/src/org/jboss/soa/esb/quickstart/test/WiretapTest.java	2007-10-10 18:15:39 UTC (rev 15726)
@@ -1,3 +1,24 @@
+/*
+ * 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.quickstart.test;
 
 import java.io.File;
@@ -5,10 +26,8 @@
 
 import junit.framework.Test;
 
-import org.jboss.soa.esb.samples.quickstart.wiretap.test.SendCBRJMSMessage;
-import org.jboss.soa.esb.samples.quickstart.wiretap.test.SendJMSMessage;
+import org.jboss.soa.esb.actions.StoreMessageToFile;
 import org.jboss.soa.esb.samples.quickstart.wiretap.test.SendStaticRouterJMSMessage;
-import org.jboss.soa.esb.samples.quickstart.wiretap.test.SendWiretapJMSMessage;
 import org.jboss.test.JBossTestCase;
 
 /**
@@ -19,7 +38,6 @@
  */
 
 public class WiretapTest extends JBossTestCase {
-	private static final String JMS_CBR_MESSAGE = "<Order sampleData=\"CBR wiretap test\" testDate=\"20070518\" routeToFollow=\"both\"><Customer userName=\"user1\" firstName=\"Harry\" lastName=\"Fletcher\" state=\"SD\"/></Order>";
 	private static final String JMS_MESSAGE = "Wiretap Message";
 	private static final String FILE_NAME = "Wiretap.log";
 	private static final String LOG_FILE = Helpers.getTempDir(FILE_NAME) + FILE_NAME;
@@ -30,6 +48,12 @@
 	} /* method */
 
 	public void testStaticRouterMessage() throws Exception {
+                final File logFile = new File(LOG_FILE) ;
+                if (logFile.exists())
+                {
+                    assertTrue("Deleting logfile", logFile.delete()) ;
+                }
+                
 		sendStaticRouterJMSMessage();
 
 		/* Verify that the message file is created */
@@ -41,14 +65,12 @@
         /* Verify that the message file is complete */
         boolean fileComplete = Helpers.checkFileContent(LOG_FILE, EXPECTED_RECORD_COUNT);
         if (!fileComplete) {
-        		Hashtable temp = Helpers.getMessageString(LOG_FILE);
-        		File target = new File(LOG_FILE);
-        		target.delete();
+        		Hashtable<String, String> temp = Helpers.getMessageString(LOG_FILE);
                 fail ("Event file " + LOG_FILE + " not complete - expected " + EXPECTED_RECORD_COUNT 
                 		+ " records - found " + temp.size() + ", test marked as failing");
         }
         
-		Hashtable theTable = Helpers.getMessageString(LOG_FILE);
+		Hashtable<String, String> theTable = Helpers.getMessageString(LOG_FILE);
 
 		String theMessage1 = (String) theTable.get("Message1");
 		String theMessage2 = (String) theTable.get("Message2");
@@ -56,15 +78,13 @@
 		assertEquals("The strings1 should match", theMessage1, JMS_MESSAGE);
 		assertEquals("The strings2 should match", theMessage2, JMS_MESSAGE);
 		
-		File target = new File(LOG_FILE);
-		target.delete();       	
-       	
+                assertTrue("Deleting logfile", logFile.delete()) ;
 	} /* method */
 
 	public void sendStaticRouterJMSMessage() throws Exception {
 		SendStaticRouterJMSMessage sm = new SendStaticRouterJMSMessage();
 		sm.setupConnection();
-		sm.sendAMessage(JMS_MESSAGE + Helpers.START_TAG + FILE_NAME + Helpers.END_TAG);
+		sm.sendAMessage(JMS_MESSAGE + StoreMessageToFile.MESSAGE_CONTENT_FILENAME_START + FILE_NAME + StoreMessageToFile.MESSAGE_CONTENT_FILENAME_END);
 		sm.stop();
 	} /* method */
 

Added: labs/jbossesb/trunk/qa/quickstarts/src/org/jboss/soa/esb/quickstart/test/util/Element.java
===================================================================
--- labs/jbossesb/trunk/qa/quickstarts/src/org/jboss/soa/esb/quickstart/test/util/Element.java	                        (rev 0)
+++ labs/jbossesb/trunk/qa/quickstarts/src/org/jboss/soa/esb/quickstart/test/util/Element.java	2007-10-10 18:15:39 UTC (rev 15726)
@@ -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.quickstart.test.util;
+
+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());
+        }
+    }
+}


Property changes on: labs/jbossesb/trunk/qa/quickstarts/src/org/jboss/soa/esb/quickstart/test/util/Element.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbossesb/trunk/qa/quickstarts/src/org/jboss/soa/esb/quickstart/test/util/IdentitySAXHandler.java
===================================================================
--- labs/jbossesb/trunk/qa/quickstarts/src/org/jboss/soa/esb/quickstart/test/util/IdentitySAXHandler.java	                        (rev 0)
+++ labs/jbossesb/trunk/qa/quickstarts/src/org/jboss/soa/esb/quickstart/test/util/IdentitySAXHandler.java	2007-10-10 18:15:39 UTC (rev 15726)
@@ -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.quickstart.test.util;
+
+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 ;
+    }
+}


Property changes on: labs/jbossesb/trunk/qa/quickstarts/src/org/jboss/soa/esb/quickstart/test/util/IdentitySAXHandler.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbossesb/trunk/qa/quickstarts/src/org/jboss/soa/esb/quickstart/test/util/Node.java
===================================================================
--- labs/jbossesb/trunk/qa/quickstarts/src/org/jboss/soa/esb/quickstart/test/util/Node.java	                        (rev 0)
+++ labs/jbossesb/trunk/qa/quickstarts/src/org/jboss/soa/esb/quickstart/test/util/Node.java	2007-10-10 18:15:39 UTC (rev 15726)
@@ -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.quickstart.test.util;
+
+/**
+ * Simple Node tagging XML nodes.
+ *
+ * @author Kevin Conner
+ */
+public interface Node
+{
+}


Property changes on: labs/jbossesb/trunk/qa/quickstarts/src/org/jboss/soa/esb/quickstart/test/util/Node.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbossesb/trunk/qa/quickstarts/src/org/jboss/soa/esb/quickstart/test/util/Text.java
===================================================================
--- labs/jbossesb/trunk/qa/quickstarts/src/org/jboss/soa/esb/quickstart/test/util/Text.java	                        (rev 0)
+++ labs/jbossesb/trunk/qa/quickstarts/src/org/jboss/soa/esb/quickstart/test/util/Text.java	2007-10-10 18:15:39 UTC (rev 15726)
@@ -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.quickstart.test.util;
+
+
+/**
+ * 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 ;
+    }
+}


Property changes on: labs/jbossesb/trunk/qa/quickstarts/src/org/jboss/soa/esb/quickstart/test/util/Text.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native




More information about the jboss-svn-commits mailing list