[jboss-svn-commits] JBL Code SVN: r31263 - in labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz: drools-core and 19 other directories.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Wed Jan 27 13:55:27 EST 2010


Author: baunax
Date: 2010-01-27 13:55:25 -0500 (Wed, 27 Jan 2010)
New Revision: 31263

Added:
   labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/command/runtime/BatchExecutionCommand.java
   labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/process/result/
   labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/process/result/ExecutionResultsType.java
   labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/process/result/FactHandleListType.java
   labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/process/result/FactObjectListType.java
   labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/process/result/GlobalType.java
   labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/process/result/InsertResultsType.java
   labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/process/result/ObjectFactory.java
   labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/process/result/QueryFieldType.java
   labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/process/result/QueryResultsType.java
   labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/process/result/QueryRowType.java
   labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/process/result/package-info.java
   labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/result/
   labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/result/AbstractResult.java
   labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/result/ExecutionResults.java
   labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/result/ExecutionResultsImpl.java
   labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/result/GenericResult.java
   labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/result/GetGlobalResult.java
   labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/result/GetObjectsResult.java
   labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/result/InsertElementsResult.java
   labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/result/InsertObjectResult.java
   labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/result/QueryResult.java
   labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/result/SetGlobalResult.java
   labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/runtime/impl/ExecutionResultAdapter.java
   labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-pipeline/drools-camel/src/main/java/org/drools/camel/component/DroolsJaxbDataFormat.java
   labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-pipeline/drools-camel/src/main/resources/META-INF/services/org/apache/camel/dataformat/drools-jaxb
   labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-pipeline/drools-camel/src/test/java/org/drools/camel/component/CamelEndpointWithJaxbTest.java
   labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-pipeline/drools-camel/src/test/resources/org/
   labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-pipeline/drools-camel/src/test/resources/org/drools/
   labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-pipeline/drools-camel/src/test/resources/org/drools/camel/
   labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-pipeline/drools-camel/src/test/resources/org/drools/camel/component/
   labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-pipeline/drools-camel/src/test/resources/org/drools/camel/component/person.xml
   labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-pipeline/drools-camel/src/test/resources/org/drools/camel/component/person.xsd
   labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-pipeline/drools-transformer-jaxb/src/main/java/org/drools/runtime/pipeline/impl/CommandTranslator.java
   labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-pipeline/drools-transformer-jaxb/src/main/java/org/drools/runtime/pipeline/impl/JaxbTransformer.java
   labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-pipeline/drools-transformer-jaxb/src/main/java/org/drools/runtime/pipeline/impl/ResultTranslator.java
Removed:
   labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/process/result/ExecutionResultsType.java
   labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/process/result/FactHandleListType.java
   labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/process/result/FactObjectListType.java
   labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/process/result/GlobalType.java
   labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/process/result/InsertResultsType.java
   labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/process/result/ObjectFactory.java
   labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/process/result/QueryFieldType.java
   labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/process/result/QueryResultsType.java
   labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/process/result/QueryRowType.java
   labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/process/result/package-info.java
   labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/result/AbstractResult.java
   labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/result/ExecutionResults.java
   labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/result/ExecutionResultsImpl.java
   labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/result/GenericResult.java
   labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/result/GetGlobalResult.java
   labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/result/GetObjectsResult.java
   labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/result/InsertElementsResult.java
   labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/result/InsertObjectResult.java
   labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/result/QueryResult.java
   labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/result/SetGlobalResult.java
   labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-pipeline/drools-camel/src/test/resources/org/drools/
   labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-pipeline/drools-camel/src/test/resources/org/drools/camel/
   labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-pipeline/drools-camel/src/test/resources/org/drools/camel/component/
   labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-pipeline/drools-camel/src/test/resources/org/drools/camel/component/person.xml
   labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-pipeline/drools-camel/src/test/resources/org/drools/camel/component/person.xsd
Modified:
   labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-api/src/main/java/org/drools/runtime/pipeline/JaxbTransformerProvider.java
   labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-api/src/main/java/org/drools/runtime/pipeline/PipelineFactory.java
   labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/pom.xml
   labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/command/impl/CommandFactoryProviderImpl.java
   labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/command/runtime/GetGlobalCommand.java
   labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/command/runtime/SetGlobalCommand.java
   labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/command/runtime/rule/GetObjectCommand.java
   labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/command/runtime/rule/InsertElementsCommand.java
   labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/command/runtime/rule/InsertObjectCommand.java
   labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/command/runtime/rule/QueryCommand.java
   labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/common/DefaultFactHandle.java
   labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/runtime/impl/BatchExecutionImpl.java
   labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/runtime/impl/ExecutionResultImpl.java
   labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-pipeline/drools-transformer-jaxb/src/main/java/org/drools/runtime/pipeline/impl/DroolsJaxbHelperProviderImpl.java
   labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-pipeline/drools-transformer-jaxb/src/main/java/org/drools/runtime/pipeline/impl/JaxbFromXmlTransformer.java
   labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-pipeline/drools-transformer-jaxb/src/main/java/org/drools/runtime/pipeline/impl/JaxbToXmlTransformer.java
   labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-pipeline/drools-transformer-jaxb/src/main/java/org/drools/runtime/pipeline/impl/JaxbTransformerProviderImpl.java
   labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-pipeline/drools-transformer-jaxb/src/test/java/org/drools/runtime/pipeline/impl/JaxbFactTest.java
   labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-pipeline/drools-transformer-jaxb/src/test/java/org/drools/runtime/pipeline/impl/JaxbGlobalTest.java
   labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-pipeline/drools-transformer-jaxb/src/test/java/org/drools/runtime/pipeline/impl/JaxbTest.java
Log:
merge with https://svn.jboss.org/repos/labs/labs/jbossrules/branches/camel_jaxb_marshaller-lucaz

Modified: labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-api/src/main/java/org/drools/runtime/pipeline/JaxbTransformerProvider.java
===================================================================
--- labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-api/src/main/java/org/drools/runtime/pipeline/JaxbTransformerProvider.java	2010-01-27 18:21:31 UTC (rev 31262)
+++ labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-api/src/main/java/org/drools/runtime/pipeline/JaxbTransformerProvider.java	2010-01-27 18:55:25 UTC (rev 31263)
@@ -1,7 +1,6 @@
 package org.drools.runtime.pipeline;
 
-import javax.xml.bind.Marshaller;
-import javax.xml.bind.Unmarshaller;
+import javax.xml.bind.JAXBContext;
 
 /**
  * 
@@ -9,7 +8,13 @@
  *
  */
 public interface JaxbTransformerProvider {
-    Transformer newJaxbFromXmlTransformer(Unmarshaller unmarshaller);
-
-    Transformer newJaxbToXmlTransformer(Marshaller marshaller);
+	
+    Transformer newJaxbFromXmlTransformer( JAXBContext jaxbCtx );
+    
+    Transformer newJaxbFromXmlCommandTransformer( JAXBContext jaxbCtx );
+    
+    Transformer newJaxbToXmlTransformer( JAXBContext jaxbCtx );
+    
+    Transformer newJaxbToXmlResultTransformer( JAXBContext jaxbCtx );
+    
 }

Modified: labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-api/src/main/java/org/drools/runtime/pipeline/PipelineFactory.java
===================================================================
--- labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-api/src/main/java/org/drools/runtime/pipeline/PipelineFactory.java	2010-01-27 18:21:31 UTC (rev 31262)
+++ labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-api/src/main/java/org/drools/runtime/pipeline/PipelineFactory.java	2010-01-27 18:55:25 UTC (rev 31263)
@@ -481,8 +481,8 @@
      * @param unmarshaller
      * @return
      */
-    public static Transformer newJaxbFromXmlTransformer(Unmarshaller unmarshaller) {
-        return getJaxbPipelineProvider().newJaxbFromXmlTransformer( unmarshaller );
+    public static Transformer newJaxbFromXmlTransformer(JAXBContext context) {
+        return getJaxbPipelineProvider().newJaxbFromXmlTransformer( context );
     }
 
     /**
@@ -498,8 +498,8 @@
      * @param marshaller
      * @return
      */
-    public static Transformer newJaxbToXmlTransformer(Marshaller marshaller) {
-        return getJaxbPipelineProvider().newJaxbToXmlTransformer( marshaller );
+    public static Transformer newJaxbToXmlTransformer(JAXBContext context) {
+        return getJaxbPipelineProvider().newJaxbToXmlTransformer( context );
     }
 
     /**

Modified: labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/pom.xml
===================================================================
--- labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/pom.xml	2010-01-27 18:21:31 UTC (rev 31262)
+++ labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/pom.xml	2010-01-27 18:55:25 UTC (rev 31263)
@@ -44,6 +44,18 @@
         <groupId>org.joda</groupId>  
         <artifactId>com.springsource.org.joda.time</artifactId>  
     </dependency-->
+
+	<dependency>
+		<groupId>com.sun.xml.bind</groupId>
+		<artifactId>jaxb-impl</artifactId>
+		<version>2.0.3</version>
+	</dependency>
+
+	<dependency>
+		<groupId>com.sun.xml.bind</groupId>
+		<artifactId>jaxb-xjc</artifactId>
+		<version>2.0.3</version>
+	</dependency>    
    </dependencies>
    <build>
       <plugins>

Modified: labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/command/impl/CommandFactoryProviderImpl.java
===================================================================
--- labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/command/impl/CommandFactoryProviderImpl.java	2010-01-27 18:21:31 UTC (rev 31262)
+++ labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/command/impl/CommandFactoryProviderImpl.java	2010-01-27 18:55:25 UTC (rev 31263)
@@ -38,7 +38,9 @@
 	}
 
 	public Command newInsertElements(Iterable objects) {
-		return new InsertElementsCommand(objects);
+//		TODO: FIX THIS
+//		return new InsertElementsCommand(objects);
+		return null;
 	}
 
 	public Command newInsert(Object object) {

Copied: labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/command/runtime/BatchExecutionCommand.java (from rev 31239, labs/jbossrules/branches/camel_jaxb_marshaller-lucaz/drools-core/src/main/java/org/drools/command/runtime/BatchExecutionCommand.java)
===================================================================
--- labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/command/runtime/BatchExecutionCommand.java	                        (rev 0)
+++ labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/command/runtime/BatchExecutionCommand.java	2010-01-27 18:55:25 UTC (rev 31263)
@@ -0,0 +1,146 @@
+package org.drools.command.runtime;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlElements;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+import org.drools.command.Context;
+import org.drools.command.impl.GenericCommand;
+import org.drools.command.runtime.process.AbortWorkItemCommand;
+import org.drools.command.runtime.process.CompleteWorkItemCommand;
+import org.drools.command.runtime.process.SignalEventCommand;
+import org.drools.command.runtime.process.StartProcessCommand;
+import org.drools.command.runtime.rule.FireAllRulesCommand;
+import org.drools.command.runtime.rule.GetObjectCommand;
+import org.drools.command.runtime.rule.InsertElementsCommand;
+import org.drools.command.runtime.rule.InsertObjectCommand;
+import org.drools.command.runtime.rule.QueryCommand;
+
+
+/**
+ * <p>Java class for BatchExecutionCommand complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType name="BatchExecutionCommand">
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;choice maxOccurs="unbounded">
+ *         &lt;element name="abort-work-item" type="{http://drools.org/drools-5.0/knowledge-session}AbortWorkItemCommand"/>
+ *         &lt;element name="complete-work-item" type="{http://drools.org/drools-5.0/knowledge-session}CompleteWorkItemCommand"/>
+ *         &lt;element name="fire-all-rules" type="{http://drools.org/drools-5.0/knowledge-session}FireAllRulesCommand"/>
+ *         &lt;element name="get-global" type="{http://drools.org/drools-5.0/knowledge-session}GetGlobalCommand"/>
+ *         &lt;element name="insert" type="{http://drools.org/drools-5.0/knowledge-session}InsertObjectCommand"/>
+ *         &lt;element name="insert-elements" type="{http://drools.org/drools-5.0/knowledge-session}InsertElementsCommand"/>
+ *         &lt;element name="query" type="{http://drools.org/drools-5.0/knowledge-session}QueryCommand"/>
+ *         &lt;element name="set-global" type="{http://drools.org/drools-5.0/knowledge-session}SetGlobalCommand"/>
+ *         &lt;element name="signal-event" type="{http://drools.org/drools-5.0/knowledge-session}SignalEventCommand"/>
+ *         &lt;element name="start-process" type="{http://drools.org/drools-5.0/knowledge-session}StartProcessCommand"/>
+ *       &lt;/choice>
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+ at XmlRootElement(name="batch-execution")
+ at XmlAccessorType(XmlAccessType.FIELD)
+ at XmlType(name = "batch-execution", propOrder = {
+    "lookup", "commands"
+})
+public class BatchExecutionCommand implements GenericCommand<Void> {
+	
+	private static final long serialVersionUID = 1L;
+	
+	@XmlAttribute
+	private String lookup;
+
+	public BatchExecutionCommand(){
+	}
+	
+	public BatchExecutionCommand( List<GenericCommand<?>> commands ) {
+		this.commands = commands;
+	}
+	
+	public BatchExecutionCommand( List<GenericCommand<?>> commands, String lookup ) {
+		this.commands = commands;
+		this.lookup = lookup;
+	}
+	
+    @XmlElements({
+        @XmlElement(name = "set-global", type = SetGlobalCommand.class),
+//        @XmlElement(name = "complete-work-item", type = CompleteWorkItemCommand.class),
+//        @XmlElement(name = "abort-work-item", type = AbortWorkItemCommand.class),
+//        @XmlElement(name = "signal-event", type = SignalEventCommand.class),
+//        @XmlElement(name = "fire-all-rules", type = FireAllRulesCommand.class),
+//        @XmlElement(name = "start-process", type = StartProcessCommand.class),
+//        @XmlElement(name = "get-global", type = GetGlobalCommand.class),
+//        @XmlElement(name = "insert-elements", type = InsertElementsCommand.class),
+//        @XmlElement(name = "query", type = QueryCommand.class),
+        @XmlElement(name = "insert", type = InsertObjectCommand.class),
+        @XmlElement(name = "get-object", type = GetObjectCommand.class)
+    })
+    protected List<GenericCommand<?>> commands;
+
+    /**
+     * Gets the value of the abortWorkItemOrCompleteWorkItemOrFireAllRules property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the abortWorkItemOrCompleteWorkItemOrFireAllRules property.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getCommand().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link SetGlobalCommand }
+     * {@link CompleteWorkItemCommand }
+     * {@link AbortWorkItemCommand }
+     * {@link SignalEventCommand }
+     * {@link FireAllRulesCommand }
+     * {@link StartProcessCommand }
+     * {@link GetGlobalCommand }
+     * {@link InsertElementsCommand }
+     * {@link QueryCommand }
+     * {@link InsertObjectCommand }
+     * 
+     * 
+     */
+    public List<GenericCommand<?>> getCommands() {
+        if (commands == null) {
+            commands = new ArrayList<GenericCommand<?>>();
+        }
+        return this.commands;
+    }
+
+    public Void execute(Context context) {
+        for ( GenericCommand<?> command : commands ) {
+            ((GenericCommand<?>)command).execute( context );
+        }
+        return null;
+    }
+
+	public void setLookup(String lookup) {
+		this.lookup = lookup;
+	}
+
+	public String getLookup() {
+		return lookup;
+	}	
+}

Modified: labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/command/runtime/GetGlobalCommand.java
===================================================================
--- labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/command/runtime/GetGlobalCommand.java	2010-01-27 18:21:31 UTC (rev 31262)
+++ labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/command/runtime/GetGlobalCommand.java	2010-01-27 18:55:25 UTC (rev 31263)
@@ -1,23 +1,23 @@
 package org.drools.command.runtime;
 
-import java.util.Collection;
-
 import org.drools.command.Context;
 import org.drools.command.impl.GenericCommand;
 import org.drools.command.impl.KnowledgeCommandContext;
 import org.drools.impl.StatefulKnowledgeSessionImpl;
-import org.drools.reteoo.ReteooWorkingMemory;
-import org.drools.runtime.ExecutionResults;
 import org.drools.runtime.StatefulKnowledgeSession;
 import org.drools.runtime.impl.ExecutionResultImpl;
-import org.drools.runtime.rule.FactHandle;
 
 public class GetGlobalCommand
     implements
     GenericCommand<Object> {
 
-    private String identifier;
+	private static final long serialVersionUID = 1L;
+	
+	private String identifier;
     private String outIdentifier;
+    
+    public GetGlobalCommand() {
+	}
 
     public GetGlobalCommand(String identifier) {
         this.identifier = identifier;

Modified: labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/command/runtime/SetGlobalCommand.java
===================================================================
--- labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/command/runtime/SetGlobalCommand.java	2010-01-27 18:21:31 UTC (rev 31262)
+++ labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/command/runtime/SetGlobalCommand.java	2010-01-27 18:55:25 UTC (rev 31263)
@@ -1,70 +1,98 @@
 package org.drools.command.runtime;
 
-import org.drools.KnowledgeBase;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+
 import org.drools.command.Context;
 import org.drools.command.impl.GenericCommand;
 import org.drools.command.impl.KnowledgeCommandContext;
 import org.drools.impl.StatefulKnowledgeSessionImpl;
-import org.drools.reteoo.ReteooWorkingMemory;
+import org.drools.result.ExecutionResults;
+import org.drools.result.SetGlobalResult;
 import org.drools.runtime.StatefulKnowledgeSession;
 
+ at XmlRootElement
+ at XmlAccessorType( XmlAccessType.NONE )
 public class SetGlobalCommand
     implements
     GenericCommand<Void> {
 
-    private String  identifier;
-    private Object  object;
+    @XmlAttribute(required = true)
+    private String identifier;
 
-    private String  outIdentifier;
+    @XmlElement(name="")
+    private Object object;
+    
+    @XmlAttribute(name = "out-identifier")
+    private String outIdentifier;
+    
+    @XmlAttribute
+    private Boolean out;
 
-    private boolean out;
+    public SetGlobalCommand(){
+    }
 
     public SetGlobalCommand(String identifier,
                             Object object) {
-        this.identifier = identifier;
-        this.object = object;
+    	this.identifier = identifier;
+    	this.object = object;
     }
 
     public Void execute(Context context) {
-        StatefulKnowledgeSession ksession = ((KnowledgeCommandContext) context).getStatefulKnowledgesession();
+    	StatefulKnowledgeSession ksession = ((KnowledgeCommandContext) context).getStatefulKnowledgesession();
 
-        if ( this.out ) {
-            ((StatefulKnowledgeSessionImpl) ksession).session.getExecutionResult().getResults().put( (this.outIdentifier != null) ? this.outIdentifier : this.identifier,
-                                                                                                     object );
-        }
+    	ksession.setGlobal( this.identifier, this.object );
 
-        ksession.setGlobal( this.identifier,
-                            this.object );
-        return null;
+    	if ( this.isOut() ) {
+    		ExecutionResults execRes = (ExecutionResults)((StatefulKnowledgeSessionImpl) ksession).session.getExecutionResult();
+    		String id =  (this.outIdentifier != null) ? this.outIdentifier : this.identifier;
+    		execRes.getResults().add( new SetGlobalResult( id, object ) );
+    	}
+    	return null;
     }
 
-    public String getIdentifier() {
-        return this.identifier;
+    public Object getObject() {
+    	return this.object;
     }
 
-    public Object getObject() {
-        return this.object;
+    public void setObject( Object object ) {
+    	this.object = object;
     }
 
     public String getOutIdentifier() {
-        return this.outIdentifier;
+    	return this.outIdentifier;
     }
 
     public void setOutIdentifier(String outIdentifier) {
-        this.outIdentifier = outIdentifier;
-        this.out = true;
+    	this.outIdentifier = outIdentifier;
+    	this.out = true;
     }
 
+    public String getIdentifier() {
+    	return this.identifier;
+    }
+
+    public void setIdentifier(String identifier) {
+    	this.identifier = identifier;
+    }
+
     public boolean isOut() {
-        return this.out;
+    	if (out == null) {
+    		return false;
+    	} else {
+    		return out;
+    	}
     }
 
-    public void setOut(boolean out) {
-        this.out = out;
+    public void setOut(Boolean out) {
+    	this.out = out;
     }
 
     public String toString() {
-        return "session.setGlobal(" + this.identifier + ", " + this.object + ");";
+    	return "session.setGlobal(" + this.identifier + ", " + this.object + ");";
     }
 
 }

Modified: labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/command/runtime/rule/GetObjectCommand.java
===================================================================
--- labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/command/runtime/rule/GetObjectCommand.java	2010-01-27 18:21:31 UTC (rev 31262)
+++ labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/command/runtime/rule/GetObjectCommand.java	2010-01-27 18:55:25 UTC (rev 31263)
@@ -1,23 +1,34 @@
 package org.drools.command.runtime.rule;
 
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlRootElement;
+
 import org.drools.command.Context;
 import org.drools.command.impl.GenericCommand;
 import org.drools.command.impl.KnowledgeCommandContext;
+import org.drools.common.DisconnectedFactHandle;
 import org.drools.impl.StatefulKnowledgeSessionImpl;
 import org.drools.runtime.StatefulKnowledgeSession;
 import org.drools.runtime.rule.FactHandle;
 
+ at XmlRootElement(name="get-object")
+ at XmlAccessorType(XmlAccessType.NONE)
 public class GetObjectCommand
     implements
     GenericCommand<Object> {
 
     private FactHandle factHandle;
     private String     outIdentifier;
+    
+    public GetObjectCommand() { }
 
     public GetObjectCommand(FactHandle factHandle) {
         this.factHandle = factHandle;
     }
 
+    @XmlAttribute(name="out-identifier", required=true)
     public String getOutIdentifier() {
         return outIdentifier;
     }
@@ -26,7 +37,12 @@
         this.outIdentifier = outIdentifier;
     }
 
-    public Object execute(Context context) {
+    @XmlAttribute(name="factHandle", required=true)
+    public void setFactHandleString(String factHandleString) {
+    	factHandle = new DisconnectedFactHandle(factHandleString);
+	}
+
+	public Object execute(Context context) {
         StatefulKnowledgeSession ksession = ((KnowledgeCommandContext) context).getStatefulKnowledgesession();
         
         Object object = ksession.getObject( factHandle );

Modified: labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/command/runtime/rule/InsertElementsCommand.java
===================================================================
--- labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/command/runtime/rule/InsertElementsCommand.java	2010-01-27 18:21:31 UTC (rev 31262)
+++ labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/command/runtime/rule/InsertElementsCommand.java	2010-01-27 18:55:25 UTC (rev 31263)
@@ -8,17 +8,17 @@
 import org.drools.command.impl.GenericCommand;
 import org.drools.command.impl.KnowledgeCommandContext;
 import org.drools.impl.StatefulKnowledgeSessionImpl;
-import org.drools.reteoo.ReteooWorkingMemory;
 import org.drools.runtime.StatefulKnowledgeSession;
 import org.drools.runtime.rule.FactHandle;
 
-import com.thoughtworks.xstream.annotations.XStreamImplicit;
-
 public class InsertElementsCommand
     implements
     GenericCommand<Collection<FactHandle>> {
-    public Iterable objects;
 
+	private static final long serialVersionUID = 1L;
+
+	public Collection<?> objects;
+
     private String  outIdentifier;
 
     private boolean returnObject = true;
@@ -27,15 +27,15 @@
         this.objects = new ArrayList();
     }
 
-    public InsertElementsCommand(Iterable objects) {
+    public InsertElementsCommand(Collection<?> objects) {
         this.objects = objects;
     }
 
-    public Iterable getObjects() {
+    public Collection<?> getObjects() {
         return this.objects;
     }
 
-    public void setObjects(Iterable objects) {
+    public void setObjects(List<?> objects) {
         this.objects = objects;
     }
 

Modified: labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/command/runtime/rule/InsertObjectCommand.java
===================================================================
--- labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/command/runtime/rule/InsertObjectCommand.java	2010-01-27 18:21:31 UTC (rev 31262)
+++ labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/command/runtime/rule/InsertObjectCommand.java	2010-01-27 18:55:25 UTC (rev 31263)
@@ -1,23 +1,37 @@
 package org.drools.command.runtime.rule;
 
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+
 import org.drools.command.Context;
 import org.drools.command.impl.GenericCommand;
 import org.drools.command.impl.KnowledgeCommandContext;
-import org.drools.common.InternalFactHandle;
 import org.drools.impl.StatefulKnowledgeSessionImpl;
 import org.drools.reteoo.ReteooWorkingMemory;
 import org.drools.runtime.StatefulKnowledgeSession;
 import org.drools.runtime.rule.FactHandle;
 
+ at XmlRootElement(name="insert")
+ at XmlAccessorType(XmlAccessType.NONE)
 public class InsertObjectCommand
     implements
     GenericCommand<FactHandle> {
 
-    private Object  object;
+	private static final long serialVersionUID = 1L;
 
+	@XmlElement
+	private Object  object;
+
+	@XmlAttribute(name="out-identifier", required=true)
     private String  outIdentifier;
 
     private boolean returnObject = true;
+    
+    public InsertObjectCommand() {
+	}
 
     public InsertObjectCommand(Object object) {
         this.object = object;
@@ -44,6 +58,10 @@
     public Object getObject() {
         return this.object;
     }
+    
+    public void setObject( Object object ) {
+        this.object = object;
+    }
 
     public String getOutIdentifier() {
         return this.outIdentifier;

Modified: labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/command/runtime/rule/QueryCommand.java
===================================================================
--- labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/command/runtime/rule/QueryCommand.java	2010-01-27 18:21:31 UTC (rev 31262)
+++ labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/command/runtime/rule/QueryCommand.java	2010-01-27 18:55:25 UTC (rev 31263)
@@ -1,27 +1,42 @@
 package org.drools.command.runtime.rule;
 
-import java.util.Collection;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
 
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+
 import org.drools.command.Context;
 import org.drools.command.impl.GenericCommand;
 import org.drools.command.impl.KnowledgeCommandContext;
 import org.drools.impl.StatefulKnowledgeSessionImpl;
-import org.drools.reteoo.ReteooWorkingMemory;
-import org.drools.runtime.ExecutionResults;
+import org.drools.result.ExecutionResults;
+import org.drools.result.QueryResult;
 import org.drools.runtime.StatefulKnowledgeSession;
-import org.drools.runtime.rule.FactHandle;
 import org.drools.runtime.rule.QueryResults;
-import org.drools.runtime.rule.impl.NativeQueryResults;
 
+ at XmlAccessorType( XmlAccessType.NONE )
 public class QueryCommand  implements GenericCommand<QueryResults> {
+
+	private static final long serialVersionUID = 1L;
+	
+	@XmlAttribute(name = "out-identifier")
     private String outIdentifier;
+    @XmlAttribute(required = true)
     private String name;
-    private Object[] arguments;
+    @XmlElement(name="argument")
+    private List<Object> arguments;
+
+    public QueryCommand() {
+    }
     
     public QueryCommand(String outIdentifier, String name, Object[] arguments) {
         this.outIdentifier = outIdentifier;
         this.name = name;
-        this.arguments = arguments;
+        this.arguments = arguments != null ? Arrays.asList( arguments ) : Arrays.asList();
     }
     
     public String getOutIdentifier() {
@@ -38,10 +53,13 @@
     public void setName(String name) {
         this.name = name;
     }
-    public Object[] getArguments() {
-        return arguments;
+    public List<Object> getArguments() {
+        if (this.arguments == null) {
+            this.arguments = new ArrayList<Object>();
+        }
+        return this.arguments;
     }
-    public void setArguments(Object[] arguments) {
+    public void setArguments(List<Object> arguments) {
         this.arguments = arguments;
     }
 
@@ -50,14 +68,17 @@
         
         QueryResults results = null;
         
-        if ( arguments == null || arguments.length == 0 ) {
+        if ( this.arguments == null || this.arguments.size() == 0 ) {
             results = ksession.getQueryResults( name );
         } else {
-            results = ksession.getQueryResults( name, this.arguments );
+            results = ksession.getQueryResults( name, this.arguments.toArray() );
         }
         
         if ( this.outIdentifier != null ) {
-            ((StatefulKnowledgeSessionImpl)ksession).session.getExecutionResult().getResults().put( this.outIdentifier, results );
+            ExecutionResults execRes =
+                (ExecutionResults)((StatefulKnowledgeSessionImpl) ksession).session.getExecutionResult();
+            QueryResult queryRes = new QueryResult( outIdentifier, results );
+            execRes.getResults().add( queryRes );
         }
 
         return results;

Modified: labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/common/DefaultFactHandle.java
===================================================================
--- labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/common/DefaultFactHandle.java	2010-01-27 18:21:31 UTC (rev 31262)
+++ labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/common/DefaultFactHandle.java	2010-01-27 18:55:25 UTC (rev 31263)
@@ -16,16 +16,21 @@
  * limitations under the License.
  */
 
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlTransient;
+
 import org.drools.FactHandle;
-import org.drools.runtime.rule.WorkingMemoryEntryPoint;
 import org.drools.reteoo.LeftTuple;
 import org.drools.reteoo.RightTuple;
+import org.drools.runtime.rule.WorkingMemoryEntryPoint;
 
 /**
  * Implementation of <code>FactHandle</code>.
  * @author <a href="mailto:mark.proctor at jboss.com">Mark Proctor</a>
  * @author <a href="mailto:bob at werken.com">bob mcwhirter </a>
  */
+ at XmlRootElement
 public class DefaultFactHandle
     implements
     InternalFactHandle {
@@ -134,6 +139,11 @@
         return "0:" + this.id + ":" + getIdentityHashCode() + ":" + getObjectHashCode() + ":" + getRecency();
     }
 
+    @XmlElement(name="external-form")
+    public String getExternalForm() {
+    	return toExternalForm();
+    }
+    
     /**
      * @see Object
      */
@@ -141,6 +151,7 @@
         return "[fact " + toExternalForm() + ":" + this.object + "]";
     }
 
+    @XmlTransient
     public long getRecency() {
         return this.recency;
     }
@@ -163,6 +174,7 @@
         return ( this.id != -1 );
     }
     
+    @XmlTransient
     public Object getObject() {
         return this.object;
     }
@@ -174,6 +186,7 @@
     /**
      * @return the key
      */
+    @XmlTransient
     public EqualityKey getEqualityKey() {
         return this.key;
     }
@@ -193,6 +206,7 @@
         return false;
     }
 
+    @XmlTransient
     public RightTuple getRightTuple() {
         return rightTuple;
     }
@@ -205,10 +219,12 @@
         this.leftTuple = leftTuple;
     }
 
+    @XmlTransient
     public LeftTuple getLeftTuple() {
         return this.leftTuple;
     }
 
+    @XmlTransient
     public WorkingMemoryEntryPoint getEntryPoint() {
         return entryPoint;
     }

Copied: labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/process/result (from rev 31239, labs/jbossrules/branches/camel_jaxb_marshaller-lucaz/drools-core/src/main/java/org/drools/process/result)

Deleted: labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/process/result/ExecutionResultsType.java
===================================================================
--- labs/jbossrules/branches/camel_jaxb_marshaller-lucaz/drools-core/src/main/java/org/drools/process/result/ExecutionResultsType.java	2010-01-26 23:07:09 UTC (rev 31239)
+++ labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/process/result/ExecutionResultsType.java	2010-01-27 18:55:25 UTC (rev 31263)
@@ -1,87 +0,0 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.3 in JDK 
-// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
-// Any modifications to this file will be lost upon recompilation of the source schema. 
-// Generated on: 2009.07.16 at 08:23:06 AM CEST 
-//
-
-
-package org.drools.process.result;
-
-import java.util.ArrayList;
-import java.util.List;
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlElements;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
-
-
-/**
- * <p>Java class for ExecutionResultsType complex type.
- * 
- * <p>The following schema fragment specifies the expected content contained within this class.
- * 
- * <pre>
- * &lt;complexType name="ExecutionResultsType">
- *   &lt;complexContent>
- *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       &lt;choice maxOccurs="unbounded" minOccurs="0">
- *         &lt;element name="query-results" type="{http://drools.org/process/result}QueryResultsType"/>
- *         &lt;element name="insert-results" type="{http://drools.org/process/result}InsertResultsType"/>
- *         &lt;element name="global-value" type="{http://drools.org/process/result}GlobalType"/>
- *       &lt;/choice>
- *     &lt;/restriction>
- *   &lt;/complexContent>
- * &lt;/complexType>
- * </pre>
- * 
- * 
- */
- at XmlRootElement( namespace = "http://drools.org/process/result", name = "execution-results" )
- at XmlAccessorType(XmlAccessType.FIELD)
- at XmlType(name = "ExecutionResultsType", propOrder = {
-    "queryResultsOrInsertResultsOrGlobalValue"
-})
-public class ExecutionResultsType {
-
-    @XmlElements({
-        @XmlElement(name = "global-value", type = GlobalType.class),
-        @XmlElement(name = "insert-results", type = InsertResultsType.class),
-        @XmlElement(name = "query-results", type = QueryResultsType.class)
-    })
-    protected List<Object> queryResultsOrInsertResultsOrGlobalValue;
-
-    /**
-     * Gets the value of the queryResultsOrInsertResultsOrGlobalValue property.
-     * 
-     * <p>
-     * This accessor method returns a reference to the live list,
-     * not a snapshot. Therefore any modification you make to the
-     * returned list will be present inside the JAXB object.
-     * This is why there is not a <CODE>set</CODE> method for the queryResultsOrInsertResultsOrGlobalValue property.
-     * 
-     * <p>
-     * For example, to add a new item, do as follows:
-     * <pre>
-     *    getQueryResultsOrInsertResultsOrGlobalValue().add(newItem);
-     * </pre>
-     * 
-     * 
-     * <p>
-     * Objects of the following type(s) are allowed in the list
-     * {@link GlobalType }
-     * {@link InsertResultsType }
-     * {@link QueryResultsType }
-     * 
-     * 
-     */
-    public List<Object> getQueryResultsOrInsertResultsOrGlobalValue() {
-        if (queryResultsOrInsertResultsOrGlobalValue == null) {
-            queryResultsOrInsertResultsOrGlobalValue = new ArrayList<Object>();
-        }
-        return this.queryResultsOrInsertResultsOrGlobalValue;
-    }
-
-}

Copied: labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/process/result/ExecutionResultsType.java (from rev 31239, labs/jbossrules/branches/camel_jaxb_marshaller-lucaz/drools-core/src/main/java/org/drools/process/result/ExecutionResultsType.java)
===================================================================
--- labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/process/result/ExecutionResultsType.java	                        (rev 0)
+++ labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/process/result/ExecutionResultsType.java	2010-01-27 18:55:25 UTC (rev 31263)
@@ -0,0 +1,87 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.3 in JDK 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2009.07.16 at 08:23:06 AM CEST 
+//
+
+
+package org.drools.process.result;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlElements;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for ExecutionResultsType complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType name="ExecutionResultsType">
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;choice maxOccurs="unbounded" minOccurs="0">
+ *         &lt;element name="query-results" type="{http://drools.org/process/result}QueryResultsType"/>
+ *         &lt;element name="insert-results" type="{http://drools.org/process/result}InsertResultsType"/>
+ *         &lt;element name="global-value" type="{http://drools.org/process/result}GlobalType"/>
+ *       &lt;/choice>
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+ at XmlRootElement( namespace = "http://drools.org/process/result", name = "execution-results" )
+ at XmlAccessorType(XmlAccessType.FIELD)
+ at XmlType(name = "ExecutionResultsType", propOrder = {
+    "queryResultsOrInsertResultsOrGlobalValue"
+})
+public class ExecutionResultsType {
+
+    @XmlElements({
+        @XmlElement(name = "global-value", type = GlobalType.class),
+        @XmlElement(name = "insert-results", type = InsertResultsType.class),
+        @XmlElement(name = "query-results", type = QueryResultsType.class)
+    })
+    protected List<Object> queryResultsOrInsertResultsOrGlobalValue;
+
+    /**
+     * Gets the value of the queryResultsOrInsertResultsOrGlobalValue property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the queryResultsOrInsertResultsOrGlobalValue property.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getQueryResultsOrInsertResultsOrGlobalValue().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link GlobalType }
+     * {@link InsertResultsType }
+     * {@link QueryResultsType }
+     * 
+     * 
+     */
+    public List<Object> getQueryResultsOrInsertResultsOrGlobalValue() {
+        if (queryResultsOrInsertResultsOrGlobalValue == null) {
+            queryResultsOrInsertResultsOrGlobalValue = new ArrayList<Object>();
+        }
+        return this.queryResultsOrInsertResultsOrGlobalValue;
+    }
+
+}

Deleted: labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/process/result/FactHandleListType.java
===================================================================
--- labs/jbossrules/branches/camel_jaxb_marshaller-lucaz/drools-core/src/main/java/org/drools/process/result/FactHandleListType.java	2010-01-26 23:07:09 UTC (rev 31239)
+++ labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/process/result/FactHandleListType.java	2010-01-27 18:55:25 UTC (rev 31263)
@@ -1,76 +0,0 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.3 in JDK 
-// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
-// Any modifications to this file will be lost upon recompilation of the source schema. 
-// Generated on: 2009.07.16 at 08:23:06 AM CEST 
-//
-
-
-package org.drools.process.result;
-
-import java.util.ArrayList;
-import java.util.List;
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlType;
-
-
-/**
- * <p>Java class for FactHandleListType complex type.
- * 
- * <p>The following schema fragment specifies the expected content contained within this class.
- * 
- * <pre>
- * &lt;complexType name="FactHandleListType">
- *   &lt;complexContent>
- *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       &lt;sequence>
- *         &lt;element name="fact-handle" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded"/>
- *       &lt;/sequence>
- *     &lt;/restriction>
- *   &lt;/complexContent>
- * &lt;/complexType>
- * </pre>
- * 
- * 
- */
- at XmlAccessorType(XmlAccessType.FIELD)
- at XmlType(name = "FactHandleListType", propOrder = {
-    "factHandle"
-})
-public class FactHandleListType {
-
-    @XmlElement(name = "fact-handle", required = true)
-    protected List<String> factHandle;
-
-    /**
-     * Gets the value of the factHandle property.
-     * 
-     * <p>
-     * This accessor method returns a reference to the live list,
-     * not a snapshot. Therefore any modification you make to the
-     * returned list will be present inside the JAXB object.
-     * This is why there is not a <CODE>set</CODE> method for the factHandle property.
-     * 
-     * <p>
-     * For example, to add a new item, do as follows:
-     * <pre>
-     *    getFactHandle().add(newItem);
-     * </pre>
-     * 
-     * 
-     * <p>
-     * Objects of the following type(s) are allowed in the list
-     * {@link String }
-     * 
-     * 
-     */
-    public List<String> getFactHandle() {
-        if (factHandle == null) {
-            factHandle = new ArrayList<String>();
-        }
-        return this.factHandle;
-    }
-
-}

Copied: labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/process/result/FactHandleListType.java (from rev 31239, labs/jbossrules/branches/camel_jaxb_marshaller-lucaz/drools-core/src/main/java/org/drools/process/result/FactHandleListType.java)
===================================================================
--- labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/process/result/FactHandleListType.java	                        (rev 0)
+++ labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/process/result/FactHandleListType.java	2010-01-27 18:55:25 UTC (rev 31263)
@@ -0,0 +1,76 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.3 in JDK 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2009.07.16 at 08:23:06 AM CEST 
+//
+
+
+package org.drools.process.result;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for FactHandleListType complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType name="FactHandleListType">
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;element name="fact-handle" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded"/>
+ *       &lt;/sequence>
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+ at XmlAccessorType(XmlAccessType.FIELD)
+ at XmlType(name = "FactHandleListType", propOrder = {
+    "factHandle"
+})
+public class FactHandleListType {
+
+    @XmlElement(name = "fact-handle", required = true)
+    protected List<String> factHandle;
+
+    /**
+     * Gets the value of the factHandle property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the factHandle property.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getFactHandle().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link String }
+     * 
+     * 
+     */
+    public List<String> getFactHandle() {
+        if (factHandle == null) {
+            factHandle = new ArrayList<String>();
+        }
+        return this.factHandle;
+    }
+
+}

Deleted: labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/process/result/FactObjectListType.java
===================================================================
--- labs/jbossrules/branches/camel_jaxb_marshaller-lucaz/drools-core/src/main/java/org/drools/process/result/FactObjectListType.java	2010-01-26 23:07:09 UTC (rev 31239)
+++ labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/process/result/FactObjectListType.java	2010-01-27 18:55:25 UTC (rev 31263)
@@ -1,77 +0,0 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.3 in JDK 
-// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
-// Any modifications to this file will be lost upon recompilation of the source schema. 
-// Generated on: 2009.07.16 at 08:23:06 AM CEST 
-//
-
-
-package org.drools.process.result;
-
-import java.util.ArrayList;
-import java.util.List;
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlAnyElement;
-import javax.xml.bind.annotation.XmlType;
-import org.w3c.dom.Element;
-
-
-/**
- * <p>Java class for FactObjectListType complex type.
- * 
- * <p>The following schema fragment specifies the expected content contained within this class.
- * 
- * <pre>
- * &lt;complexType name="FactObjectListType">
- *   &lt;complexContent>
- *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       &lt;sequence>
- *         &lt;any/>
- *       &lt;/sequence>
- *     &lt;/restriction>
- *   &lt;/complexContent>
- * &lt;/complexType>
- * </pre>
- * 
- * 
- */
- at XmlAccessorType(XmlAccessType.FIELD)
- at XmlType(name = "FactObjectListType", propOrder = {
-    "any"
-})
-public class FactObjectListType {
-
-    @XmlAnyElement
-    protected List<Element> any;
-
-    /**
-     * Gets the value of the any property.
-     * 
-     * <p>
-     * This accessor method returns a reference to the live list,
-     * not a snapshot. Therefore any modification you make to the
-     * returned list will be present inside the JAXB object.
-     * This is why there is not a <CODE>set</CODE> method for the any property.
-     * 
-     * <p>
-     * For example, to add a new item, do as follows:
-     * <pre>
-     *    getAny().add(newItem);
-     * </pre>
-     * 
-     * 
-     * <p>
-     * Objects of the following type(s) are allowed in the list
-     * {@link Element }
-     * 
-     * 
-     */
-    public List<Element> getAny() {
-        if (any == null) {
-            any = new ArrayList<Element>();
-        }
-        return this.any;
-    }
-
-}

Copied: labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/process/result/FactObjectListType.java (from rev 31239, labs/jbossrules/branches/camel_jaxb_marshaller-lucaz/drools-core/src/main/java/org/drools/process/result/FactObjectListType.java)
===================================================================
--- labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/process/result/FactObjectListType.java	                        (rev 0)
+++ labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/process/result/FactObjectListType.java	2010-01-27 18:55:25 UTC (rev 31263)
@@ -0,0 +1,77 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.3 in JDK 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2009.07.16 at 08:23:06 AM CEST 
+//
+
+
+package org.drools.process.result;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAnyElement;
+import javax.xml.bind.annotation.XmlType;
+import org.w3c.dom.Element;
+
+
+/**
+ * <p>Java class for FactObjectListType complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType name="FactObjectListType">
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;any/>
+ *       &lt;/sequence>
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+ at XmlAccessorType(XmlAccessType.FIELD)
+ at XmlType(name = "FactObjectListType", propOrder = {
+    "any"
+})
+public class FactObjectListType {
+
+    @XmlAnyElement
+    protected List<Element> any;
+
+    /**
+     * Gets the value of the any property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the any property.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getAny().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link Element }
+     * 
+     * 
+     */
+    public List<Element> getAny() {
+        if (any == null) {
+            any = new ArrayList<Element>();
+        }
+        return this.any;
+    }
+
+}

Deleted: labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/process/result/GlobalType.java
===================================================================
--- labs/jbossrules/branches/camel_jaxb_marshaller-lucaz/drools-core/src/main/java/org/drools/process/result/GlobalType.java	2010-01-26 23:07:09 UTC (rev 31239)
+++ labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/process/result/GlobalType.java	2010-01-27 18:55:25 UTC (rev 31263)
@@ -1,98 +0,0 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.3 in JDK 
-// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
-// Any modifications to this file will be lost upon recompilation of the source schema. 
-// Generated on: 2009.07.16 at 08:23:06 AM CEST 
-//
-
-
-package org.drools.process.result;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlAnyElement;
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlType;
-import org.w3c.dom.Element;
-
-
-/**
- * <p>Java class for GlobalType complex type.
- * 
- * <p>The following schema fragment specifies the expected content contained within this class.
- * 
- * <pre>
- * &lt;complexType name="GlobalType">
- *   &lt;complexContent>
- *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       &lt;sequence>
- *         &lt;any/>
- *       &lt;/sequence>
- *       &lt;attribute name="identifier" type="{http://www.w3.org/2001/XMLSchema}string" />
- *     &lt;/restriction>
- *   &lt;/complexContent>
- * &lt;/complexType>
- * </pre>
- * 
- * 
- */
- at XmlAccessorType(XmlAccessType.FIELD)
- at XmlType(name = "GlobalType", propOrder = {
-    "any"
-})
-public class GlobalType {
-
-    @XmlAnyElement
-    protected Element any;
-    @XmlAttribute
-    protected String identifier;
-
-    /**
-     * Gets the value of the any property.
-     * 
-     * @return
-     *     possible object is
-     *     {@link Element }
-     *     
-     */
-    public Element getAny() {
-        return any;
-    }
-
-    /**
-     * Sets the value of the any property.
-     * 
-     * @param value
-     *     allowed object is
-     *     {@link Element }
-     *     
-     */
-    public void setAny(Element value) {
-        this.any = value;
-    }
-
-    /**
-     * Gets the value of the identifier property.
-     * 
-     * @return
-     *     possible object is
-     *     {@link String }
-     *     
-     */
-    public String getIdentifier() {
-        return identifier;
-    }
-
-    /**
-     * Sets the value of the identifier property.
-     * 
-     * @param value
-     *     allowed object is
-     *     {@link String }
-     *     
-     */
-    public void setIdentifier(String value) {
-        this.identifier = value;
-    }
-
-}

Copied: labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/process/result/GlobalType.java (from rev 31239, labs/jbossrules/branches/camel_jaxb_marshaller-lucaz/drools-core/src/main/java/org/drools/process/result/GlobalType.java)
===================================================================
--- labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/process/result/GlobalType.java	                        (rev 0)
+++ labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/process/result/GlobalType.java	2010-01-27 18:55:25 UTC (rev 31263)
@@ -0,0 +1,98 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.3 in JDK 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2009.07.16 at 08:23:06 AM CEST 
+//
+
+
+package org.drools.process.result;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAnyElement;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlType;
+import org.w3c.dom.Element;
+
+
+/**
+ * <p>Java class for GlobalType complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType name="GlobalType">
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;any/>
+ *       &lt;/sequence>
+ *       &lt;attribute name="identifier" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+ at XmlAccessorType(XmlAccessType.FIELD)
+ at XmlType(name = "GlobalType", propOrder = {
+    "any"
+})
+public class GlobalType {
+
+    @XmlAnyElement
+    protected Element any;
+    @XmlAttribute
+    protected String identifier;
+
+    /**
+     * Gets the value of the any property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link Element }
+     *     
+     */
+    public Element getAny() {
+        return any;
+    }
+
+    /**
+     * Sets the value of the any property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link Element }
+     *     
+     */
+    public void setAny(Element value) {
+        this.any = value;
+    }
+
+    /**
+     * Gets the value of the identifier property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getIdentifier() {
+        return identifier;
+    }
+
+    /**
+     * Sets the value of the identifier property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setIdentifier(String value) {
+        this.identifier = value;
+    }
+
+}

Deleted: labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/process/result/InsertResultsType.java
===================================================================
--- labs/jbossrules/branches/camel_jaxb_marshaller-lucaz/drools-core/src/main/java/org/drools/process/result/InsertResultsType.java	2010-01-26 23:07:09 UTC (rev 31239)
+++ labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/process/result/InsertResultsType.java	2010-01-27 18:55:25 UTC (rev 31263)
@@ -1,124 +0,0 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.3 in JDK 
-// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
-// Any modifications to this file will be lost upon recompilation of the source schema. 
-// Generated on: 2009.07.16 at 08:23:06 AM CEST 
-//
-
-
-package org.drools.process.result;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlType;
-
-
-/**
- * <p>Java class for InsertResultsType complex type.
- * 
- * <p>The following schema fragment specifies the expected content contained within this class.
- * 
- * <pre>
- * &lt;complexType name="InsertResultsType">
- *   &lt;complexContent>
- *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       &lt;sequence>
- *         &lt;element name="fact-handles" type="{http://drools.org/process/result}FactHandleListType"/>
- *         &lt;element name="fact-objects" type="{http://drools.org/process/result}FactObjectListType" minOccurs="0"/>
- *       &lt;/sequence>
- *       &lt;attribute name="identifier" type="{http://www.w3.org/2001/XMLSchema}string" />
- *     &lt;/restriction>
- *   &lt;/complexContent>
- * &lt;/complexType>
- * </pre>
- * 
- * 
- */
- at XmlAccessorType(XmlAccessType.FIELD)
- at XmlType(name = "InsertResultsType", propOrder = {
-    "factHandles",
-    "factObjects"
-})
-public class InsertResultsType {
-
-    @XmlElement(name = "fact-handles", required = true)
-    protected FactHandleListType factHandles;
-    @XmlElement(name = "fact-objects")
-    protected FactObjectListType factObjects;
-    @XmlAttribute
-    protected String identifier;
-
-    /**
-     * Gets the value of the factHandles property.
-     * 
-     * @return
-     *     possible object is
-     *     {@link FactHandleListType }
-     *     
-     */
-    public FactHandleListType getFactHandles() {
-        return factHandles;
-    }
-
-    /**
-     * Sets the value of the factHandles property.
-     * 
-     * @param value
-     *     allowed object is
-     *     {@link FactHandleListType }
-     *     
-     */
-    public void setFactHandles(FactHandleListType value) {
-        this.factHandles = value;
-    }
-
-    /**
-     * Gets the value of the factObjects property.
-     * 
-     * @return
-     *     possible object is
-     *     {@link FactObjectListType }
-     *     
-     */
-    public FactObjectListType getFactObjects() {
-        return factObjects;
-    }
-
-    /**
-     * Sets the value of the factObjects property.
-     * 
-     * @param value
-     *     allowed object is
-     *     {@link FactObjectListType }
-     *     
-     */
-    public void setFactObjects(FactObjectListType value) {
-        this.factObjects = value;
-    }
-
-    /**
-     * Gets the value of the identifier property.
-     * 
-     * @return
-     *     possible object is
-     *     {@link String }
-     *     
-     */
-    public String getIdentifier() {
-        return identifier;
-    }
-
-    /**
-     * Sets the value of the identifier property.
-     * 
-     * @param value
-     *     allowed object is
-     *     {@link String }
-     *     
-     */
-    public void setIdentifier(String value) {
-        this.identifier = value;
-    }
-}

Copied: labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/process/result/InsertResultsType.java (from rev 31239, labs/jbossrules/branches/camel_jaxb_marshaller-lucaz/drools-core/src/main/java/org/drools/process/result/InsertResultsType.java)
===================================================================
--- labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/process/result/InsertResultsType.java	                        (rev 0)
+++ labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/process/result/InsertResultsType.java	2010-01-27 18:55:25 UTC (rev 31263)
@@ -0,0 +1,124 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.3 in JDK 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2009.07.16 at 08:23:06 AM CEST 
+//
+
+
+package org.drools.process.result;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for InsertResultsType complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType name="InsertResultsType">
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;element name="fact-handles" type="{http://drools.org/process/result}FactHandleListType"/>
+ *         &lt;element name="fact-objects" type="{http://drools.org/process/result}FactObjectListType" minOccurs="0"/>
+ *       &lt;/sequence>
+ *       &lt;attribute name="identifier" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+ at XmlAccessorType(XmlAccessType.FIELD)
+ at XmlType(name = "InsertResultsType", propOrder = {
+    "factHandles",
+    "factObjects"
+})
+public class InsertResultsType {
+
+    @XmlElement(name = "fact-handles", required = true)
+    protected FactHandleListType factHandles;
+    @XmlElement(name = "fact-objects")
+    protected FactObjectListType factObjects;
+    @XmlAttribute
+    protected String identifier;
+
+    /**
+     * Gets the value of the factHandles property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link FactHandleListType }
+     *     
+     */
+    public FactHandleListType getFactHandles() {
+        return factHandles;
+    }
+
+    /**
+     * Sets the value of the factHandles property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link FactHandleListType }
+     *     
+     */
+    public void setFactHandles(FactHandleListType value) {
+        this.factHandles = value;
+    }
+
+    /**
+     * Gets the value of the factObjects property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link FactObjectListType }
+     *     
+     */
+    public FactObjectListType getFactObjects() {
+        return factObjects;
+    }
+
+    /**
+     * Sets the value of the factObjects property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link FactObjectListType }
+     *     
+     */
+    public void setFactObjects(FactObjectListType value) {
+        this.factObjects = value;
+    }
+
+    /**
+     * Gets the value of the identifier property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getIdentifier() {
+        return identifier;
+    }
+
+    /**
+     * Sets the value of the identifier property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setIdentifier(String value) {
+        this.identifier = value;
+    }
+}

Deleted: labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/process/result/ObjectFactory.java
===================================================================
--- labs/jbossrules/branches/camel_jaxb_marshaller-lucaz/drools-core/src/main/java/org/drools/process/result/ObjectFactory.java	2010-01-26 23:07:09 UTC (rev 31239)
+++ labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/process/result/ObjectFactory.java	2010-01-27 18:55:25 UTC (rev 31263)
@@ -1,116 +0,0 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.3 in JDK 
-// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
-// Any modifications to this file will be lost upon recompilation of the source schema. 
-// Generated on: 2009.07.16 at 08:23:06 AM CEST 
-//
-
-
-package org.drools.process.result;
-
-import javax.xml.bind.JAXBElement;
-import javax.xml.bind.annotation.XmlElementDecl;
-import javax.xml.bind.annotation.XmlRegistry;
-import javax.xml.namespace.QName;
-
-
-/**
- * This object contains factory methods for each 
- * Java content interface and Java element interface 
- * generated in the org.drools.process.result package. 
- * <p>An ObjectFactory allows you to programatically 
- * construct new instances of the Java representation 
- * for XML content. The Java representation of XML 
- * content can consist of schema derived interfaces 
- * and classes representing the binding of schema 
- * type definitions, element declarations and model 
- * groups.  Factory methods for each of these are 
- * provided in this class.
- * 
- */
- at XmlRegistry
-public class ObjectFactory {
-
-    private final static QName _ExecutionResults_QNAME = new QName("http://drools.org/process/result", "execution-results");
-
-    /**
-     * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: org.drools.process.result
-     * 
-     */
-    public ObjectFactory() {
-    }
-
-    /**
-     * Create an instance of {@link FactObjectListType }
-     * 
-     */
-    public FactObjectListType createFactObjectListType() {
-        return new FactObjectListType();
-    }
-
-    /**
-     * Create an instance of {@link QueryRowType }
-     * 
-     */
-    public QueryRowType createQueryRowType() {
-        return new QueryRowType();
-    }
-
-    /**
-     * Create an instance of {@link ExecutionResultsType }
-     * 
-     */
-    public ExecutionResultsType createExecutionResultsType() {
-        return new ExecutionResultsType();
-    }
-
-    /**
-     * Create an instance of {@link FactHandleListType }
-     * 
-     */
-    public FactHandleListType createFactHandleListType() {
-        return new FactHandleListType();
-    }
-
-    /**
-     * Create an instance of {@link QueryFieldType }
-     * 
-     */
-    public QueryFieldType createQueryFieldType() {
-        return new QueryFieldType();
-    }
-
-    /**
-     * Create an instance of {@link InsertResultsType }
-     * 
-     */
-    public InsertResultsType createInsertResultsType() {
-        return new InsertResultsType();
-    }
-
-    /**
-     * Create an instance of {@link QueryResultsType }
-     * 
-     */
-    public QueryResultsType createQueryResultsType() {
-        return new QueryResultsType();
-    }
-
-    /**
-     * Create an instance of {@link GlobalType }
-     * 
-     */
-    public GlobalType createGlobalType() {
-        return new GlobalType();
-    }
-
-    /**
-     * Create an instance of {@link JAXBElement }{@code <}{@link ExecutionResultsType }{@code >}}
-     * 
-     */
-    @XmlElementDecl(namespace = "http://drools.org/process/result", name = "execution-results")
-    public JAXBElement<ExecutionResultsType> createExecutionResults(ExecutionResultsType value) {
-        return new JAXBElement<ExecutionResultsType>(_ExecutionResults_QNAME, ExecutionResultsType.class, null, value);
-    }
-
-}

Copied: labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/process/result/ObjectFactory.java (from rev 31239, labs/jbossrules/branches/camel_jaxb_marshaller-lucaz/drools-core/src/main/java/org/drools/process/result/ObjectFactory.java)
===================================================================
--- labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/process/result/ObjectFactory.java	                        (rev 0)
+++ labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/process/result/ObjectFactory.java	2010-01-27 18:55:25 UTC (rev 31263)
@@ -0,0 +1,116 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.3 in JDK 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2009.07.16 at 08:23:06 AM CEST 
+//
+
+
+package org.drools.process.result;
+
+import javax.xml.bind.JAXBElement;
+import javax.xml.bind.annotation.XmlElementDecl;
+import javax.xml.bind.annotation.XmlRegistry;
+import javax.xml.namespace.QName;
+
+
+/**
+ * This object contains factory methods for each 
+ * Java content interface and Java element interface 
+ * generated in the org.drools.process.result package. 
+ * <p>An ObjectFactory allows you to programatically 
+ * construct new instances of the Java representation 
+ * for XML content. The Java representation of XML 
+ * content can consist of schema derived interfaces 
+ * and classes representing the binding of schema 
+ * type definitions, element declarations and model 
+ * groups.  Factory methods for each of these are 
+ * provided in this class.
+ * 
+ */
+ at XmlRegistry
+public class ObjectFactory {
+
+    private final static QName _ExecutionResults_QNAME = new QName("http://drools.org/process/result", "execution-results");
+
+    /**
+     * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: org.drools.process.result
+     * 
+     */
+    public ObjectFactory() {
+    }
+
+    /**
+     * Create an instance of {@link FactObjectListType }
+     * 
+     */
+    public FactObjectListType createFactObjectListType() {
+        return new FactObjectListType();
+    }
+
+    /**
+     * Create an instance of {@link QueryRowType }
+     * 
+     */
+    public QueryRowType createQueryRowType() {
+        return new QueryRowType();
+    }
+
+    /**
+     * Create an instance of {@link ExecutionResultsType }
+     * 
+     */
+    public ExecutionResultsType createExecutionResultsType() {
+        return new ExecutionResultsType();
+    }
+
+    /**
+     * Create an instance of {@link FactHandleListType }
+     * 
+     */
+    public FactHandleListType createFactHandleListType() {
+        return new FactHandleListType();
+    }
+
+    /**
+     * Create an instance of {@link QueryFieldType }
+     * 
+     */
+    public QueryFieldType createQueryFieldType() {
+        return new QueryFieldType();
+    }
+
+    /**
+     * Create an instance of {@link InsertResultsType }
+     * 
+     */
+    public InsertResultsType createInsertResultsType() {
+        return new InsertResultsType();
+    }
+
+    /**
+     * Create an instance of {@link QueryResultsType }
+     * 
+     */
+    public QueryResultsType createQueryResultsType() {
+        return new QueryResultsType();
+    }
+
+    /**
+     * Create an instance of {@link GlobalType }
+     * 
+     */
+    public GlobalType createGlobalType() {
+        return new GlobalType();
+    }
+
+    /**
+     * Create an instance of {@link JAXBElement }{@code <}{@link ExecutionResultsType }{@code >}}
+     * 
+     */
+    @XmlElementDecl(namespace = "http://drools.org/process/result", name = "execution-results")
+    public JAXBElement<ExecutionResultsType> createExecutionResults(ExecutionResultsType value) {
+        return new JAXBElement<ExecutionResultsType>(_ExecutionResults_QNAME, ExecutionResultsType.class, null, value);
+    }
+
+}

Deleted: labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/process/result/QueryFieldType.java
===================================================================
--- labs/jbossrules/branches/camel_jaxb_marshaller-lucaz/drools-core/src/main/java/org/drools/process/result/QueryFieldType.java	2010-01-26 23:07:09 UTC (rev 31239)
+++ labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/process/result/QueryFieldType.java	2010-01-27 18:55:25 UTC (rev 31263)
@@ -1,128 +0,0 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.3 in JDK 
-// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
-// Any modifications to this file will be lost upon recompilation of the source schema. 
-// Generated on: 2009.07.16 at 08:23:06 AM CEST 
-//
-
-
-package org.drools.process.result;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlAnyElement;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlType;
-import org.w3c.dom.Element;
-
-
-/**
- * <p>Java class for QueryFieldType complex type.
- * 
- * <p>The following schema fragment specifies the expected content contained within this class.
- * 
- * <pre>
- * &lt;complexType name="QueryFieldType">
- *   &lt;complexContent>
- *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       &lt;sequence>
- *         &lt;element name="name" type="{http://www.w3.org/2001/XMLSchema}string"/>
- *         &lt;choice>
- *           &lt;element name="value" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
- *           &lt;any/>
- *         &lt;/choice>
- *       &lt;/sequence>
- *     &lt;/restriction>
- *   &lt;/complexContent>
- * &lt;/complexType>
- * </pre>
- * 
- * 
- */
- at XmlAccessorType(XmlAccessType.FIELD)
- at XmlType(name = "QueryFieldType", propOrder = {
-    "name",
-    "value",
-    "any"
-})
-public class QueryFieldType {
-
-    @XmlElement(required = true)
-    protected String name;
-    protected String value;
-    @XmlAnyElement
-    protected Element any;
-
-    /**
-     * Gets the value of the name property.
-     * 
-     * @return
-     *     possible object is
-     *     {@link String }
-     *     
-     */
-    public String getName() {
-        return name;
-    }
-
-    /**
-     * Sets the value of the name property.
-     * 
-     * @param value
-     *     allowed object is
-     *     {@link String }
-     *     
-     */
-    public void setName(String value) {
-        this.name = value;
-    }
-
-    /**
-     * Gets the value of the value property.
-     * 
-     * @return
-     *     possible object is
-     *     {@link String }
-     *     
-     */
-    public String getValue() {
-        return value;
-    }
-
-    /**
-     * Sets the value of the value property.
-     * 
-     * @param value
-     *     allowed object is
-     *     {@link String }
-     *     
-     */
-    public void setValue(String value) {
-        this.value = value;
-    }
-
-    /**
-     * Gets the value of the any property.
-     * 
-     * @return
-     *     possible object is
-     *     {@link Element }
-     *     
-     */
-    public Element getAny() {
-        return any;
-    }
-
-    /**
-     * Sets the value of the any property.
-     * 
-     * @param value
-     *     allowed object is
-     *     {@link Element }
-     *     
-     */
-    public void setAny(Element value) {
-        this.any = value;
-    }
-
-}

Copied: labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/process/result/QueryFieldType.java (from rev 31239, labs/jbossrules/branches/camel_jaxb_marshaller-lucaz/drools-core/src/main/java/org/drools/process/result/QueryFieldType.java)
===================================================================
--- labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/process/result/QueryFieldType.java	                        (rev 0)
+++ labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/process/result/QueryFieldType.java	2010-01-27 18:55:25 UTC (rev 31263)
@@ -0,0 +1,128 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.3 in JDK 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2009.07.16 at 08:23:06 AM CEST 
+//
+
+
+package org.drools.process.result;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAnyElement;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+import org.w3c.dom.Element;
+
+
+/**
+ * <p>Java class for QueryFieldType complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType name="QueryFieldType">
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;element name="name" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         &lt;choice>
+ *           &lt;element name="value" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *           &lt;any/>
+ *         &lt;/choice>
+ *       &lt;/sequence>
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+ at XmlAccessorType(XmlAccessType.FIELD)
+ at XmlType(name = "QueryFieldType", propOrder = {
+    "name",
+    "value",
+    "any"
+})
+public class QueryFieldType {
+
+    @XmlElement(required = true)
+    protected String name;
+    protected String value;
+    @XmlAnyElement
+    protected Element any;
+
+    /**
+     * Gets the value of the name property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getName() {
+        return name;
+    }
+
+    /**
+     * Sets the value of the name property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setName(String value) {
+        this.name = value;
+    }
+
+    /**
+     * Gets the value of the value property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getValue() {
+        return value;
+    }
+
+    /**
+     * Sets the value of the value property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setValue(String value) {
+        this.value = value;
+    }
+
+    /**
+     * Gets the value of the any property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link Element }
+     *     
+     */
+    public Element getAny() {
+        return any;
+    }
+
+    /**
+     * Sets the value of the any property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link Element }
+     *     
+     */
+    public void setAny(Element value) {
+        this.any = value;
+    }
+
+}

Deleted: labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/process/result/QueryResultsType.java
===================================================================
--- labs/jbossrules/branches/camel_jaxb_marshaller-lucaz/drools-core/src/main/java/org/drools/process/result/QueryResultsType.java	2010-01-26 23:07:09 UTC (rev 31239)
+++ labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/process/result/QueryResultsType.java	2010-01-27 18:55:25 UTC (rev 31263)
@@ -1,122 +0,0 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.3 in JDK 
-// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
-// Any modifications to this file will be lost upon recompilation of the source schema. 
-// Generated on: 2009.07.16 at 08:23:06 AM CEST 
-//
-
-
-package org.drools.process.result;
-
-import java.util.ArrayList;
-import java.util.List;
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlType;
-
-
-/**
- * <p>Java class for QueryResultsType complex type.
- * 
- * <p>The following schema fragment specifies the expected content contained within this class.
- * 
- * <pre>
- * &lt;complexType name="QueryResultsType">
- *   &lt;complexContent>
- *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       &lt;sequence>
- *         &lt;element name="row" type="{http://drools.org/process/result}QueryRowType" maxOccurs="unbounded" minOccurs="0"/>
- *       &lt;/sequence>
- *       &lt;attribute name="name" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
- *       &lt;attribute name="identifier" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
- *       &lt;attribute name="size" use="required" type="{http://www.w3.org/2001/XMLSchema}int" />
- *     &lt;/restriction>
- *   &lt;/complexContent>
- * &lt;/complexType>
- * </pre>
- * 
- * 
- */
- at XmlAccessorType(XmlAccessType.FIELD)
- at XmlType(name = "QueryResultsType", propOrder = {
-    "row"
-})
-public class QueryResultsType {
-
-    protected List<QueryRowType> row;
-    @XmlAttribute(required = true)
-    protected String identifier;
-    @XmlAttribute(required = true)
-    protected int size;
-
-    /**
-     * Gets the value of the row property.
-     * 
-     * <p>
-     * This accessor method returns a reference to the live list,
-     * not a snapshot. Therefore any modification you make to the
-     * returned list will be present inside the JAXB object.
-     * This is why there is not a <CODE>set</CODE> method for the row property.
-     * 
-     * <p>
-     * For example, to add a new item, do as follows:
-     * <pre>
-     *    getRow().add(newItem);
-     * </pre>
-     * 
-     * 
-     * <p>
-     * Objects of the following type(s) are allowed in the list
-     * {@link QueryRowType }
-     * 
-     * 
-     */
-    public List<QueryRowType> getRow() {
-        if (row == null) {
-            row = new ArrayList<QueryRowType>();
-        }
-        return this.row;
-    }
-
-    /**
-     * Gets the value of the identifier property.
-     * 
-     * @return
-     *     possible object is
-     *     {@link String }
-     *     
-     */
-    public String getIdentifier() {
-        return identifier;
-    }
-
-    /**
-     * Sets the value of the identifier property.
-     * 
-     * @param value
-     *     allowed object is
-     *     {@link String }
-     *     
-     */
-    public void setIdentifier(String value) {
-        this.identifier = value;
-    }
-
-    /**
-     * Gets the value of the size property.
-     * 
-     */
-    public int getSize() {
-        return size;
-    }
-
-    /**
-     * Sets the value of the size property.
-     * 
-     */
-    public void setSize(int value) {
-        this.size = value;
-    }
-
-}

Copied: labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/process/result/QueryResultsType.java (from rev 31239, labs/jbossrules/branches/camel_jaxb_marshaller-lucaz/drools-core/src/main/java/org/drools/process/result/QueryResultsType.java)
===================================================================
--- labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/process/result/QueryResultsType.java	                        (rev 0)
+++ labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/process/result/QueryResultsType.java	2010-01-27 18:55:25 UTC (rev 31263)
@@ -0,0 +1,122 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.3 in JDK 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2009.07.16 at 08:23:06 AM CEST 
+//
+
+
+package org.drools.process.result;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for QueryResultsType complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType name="QueryResultsType">
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;element name="row" type="{http://drools.org/process/result}QueryRowType" maxOccurs="unbounded" minOccurs="0"/>
+ *       &lt;/sequence>
+ *       &lt;attribute name="name" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       &lt;attribute name="identifier" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       &lt;attribute name="size" use="required" type="{http://www.w3.org/2001/XMLSchema}int" />
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+ at XmlAccessorType(XmlAccessType.FIELD)
+ at XmlType(name = "QueryResultsType", propOrder = {
+    "row"
+})
+public class QueryResultsType {
+
+    protected List<QueryRowType> row;
+    @XmlAttribute(required = true)
+    protected String identifier;
+    @XmlAttribute(required = true)
+    protected int size;
+
+    /**
+     * Gets the value of the row property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the row property.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getRow().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link QueryRowType }
+     * 
+     * 
+     */
+    public List<QueryRowType> getRow() {
+        if (row == null) {
+            row = new ArrayList<QueryRowType>();
+        }
+        return this.row;
+    }
+
+    /**
+     * Gets the value of the identifier property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getIdentifier() {
+        return identifier;
+    }
+
+    /**
+     * Sets the value of the identifier property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setIdentifier(String value) {
+        this.identifier = value;
+    }
+
+    /**
+     * Gets the value of the size property.
+     * 
+     */
+    public int getSize() {
+        return size;
+    }
+
+    /**
+     * Sets the value of the size property.
+     * 
+     */
+    public void setSize(int value) {
+        this.size = value;
+    }
+
+}

Deleted: labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/process/result/QueryRowType.java
===================================================================
--- labs/jbossrules/branches/camel_jaxb_marshaller-lucaz/drools-core/src/main/java/org/drools/process/result/QueryRowType.java	2010-01-26 23:07:09 UTC (rev 31239)
+++ labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/process/result/QueryRowType.java	2010-01-27 18:55:25 UTC (rev 31263)
@@ -1,74 +0,0 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.3 in JDK 
-// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
-// Any modifications to this file will be lost upon recompilation of the source schema. 
-// Generated on: 2009.07.16 at 08:23:06 AM CEST 
-//
-
-
-package org.drools.process.result;
-
-import java.util.ArrayList;
-import java.util.List;
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlType;
-
-
-/**
- * <p>Java class for QueryRowType complex type.
- * 
- * <p>The following schema fragment specifies the expected content contained within this class.
- * 
- * <pre>
- * &lt;complexType name="QueryRowType">
- *   &lt;complexContent>
- *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       &lt;sequence>
- *         &lt;element name="field" type="{http://drools.org/process/result}QueryFieldType" maxOccurs="unbounded" minOccurs="0"/>
- *       &lt;/sequence>
- *     &lt;/restriction>
- *   &lt;/complexContent>
- * &lt;/complexType>
- * </pre>
- * 
- * 
- */
- at XmlAccessorType(XmlAccessType.FIELD)
- at XmlType(name = "QueryRowType", propOrder = {
-    "field"
-})
-public class QueryRowType {
-
-    protected List<QueryFieldType> field;
-
-    /**
-     * Gets the value of the field property.
-     * 
-     * <p>
-     * This accessor method returns a reference to the live list,
-     * not a snapshot. Therefore any modification you make to the
-     * returned list will be present inside the JAXB object.
-     * This is why there is not a <CODE>set</CODE> method for the field property.
-     * 
-     * <p>
-     * For example, to add a new item, do as follows:
-     * <pre>
-     *    getField().add(newItem);
-     * </pre>
-     * 
-     * 
-     * <p>
-     * Objects of the following type(s) are allowed in the list
-     * {@link QueryFieldType }
-     * 
-     * 
-     */
-    public List<QueryFieldType> getField() {
-        if (field == null) {
-            field = new ArrayList<QueryFieldType>();
-        }
-        return this.field;
-    }
-
-}

Copied: labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/process/result/QueryRowType.java (from rev 31239, labs/jbossrules/branches/camel_jaxb_marshaller-lucaz/drools-core/src/main/java/org/drools/process/result/QueryRowType.java)
===================================================================
--- labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/process/result/QueryRowType.java	                        (rev 0)
+++ labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/process/result/QueryRowType.java	2010-01-27 18:55:25 UTC (rev 31263)
@@ -0,0 +1,74 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.3 in JDK 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2009.07.16 at 08:23:06 AM CEST 
+//
+
+
+package org.drools.process.result;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for QueryRowType complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType name="QueryRowType">
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;element name="field" type="{http://drools.org/process/result}QueryFieldType" maxOccurs="unbounded" minOccurs="0"/>
+ *       &lt;/sequence>
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+ at XmlAccessorType(XmlAccessType.FIELD)
+ at XmlType(name = "QueryRowType", propOrder = {
+    "field"
+})
+public class QueryRowType {
+
+    protected List<QueryFieldType> field;
+
+    /**
+     * Gets the value of the field property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the field property.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getField().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link QueryFieldType }
+     * 
+     * 
+     */
+    public List<QueryFieldType> getField() {
+        if (field == null) {
+            field = new ArrayList<QueryFieldType>();
+        }
+        return this.field;
+    }
+
+}

Deleted: labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/process/result/package-info.java
===================================================================
--- labs/jbossrules/branches/camel_jaxb_marshaller-lucaz/drools-core/src/main/java/org/drools/process/result/package-info.java	2010-01-26 23:07:09 UTC (rev 31239)
+++ labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/process/result/package-info.java	2010-01-27 18:55:25 UTC (rev 31263)
@@ -1,9 +0,0 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.3 in JDK 
-// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
-// Any modifications to this file will be lost upon recompilation of the source schema. 
-// Generated on: 2009.07.16 at 08:23:06 AM CEST 
-//
-
- at javax.xml.bind.annotation.XmlSchema(namespace = "http://drools.org/process/result")
-package org.drools.process.result;

Copied: labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/process/result/package-info.java (from rev 31239, labs/jbossrules/branches/camel_jaxb_marshaller-lucaz/drools-core/src/main/java/org/drools/process/result/package-info.java)
===================================================================
--- labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/process/result/package-info.java	                        (rev 0)
+++ labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/process/result/package-info.java	2010-01-27 18:55:25 UTC (rev 31263)
@@ -0,0 +1,9 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.3 in JDK 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2009.07.16 at 08:23:06 AM CEST 
+//
+
+ at javax.xml.bind.annotation.XmlSchema(namespace = "http://drools.org/process/result")
+package org.drools.process.result;

Copied: labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/result (from rev 31239, labs/jbossrules/branches/camel_jaxb_marshaller-lucaz/drools-core/src/main/java/org/drools/result)

Deleted: labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/result/AbstractResult.java
===================================================================
--- labs/jbossrules/branches/camel_jaxb_marshaller-lucaz/drools-core/src/main/java/org/drools/result/AbstractResult.java	2010-01-26 23:07:09 UTC (rev 31239)
+++ labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/result/AbstractResult.java	2010-01-27 18:55:25 UTC (rev 31263)
@@ -1,19 +0,0 @@
-package org.drools.result;
-
-public abstract class AbstractResult {
-
-    private String identifier;
-
-    public AbstractResult( String identifier ){
-        this.identifier = identifier;
-    }
-
-    public String getIdentifier(){
-        return identifier;
-    }
-
-    public Object getFactHandle(){
-	return null;
-    }
-
-}
\ No newline at end of file

Copied: labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/result/AbstractResult.java (from rev 31239, labs/jbossrules/branches/camel_jaxb_marshaller-lucaz/drools-core/src/main/java/org/drools/result/AbstractResult.java)
===================================================================
--- labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/result/AbstractResult.java	                        (rev 0)
+++ labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/result/AbstractResult.java	2010-01-27 18:55:25 UTC (rev 31263)
@@ -0,0 +1,19 @@
+package org.drools.result;
+
+public abstract class AbstractResult {
+
+    private String identifier;
+
+    public AbstractResult( String identifier ){
+        this.identifier = identifier;
+    }
+
+    public String getIdentifier(){
+        return identifier;
+    }
+
+    public Object getFactHandle(){
+	return null;
+    }
+
+}
\ No newline at end of file

Deleted: labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/result/ExecutionResults.java
===================================================================
--- labs/jbossrules/branches/camel_jaxb_marshaller-lucaz/drools-core/src/main/java/org/drools/result/ExecutionResults.java	2010-01-26 23:07:09 UTC (rev 31239)
+++ labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/result/ExecutionResults.java	2010-01-27 18:55:25 UTC (rev 31263)
@@ -1,15 +0,0 @@
-package org.drools.result;
-
-import java.util.List;
-
-public interface ExecutionResults {
-
-    List<GenericResult> getResults();
-
-    Object getValue( String identifier );
-
-    Object getFactHandle( String identifier );
-
-    List<String> getIdentifiers();
-
-}

Copied: labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/result/ExecutionResults.java (from rev 31239, labs/jbossrules/branches/camel_jaxb_marshaller-lucaz/drools-core/src/main/java/org/drools/result/ExecutionResults.java)
===================================================================
--- labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/result/ExecutionResults.java	                        (rev 0)
+++ labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/result/ExecutionResults.java	2010-01-27 18:55:25 UTC (rev 31263)
@@ -0,0 +1,15 @@
+package org.drools.result;
+
+import java.util.List;
+
+public interface ExecutionResults {
+
+    List<GenericResult> getResults();
+
+    Object getValue( String identifier );
+
+    Object getFactHandle( String identifier );
+
+    List<String> getIdentifiers();
+
+}

Deleted: labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/result/ExecutionResultsImpl.java
===================================================================
--- labs/jbossrules/branches/camel_jaxb_marshaller-lucaz/drools-core/src/main/java/org/drools/result/ExecutionResultsImpl.java	2010-01-26 23:07:09 UTC (rev 31239)
+++ labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/result/ExecutionResultsImpl.java	2010-01-27 18:55:25 UTC (rev 31263)
@@ -1,76 +0,0 @@
-package org.drools.result;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-public class ExecutionResultsImpl implements ExecutionResults {
-
-    private List<GenericResult> results;
-
-    public ExecutionResultsImpl(){
-    }
-
-    public List<GenericResult> getResults(){
-	if( results == null ){
-	    results = new ArrayList<GenericResult>();
-	}
-        return results;
-    }
-
-    public Object getValue( String identifier ){
-        for( GenericResult genRes: getResults() ){
-	    if( identifier.equals( genRes.getIdentifier() ) ){
-                return genRes.getValue();
-	    }
-	}
-        return null;
-    }
-
-    public Object getFactHandle( String identifier ){
-        for( GenericResult genRes: getResults() ){
-	    if( identifier.equals( genRes.getIdentifier() ) ){
-                return genRes.getFactHandle();
-	    }
-	}
-        return null;
-    }
-
-    public List<String> getIdentifiers(){
-	List<String> idList = new ArrayList<String>();
-        for( GenericResult genRes: getResults() ){
-	    String id = genRes.getIdentifier();
-            if( id != null ){
-                idList.add( id );
-	    }
-	}
-        return idList;
-    }
-    
-    public Map<String,Object> getResultsAsMap(){
-    	Map<String,Object> resmap = new HashMap<String,Object>();
-    	for( GenericResult genres: results ){
-    		String key = genres.getIdentifier();
-    		Object val = genres.getValue();
-    		if( key != null && val != null ){
-    			resmap.put( key, val );
-    		}
-    	}
-    	return resmap;
-    }
-
-    public Map<String,Object> getFactHandlesAsMap(){
-    	Map<String,Object> hanmap = new HashMap<String,Object>();
-    	for( GenericResult genres: results ){
-    		String key = genres.getIdentifier();
-    		Object val = genres.getFactHandle();
-    		if( key != null && val != null ){
-    			hanmap.put( key, val );
-    		}
-    	}
-    	return hanmap;
-    }
-
-
-}

Copied: labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/result/ExecutionResultsImpl.java (from rev 31239, labs/jbossrules/branches/camel_jaxb_marshaller-lucaz/drools-core/src/main/java/org/drools/result/ExecutionResultsImpl.java)
===================================================================
--- labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/result/ExecutionResultsImpl.java	                        (rev 0)
+++ labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/result/ExecutionResultsImpl.java	2010-01-27 18:55:25 UTC (rev 31263)
@@ -0,0 +1,76 @@
+package org.drools.result;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+public class ExecutionResultsImpl implements ExecutionResults {
+
+    private List<GenericResult> results;
+
+    public ExecutionResultsImpl(){
+    }
+
+    public List<GenericResult> getResults(){
+	if( results == null ){
+	    results = new ArrayList<GenericResult>();
+	}
+        return results;
+    }
+
+    public Object getValue( String identifier ){
+        for( GenericResult genRes: getResults() ){
+	    if( identifier.equals( genRes.getIdentifier() ) ){
+                return genRes.getValue();
+	    }
+	}
+        return null;
+    }
+
+    public Object getFactHandle( String identifier ){
+        for( GenericResult genRes: getResults() ){
+	    if( identifier.equals( genRes.getIdentifier() ) ){
+                return genRes.getFactHandle();
+	    }
+	}
+        return null;
+    }
+
+    public List<String> getIdentifiers(){
+	List<String> idList = new ArrayList<String>();
+        for( GenericResult genRes: getResults() ){
+	    String id = genRes.getIdentifier();
+            if( id != null ){
+                idList.add( id );
+	    }
+	}
+        return idList;
+    }
+    
+    public Map<String,Object> getResultsAsMap(){
+    	Map<String,Object> resmap = new HashMap<String,Object>();
+    	for( GenericResult genres: results ){
+    		String key = genres.getIdentifier();
+    		Object val = genres.getValue();
+    		if( key != null && val != null ){
+    			resmap.put( key, val );
+    		}
+    	}
+    	return resmap;
+    }
+
+    public Map<String,Object> getFactHandlesAsMap(){
+    	Map<String,Object> hanmap = new HashMap<String,Object>();
+    	for( GenericResult genres: results ){
+    		String key = genres.getIdentifier();
+    		Object val = genres.getFactHandle();
+    		if( key != null && val != null ){
+    			hanmap.put( key, val );
+    		}
+    	}
+    	return hanmap;
+    }
+
+
+}

Deleted: labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/result/GenericResult.java
===================================================================
--- labs/jbossrules/branches/camel_jaxb_marshaller-lucaz/drools-core/src/main/java/org/drools/result/GenericResult.java	2010-01-26 23:07:09 UTC (rev 31239)
+++ labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/result/GenericResult.java	2010-01-27 18:55:25 UTC (rev 31263)
@@ -1,10 +0,0 @@
-package org.drools.result;
-
-public interface GenericResult {
-
-    String getIdentifier();
-
-    Object getValue();
-
-    Object getFactHandle();
-}

Copied: labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/result/GenericResult.java (from rev 31239, labs/jbossrules/branches/camel_jaxb_marshaller-lucaz/drools-core/src/main/java/org/drools/result/GenericResult.java)
===================================================================
--- labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/result/GenericResult.java	                        (rev 0)
+++ labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/result/GenericResult.java	2010-01-27 18:55:25 UTC (rev 31263)
@@ -0,0 +1,10 @@
+package org.drools.result;
+
+public interface GenericResult {
+
+    String getIdentifier();
+
+    Object getValue();
+
+    Object getFactHandle();
+}

Deleted: labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/result/GetGlobalResult.java
===================================================================
--- labs/jbossrules/branches/camel_jaxb_marshaller-lucaz/drools-core/src/main/java/org/drools/result/GetGlobalResult.java	2010-01-26 23:07:09 UTC (rev 31239)
+++ labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/result/GetGlobalResult.java	2010-01-27 18:55:25 UTC (rev 31263)
@@ -1,15 +0,0 @@
-package org.drools.result;
-
-public class GetGlobalResult extends AbstractResult implements GenericResult {
-
-    private Object object;
-
-    public GetGlobalResult( String identifier, Object object ){
-        super( identifier );
-        this.object = object;
-    }
-
-    public Object getValue(){
-	return object;
-    }
-}

Copied: labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/result/GetGlobalResult.java (from rev 31239, labs/jbossrules/branches/camel_jaxb_marshaller-lucaz/drools-core/src/main/java/org/drools/result/GetGlobalResult.java)
===================================================================
--- labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/result/GetGlobalResult.java	                        (rev 0)
+++ labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/result/GetGlobalResult.java	2010-01-27 18:55:25 UTC (rev 31263)
@@ -0,0 +1,15 @@
+package org.drools.result;
+
+public class GetGlobalResult extends AbstractResult implements GenericResult {
+
+    private Object object;
+
+    public GetGlobalResult( String identifier, Object object ){
+        super( identifier );
+        this.object = object;
+    }
+
+    public Object getValue(){
+	return object;
+    }
+}

Deleted: labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/result/GetObjectsResult.java
===================================================================
--- labs/jbossrules/branches/camel_jaxb_marshaller-lucaz/drools-core/src/main/java/org/drools/result/GetObjectsResult.java	2010-01-26 23:07:09 UTC (rev 31239)
+++ labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/result/GetObjectsResult.java	2010-01-27 18:55:25 UTC (rev 31263)
@@ -1,29 +0,0 @@
-package org.drools.result;
-
-import java.util.ArrayList;
-import java.util.List;
-
-public class GetObjectsResult extends AbstractResult implements GenericResult {
-
-    private List<Object> objects;
-
-    public GetObjectsResult( String identifier, Object object ){
-        super( identifier );
-        this.objects = new ArrayList<Object>();
-        this.objects.add( object );
-    }
-
-    public GetObjectsResult( String identifier, List<Object> objects ){
-        super( identifier );
-        this.objects = objects;
-    }
-
-    public List<Object> getObjects(){
-        return objects;
-    }
-
-    public Object getValue(){
-	return objects;
-    }
-
-}

Copied: labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/result/GetObjectsResult.java (from rev 31239, labs/jbossrules/branches/camel_jaxb_marshaller-lucaz/drools-core/src/main/java/org/drools/result/GetObjectsResult.java)
===================================================================
--- labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/result/GetObjectsResult.java	                        (rev 0)
+++ labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/result/GetObjectsResult.java	2010-01-27 18:55:25 UTC (rev 31263)
@@ -0,0 +1,29 @@
+package org.drools.result;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class GetObjectsResult extends AbstractResult implements GenericResult {
+
+    private List<Object> objects;
+
+    public GetObjectsResult( String identifier, Object object ){
+        super( identifier );
+        this.objects = new ArrayList<Object>();
+        this.objects.add( object );
+    }
+
+    public GetObjectsResult( String identifier, List<Object> objects ){
+        super( identifier );
+        this.objects = objects;
+    }
+
+    public List<Object> getObjects(){
+        return objects;
+    }
+
+    public Object getValue(){
+	return objects;
+    }
+
+}

Deleted: labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/result/InsertElementsResult.java
===================================================================
--- labs/jbossrules/branches/camel_jaxb_marshaller-lucaz/drools-core/src/main/java/org/drools/result/InsertElementsResult.java	2010-01-26 23:07:09 UTC (rev 31239)
+++ labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/result/InsertElementsResult.java	2010-01-27 18:55:25 UTC (rev 31263)
@@ -1,39 +0,0 @@
-package org.drools.result;
-
-import java.util.List;
-
-import org.drools.runtime.rule.FactHandle;
-
-public class InsertElementsResult extends AbstractResult implements GenericResult {
-
-    private List<FactHandle> handles;
-    private List<Object>     objects;
-
-    public InsertElementsResult( String identifier ){
-        super( identifier );
-    }
-
-    public List<FactHandle> getHandles(){
-        return handles;
-    }
-
-    public void setHandles( List<FactHandle> handles ){
-	this.handles = handles;
-    }
-
-    public List<Object> getObjects(){
-        return objects;
-    }
-
-    public void setObjects( List<Object> objects ){
-	this.objects = objects;
-    }
-
-    public Object getValue(){
-        return this.objects;
-    }
-
-    public Object getFactHandle(){
-        return this.handles;
-    }
-}

Copied: labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/result/InsertElementsResult.java (from rev 31239, labs/jbossrules/branches/camel_jaxb_marshaller-lucaz/drools-core/src/main/java/org/drools/result/InsertElementsResult.java)
===================================================================
--- labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/result/InsertElementsResult.java	                        (rev 0)
+++ labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/result/InsertElementsResult.java	2010-01-27 18:55:25 UTC (rev 31263)
@@ -0,0 +1,39 @@
+package org.drools.result;
+
+import java.util.List;
+
+import org.drools.runtime.rule.FactHandle;
+
+public class InsertElementsResult extends AbstractResult implements GenericResult {
+
+    private List<FactHandle> handles;
+    private List<Object>     objects;
+
+    public InsertElementsResult( String identifier ){
+        super( identifier );
+    }
+
+    public List<FactHandle> getHandles(){
+        return handles;
+    }
+
+    public void setHandles( List<FactHandle> handles ){
+	this.handles = handles;
+    }
+
+    public List<Object> getObjects(){
+        return objects;
+    }
+
+    public void setObjects( List<Object> objects ){
+	this.objects = objects;
+    }
+
+    public Object getValue(){
+        return this.objects;
+    }
+
+    public Object getFactHandle(){
+        return this.handles;
+    }
+}

Deleted: labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/result/InsertObjectResult.java
===================================================================
--- labs/jbossrules/branches/camel_jaxb_marshaller-lucaz/drools-core/src/main/java/org/drools/result/InsertObjectResult.java	2010-01-26 23:07:09 UTC (rev 31239)
+++ labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/result/InsertObjectResult.java	2010-01-27 18:55:25 UTC (rev 31263)
@@ -1,26 +0,0 @@
-package org.drools.result;
-
-import org.drools.runtime.rule.FactHandle;
-
-public class InsertObjectResult extends AbstractResult implements GenericResult {
-
-    private FactHandle handle;
-    private Object     object;
-
-    public InsertObjectResult( String identifier, FactHandle handle ){
-        super( identifier );
-        this.handle = handle;
-    }
-
-    public void setObject( Object object ){
-	this.object = object;
-    }
-
-    public Object getValue(){
-        return this.object;
-    }
-
-    public Object getFactHandle(){
-        return this.handle;
-    }
-}

Copied: labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/result/InsertObjectResult.java (from rev 31239, labs/jbossrules/branches/camel_jaxb_marshaller-lucaz/drools-core/src/main/java/org/drools/result/InsertObjectResult.java)
===================================================================
--- labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/result/InsertObjectResult.java	                        (rev 0)
+++ labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/result/InsertObjectResult.java	2010-01-27 18:55:25 UTC (rev 31263)
@@ -0,0 +1,26 @@
+package org.drools.result;
+
+import org.drools.runtime.rule.FactHandle;
+
+public class InsertObjectResult extends AbstractResult implements GenericResult {
+
+    private FactHandle handle;
+    private Object     object;
+
+    public InsertObjectResult( String identifier, FactHandle handle ){
+        super( identifier );
+        this.handle = handle;
+    }
+
+    public void setObject( Object object ){
+	this.object = object;
+    }
+
+    public Object getValue(){
+        return this.object;
+    }
+
+    public Object getFactHandle(){
+        return this.handle;
+    }
+}

Deleted: labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/result/QueryResult.java
===================================================================
--- labs/jbossrules/branches/camel_jaxb_marshaller-lucaz/drools-core/src/main/java/org/drools/result/QueryResult.java	2010-01-26 23:07:09 UTC (rev 31239)
+++ labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/result/QueryResult.java	2010-01-27 18:55:25 UTC (rev 31263)
@@ -1,21 +0,0 @@
-package org.drools.result;
-
-import org.drools.runtime.rule.QueryResults;
-
-public class QueryResult extends AbstractResult implements GenericResult {
-
-    private QueryResults results;
-
-    public QueryResult( String identifier, QueryResults results ){
-        super( identifier );
-        this.results = results;
-    }
-
-    public QueryResults getResults(){
-        return this.results;
-    }
-
-    public Object getValue(){
-	return this.results;
-    }
-}

Copied: labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/result/QueryResult.java (from rev 31239, labs/jbossrules/branches/camel_jaxb_marshaller-lucaz/drools-core/src/main/java/org/drools/result/QueryResult.java)
===================================================================
--- labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/result/QueryResult.java	                        (rev 0)
+++ labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/result/QueryResult.java	2010-01-27 18:55:25 UTC (rev 31263)
@@ -0,0 +1,21 @@
+package org.drools.result;
+
+import org.drools.runtime.rule.QueryResults;
+
+public class QueryResult extends AbstractResult implements GenericResult {
+
+    private QueryResults results;
+
+    public QueryResult( String identifier, QueryResults results ){
+        super( identifier );
+        this.results = results;
+    }
+
+    public QueryResults getResults(){
+        return this.results;
+    }
+
+    public Object getValue(){
+	return this.results;
+    }
+}

Deleted: labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/result/SetGlobalResult.java
===================================================================
--- labs/jbossrules/branches/camel_jaxb_marshaller-lucaz/drools-core/src/main/java/org/drools/result/SetGlobalResult.java	2010-01-26 23:07:09 UTC (rev 31239)
+++ labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/result/SetGlobalResult.java	2010-01-27 18:55:25 UTC (rev 31263)
@@ -1,10 +0,0 @@
-package org.drools.result;
-
-
-public class SetGlobalResult extends GetGlobalResult {
-
-    public SetGlobalResult( String outIdentifier, Object object ){
-        super( outIdentifier, object );
-    }
-
-}

Copied: labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/result/SetGlobalResult.java (from rev 31239, labs/jbossrules/branches/camel_jaxb_marshaller-lucaz/drools-core/src/main/java/org/drools/result/SetGlobalResult.java)
===================================================================
--- labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/result/SetGlobalResult.java	                        (rev 0)
+++ labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/result/SetGlobalResult.java	2010-01-27 18:55:25 UTC (rev 31263)
@@ -0,0 +1,10 @@
+package org.drools.result;
+
+
+public class SetGlobalResult extends GetGlobalResult {
+
+    public SetGlobalResult( String outIdentifier, Object object ){
+        super( outIdentifier, object );
+    }
+
+}

Modified: labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/runtime/impl/BatchExecutionImpl.java
===================================================================
--- labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/runtime/impl/BatchExecutionImpl.java	2010-01-27 18:21:31 UTC (rev 31262)
+++ labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/runtime/impl/BatchExecutionImpl.java	2010-01-27 18:55:25 UTC (rev 31263)
@@ -1,21 +1,23 @@
 package org.drools.runtime.impl;
 
-import java.util.Collection;
 import java.util.List;
 
+import javax.xml.bind.annotation.XmlRootElement;
+
 import org.drools.command.Context;
 import org.drools.command.impl.GenericCommand;
-import org.drools.command.impl.KnowledgeCommandContext;
-import org.drools.reteoo.ReteooWorkingMemory;
-import org.drools.runtime.StatefulKnowledgeSession;
-import org.drools.runtime.process.ProcessInstance;
-import org.drools.vsm.ServiceManager;
 
+ at XmlRootElement
+public class BatchExecutionImpl implements GenericCommand<Void> {
 
-public class BatchExecutionImpl implements GenericCommand<Void> {
+	private static final long serialVersionUID = 1L;
+
 	private List<GenericCommand> commands;
 	
 	private String lookup;
+	
+	public BatchExecutionImpl() {
+	}
 
 	public BatchExecutionImpl(List<GenericCommand> commands) {
         this.commands = commands;

Copied: labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/runtime/impl/ExecutionResultAdapter.java (from rev 31239, labs/jbossrules/branches/camel_jaxb_marshaller-lucaz/drools-core/src/main/java/org/drools/runtime/impl/ExecutionResultAdapter.java)
===================================================================
--- labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/runtime/impl/ExecutionResultAdapter.java	                        (rev 0)
+++ labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/runtime/impl/ExecutionResultAdapter.java	2010-01-27 18:55:25 UTC (rev 31263)
@@ -0,0 +1,24 @@
+package org.drools.runtime.impl;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.xml.bind.annotation.adapters.XmlAdapter;
+
+public class ExecutionResultAdapter extends XmlAdapter<Object[], Map<String,Object>> {
+
+	@Override
+	public Object[] marshal(Map<String, Object> value) throws Exception {
+		return value.values().toArray(new Object[value.size()]);
+	}
+
+	@Override
+	public Map<String, Object> unmarshal(Object[] value) throws Exception {
+		Map<String, Object> r = new HashMap<String, Object>();
+		for( Object c : value ) {
+			r.put(c.toString(), c);
+		}
+		return r;
+	}
+
+}

Modified: labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/runtime/impl/ExecutionResultImpl.java
===================================================================
--- labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/runtime/impl/ExecutionResultImpl.java	2010-01-27 18:21:31 UTC (rev 31262)
+++ labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-core/src/main/java/org/drools/runtime/impl/ExecutionResultImpl.java	2010-01-27 18:55:25 UTC (rev 31263)
@@ -5,11 +5,27 @@
 import java.util.HashMap;
 import java.util.Map;
 
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlElementRef;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
+
 import org.drools.runtime.ExecutionResults;
 
+ at XmlRootElement(name="execution-results")
+ at XmlAccessorType(XmlAccessType.NONE)
 public class ExecutionResultImpl implements ExecutionResults, Serializable {
-    Map<String, Object> results = new HashMap<String, Object>();    
-    Map<String, Object> facts = new HashMap<String, Object>();
+	
+	private static final long serialVersionUID = 1L;
+	
+	@XmlJavaTypeAdapter(ExecutionResultAdapter.class)
+	@XmlElement(name="results")
+    HashMap<String, Object> results = new HashMap<String, Object>();
+//	@XmlJavaTypeAdapter(ExecutionResultAdapter.class)
+	@XmlElement(name="facts")
+	HashMap<String, Object> facts = new HashMap<String, Object>();
     
     /* (non-Javadoc)
      * @see org.drools.batchexecution.BatchExecutionResult#getIdentifiers()
@@ -33,7 +49,7 @@
         return this.results;
     }
 
-    public void setResults(Map<String, Object> results) {
+    public void setResults(HashMap<String, Object> results) {
         this.results = results;
     }
     
@@ -41,7 +57,7 @@
         return this.facts;
     }    
     
-    public void setFactHandles(Map<String, Object> facts) {
+    public void setFactHandles(HashMap<String, Object> facts) {
         this.facts = facts;
     }
 }

Copied: labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-pipeline/drools-camel/src/main/java/org/drools/camel/component/DroolsJaxbDataFormat.java (from rev 31239, labs/jbossrules/branches/camel_jaxb_marshaller-lucaz/drools-pipeline/drools-camel/src/main/java/org/drools/camel/component/DroolsJaxbDataFormat.java)
===================================================================
--- labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-pipeline/drools-camel/src/main/java/org/drools/camel/component/DroolsJaxbDataFormat.java	                        (rev 0)
+++ labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-pipeline/drools-camel/src/main/java/org/drools/camel/component/DroolsJaxbDataFormat.java	2010-01-27 18:55:25 UTC (rev 31263)
@@ -0,0 +1,172 @@
+package org.drools.camel.component;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.io.Reader;
+import java.io.StringReader;
+
+import javax.xml.bind.JAXBContext;
+import javax.xml.bind.JAXBElement;
+import javax.xml.bind.JAXBException;
+import javax.xml.bind.Marshaller;
+import javax.xml.bind.Unmarshaller;
+import javax.xml.transform.Source;
+
+import org.apache.camel.Exchange;
+import org.apache.camel.spi.DataFormat;
+import org.drools.KnowledgeBase;
+import org.drools.builder.KnowledgeBuilder;
+import org.drools.builder.help.KnowledgeBuilderHelper;
+import org.drools.command.runtime.BatchExecutionCommand;
+import org.drools.impl.StatefulKnowledgeSessionImpl;
+import org.drools.impl.StatelessKnowledgeSessionImpl;
+import org.drools.io.Resource;
+import org.drools.io.ResourceFactory;
+import org.drools.reteoo.ReteooRuleBase;
+import org.drools.runtime.CommandExecutor;
+import org.drools.runtime.impl.ExecutionResultAdapter;
+import org.drools.runtime.pipeline.PipelineContext;
+import org.drools.runtime.pipeline.impl.CommandTranslator;
+import org.drools.runtime.pipeline.impl.ServiceManagerPipelineContextImpl;
+import org.drools.vsm.ServiceManager;
+import org.drools.vsm.local.ServiceManagerLocalClient;
+import org.w3c.dom.Document;
+import org.xml.sax.InputSource;
+
+import com.sun.tools.xjc.Language;
+import com.sun.tools.xjc.Options;
+
+/**
+ * 
+ * @author Lucas Amador
+ * 
+ */
+public class DroolsJaxbDataFormat implements DataFormat {
+
+	private CommandTranslator cmdTranslator;
+	private Unmarshaller unmarshaller;
+	private Marshaller marshaller;
+
+	public DroolsJaxbDataFormat() throws JAXBException {
+		JAXBContext jaxbContext = createJaxbContext();
+		this.unmarshaller = jaxbContext.createUnmarshaller();
+		this.marshaller = jaxbContext.createMarshaller();
+		this.marshaller.setProperty(Marshaller.JAXB_FRAGMENT, true);
+		this.marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);
+		this.marshaller.setAdapter(new ExecutionResultAdapter());
+
+		this.cmdTranslator = new CommandTranslator(unmarshaller);
+	}
+
+	public void marshal(Exchange exchange, Object graph, OutputStream stream)
+	throws Exception {
+
+		Object body = exchange.getIn().getBody();
+
+		try {
+			this.marshaller.marshal(body, stream);
+		} catch (Exception e) {
+			e.printStackTrace();
+		}
+
+		stream.flush();
+
+	}
+
+	public Object unmarshal(Exchange exchange, InputStream stream) throws Exception {
+
+		PipelineContext context = (PipelineContext) exchange.getProperty("drools-context");
+		Document d = exchange.getIn().getBody(Document.class);
+		Object body = exchange.getIn().getBody();
+		String name = d.getDocumentElement().getAttribute("lookup");
+		//        JAXBContext jaxbContext = (JAXBContext) context.getProperties().get("jaxb-context");
+		//        this.unmarshaller = getUnmarshaller(jaxbContext);
+		ServiceManagerPipelineContextImpl vsmContext = (ServiceManagerPipelineContextImpl) exchange.getProperty("drools-context");
+		ServiceManager sm = vsmContext.getServiceManager();
+		CommandExecutor executor = sm.lookup(name);
+		if (executor == null) {
+			throw new IllegalArgumentException("Unable to lookup CommandExecutor using name '" + name + "'");
+		}
+		vsmContext.setCommandExecutor(executor);
+		ClassLoader cl = null;
+		if (executor instanceof StatefulKnowledgeSessionImpl) {
+			cl = ((ReteooRuleBase) ((StatefulKnowledgeSessionImpl) executor).getRuleBase()).getRootClassLoader();
+		} else if (executor instanceof StatelessKnowledgeSessionImpl) {
+			cl = ((ReteooRuleBase) ((StatelessKnowledgeSessionImpl) executor).getRuleBase()).getRootClassLoader();
+		} else {
+			throw new IllegalArgumentException("Unable to set ClassLoader on " + executor);
+		}
+		vsmContext.setClassLoader(cl);
+		Object payload = null;
+		if ( body instanceof File ) {
+			payload = (String) this.unmarshaller.unmarshal( (File) body );
+		} else if ( body instanceof InputStream ) {
+			payload = (String) this.unmarshaller.unmarshal( (InputStream) body );
+		} else if ( body instanceof Reader ) {
+			payload = (String) this.unmarshaller.unmarshal( (Reader) body );
+		} else if ( body instanceof Source ) {
+			payload = (String) this.unmarshaller.unmarshal( (Source) body );
+		} else if ( body instanceof InputSource ) {
+			payload = (String) this.unmarshaller.unmarshal( (InputSource) body );
+		}  else if ( body instanceof Resource ) {
+			payload = (String) this.unmarshaller.unmarshal( (( Resource ) body).getReader() );
+		}  else if ( body instanceof String ) {
+			try {
+				payload = this.unmarshaller.unmarshal( new StringReader( ( String ) body ) );
+			} catch (Exception e) {
+				e.printStackTrace();
+			}
+			System.out.println("body unmarshaled");
+		} else {
+			throw new IllegalArgumentException( "exchange input body object must be instance of File, InputStream, Reader, Source, InputSource, Resource, String" );
+		}
+
+		if ( payload instanceof JAXBElement ) {
+			payload = ((JAXBElement<?>) payload).getValue();
+		}
+
+		if (payload instanceof BatchExecutionCommand) {
+			payload = cmdTranslator.transform((BatchExecutionCommand) payload);
+		}
+
+		//        context.getProperties().put("jaxb-context", jaxbCtx);
+		exchange.setProperty("drools-context", context);
+
+		return payload;
+	}
+
+	/**
+	 * Only to share temporarily the model definition, this must be replaced with the JaxbContext inside the Exchange as a property
+	 * @return jaxb context
+	 */
+	private JAXBContext createJaxbContext() {
+		Options xjcOpts = new Options();
+		xjcOpts.setSchemaLanguage( Language.XMLSCHEMA );
+		ServiceManagerLocalClient serviceManager = new ServiceManagerLocalClient();
+		KnowledgeBuilder kbuilder = serviceManager.getKnowledgeBuilderFactory().newKnowledgeBuilder();
+		String[] classNames = null;
+		try {
+			classNames = KnowledgeBuilderHelper.addXsdModel( ResourceFactory.newClassPathResource("person.xsd", getClass()),
+					kbuilder,
+					xjcOpts,
+			"xsd" );
+		} catch (IOException e) {
+			System.out.println("Errors while adding xsd model. " + kbuilder.getErrors());
+		}
+
+		KnowledgeBase kbase = serviceManager.getKnowledgeBaseFactory().newKnowledgeBase();
+		kbase.addKnowledgePackages(kbuilder.getKnowledgePackages());
+
+		JAXBContext jaxbContext = null;
+		try {
+			jaxbContext = KnowledgeBuilderHelper.newJAXBContext( classNames, kbase );
+		} catch (JAXBException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+		return jaxbContext;
+	}
+
+}

Copied: labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-pipeline/drools-camel/src/main/resources/META-INF/services/org/apache/camel/dataformat/drools-jaxb (from rev 31239, labs/jbossrules/branches/camel_jaxb_marshaller-lucaz/drools-pipeline/drools-camel/src/main/resources/META-INF/services/org/apache/camel/dataformat/drools-jaxb)
===================================================================
--- labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-pipeline/drools-camel/src/main/resources/META-INF/services/org/apache/camel/dataformat/drools-jaxb	                        (rev 0)
+++ labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-pipeline/drools-camel/src/main/resources/META-INF/services/org/apache/camel/dataformat/drools-jaxb	2010-01-27 18:55:25 UTC (rev 31263)
@@ -0,0 +1,19 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+class=org.drools.camel.component.DroolsJaxbDataFormat
+

Copied: labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-pipeline/drools-camel/src/test/java/org/drools/camel/component/CamelEndpointWithJaxbTest.java (from rev 31239, labs/jbossrules/branches/camel_jaxb_marshaller-lucaz/drools-pipeline/drools-camel/src/test/java/org/drools/camel/component/CamelEndpointWithJaxbTest.java)
===================================================================
--- labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-pipeline/drools-camel/src/test/java/org/drools/camel/component/CamelEndpointWithJaxbTest.java	                        (rev 0)
+++ labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-pipeline/drools-camel/src/test/java/org/drools/camel/component/CamelEndpointWithJaxbTest.java	2010-01-27 18:55:25 UTC (rev 31263)
@@ -0,0 +1,175 @@
+package org.drools.camel.component;
+
+import java.io.IOException;
+
+import org.apache.camel.builder.RouteBuilder;
+import org.drools.KnowledgeBase;
+import org.drools.builder.KnowledgeBuilder;
+import org.drools.builder.ResourceType;
+import org.drools.builder.help.KnowledgeBuilderHelper;
+import org.drools.command.runtime.rule.InsertObjectCommand;
+import org.drools.io.ResourceFactory;
+import org.drools.pipeline.camel.Person;
+import org.drools.runtime.ExecutionResults;
+import org.drools.runtime.StatefulKnowledgeSession;
+import org.drools.runtime.rule.FactHandle;
+
+import com.sun.tools.xjc.Language;
+import com.sun.tools.xjc.Options;
+/**
+ * 
+ * @author Lucas Amador
+ *
+ */
+public class CamelEndpointWithJaxbTest extends DroolsCamelTestSupport {
+	
+    private String handle;
+//	private JAXBContext jaxbContext;
+    
+//    public void testSimple() throws JAXBException {
+//    	ExecutionResultImpl res = new ExecutionResultImpl();
+//    	HashMap<String, Object> results = new HashMap<String, Object>();
+//    	results.put("name", new String("lucaz"));
+//		res.setResults(results);
+//    	Marshaller marshaller = jaxbContext.createMarshaller();
+//    	marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);
+//    	marshaller.marshal(res, System.out);
+//    }
+
+    public void testSessionInsert() throws Exception {
+
+        String cmd = "<batch-execution lookup=\"ksession1\">\n" +
+        				"<insert out-identifier=\"lucaz\">\n" +
+        				  "<object>\n" +
+        				  	"<Person xmlns=\"http://drools.org/model\" >\n" +
+        				  	  "<name>lucaz</name>\n" +
+        				  	  "<age>25</age>\n" +
+        		    		"</Person>\n" +
+	                      "</object>\n" +
+        				"</insert>" +
+            		 "</batch-execution>\n";
+
+        Object requestBody = template.requestBody("direct:test-with-session", cmd);
+        System.out.println(new String((byte[])requestBody));
+        
+//        String outXml = new String((byte[])template.requestBody("direct:test-with-session", cmd));
+        
+//        ExecutionResults result = (ExecutionResults) BatchExecutionHelper.newXStreamMarshaller().fromXML(outXml);
+//        Person person = (Person) result.getValue("salaboy");
+//        assertEquals("salaboy", person.getName());
+
+//        String expectedXml = "<execution-results>\n";
+//        expectedXml += "  <result identifier=\"salaboy\">\n";
+//        expectedXml += "    <org.drools.pipeline.camel.Person>\n";
+//        expectedXml += "      <name>salaboy</name>\n";
+//        expectedXml += "    </org.drools.pipeline.camel.Person>\n";
+//        expectedXml += "  </result>\n";
+//        expectedXml += "  <fact-handle identifier=\"salaboy\" externalForm=\"" + ((InternalFactHandle) result.getFactHandle("salaboy")).toExternalForm() + "\"/>\n";
+//        expectedXml += "</execution-results>";
+
+//        assertEquals(expectedXml, outXml);
+
+    }
+    
+    public void testSessionGetObject() throws Exception {
+    	
+//    	String cmd = "" +
+//			    	"<batch-execution lookup=\"ksession1\">\n" +
+//			    		"<get-object out-identifier=\"rider\" factHandle=\""+ handle +"\"/>\n" +
+//			    	"</batch-execution>\n";
+//
+//    	String outXml = new String((byte[])template.requestBody("direct:test-with-session", cmd));
+//    	
+//    	System.out.println(outXml);
+//    	
+//    	Object requestBody = template.requestBody("direct:test-with-session", cmd);
+//    	System.out.println(requestBody);
+
+//    	ExecutionResults result = (ExecutionResults) BatchExecutionHelper.newXStreamMarshaller().fromXML(outXml);
+//    	Person person = (Person) result.getValue("rider");
+//    	assertEquals("Hadrian", person.getName());
+//
+//    	String expectedXml = "<execution-results>\n" +
+//					    	"  <result identifier=\"rider\">\n" +
+//					    	"    <org.drools.pipeline.camel.Person>\n" +
+//					    	"      <name>Hadrian</name>\n" +
+//					    	"    </org.drools.pipeline.camel.Person>\n" +
+//					    	"  </result>\n" +
+//					    	"</execution-results>";
+//
+//    	assertEquals(expectedXml, outXml);
+
+    }
+
+    @Override
+    protected RouteBuilder createRouteBuilder() throws Exception {
+        return new RouteBuilder() {
+            public void configure() throws Exception {
+                from("direct:test-with-session").to("drools:sm/ksession1?dataFormat=drools-jaxb");
+                from("direct:test-no-session").to("drools:sm?dataFormat=drools-jaxb");
+            }
+        };
+    }
+
+    @Override
+    protected void configureDroolsContext() {
+        Person me = new Person();
+        me.setName("Hadrian");
+
+        StatefulKnowledgeSession ksession = registerKnowledgeRuntime("ksession1", null);
+        InsertObjectCommand cmd = new InsertObjectCommand(me);
+        cmd.setOutIdentifier("camel-rider");
+        cmd.setReturnObject(false);
+        ExecutionResults results = ksession.execute(cmd);
+        handle = ((FactHandle)results.getFactHandle("camel-rider")).toExternalForm();
+    }
+    
+    @Override
+    protected StatefulKnowledgeSession registerKnowledgeRuntime(String identifier, String rule) {
+    	KnowledgeBuilder kbuilder = serviceManager.getKnowledgeBuilderFactory().newKnowledgeBuilder();
+    	
+    	Options xjcOpts = new Options();
+        xjcOpts.setSchemaLanguage( Language.XMLSCHEMA );
+
+        String classNames[] = null;
+        
+        try {
+			classNames = KnowledgeBuilderHelper.addXsdModel( ResourceFactory.newClassPathResource("person.xsd", getClass()),
+			                                                          kbuilder,
+			                                                          xjcOpts,
+			                                                          "xsd" );
+		} catch (IOException e) {
+			LOG.error("Errors while adding xsd model. ", kbuilder.getErrors());
+		}
+
+        assertFalse( kbuilder.hasErrors() );
+        
+        if (rule != null && rule.length() > 0) {
+            kbuilder.add(ResourceFactory.newByteArrayResource(rule.getBytes()), ResourceType.DRL);
+    
+            if (kbuilder.hasErrors()) {
+                LOG.info("Errors while adding rule. ", kbuilder.getErrors());
+            }
+        }
+
+    	assertFalse(kbuilder.hasErrors());
+    	
+    	
+    	KnowledgeBase kbase = serviceManager.getKnowledgeBaseFactory().newKnowledgeBase();
+		kbase.addKnowledgePackages(kbuilder.getKnowledgePackages());
+		
+//		JAXBContext jaxbContext = null;
+//		try {
+//			jaxbContext = KnowledgeBuilderHelper.newJAXBContext( classNames, kbase );
+//		} catch (JAXBException e) {
+//			// TODO Auto-generated catch block
+//			e.printStackTrace();
+//		}
+		// put this jaxbContext into the camel-context
+    	
+    	StatefulKnowledgeSession session = kbase.newStatefulKnowledgeSession();
+    	serviceManager.register(identifier, session);
+    	return session;
+    }
+    
+}

Copied: labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-pipeline/drools-camel/src/test/resources/org (from rev 31239, labs/jbossrules/branches/camel_jaxb_marshaller-lucaz/drools-pipeline/drools-camel/src/test/resources/org)

Copied: labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-pipeline/drools-camel/src/test/resources/org/drools (from rev 31239, labs/jbossrules/branches/camel_jaxb_marshaller-lucaz/drools-pipeline/drools-camel/src/test/resources/org/drools)

Copied: labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-pipeline/drools-camel/src/test/resources/org/drools/camel (from rev 31239, labs/jbossrules/branches/camel_jaxb_marshaller-lucaz/drools-pipeline/drools-camel/src/test/resources/org/drools/camel)

Copied: labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-pipeline/drools-camel/src/test/resources/org/drools/camel/component (from rev 31239, labs/jbossrules/branches/camel_jaxb_marshaller-lucaz/drools-pipeline/drools-camel/src/test/resources/org/drools/camel/component)

Deleted: labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-pipeline/drools-camel/src/test/resources/org/drools/camel/component/person.xml
===================================================================
--- labs/jbossrules/branches/camel_jaxb_marshaller-lucaz/drools-pipeline/drools-camel/src/test/resources/org/drools/camel/component/person.xml	2010-01-26 23:07:09 UTC (rev 31239)
+++ labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-pipeline/drools-camel/src/test/resources/org/drools/camel/component/person.xml	2010-01-27 18:55:25 UTC (rev 31263)
@@ -1,5 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<Person xmlns="http://drools.org/model" >
-	<name>lucaz</name>
-	<age>25</age>
-</Person>
\ No newline at end of file

Copied: labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-pipeline/drools-camel/src/test/resources/org/drools/camel/component/person.xml (from rev 31239, labs/jbossrules/branches/camel_jaxb_marshaller-lucaz/drools-pipeline/drools-camel/src/test/resources/org/drools/camel/component/person.xml)
===================================================================
--- labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-pipeline/drools-camel/src/test/resources/org/drools/camel/component/person.xml	                        (rev 0)
+++ labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-pipeline/drools-camel/src/test/resources/org/drools/camel/component/person.xml	2010-01-27 18:55:25 UTC (rev 31263)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<Person xmlns="http://drools.org/model" >
+	<name>lucaz</name>
+	<age>25</age>
+</Person>
\ No newline at end of file

Deleted: labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-pipeline/drools-camel/src/test/resources/org/drools/camel/component/person.xsd
===================================================================
--- labs/jbossrules/branches/camel_jaxb_marshaller-lucaz/drools-pipeline/drools-camel/src/test/resources/org/drools/camel/component/person.xsd	2010-01-26 23:07:09 UTC (rev 31239)
+++ labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-pipeline/drools-camel/src/test/resources/org/drools/camel/component/person.xsd	2010-01-27 18:55:25 UTC (rev 31263)
@@ -1,15 +0,0 @@
-<xsd:schema xmlns:person="http://drools.org/model" 
-            xmlns:xsd="http://www.w3.org/2001/XMLSchema"
-	        targetNamespace="http://drools.org/model"
-	        elementFormDefault="qualified" >
-	        
-	<xsd:element name="Person">
-		<xsd:complexType>
-			<xsd:sequence>
-				<xsd:element name="name" type="xsd:string" />
-				<xsd:element name="age" type="xsd:integer" />
-			</xsd:sequence>	
-		</xsd:complexType>
-	</xsd:element>
-
-</xsd:schema>
\ No newline at end of file

Copied: labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-pipeline/drools-camel/src/test/resources/org/drools/camel/component/person.xsd (from rev 31239, labs/jbossrules/branches/camel_jaxb_marshaller-lucaz/drools-pipeline/drools-camel/src/test/resources/org/drools/camel/component/person.xsd)
===================================================================
--- labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-pipeline/drools-camel/src/test/resources/org/drools/camel/component/person.xsd	                        (rev 0)
+++ labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-pipeline/drools-camel/src/test/resources/org/drools/camel/component/person.xsd	2010-01-27 18:55:25 UTC (rev 31263)
@@ -0,0 +1,15 @@
+<xsd:schema xmlns:person="http://drools.org/model" 
+            xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+	        targetNamespace="http://drools.org/model"
+	        elementFormDefault="qualified" >
+	        
+	<xsd:element name="Person">
+		<xsd:complexType>
+			<xsd:sequence>
+				<xsd:element name="name" type="xsd:string" />
+				<xsd:element name="age" type="xsd:integer" />
+			</xsd:sequence>	
+		</xsd:complexType>
+	</xsd:element>
+
+</xsd:schema>
\ No newline at end of file

Copied: labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-pipeline/drools-transformer-jaxb/src/main/java/org/drools/runtime/pipeline/impl/CommandTranslator.java (from rev 31239, labs/jbossrules/branches/camel_jaxb_marshaller-lucaz/drools-pipeline/drools-transformer-jaxb/src/main/java/org/drools/runtime/pipeline/impl/CommandTranslator.java)
===================================================================
--- labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-pipeline/drools-transformer-jaxb/src/main/java/org/drools/runtime/pipeline/impl/CommandTranslator.java	                        (rev 0)
+++ labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-pipeline/drools-transformer-jaxb/src/main/java/org/drools/runtime/pipeline/impl/CommandTranslator.java	2010-01-27 18:55:25 UTC (rev 31263)
@@ -0,0 +1,199 @@
+package org.drools.runtime.pipeline.impl;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.xml.bind.JAXBException;
+import javax.xml.bind.Unmarshaller;
+
+import org.drools.command.impl.GenericCommand;
+import org.drools.command.runtime.BatchExecutionCommand;
+import org.drools.command.runtime.SetGlobalCommand;
+import org.drools.command.runtime.process.SignalEventCommand;
+import org.drools.command.runtime.process.StartProcessCommand;
+import org.drools.command.runtime.rule.InsertElementsCommand;
+import org.drools.command.runtime.rule.InsertObjectCommand;
+import org.drools.command.runtime.rule.QueryCommand;
+import org.w3c.dom.Element;
+
+/**
+ * 
+ * @author Wolfgang Laun
+ */
+public class CommandTranslator {
+    private Unmarshaller unmarshaller;
+    private Map<Class<?>,CommandTransformer> class2trans;
+    
+    /**
+     * Constructor
+     *  
+     */
+    public CommandTranslator( Unmarshaller unmarshaller ){
+        class2trans = new HashMap<Class<?>,CommandTransformer>();
+        class2trans.put( BatchExecutionCommand.class,   new BatchExecutionTransformer() );
+        class2trans.put( InsertElementsCommand.class,   new InsertElementsTransformer() );
+        class2trans.put( InsertObjectCommand.class,     new InsertObjectTransformer() );
+        class2trans.put( QueryCommand.class,            new QueryTransformer() );
+        class2trans.put( SetGlobalCommand.class,        new SetGlobalTransformer() );
+        class2trans.put( SignalEventCommand.class,      new SignalEventTransformer() );
+        class2trans.put( StartProcessCommand.class,     new StartProcessTransformer() );
+        this.unmarshaller = unmarshaller;
+    }
+    
+    /**
+     * Transforms a list of XML elements representing Drools command objects
+     * to a list of <tt>Command&lt;?&gt;</tt> objects. Application objects
+     * are unmarshalled, using an <tt>Unmarshaller</tt> object derived from
+     * the object's class.
+     * 
+     * @param xmlCmds the list of XML elements representing Drools command objects
+     * @return 
+     * @return a list of <tt>Command&lt;?&gt;</tt> objects
+     */
+    public GenericCommand<?> transform( BatchExecutionCommand batchExecution ){
+        CommandTransformer ct = class2trans.get( batchExecution.getClass() );
+        return ct.transform( this, batchExecution );
+    }
+
+    CommandTransformer getCommandTransformer( Class<?> clazz ){
+        return class2trans.get( clazz );
+    }
+        
+    protected Object makeObject( Element element ){        
+        Object obj = null;
+        try {
+            obj = unmarshaller.unmarshal( element.getFirstChild() );
+        } catch (JAXBException e) {
+            // TODO Auto-generated catch block
+            e.printStackTrace();
+        }
+        return obj;
+    }
+}
+
+
+/**
+ * Abstract base class for all command transformers.
+ */
+abstract class CommandTransformer {
+    abstract GenericCommand<?> transform( CommandTranslator ct, Object o );
+}
+
+/**
+ * Class for transforming a BatchExecution command.
+ */
+class BatchExecutionTransformer extends CommandTransformer {
+    public GenericCommand<?> transform( CommandTranslator cmdTrans, Object o ){
+        BatchExecutionCommand be = (BatchExecutionCommand)o;
+        List<GenericCommand<?>> xmlCmds = be.getCommands();
+        for( int i = 0; i < xmlCmds.size(); i++ ){
+            GenericCommand<?> cmd = xmlCmds.get( i );
+            CommandTransformer ct = cmdTrans.getCommandTransformer( cmd.getClass() );
+            if( ct != null ){
+                xmlCmds.set( i, ct.transform( cmdTrans, cmd ) );
+            }
+        }
+        return be;
+    }
+}
+
+/**
+ * Class for transforming an InsertElements command.
+ */
+class InsertElementsTransformer extends CommandTransformer {
+    public GenericCommand<?> transform( CommandTranslator ct, Object o ){
+        InsertElementsCommand ie = (InsertElementsCommand)o;
+        Iterable<?> ioList = ie.getObjects();        
+        List<Object> coList = new ArrayList<Object>();
+        for( Object io: ioList ){
+            Element el = (Element)io;
+            Object co = ct.makeObject( el );
+            coList.add( co );
+        }
+        ie.setObjects( coList );
+        return ie;
+    }
+}
+
+/**
+ * Class for transforming a InsertObject command.
+ */
+class InsertObjectTransformer extends CommandTransformer {
+    public GenericCommand<?> transform( CommandTranslator ct, Object o ){
+        InsertObjectCommand io = (InsertObjectCommand)o;
+        Element el = (Element)io.getObject();
+        Object obj = ct.makeObject( el );
+        io.setObject( obj );
+        return io;
+    }
+}
+
+/**
+ * Class for transforming a Query command.
+ */
+class QueryTransformer extends CommandTransformer {
+    public GenericCommand<?> transform( CommandTranslator ct, Object o ){
+        QueryCommand q = (QueryCommand)o;
+        List<Object> argList = q.getArguments();
+        for( int i = 0; i < argList.size(); i++ ){
+            Element el = (Element)argList.get( i );
+            Object ao = ct.makeObject( el );
+            argList.add( i, ao );
+        }
+        return q;
+    }
+}
+
+/**
+ * Class for transforming a SetGlobal command.
+ */
+class SetGlobalTransformer extends CommandTransformer {
+    public GenericCommand<?> transform( CommandTranslator ct, Object o ){
+        SetGlobalCommand sg = (SetGlobalCommand)o;
+        Element el = (Element)sg.getObject();
+        Object obj = ct.makeObject( el );
+        sg.setObject( obj );
+        return sg;
+    }
+}
+
+/**
+ * Class for transforming a SignalEvent command.
+ */
+class SignalEventTransformer extends CommandTransformer {
+    public GenericCommand<?> transform( CommandTranslator ct, Object o ){
+        SignalEventCommand se = (SignalEventCommand)o;
+        Object ev = se.getEvent();
+        if( ev != null ){
+            Object obj = ct.makeObject( (Element)ev );
+            se.setEvent( obj );
+        }
+        return se;
+    }
+}
+
+/**
+ * Class for transforming a StartProcess command.
+ */
+class StartProcessTransformer extends CommandTransformer {
+    public GenericCommand<?> transform( CommandTranslator ct, Object o ){
+        StartProcessCommand sp = (StartProcessCommand)o;
+        // data items
+        List<Object> diList = sp.getData();
+        for( int i = 0; i < diList.size(); i++ ){
+            Element el = (Element)diList.get( i );
+            Object obj = ct.makeObject( el );
+            diList.add( i, obj );
+        }
+        // parameters
+        Map<String,Object> parMap = sp.getParameters();;
+        for( Map.Entry<String, Object> entry: parMap.entrySet() ){
+            Element el = (Element)entry.getValue();
+            Object obj = ct.makeObject( el );
+            entry.setValue( obj );
+        }
+        return sp;
+    }
+}

Modified: labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-pipeline/drools-transformer-jaxb/src/main/java/org/drools/runtime/pipeline/impl/DroolsJaxbHelperProviderImpl.java
===================================================================
--- labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-pipeline/drools-transformer-jaxb/src/main/java/org/drools/runtime/pipeline/impl/DroolsJaxbHelperProviderImpl.java	2010-01-27 18:21:31 UTC (rev 31262)
+++ labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-pipeline/drools-transformer-jaxb/src/main/java/org/drools/runtime/pipeline/impl/DroolsJaxbHelperProviderImpl.java	2010-01-27 18:55:25 UTC (rev 31263)
@@ -35,7 +35,6 @@
 import javax.xml.bind.JAXBException;
 
 import org.drools.KnowledgeBase;
-import org.drools.RuleBase;
 import org.drools.builder.KnowledgeBuilder;
 import org.drools.builder.help.DroolsJaxbHelperProvider;
 import org.drools.builder.impl.KnowledgeBuilderImpl;
@@ -62,6 +61,14 @@
 public class DroolsJaxbHelperProviderImpl
     implements
     DroolsJaxbHelperProvider {
+	
+	private static final String[] JAXB_ANNOTATED_CMD = {"org.drools.command.runtime.BatchExecutionCommand",
+														"org.drools.command.runtime.rule.InsertObjectCommand",
+														"org.drools.runtime.impl.BatchExecutionImpl",
+														"org.drools.runtime.impl.ExecutionResultImpl",
+														"org.drools.common.DefaultFactHandle"
+														};
+	
     public String[] addXsdModel(Resource resource,
                              KnowledgeBuilder kbuilder,
                              Options xjcOpts,
@@ -141,8 +148,10 @@
                                       Map<String, ? > properties,
                                       KnowledgeBase kbase) throws JAXBException {
         ClassLoader classLoader = ((InternalRuleBase) ((KnowledgeBaseImpl) kbase).getRuleBase()).getRootClassLoader();
+        
+        
 
-        Class[] classes = new Class[classNames.length];
+        Class[] classes = new Class[classNames.length + JAXB_ANNOTATED_CMD.length];
         int i = 0;
         try {
             for ( i = 0; i < classNames.length; i++ ) {
@@ -152,7 +161,16 @@
             throw new JAXBException( "Unable to resolve class '" + classNames[i] + "'",
                                      e );
         }
-
+        int j = 0;
+        try {
+        	for (i = classNames.length; i < classes.length; i++, j++) {
+            	classes[i] = classLoader.loadClass( JAXB_ANNOTATED_CMD[j] );
+            }
+        } catch ( ClassNotFoundException e ) {
+            throw new JAXBException( "Unable to resolve class '" + JAXB_ANNOTATED_CMD[j] + "'",
+                                     e );
+        }
+        
         return JAXBContext.newInstance( classes,
                                         properties );
     }

Modified: labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-pipeline/drools-transformer-jaxb/src/main/java/org/drools/runtime/pipeline/impl/JaxbFromXmlTransformer.java
===================================================================
--- labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-pipeline/drools-transformer-jaxb/src/main/java/org/drools/runtime/pipeline/impl/JaxbFromXmlTransformer.java	2010-01-27 18:21:31 UTC (rev 31262)
+++ labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-pipeline/drools-transformer-jaxb/src/main/java/org/drools/runtime/pipeline/impl/JaxbFromXmlTransformer.java	2010-01-27 18:55:25 UTC (rev 31263)
@@ -1,63 +1,75 @@
-package org.drools.runtime.pipeline.impl;
-
-import java.io.File;
-import java.io.InputStream;
-import java.io.Reader;
-import java.io.StringReader;
-
-import javax.xml.bind.JAXBElement;
-import javax.xml.bind.Unmarshaller;
-import javax.xml.transform.Source;
-
-import org.drools.io.Resource;
-import org.drools.runtime.pipeline.PipelineContext;
-import org.drools.runtime.pipeline.Transformer;
-import org.drools.runtime.pipeline.impl.BaseEmitter;
-import org.drools.runtime.pipeline.impl.BaseStage;
-import org.xml.sax.InputSource;
-
-public class JaxbFromXmlTransformer extends BaseEmitter
-    implements
-    Transformer {
-    private Unmarshaller            unmarshaller;
-
-    public JaxbFromXmlTransformer(Unmarshaller unmarshaller) {
-        this.unmarshaller = unmarshaller;
-    }
-
-    public void receive(Object object,
-                       PipelineContext context) {
-        Object result = null;
-        try {
-            if ( object instanceof File ) {
-                result = this.unmarshaller.unmarshal( (File) object );
-            } else if ( object instanceof InputStream ) {
-                result = this.unmarshaller.unmarshal( (InputStream) object );
-            } else if ( object instanceof Reader ) {
-                result = this.unmarshaller.unmarshal( (Reader) object );
-            } else if ( object instanceof Source ) {
-                result = this.unmarshaller.unmarshal( (Source) object );
-            } else if ( object instanceof InputSource ) {
-                result = this.unmarshaller.unmarshal( (InputSource) object );
-            }  else if ( object instanceof Resource ) {
-                result = this.unmarshaller.unmarshal( (( Resource ) object).getReader() );
-            }  else if ( object instanceof String ) {
-                result = this.unmarshaller.unmarshal( new StringReader( ( String ) object ) );
-            } else {
-                throw new IllegalArgumentException( "signal object must be instance of File, InputStream, Reader, Source, InputSource, Resource, String" );
-            }
-        } catch ( Exception e ) {
-            handleException( this,
-                             object,
-                             e );
-        }
-        
-        if ( result instanceof JAXBElement ) {
-            result = ((JAXBElement) object).getValue();
-        }
-        
-        emit( result,
-              context );
-    }
-
-}
+package org.drools.runtime.pipeline.impl;
+
+import java.io.File;
+import java.io.InputStream;
+import java.io.Reader;
+import java.io.StringReader;
+
+import javax.xml.bind.JAXBContext;
+import javax.xml.bind.JAXBElement;
+import javax.xml.bind.Unmarshaller;
+import javax.xml.transform.Source;
+
+import org.drools.io.Resource;
+import org.drools.command.runtime.BatchExecutionCommand;
+import org.drools.runtime.pipeline.PipelineContext;
+import org.drools.runtime.pipeline.Transformer;
+
+import org.xml.sax.InputSource;
+
+public class JaxbFromXmlTransformer extends JaxbTransformer
+    implements
+    Transformer {
+
+    private CommandTranslator cmdTrans;
+
+    public JaxbFromXmlTransformer(JAXBContext jaxbCtx) {
+        super( jaxbCtx );
+    }
+
+    public void receive(Object object, PipelineContext context) {
+    	Unmarshaller unmarshaller;
+    	try {
+    		JAXBContext jaxbContext = getPrimaryContext();
+    		unmarshaller = jaxbContext.createUnmarshaller();
+   !
  	} catch ( Exception e ) {
+    		handleException( this,
+    				object,
+    				e );
+    		return;
+    	}
+
+    	Object result = null;
+    	try {
+    		if ( object instanceof File ) {
+    			result = unmarshaller.unmarshal( (File) object );
+    		} else if ( object instanceof InputStream ) {
+    			result = unmarshaller.unmarshal( (InputStream) object );
+    		} else if ( object instanceof Reader ) {
+    			result = unmarshaller.unmarshal( (Reader) object );
+    		} else if ( object instanceof Source ) {
+    			result = unmarshaller.unmarshal( (Source) object );
+    		} else if ( object instanceof InputSource ) {
+    			result = unmarshaller.unmarshal( (InputSource) object );
+    		}  else if ( object instanceof Resource ) {
+    			result = unmarshaller.unmarshal( (( Resource ) object).getReader() );
+    		}  else if ( object instanceof String ) {
+    			result = unmarshaller.unmarshal( new StringReader( ( String ) object ) );
+    		} else {
+    			t!
 hrow new IllegalArgumentException( "signal object must be inst!
 ance of 
File, InputStream, Reader, Source, InputSource, Resource, String" );
+    		}
+    	} catch ( Exception e ) {
+    		handleException( this,
+    				object,
+    				e );
+    	}
+
+    	if ( result instanceof JAXBElement ) {
+    		result = ((JAXBElement<?>) result).getValue();
+    	}
+
+    	emit( result,
+    			context );
+    }
+
+}
Modified: labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-pipeline/drools-transformer-jaxb/src/main/java/org/drools/runtime/pipeline/impl/JaxbToXmlTransformer.java
===================================================================
--- labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-pipeline/drools-transformer-jaxb/src/main/java/org/drools/runtime/pipeline/impl/JaxbToXmlTransformer.java	2010-01-27 18:21:31 UTC (rev 31262)
+++ labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-pipeline/drools-transformer-jaxb/src/main/java/org/drools/runtime/pipeline/impl/JaxbToXmlTransformer.java	2010-01-27 18:55:25 UTC (rev 31263)
@@ -1,49 +1,52 @@
 package org.drools.runtime.pipeline.impl;
 
-import java.io.File;
-import java.io.InputStream;
-import java.io.Reader;
 import java.io.StringWriter;
 
-import javax.xml.bind.JAXBElement;
+import javax.xml.bind.JAXBContext;
 import javax.xml.bind.Marshaller;
-import javax.xml.bind.Unmarshaller;
-import javax.xml.transform.Source;
 
-import org.drools.io.Resource;
-import org.drools.runtime.pipeline.JaxbTransformerProvider;
+import org.drools.result.ExecutionResults;
+import org.drools.process.result.ExecutionResultsType;
 import org.drools.runtime.pipeline.PipelineContext;
 import org.drools.runtime.pipeline.Transformer;
-import org.drools.runtime.pipeline.impl.BaseEmitter;
-import org.drools.runtime.pipeline.impl.BaseStage;
-import org.xml.sax.InputSource;
+import org.drools.runtime.pipeline.impl.ResultTranslator;
 
-public class JaxbToXmlTransformer extends BaseEmitter
-    implements
-    Transformer {
-    private Marshaller            marshaller;
 
-    public JaxbToXmlTransformer(Marshaller marshaller) {
-        this.marshaller = marshaller;
-    }
+public class JaxbToXmlTransformer extends JaxbTransformer implements Transformer {
 
-    public void receive(Object object,
-                       PipelineContext context) {
-        Object result = null;
-        try {
-            StringWriter stringWriter = new StringWriter();
-            
-            this.marshaller.marshal( object, stringWriter );
+	ResultTranslator resTrans;
 
-            result = stringWriter.getBuffer().toString();
-        } catch ( Exception e ) {
-            handleException( this,
-                             object,
-                             e );
-        }
-        
-        emit( result,
-              context );
-    }
+	public JaxbToXmlTransformer( JAXBContext jaxbCtx ) {
+		super( jaxbCtx );
+	}
 
+	public void receive(Object object, PipelineContext context) {
+
+		Object result = null;
+		JAXBContext jaxbCtxt = getPrimaryContext();
+		StringWriter stringWriter = new StringWriter();
+		try {
+			Marshaller marshaller = jaxbCtxt.createMarshaller();
+			marshaller.setProperty( Marshaller.JAXB_FORMATTED_OUTPUT, true );
+
+			if( object instanceof ExecutionResults ){
+				if( resTrans == null ){
+					resTrans = new ResultTranslator( this );
+				}
+				ExecutionResultsType execRes = resTrans.transform( (ExecutionResults)object );
+				marshaller.marshal( execRes, stringWriter );
+			} else {
+				marshaller.marshal( object, stringWriter );
+			}
+		} catch ( Exception e ) {
+			handleException( this,
+					object,
+					e );
+		}
+    	result = stringWriter.getBuffer().toString();
+
+		emit( result,
+				context );
+	}
+
 }

Copied: labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-pipeline/drools-transformer-jaxb/src/main/java/org/drools/runtime/pipeline/impl/JaxbTransformer.java (from rev 31239, labs/jbossrules/branches/camel_jaxb_marshaller-lucaz/drools-pipeline/drools-transformer-jaxb/src/main/java/org/drools/runtime/pipeline/impl/JaxbTransformer.java)
===================================================================
--- labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-pipeline/drools-transformer-jaxb/src/main/java/org/drools/runtime/pipeline/impl/JaxbTransformer.java	                        (rev 0)
+++ labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-pipeline/drools-transformer-jaxb/src/main/java/org/drools/runtime/pipeline/impl/JaxbTransformer.java	2010-01-27 18:55:25 UTC (rev 31263)
@@ -0,0 +1,79 @@
+package org.drools.runtime.pipeline.impl;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.xml.bind.JAXBContext;
+import javax.xml.bind.JAXBException;
+
+import org.drools.process.result.ExecutionResultsType;
+import org.drools.runtime.pipeline.impl.BaseEmitter;
+
+/**
+ * @author: Wolfgang Laun
+ */
+public class JaxbTransformer extends BaseEmitter {
+
+    public final static String COMMAND_PACKAGES = "org.drools.command.runtime:" +
+											      "org.drools.command.runtime.process:" +
+											      "org.drools.command.runtime.rule:" +
+											      "org.drools.runtime.impl";
+
+    public final static String RESULT_PACKAGE = "org.drools.process.result";
+
+    private Map<Object,JAXBContext> class2ctxt;
+
+    protected JAXBContext jaxbContext;
+    protected JAXBContext jaxbPrimaryContext;
+    
+    protected JaxbTransformer( JAXBContext jaxbCtx ){
+    	this.jaxbContext = jaxbCtx;
+    	this.jaxbPrimaryContext = jaxbCtx;
+        this.class2ctxt = new HashMap<Object,JAXBContext>();
+    }
+
+    public void addContextForCommands() {
+    	try {
+    		jaxbPrimaryContext = getContext( JaxbTransformer.COMMAND_PACKAGES );
+    	} catch ( Exception e ) {
+    		handleException( this, null, e );
+    		return;
+    	}
+    }
+
+    public void addContextForResults() {
+    	try {
+    		jaxbPrimaryContext = getContext( ExecutionResultsType.class );
+    	} catch ( Exception e ) {
+    		handleException( this, null, e );
+    		return;
+    	}
+    }
+
+    protected JAXBContext getContext(){
+    	return this.jaxbContext;
+    }
+    
+    protected JAXBContext getPrimaryContext(){
+    	return this.jaxbPrimaryContext;
+    }
+    
+    protected JAXBContext getContext( Class<?> clazz ) throws JAXBException{
+    	JAXBContext ctxt = class2ctxt.get( clazz );
+    	if ( ctxt == null ) {
+            ctxt = JAXBContext.newInstance( clazz );
+            class2ctxt.put( clazz, ctxt );
+        }
+        return ctxt;
+    }
+
+    protected JAXBContext getContext( String packagePath ) throws JAXBException{
+    	JAXBContext ctxt = class2ctxt.get( packagePath );
+    	if ( ctxt == null ) {
+            ctxt = JAXBContext.newInstance( packagePath );
+            class2ctxt.put( packagePath, ctxt );
+        }
+        return ctxt;
+    }
+
+}

Modified: labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-pipeline/drools-transformer-jaxb/src/main/java/org/drools/runtime/pipeline/impl/JaxbTransformerProviderImpl.java
===================================================================
--- labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-pipeline/drools-transformer-jaxb/src/main/java/org/drools/runtime/pipeline/impl/JaxbTransformerProviderImpl.java	2010-01-27 18:21:31 UTC (rev 31262)
+++ labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-pipeline/drools-transformer-jaxb/src/main/java/org/drools/runtime/pipeline/impl/JaxbTransformerProviderImpl.java	2010-01-27 18:55:25 UTC (rev 31263)
@@ -1,8 +1,6 @@
-/**
- * 
- */
 package org.drools.runtime.pipeline.impl;
 
+import javax.xml.bind.JAXBContext;
 import javax.xml.bind.Marshaller;
 import javax.xml.bind.Unmarshaller;
 
@@ -10,11 +8,24 @@
 import org.drools.runtime.pipeline.Transformer;
 
 public class JaxbTransformerProviderImpl implements JaxbTransformerProvider {
-    public Transformer newJaxbFromXmlTransformer(Unmarshaller unmarshaller) {
-        return new JaxbFromXmlTransformer( unmarshaller );
+    public Transformer newJaxbFromXmlTransformer( JAXBContext jaxbCtx ) {
+        return new JaxbFromXmlTransformer( jaxbCtx );
     }
     
-    public Transformer newJaxbToXmlTransformer(Marshaller marshaller) {
-        return new JaxbToXmlTransformer( marshaller );
+    public Transformer newJaxbFromXmlCommandTransformer( JAXBContext jaxbCtx ) {
+    	JaxbFromXmlTransformer trans = new JaxbFromXmlTransformer( jaxbCtx );
+    	trans.addContextForCommands();
+    	return trans;
+    }
+
+    public Transformer newJaxbToXmlTransformer( JAXBContext jaxbCtx ) {
+        return new JaxbToXmlTransformer( jaxbCtx );
     }    
+
+    public Transformer newJaxbToXmlResultTransformer( JAXBContext jaxbCtx ) {
+    	JaxbToXmlTransformer trans = new JaxbToXmlTransformer( jaxbCtx );
+    	trans.addContextForResults();
+    	return trans;
+    }
+
 }
\ No newline at end of file

Copied: labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-pipeline/drools-transformer-jaxb/src/main/java/org/drools/runtime/pipeline/impl/ResultTranslator.java (from rev 31239, labs/jbossrules/branches/camel_jaxb_marshaller-lucaz/drools-pipeline/drools-transformer-jaxb/src/main/java/org/drools/runtime/pipeline/impl/ResultTranslator.java)
===================================================================
--- labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-pipeline/drools-transformer-jaxb/src/main/java/org/drools/runtime/pipeline/impl/ResultTranslator.java	                        (rev 0)
+++ labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-pipeline/drools-transformer-jaxb/src/main/java/org/drools/runtime/pipeline/impl/ResultTranslator.java	2010-01-27 18:55:25 UTC (rev 31263)
@@ -0,0 +1,254 @@
+package org.drools.runtime.pipeline.impl;
+
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.xml.bind.JAXBContext;
+import javax.xml.bind.JAXBException;
+import javax.xml.bind.Marshaller;
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+
+import org.drools.process.result.ExecutionResultsType;
+import org.drools.process.result.FactHandleListType;
+import org.drools.process.result.FactObjectListType;
+import org.drools.process.result.GlobalType;
+import org.drools.process.result.InsertResultsType;
+import org.drools.process.result.ObjectFactory;
+import org.drools.process.result.QueryFieldType;
+import org.drools.process.result.QueryResultsType;
+import org.drools.process.result.QueryRowType;
+import org.drools.result.ExecutionResults;
+import org.drools.result.GenericResult;
+import org.drools.result.GetGlobalResult;
+import org.drools.result.InsertElementsResult;
+import org.drools.result.InsertObjectResult;
+import org.drools.result.QueryResult;
+import org.drools.runtime.rule.FactHandle;
+import org.drools.runtime.rule.QueryResults;
+import org.drools.runtime.rule.QueryResultsRow;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+
+public class ResultTranslator {
+    private JaxbTransformer jaxbTransformer;
+    private Map<Class<?>,ResultTransformer> class2trans;
+    private ObjectFactory objFact;
+    private ExecutionResultsType execRes;
+
+    /**
+     * Constructor.
+     *  
+     * @param jaxbTransformer the <tt>JaxbTransformer</tt>
+     */
+    public ResultTranslator( JaxbTransformer jaxbTransformer ){
+        this.jaxbTransformer = jaxbTransformer;
+        class2trans = new HashMap<Class<?>,ResultTransformer>();
+        class2trans.put( InsertElementsResult.class, new InsertElementsResultTransformer() );
+        class2trans.put( InsertObjectResult.class,   new InsertObjectResultTransformer() );
+        class2trans.put( GetGlobalResult.class,      new GetGlobalResultTransformer() );
+	/** @TODO: LATER
+        class2trans.put( GetObjectsResult.class, new GetObjectsResultTransformer() );
+        class2trans.put( SetGlobalResult.class,  new SetGlobalResultTransformer() );
+        */
+        class2trans.put( QueryResult.class,      new QueryResultTransformer() );
+
+        objFact = new ObjectFactory();
+    }
+
+    ObjectFactory getObjFact(){
+    	return objFact;
+    }
+
+    void addResult( Object result ){
+    	execRes.getQueryResultsOrInsertResultsOrGlobalValue().add( result );
+    }
+
+    ResultTransformer getResultTransformer( Class<?> clazz ){
+    	return class2trans.get( clazz );
+    }
+
+
+    Element makeElement( Object obj ) throws JAXBException, ParserConfigurationException {
+        DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
+        dbf.setNamespaceAware( true );
+        DocumentBuilder db = dbf.newDocumentBuilder();
+        Document doc = db.newDocument();
+        JAXBContext ctxt = jaxbTransformer.getContext();
+        Marshaller m = ctxt.createMarshaller();
+        m.marshal( obj, doc );
+        Element el = doc.getDocumentElement();
+        
+        Node xsi = doc.createAttributeNS( "http://www.w3.org/2000/xmlns/", "xmlns:xsi" );
+        xsi.setTextContent( "http://www.w3.org/2001/XMLSchema-instance" );
+        el.getAttributes().setNamedItem( xsi );
+        
+        Node type = doc.createAttributeNS( "http://www.w3.org/2001/XMLSchema-instance", "xsi:type" );
+        type.setTextContent( obj.getClass().getName() );
+        el.getAttributes().setNamedItem( type );
+        
+        return el;
+    }
+    
+    public ExecutionResultsType transform( ExecutionResults results ){
+        execRes = new ExecutionResultsType();
+        for( GenericResult aResult: results.getResults() ){
+            ResultTransformer resultTransformer = this.getResultTransformer( aResult.getClass() );
+            if( resultTransformer != null ){
+                resultTransformer.transform( this, aResult );
+	    }
+	}
+        return execRes;
+    }
+
+}
+
+/**
+ * Abstract base class for all result transformers.
+ */
+abstract class ResultTransformer {
+    abstract void transform( ResultTranslator rt,
+                             GenericResult result );
+}
+
+
+class InsertElementsResultTransformer extends ResultTransformer {
+    void transform( ResultTranslator rt, GenericResult result ){
+        InsertElementsResult insertResult = (InsertElementsResult)result;
+        String ident = insertResult.getIdentifier();
+
+        ObjectFactory objFact = rt.getObjFact();
+        InsertResultsType insResultXml = objFact.createInsertResultsType();
+        FactHandleListType fhList = objFact.createFactHandleListType();
+        insResultXml.setFactHandles( fhList );
+        FactObjectListType foList = null;
+        insResultXml.setIdentifier( ident );
+
+        List<FactHandle> fhResList = insertResult.getHandles();
+        List<Object>     obResList = insertResult.getObjects();
+
+        if( obResList != null ){
+            foList = objFact.createFactObjectListType();
+            insResultXml.setFactObjects( foList );
+        }
+            
+        try {
+            for( int i = 0; i < fhResList.size(); i++ ){
+                fhList.getFactHandle().add( fhResList.get( i ).toExternalForm() );
+                if( obResList != null ){
+                    Object factObj = obResList.get( i );
+                    foList.getAny().add( rt.makeElement( factObj ) );
+                }
+            }
+            rt.addResult( insResultXml );
+        } catch (JAXBException e) {
+            // TODO Auto-generated catch block
+            e.printStackTrace();
+        } catch (ParserConfigurationException e) {
+            // TODO Auto-generated catch block
+            e.printStackTrace();
+        }
+    }
+}
+
+class InsertObjectResultTransformer extends ResultTransformer {
+    void transform( ResultTranslator rt, GenericResult result ){
+        InsertObjectResult insertResult = (InsertObjectResult)result;
+        String ident = insertResult.getIdentifier();
+
+        ObjectFactory objFact = rt.getObjFact();
+        InsertResultsType insResultXml = objFact.createInsertResultsType();
+        FactHandleListType fhList = objFact.createFactHandleListType();
+        insResultXml.setFactHandles( fhList );
+        FactObjectListType foList = null;
+        insResultXml.setIdentifier( ident );
+
+        FactHandle handle = (FactHandle)insertResult.getFactHandle();
+        Object object = insertResult.getValue();
+
+        if( object != null ){
+            foList = objFact.createFactObjectListType();
+            insResultXml.setFactObjects( foList );
+        }
+            
+        try {
+            fhList.getFactHandle().add( handle.toExternalForm() );
+
+            if( object != null ){
+                foList.getAny().add( rt.makeElement( object ) );
+            }
+
+            rt.addResult( insResultXml );
+        } catch (JAXBException e) {
+            // TODO Auto-generated catch block
+            e.printStackTrace();
+        } catch (ParserConfigurationException e) {
+            // TODO Auto-generated catch block
+            e.printStackTrace();
+        }
+    }
+}
+
+
+class GetGlobalResultTransformer extends ResultTransformer {
+    void transform( ResultTranslator rt, GenericResult result ){
+
+        GetGlobalResult getGlobalResult = (GetGlobalResult)result;
+        String identifier = getGlobalResult.getIdentifier();
+        try {
+            Object globalObject = getGlobalResult.getValue();
+            Element el = rt.makeElement( globalObject );
+            ObjectFactory objFact = rt.getObjFact();
+            GlobalType getGlobalXml = objFact.createGlobalType();
+            getGlobalXml.setIdentifier( identifier );
+            getGlobalXml.setAny( el );
+            rt.addResult( getGlobalXml );
+        } catch (JAXBException e) {
+            // TODO Auto-generated catch block
+            e.printStackTrace();
+        } catch (ParserConfigurationException e) {
+            // TODO Auto-generated catch block
+            e.printStackTrace();
+        }
+    }
+}
+
+class QueryResultTransformer extends ResultTransformer {
+    void transform( ResultTranslator rt, GenericResult result ){
+        QueryResult queryResult = (QueryResult)result;
+
+        String identifier = queryResult.getIdentifier();
+       	QueryResults qr = queryResult.getResults();
+        int size = qr.size();
+
+        ObjectFactory objFact = rt.getObjFact();
+        QueryResultsType queryResXml = objFact.createQueryResultsType();
+        queryResXml.setIdentifier( identifier );
+        queryResXml.setSize( size );
+
+        String[] quids = qr.getIdentifiers();
+        for( QueryResultsRow row: qr ){
+            QueryRowType queryRowXml = objFact.createQueryRowType();
+            queryResXml.getRow().add( queryRowXml );
+            for( String quid: quids  ){
+                QueryFieldType queryFieldXml = objFact.createQueryFieldType();
+                queryRowXml.getField().add( queryFieldXml );
+                queryFieldXml.setName( quid );
+                
+                try {
+                    Element el = rt.makeElement( row.get( quid ) );
+                    queryFieldXml.setAny( el );
+                } catch( Throwable t ){
+                    queryFieldXml.setValue( row.get( quid ).toString() );
+                }
+            }
+        }
+        rt.addResult( queryResXml );
+    }
+}
+
+

Modified: labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-pipeline/drools-transformer-jaxb/src/test/java/org/drools/runtime/pipeline/impl/JaxbFactTest.java
===================================================================
--- labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-pipeline/drools-transformer-jaxb/src/test/java/org/drools/runtime/pipeline/impl/JaxbFactTest.java	2010-01-27 18:21:31 UTC (rev 31262)
+++ labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-pipeline/drools-transformer-jaxb/src/test/java/org/drools/runtime/pipeline/impl/JaxbFactTest.java	2010-01-27 18:55:25 UTC (rev 31263)
@@ -64,7 +64,8 @@
         JAXBContext jaxbCtx = KnowledgeBuilderHelper.newJAXBContext( classNames,
                                                                      kbase );
         Unmarshaller unmarshaller = jaxbCtx.createUnmarshaller();
-        Transformer transformer = PipelineFactory.newJaxbFromXmlTransformer( unmarshaller );
+
+        Transformer transformer = PipelineFactory.newJaxbFromXmlTransformer( jaxbCtx );
         transformer.setReceiver( insertStage );
 
         Pipeline pipeline = PipelineFactory.newStatefulKnowledgeSessionPipeline( ksession );
@@ -87,7 +88,7 @@
 
         //transformer = PipelineFactory.newXStreamToXmlTransformer( xstream );
         Marshaller marshaller = jaxbCtx.createMarshaller();
-        transformer = PipelineFactory.newJaxbToXmlTransformer( marshaller );
+        transformer = PipelineFactory.newJaxbToXmlTransformer( jaxbCtx );
         transformer.setReceiver( assignAsResult );
 
         KnowledgeRuntimeCommand getObject = PipelineFactory.newStatefulKnowledgeSessionGetObject();

Modified: labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-pipeline/drools-transformer-jaxb/src/test/java/org/drools/runtime/pipeline/impl/JaxbGlobalTest.java
===================================================================
--- labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-pipeline/drools-transformer-jaxb/src/test/java/org/drools/runtime/pipeline/impl/JaxbGlobalTest.java	2010-01-27 18:21:31 UTC (rev 31262)
+++ labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-pipeline/drools-transformer-jaxb/src/test/java/org/drools/runtime/pipeline/impl/JaxbGlobalTest.java	2010-01-27 18:55:25 UTC (rev 31263)
@@ -63,8 +63,7 @@
 
         JAXBContext jaxbCtx = KnowledgeBuilderHelper.newJAXBContext( classNames,
                                                                      kbase );
-        Unmarshaller unmarshaller = jaxbCtx.createUnmarshaller();
-        Transformer transformer = PipelineFactory.newJaxbFromXmlTransformer( unmarshaller );
+        Transformer transformer = PipelineFactory.newJaxbFromXmlTransformer( jaxbCtx );
         transformer.setReceiver(setGlobalStage );
 
         Pipeline pipeline = PipelineFactory.newStatefulKnowledgeSessionPipeline( ksession );
@@ -83,8 +82,7 @@
         assignAsResult.setReceiver( executeResult );
         
         //transformer = PipelineFactory.newXStreamToXmlTransformer( xstream );
-        Marshaller marshaller = jaxbCtx.createMarshaller();
-        transformer = PipelineFactory.newJaxbToXmlTransformer( marshaller );
+        transformer = PipelineFactory.newJaxbToXmlTransformer( jaxbCtx );
         transformer.setReceiver( assignAsResult );
         
         KnowledgeRuntimeCommand getGlobalStage = PipelineFactory.newStatefulKnowledgeSessionGetGlobal( );        

Modified: labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-pipeline/drools-transformer-jaxb/src/test/java/org/drools/runtime/pipeline/impl/JaxbTest.java
===================================================================
--- labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-pipeline/drools-transformer-jaxb/src/test/java/org/drools/runtime/pipeline/impl/JaxbTest.java	2010-01-27 18:21:31 UTC (rev 31262)
+++ labs/jbossrules/branches/camel_jaxb_marshaller2-lucaz/drools-pipeline/drools-transformer-jaxb/src/test/java/org/drools/runtime/pipeline/impl/JaxbTest.java	2010-01-27 18:55:25 UTC (rev 31263)
@@ -106,8 +106,7 @@
 
         JAXBContext jaxbCtx = KnowledgeBuilderHelper.newJAXBContext( classNames,
                                                                      kbase );
-        Unmarshaller unmarshaller = jaxbCtx.createUnmarshaller();
-        Transformer transformer = PipelineFactory.newJaxbFromXmlTransformer( unmarshaller );
+        Transformer transformer =  PipelineFactory.newJaxbFromXmlTransformer( jaxbCtx );
         transformer.setReceiver( insertStage );
 
         Pipeline pipeline = PipelineFactory.newStatefulKnowledgeSessionPipeline( ksession );
@@ -172,8 +171,7 @@
 
         JAXBContext jaxbCtx = KnowledgeBuilderHelper.newJAXBContext( classNames,
                                                                      kbase );
-        Unmarshaller unmarshaller = jaxbCtx.createUnmarshaller();
-        Transformer transformer = PipelineFactory.newJaxbFromXmlTransformer( unmarshaller );
+        Transformer transformer = PipelineFactory.newJaxbFromXmlTransformer( jaxbCtx );
         transformer.setReceiver( expression );
 
         Pipeline pipeline = PipelineFactory.newStatefulKnowledgeSessionPipeline( ksession );



More information about the jboss-svn-commits mailing list