Index: pom.xml
===================================================================
--- pom.xml	(revision 15668)
+++ pom.xml	(working copy)
@@ -3,7 +3,7 @@
 	<parent>
 		<artifactId>petals-components-sls-parent</artifactId>
 		<groupId>org.ow2.petals</groupId>
-		<version>1</version>
+		<version>3-SNAPSHOT</version>
 	</parent>
 
 	<name>Petals ESB Binding Component :: JMS</name>
@@ -36,8 +36,31 @@
 		<dependency>
 			<groupId>org.ow2.petals</groupId>
 			<artifactId>petals-cdk-core</artifactId>
-			<version>5.0.2</version>
+			<version>5.1-SNAPSHOT</version>
 		</dependency>
+		
+		<dependency>
+   <groupId>org.codehaus.castor</groupId>
+   <artifactId>castor-xml</artifactId>
+   <version>1.3.1</version>
+</dependency>
+		
+      <dependency>
+         <groupId>org.apache.activemq</groupId>
+         <artifactId>activemq-core</artifactId>
+         <version>5.3.0</version>
+         <scope>test</scope>
+         <exclusions>
+            <exclusion>
+               <groupId>org.apache.camel</groupId>
+               <artifactId>camel-core</artifactId>
+            </exclusion>
+            <exclusion>
+               <groupId>org.apache.activemq</groupId>
+               <artifactId>activeio-core</artifactId>
+            </exclusion>
+         </exclusions>
+      </dependency> 
 	</dependencies>
 
 	<build>
Index: src/main/java/org/ow2/petals/bc/jms/listener/JMSMessageListener.java
===================================================================
--- src/main/java/org/ow2/petals/bc/jms/listener/JMSMessageListener.java	(revision 15926)
+++ src/main/java/org/ow2/petals/bc/jms/listener/JMSMessageListener.java	(working copy)
@@ -22,6 +22,16 @@
 package org.ow2.petals.bc.jms.listener;
 
 
+import static org.ow2.petals.bc.jms.Constants.Extensions.OPERATION;
+import static org.ow2.petals.bc.jms.Constants.JMSPropertyNames.JMS_OPERATION_NAME;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.OutputStreamWriter;
 import java.util.Enumeration;
 import java.util.logging.Level;
 import java.util.logging.Logger;
@@ -35,9 +45,18 @@
 import javax.jms.ObjectMessage;
 import javax.jms.TextMessage;
 import javax.xml.namespace.QName;
+import javax.xml.transform.Result;
 import javax.xml.transform.Source;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerException;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.stream.StreamResult;
+import javax.xml.transform.stream.StreamSource;
 
 import org.apache.commons.lang.CharEncoding;
+import org.exolab.castor.xml.MarshalException;
+import org.exolab.castor.xml.Marshaller;
+import org.exolab.castor.xml.ValidationException;
 import org.ow2.petals.bc.jms.Constants;
 import org.ow2.petals.component.framework.api.Message.MEPConstants;
 import org.ow2.petals.component.framework.api.configuration.ConfigurationExtensions;
@@ -46,9 +65,6 @@
 import org.ow2.petals.component.framework.listener.AbstractExternalListener;
 import org.ow2.petals.component.framework.util.UtilFactory;
 
-import static org.ow2.petals.bc.jms.Constants.Extensions.OPERATION;
-import static org.ow2.petals.bc.jms.Constants.JMSPropertyNames.JMS_OPERATION_NAME;
-
 /**
  * This class is the JMS message listener for the JmsBC component
  * 
@@ -112,15 +128,14 @@
                 this.logger.log(Level.FINEST, "It's a TextMessage.");
                 final TextMessage textMessage = (TextMessage) jmsExchange;
                 this.transform(textMessage, exchange);
-            } /*else if (jmsExchange instanceof BytesMessage) {
-                this.logger.log(Level.FINEST, "It's a BytesMessage.");
-                final BytesMessage byteMessage = (BytesMessage) jmsExchange;
-                this.transform(byteMessage, exchange);
             } else if (jmsExchange instanceof ObjectMessage) {
                 this.logger.log(Level.FINEST, "It's a ObjectMessage.");
                 final ObjectMessage objectMessage = (ObjectMessage) jmsExchange;
                 transform(objectMessage, exchange);
-            }*/
+            } /*
+               * else if (jmsExchange instanceof BytesMessage) { this.logger.log(Level.FINEST, "It's a BytesMessage.");
+               * final BytesMessage byteMessage = (BytesMessage) jmsExchange; this.transform(byteMessage, exchange); }
+               */
 
             // 4. send the exchange, use the framework's send() method
             this.externalListener.send(exchange);
@@ -253,6 +268,79 @@
     }*/
 
     /**
+     * Transform the ObjectMessage into a NormalizedMessage of the JBI MsgExch . The content and properties are set.
+     * 
+     * @param jmsMessage
+     * @param exchange
+     * @throws PEtALSComponentSDKException
+     *             can not create a Source object from the jms map content
+     * @throws JMSException
+     *             getting jms content or properties
+     * @throws MessagingException
+     *             setting NormalizedMessage properties or content
+     * @throws PEtALSCDKException
+     */
+    private void transform(final ObjectMessage jmsMessage, final Exchange exchange) throws JMSException,
+            MessagingException, PEtALSCDKException {
+        this.logger.log(Level.FINE, "transform");
+
+        // We load the XSL
+        final String xslName = this.externalListener.getExtensions().get("xsl");
+        FileInputStream fisXsl;
+        try {
+            fisXsl = new FileInputStream(new File(this.externalListener.getInstallRoot(), xslName));
+            if (fisXsl != null) {
+                try {
+
+                    // Marshall the Java Object
+                    final ByteArrayOutputStream baosXmlObj = new ByteArrayOutputStream();
+                    Marshaller.marshal(jmsMessage.getObject(), new OutputStreamWriter(baosXmlObj));
+
+                    this.logger.fine("Marshalled object: " + baosXmlObj.toString());
+
+                    final ByteArrayOutputStream baosXmlRequest = new ByteArrayOutputStream();
+
+                    final Transformer transformer = TransformerFactory.newInstance().newTransformer(
+                            new StreamSource(fisXsl));
+
+                    final Result outputResult = new StreamResult(baosXmlRequest);
+                    transformer.transform(new StreamSource(new ByteArrayInputStream(baosXmlObj.toByteArray())),
+                            outputResult);
+
+                    exchange.getInMessage().setContent(
+                            new StreamSource(new ByteArrayInputStream(baosXmlRequest.toByteArray())));
+
+                    // set the operation in the JBI message exchange
+                    this.setOperation(jmsMessage, exchange);
+
+                    // set remaining properties of the JMS message into the JBI message
+                    // exchange normalized message "IN"
+                    this.setMessageProperties(jmsMessage, exchange.getInMessage());
+
+                } catch (final TransformerException e) {
+                    throw new PEtALSCDKException(e);
+                } catch (MarshalException e) {
+                    throw new PEtALSCDKException(e);
+                } catch (ValidationException e) {
+                    throw new PEtALSCDKException(e);
+                } finally {
+                    try {
+                        fisXsl.close();
+                    } catch (IOException e) {
+                        // TODO Auto-generated catch block
+                        e.printStackTrace();
+                    }
+                }
+            } else {
+                throw new PEtALSCDKException("Unable to load the Xsl '" + xslName);
+            }
+        } catch (FileNotFoundException e1) {
+            throw new PEtALSCDKException(e1);
+        }
+
+    }
+
+    /**
      * <p>
      * Set the operation into the JBI message exchange according to the
      * following priorized values:
