[maven-release-plugin]  copy for tag 2.1.0

git-svn-id: https://svn.apache.org/repos/asf/synapse/tags/2.1.0@1226390 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/modules/commons/pom.xml b/modules/commons/pom.xml
index 735b9b5..d04ee0b 100644
--- a/modules/commons/pom.xml
+++ b/modules/commons/pom.xml
@@ -18,39 +18,41 @@
   ~  under the License.
   -->
 
-<project
-    xmlns="http://maven.apache.org/POM/4.0.0"
-    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
     <modelVersion>4.0.0</modelVersion>
     <parent>
         <groupId>org.apache.synapse</groupId>
         <artifactId>Apache-Synapse</artifactId>
-        <version>2.2.0-SNAPSHOT</version>
+        <version>2.1.0</version>
         <relativePath>../../pom.xml</relativePath>
     </parent>
 
     <groupId>org.apache.synapse</groupId>
     <artifactId>synapse-commons</artifactId>
     
-    <name>Apache Synapse - Commons</name>
-    <description>Apache Synapse - Common Utilities</description>
+    <name>Apache Synapse - Commons classes</name>
+    <description>Apache Synapse - Commons classes</description>
     <packaging>bundle</packaging>
 
     <scm>
-        <connection>scm:svn:http://svn.apache.org/repos/asf/synapse/trunk/java/modules/commons</connection>
-        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/synapse/trunk/java/modules/commons</developerConnection>
-        <url>http://svn.apache.org/viewvc/synapse/trunk/java/modules/commons</url>
+        <connection>scm:svn:http://svn.apache.org/repos/asf/synapse/tags/2.1.0/modules/commons</connection>
+        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/synapse/tags/2.1.0/modules/commons</developerConnection>
+        <url>http://svn.apache.org/viewvc/synapse/tags/2.1.0/modules/commons</url>
     </scm>
 
     <build>
         <plugins>
+
             <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-surefire-plugin</artifactId>
+                <version>2.2</version>
             </plugin>
+
             <plugin>
                 <groupId>org.apache.felix</groupId>
                 <artifactId>maven-bundle-plugin</artifactId>
+                <version>1.4.0</version>
                 <extensions>true</extensions>
                 <configuration>
                     <instructions>
@@ -67,6 +69,7 @@
                     </instructions>
                 </configuration>
             </plugin>
+
         </plugins>
     </build>
 
@@ -74,26 +77,17 @@
         <dependency>
           <groupId>javax.activation</groupId>
           <artifactId>activation</artifactId>
+          <version>1.1</version>
         </dependency>
         <dependency>
           <groupId>org.apache.axis2</groupId>
           <artifactId>axis2-transport-base</artifactId>
+          <version>${axis2.transport.version}</version>
         </dependency>
         <dependency>
           <groupId>org.apache.synapse</groupId>
           <artifactId>synapse-securevault</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>commons-pool</groupId>
-            <artifactId>commons-pool</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>commons-dbcp</groupId>
-            <artifactId>commons-dbcp</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>xmlunit</groupId>
-            <artifactId>xmlunit</artifactId>
+          <version>${project.version}</version>
         </dependency>
     </dependencies>
 </project>
diff --git a/modules/commons/src/main/java/org/apache/synapse/commons/builders/XFormURLEncodedBuilder.java b/modules/commons/src/main/java/org/apache/synapse/commons/builders/XFormURLEncodedBuilder.java
deleted file mode 100644
index 570c453..0000000
--- a/modules/commons/src/main/java/org/apache/synapse/commons/builders/XFormURLEncodedBuilder.java
+++ /dev/null
@@ -1,83 +0,0 @@
-package org.apache.synapse.commons.builders;
-
-
-import org.apache.axiom.om.OMAbstractFactory;
-import org.apache.axiom.om.OMElement;
-import org.apache.axiom.soap.*;
-import org.apache.axis2.AxisFault;
-import org.apache.axis2.Constants;
-import org.apache.axis2.builder.Builder;
-import org.apache.axis2.builder.BuilderUtil;
-import org.apache.axis2.context.MessageContext;
-import org.apache.axis2.description.AxisBinding;
-import org.apache.axis2.description.AxisEndpoint;
-import org.apache.axis2.description.WSDL2Constants;
-import org.apache.axis2.i18n.Messages;
-import org.apache.axis2.transport.http.HTTPConstants;
-import org.apache.axis2.util.MultipleEntryHashMap;
-
-import javax.xml.namespace.QName;
-import java.io.InputStream;
-
-/**
- * Synapse specific message builder for "application/x-www-form-urlencoded" content type. This
- * builder extends the functionality provided by the Axis2 builder.
- */
-public class XFormURLEncodedBuilder implements Builder {
-
-    private org.apache.axis2.builder.XFormURLEncodedBuilder
-            xformAxis2Builder = new org.apache.axis2.builder.XFormURLEncodedBuilder();
-
-    private static final QName XFORM_FIRST_ELEMENT = new QName("xformValues");
-
-    public OMElement processDocument(InputStream inputStream, String s,
-                                     MessageContext messageContext) throws AxisFault {
-        // first process the input stream using the Axis2 builder
-        SOAPEnvelope soapEnv = (SOAPEnvelope) xformAxis2Builder.processDocument(inputStream,
-                s, messageContext);
-
-        // when this is a POST request, if the body of the soap envelope is empty and the parameter
-        // map is there, build a dummy soap body which contains all the parameters coming in.
-        SOAPBody body = soapEnv.getBody();
-        String httpMethod = (String) messageContext.getProperty(HTTPConstants.HTTP_METHOD);
-        if (body.getFirstElement() == null && HTTPConstants.HTTP_METHOD_POST.equals(httpMethod) &&
-                messageContext.getProperty(Constants.REQUEST_PARAMETER_MAP) != null) {
-            MultipleEntryHashMap map = (MultipleEntryHashMap) messageContext
-                    .getProperty(Constants.REQUEST_PARAMETER_MAP);
-            SOAPFactory soapFactory = getSOAPFactory(messageContext);
-            OMElement bodyFirstChild = soapFactory
-                    .createOMElement(XFORM_FIRST_ELEMENT, body);
-            BuilderUtil.createSOAPMessageWithoutSchema(soapFactory, bodyFirstChild, map);
-        }
-        return soapEnv;
-    }
-
-    private SOAPFactory getSOAPFactory(MessageContext messageContext) throws AxisFault {
-        SOAPFactory soapFactory;
-        AxisEndpoint axisEndpoint = (AxisEndpoint) messageContext
-                .getProperty(WSDL2Constants.ENDPOINT_LOCAL_NAME);
-        if (axisEndpoint != null) {
-            AxisBinding axisBinding = axisEndpoint.getBinding();
-            String soapVersion =
-                    (String) axisBinding.getProperty(WSDL2Constants.ATTR_WSOAP_VERSION);
-            soapFactory = getSOAPFactory(soapVersion);
-        } else {
-            soapFactory = getSOAPFactory(SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI);
-        }
-        return soapFactory;
-    }
-
-    private SOAPFactory getSOAPFactory(String nsURI) throws AxisFault {
-        if (nsURI == null) {
-            return OMAbstractFactory.getSOAP12Factory();
-        }
-        else if (SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI.equals(nsURI)) {
-            return OMAbstractFactory.getSOAP12Factory();
-        } else if (SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI.equals(nsURI)) {
-            return OMAbstractFactory.getSOAP11Factory();
-        } else {
-            throw new AxisFault(Messages.getMessage("invalidSOAPversion"));
-        }
-    }
-
-}
diff --git a/modules/core/pom.xml b/modules/core/pom.xml
index b0c67a1..738611e 100644
--- a/modules/core/pom.xml
+++ b/modules/core/pom.xml
@@ -18,15 +18,12 @@
   ~  under the License.
   -->
 
-<project
-    xmlns="http://maven.apache.org/POM/4.0.0"
-    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
     <modelVersion>4.0.0</modelVersion>
     <parent>
         <groupId>org.apache.synapse</groupId>
         <artifactId>Apache-Synapse</artifactId>
-        <version>2.2.0-SNAPSHOT</version>
+        <version>2.1.0</version>
         <relativePath>../../pom.xml</relativePath>
     </parent>
 
@@ -39,9 +36,9 @@
     <url>http://synapse.apache.org</url>
 
     <scm>
-        <connection>scm:svn:http://svn.apache.org/repos/asf/synapse/trunk/java/modules/core</connection>
-        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/synapse/trunk/java/modules/core</developerConnection>
-        <url>http://svn.apache.org/viewvc/synapse/trunk/java/modules/core</url>
+        <connection>scm:svn:http://svn.apache.org/repos/asf/synapse/tags/2.1.0/modules/core</connection>
+        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/synapse/tags/2.1.0/modules/core</developerConnection>
+        <url>http://svn.apache.org/viewvc/synapse/tags/2.1.0/modules/core</url>
     </scm>
 
     <build>
@@ -50,6 +47,7 @@
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-dependency-plugin</artifactId>
+                <version>2.0</version>
                 <executions>
                     <execution>
                         <id>copy</id>
@@ -76,17 +74,18 @@
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-antrun-plugin</artifactId>
+                <version>1.1</version>
                 <executions>
                     <execution>
                         <id>create_repo</id>
                         <phase>generate-test-resources</phase>
                         <configuration>
                             <tasks>
-                                <echo message="*** Creating a testing repository ***"/>
-                                <mkdir dir="target/test_repos"/>
-                                <mkdir dir="target/test_repos/synapse/modules"/>
-                                <mkdir dir="target/test_repos/synapse/services"/>
-                                <mkdir dir="target/test_repos/client/modules"/>
+                                <echo message="*** Creating a testing repository ***" />
+                                <mkdir dir="target/test_repos" />
+                                <mkdir dir="target/test_repos/synapse/modules" />
+                                <mkdir dir="target/test_repos/synapse/services" />
+                                <mkdir dir="target/test_repos/client/modules" />
                             </tasks>
                         </configuration>
                         <goals>
@@ -95,9 +94,11 @@
                     </execution>
                 </executions>
             </plugin>
+
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-surefire-plugin</artifactId>
+                <version>2.3</version>
                 <configuration>
                     <systemProperties>
                         <property>
@@ -133,6 +134,7 @@
             <plugin>
                 <groupId>org.apache.felix</groupId>
                 <artifactId>maven-bundle-plugin</artifactId>
+                <version>1.4.0</version>
                 <extensions>true</extensions>
                 <configuration>
                     <instructions>
@@ -188,60 +190,32 @@
             <artifactId>synapse-nhttp-transport</artifactId>
         </dependency>
         <dependency>
-            <groupId>org.wso2.eventing</groupId>
-            <artifactId>wso2eventing-api</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.sandesha2</groupId>
-            <artifactId>sandesha2-core</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.wso2.caching</groupId>
-            <artifactId>wso2caching-core</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.wso2.uri.template</groupId>
-            <artifactId>wso2-uri-templates</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>xalan</groupId>
-            <artifactId>xalan</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>net.sf.saxon</groupId>
-            <artifactId>saxon-dom</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
             <groupId>org.apache.axis2</groupId>
             <artifactId>axis2-transport-jms</artifactId>
             <scope>test</scope>
         </dependency>
         <dependency>
-            <groupId>org.apache.derby</groupId>
-            <artifactId>derby</artifactId>
-        </dependency>
-        <dependency>
             <groupId>org.apache.axis2</groupId>
             <artifactId>axis2-transport-mail</artifactId>
             <scope>test</scope>
         </dependency>
         <dependency>
-            <groupId>org.apache.axis2</groupId>
-            <artifactId>axis2-transport-local</artifactId>
+            <groupId>org.apache.commons</groupId>
+            <artifactId>commons-vfs2</artifactId>
+            <version>${commons.vfs.version}</version>
             <scope>test</scope>
         </dependency>
         <dependency>
             <groupId>org.apache.synapse</groupId>
             <artifactId>synapse-vfs-transport</artifactId>
             <scope>test</scope>
-        </dependency>
-	    <dependency>
-	        <!-- Required for validate mediator tests on JDK 5 -->
-            <groupId>xerces</groupId>
-            <artifactId>xercesImpl</artifactId>
-	        <scope>test</scope>
+        </dependency> 
+        <!-- This is used by the CacheMediator. TODO: since axis2-saaj is based on
+             Axiom, it should not be necessary to rely on SAAJ and we should try
+             to eliminate this dependency. -->
+        <dependency>
+            <groupId>org.apache.axis2</groupId>
+            <artifactId>axis2-saaj</artifactId>
         </dependency>
     </dependencies>
 </project>
diff --git a/modules/core/src/main/java/org/apache/synapse/config/xml/EnqueueMediatorFactory.java b/modules/core/src/main/java/org/apache/synapse/config/xml/EnqueueMediatorFactory.java
index 8eeee1b..9ac8d44 100644
--- a/modules/core/src/main/java/org/apache/synapse/config/xml/EnqueueMediatorFactory.java
+++ b/modules/core/src/main/java/org/apache/synapse/config/xml/EnqueueMediatorFactory.java
@@ -43,7 +43,7 @@
         if (seqAtt != null && !"".equals(seqAtt.getAttributeValue())) {
             mediator.setSequenceName(seqAtt.getAttributeValue());
         } else {
-            handleException("sequence is a required attribute");
+            handleException("sequence is a required attribue");
         }
 
         OMAttribute priorityAtt = elem.getAttribute(PRIORITY_ATT);
@@ -55,7 +55,7 @@
         if (queueAtt != null && !"".equals(queueAtt.getAttributeValue())) {
             mediator.setExecutorName(queueAtt.getAttributeValue());
         } else {
-            handleException("Queue is a required attribute");
+            handleException("Queue is a required attribue");
         }
 
         return mediator;
diff --git a/modules/core/src/main/java/org/apache/synapse/config/xml/OMElementUtils.java b/modules/core/src/main/java/org/apache/synapse/config/xml/OMElementUtils.java
index 9967b52..cd9b6f7 100644
--- a/modules/core/src/main/java/org/apache/synapse/config/xml/OMElementUtils.java
+++ b/modules/core/src/main/java/org/apache/synapse/config/xml/OMElementUtils.java
@@ -20,6 +20,7 @@
 package org.apache.synapse.config.xml;
 
 import org.apache.axiom.om.OMContainer;
+import org.apache.axiom.om.OMDocument;
 import org.apache.axiom.om.OMElement;
 import org.apache.axiom.om.OMNamespace;
 import org.apache.commons.logging.Log;
@@ -39,8 +40,9 @@
 
     /**
      * Return the namespace with the given prefix, using the given element
+     *
      * @param prefix the prefix looked up
-     * @param elem the source element to use
+     * @param elem   the source element to use
      * @return the namespace which maps to the prefix or null
      */
     public static String getNameSpaceWithPrefix(String prefix, OMElement elem) {
@@ -48,19 +50,19 @@
             log.warn("Searching for null NS prefix and/or using null OMElement");
             return null;
         }
-        
+
         OMElement currentElem = elem;
         while (true) {
             Iterator iter = currentElem.getAllDeclaredNamespaces();
             while (iter.hasNext()) {
                 OMNamespace ns = (OMNamespace) iter.next();
                 if (prefix.equals(ns.getPrefix())) {
-                    return ns.getNamespaceURI();     
+                    return ns.getNamespaceURI();
                 }
             }
             OMContainer parent = currentElem.getParent();
             if (parent != null && parent instanceof OMElement) {
-                currentElem = (OMElement)parent;
+                currentElem = (OMElement) parent;
             } else {
                 return null;
             }
@@ -71,7 +73,7 @@
      * Add the namespace declarations of a given {@link OMElement} to the namespace
      * context of an XPath expression. Typically this method is used with an XPath
      * expression appearing in an attribute of the given element.
-     * <p>
+     * <p/>
      * Note that the default namespace is explicitly excluded and not added to the
      * namespace context. This implies that XPath expressions
      * appearing in Synapse configuration files follow the same rule as in XSL
@@ -82,29 +84,43 @@
      * attribute in which the expression occurs; [...] the default namespace
      * (as declared by xmlns) is not part of this set
      * </blockquote>
-     * 
+     *
      * @param xpath
      * @param elem
      * @param log
      */
     public static void addNameSpaces(XPath xpath, OMElement elem, Log log) {
-        Iterator it = elem.getNamespacesInScope();
-        while (it.hasNext()) {
+        OMElement currentElem = elem;
 
-            OMNamespace n = (OMNamespace) it.next();
-            // Exclude the default namespace as explained in the Javadoc above
-            if (n.getPrefix().length() > 0) {
+        while (currentElem != null) {
+            Iterator it = currentElem.getAllDeclaredNamespaces();
+            while (it.hasNext()) {
 
-                try {
-                    xpath.addNamespace(n.getPrefix(), n.getNamespaceURI());
-                } catch (JaxenException je) {
-                    String msg = "Error adding declared name space with prefix : "
-                        + n.getPrefix() + "and uri : " + n.getNamespaceURI()
-                        + " to the XPath : " + xpath;
-                    log.error(msg);
-                    throw new SynapseException(msg, je);
+                OMNamespace n = (OMNamespace) it.next();
+                // Exclude the default namespace as explained in the Javadoc above
+                if (n != null && !"".equals(n.getPrefix())) {
+
+                    try {
+                        xpath.addNamespace(n.getPrefix(), n.getNamespaceURI());
+                    } catch (JaxenException je) {
+                        String msg = "Error adding declared name space with prefix : "
+                                + n.getPrefix() + "and uri : " + n.getNamespaceURI()
+                                + " to the XPath : " + xpath;
+                        log.error(msg);
+                        throw new SynapseException(msg, je);
+                    }
                 }
             }
+
+            OMContainer parent = currentElem.getParent();
+            //if the parent is a document element or parent is null ,then return
+            if (parent == null || parent instanceof OMDocument) {
+                return;
+            }
+            if (parent instanceof OMElement) {
+                currentElem = (OMElement) parent;
+            }
         }
     }
+
 }
diff --git a/modules/core/src/main/java/org/apache/synapse/config/xml/endpoints/EndpointFactory.java b/modules/core/src/main/java/org/apache/synapse/config/xml/endpoints/EndpointFactory.java
index fdd5f49..db7fa14 100644
--- a/modules/core/src/main/java/org/apache/synapse/config/xml/endpoints/EndpointFactory.java
+++ b/modules/core/src/main/java/org/apache/synapse/config/xml/endpoints/EndpointFactory.java
@@ -227,12 +227,6 @@
             return DynamicLoadbalanceEndpointFactory.getInstance();
         }
 
-        OMElement sdlbElement = configElement.getFirstChildWithName
-                (new QName(SynapseConstants.SYNAPSE_NAMESPACE, "serviceDynamicLoadbalance"));
-        if (sdlbElement != null) {
-            return ServiceDynamicLoadbalanceEndpointFactory.getInstance();
-        }
-        
         OMElement foElement = configElement.getFirstChildWithName
                 (new QName(SynapseConstants.SYNAPSE_NAMESPACE, "failover"));
         if (foElement != null) {
diff --git a/modules/core/src/main/java/org/apache/synapse/config/xml/endpoints/ServiceDynamicLoadbalanceEndpointFactory.java b/modules/core/src/main/java/org/apache/synapse/config/xml/endpoints/ServiceDynamicLoadbalanceEndpointFactory.java
deleted file mode 100644
index 47af074..0000000
--- a/modules/core/src/main/java/org/apache/synapse/config/xml/endpoints/ServiceDynamicLoadbalanceEndpointFactory.java
+++ /dev/null
@@ -1,212 +0,0 @@
-/*
- *  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.
- */
-package org.apache.synapse.config.xml.endpoints;
-
-import org.apache.axiom.om.OMAttribute;
-import org.apache.axiom.om.OMElement;
-import org.apache.axiom.om.impl.builder.StAXOMBuilder;
-import org.apache.synapse.SynapseConstants;
-import org.apache.synapse.config.xml.XMLConfigConstants;
-import org.apache.synapse.config.xml.endpoints.utils.LoadbalanceAlgorithmFactory;
-import org.apache.synapse.endpoints.Endpoint;
-import org.apache.synapse.endpoints.ServiceDynamicLoadbalanceEndpoint;
-import org.apache.synapse.endpoints.algorithms.LoadbalanceAlgorithm;
-import org.apache.synapse.endpoints.dispatch.Dispatcher;
-import org.apache.synapse.endpoints.dispatch.HttpSessionDispatcher;
-import org.apache.synapse.endpoints.dispatch.SoapSessionDispatcher;
-
-import javax.xml.namespace.QName;
-import java.net.URL;
-import java.util.*;
-
-/**
- * Creates {@link org.apache.synapse.endpoints.DynamicLoadbalanceEndpoint} using an XML configuration.
- * <p/>
- * <pre>
- * <endpoint name="sdLB">
- *       <serviceDynamicLoadbalance algorithm="org.apache.synapse.endpoints.algorithms.RoundRobin"
- *                                  configuration="file:repository/conf/lbservices.xml"/>
- * </endpoint>
- * </pre>
- * <p/>
- * The configuration file has the following format. This can be even specified inline
- * <loadBalancerConfig>
- * <services>
- * <service>
- * <hosts>
- * <host>test1.synapse.apache.org</host>
- * <host>test1.apache.org</host>
- * </hosts>
- * <domain>test1.synapse.apache.domain</domain>
- * </service>
- * <service>
- * <hosts>
- * <host>test2.synapse.apache.org</host>
- * <host>test2.apache.org</host>
- * </hosts>
- * <domain>test2.synapse.apache.domain</domain>
- * </service>
- * </services>
- * </loadBalancerConfig>
- */
-public class ServiceDynamicLoadbalanceEndpointFactory extends EndpointFactory {
-
-    private static ServiceDynamicLoadbalanceEndpointFactory instance =
-            new ServiceDynamicLoadbalanceEndpointFactory();
-    public static final QName SERVICES_QNAME = new QName(SynapseConstants.SYNAPSE_NAMESPACE,
-                                                         "services");
-    public static final QName LB_CONFIG_QNAME = new QName(SynapseConstants.SYNAPSE_NAMESPACE,
-                                                          "loadBalancerConfig");
-
-    private ServiceDynamicLoadbalanceEndpointFactory() {
-    }
-
-    public static ServiceDynamicLoadbalanceEndpointFactory getInstance() {
-        return instance;
-    }
-
-    protected Endpoint createEndpoint(OMElement epConfig, boolean anonymousEndpoint,
-                                      Properties properties) {
-
-        OMElement loadbalanceElement =
-                epConfig.getFirstChildWithName(new QName(SynapseConstants.SYNAPSE_NAMESPACE,
-                                                         "serviceDynamicLoadbalance"));
-        if (loadbalanceElement == null) {
-            return null;
-        }
-
-        String configuration =
-                loadbalanceElement.getAttributeValue(new QName(XMLConfigConstants.NULL_NAMESPACE,
-                                                               "configuration"));
-        OMElement servicesEle;
-        if (configuration != null) {
-            if (configuration.startsWith("$system:")) {
-                configuration = System.getProperty(configuration.substring("$system:".length()));
-            }
-            // Load the file
-            StAXOMBuilder builder = null;
-            try {
-                builder = new StAXOMBuilder(new URL(configuration).openStream());
-            } catch (Exception e) {
-                handleException("Could not load ServiceDynamicLoadbalanceEndpoint configuration file " +
-                                configuration);
-            }
-            servicesEle = builder.getDocumentElement().getFirstChildWithName(SERVICES_QNAME);
-        } else {
-            OMElement lbConfigEle = loadbalanceElement.getFirstChildWithName(LB_CONFIG_QNAME);
-            if (lbConfigEle == null) {
-                throw new RuntimeException("loadBalancerConfig element not found as a child of " +
-                                           "serviceDynamicLoadbalance element");
-            }
-            servicesEle = lbConfigEle.getFirstChildWithName(SERVICES_QNAME);
-        }
-
-        if (servicesEle == null) {
-            throw new RuntimeException("services element not found in serviceDynamicLoadbalance configuration");
-        }
-        Map<String, String> hostDomainMap = new HashMap<String, String>();
-        for (Iterator<OMElement> iter = servicesEle.getChildrenWithLocalName("service"); iter.hasNext();) {
-            OMElement serviceEle = iter.next();
-            OMElement hostsEle =
-                    serviceEle.getFirstChildWithName(new QName(SynapseConstants.SYNAPSE_NAMESPACE, "hosts"));
-            if (hostsEle == null) {
-                throw new RuntimeException("hosts element not found as a child of service element");
-            }
-            List<String> hosts = new ArrayList<String>();
-            for (Iterator<OMElement> hostIter = hostsEle.getChildrenWithLocalName("host");
-                 hostIter.hasNext();) {
-                OMElement hostEle = hostIter.next();
-                String host = hostEle.getText();
-                if (host.trim().length() == 0) {
-                    throw new RuntimeException("host cannot be null");
-                }
-                hosts.add(host);
-            }
-            OMElement domainEle =
-                    serviceEle.getFirstChildWithName(new QName(SynapseConstants.SYNAPSE_NAMESPACE,
-                                                               "domain"));
-            if (domainEle == null) {
-                throw new RuntimeException("domain element not found in as a child of services");
-            }
-            String domain = domainEle.getText();
-            if (domain.trim().length() == 0) {
-                throw new RuntimeException("domain cannot be null");
-            }
-            for (String host : hosts) {
-                if (hostDomainMap.containsKey(host)) {
-                    throw new RuntimeException("host " + host + " has been already defined for " +
-                                               "clustering domain " + hostDomainMap.get(host));
-                }
-                hostDomainMap.put(host, domain);
-            }
-        }
-        if (hostDomainMap.isEmpty()) {
-            throw new RuntimeException("No service elements defined under services");
-        }
-
-        LoadbalanceAlgorithm algorithm =
-                LoadbalanceAlgorithmFactory.
-                        createLoadbalanceAlgorithm(loadbalanceElement, null);
-
-        ServiceDynamicLoadbalanceEndpoint loadbalanceEndpoint =
-                new ServiceDynamicLoadbalanceEndpoint(hostDomainMap, algorithm);
-
-        // set endpoint name
-        OMAttribute name =
-                epConfig.getAttribute(new QName(XMLConfigConstants.NULL_NAMESPACE, "name"));
-        if (name != null) {
-            loadbalanceEndpoint.setName(name.getAttributeValue());
-        }
-
-        // get the session for this endpoint
-        OMElement sessionElement =
-                epConfig.getFirstChildWithName(new QName(SynapseConstants.SYNAPSE_NAMESPACE, "session"));
-        if (sessionElement != null) {
-
-            OMElement sessionTimeout = sessionElement.getFirstChildWithName(
-                    new QName(SynapseConstants.SYNAPSE_NAMESPACE, "sessionTimeout"));
-
-            if (sessionTimeout != null) {
-                try {
-                    loadbalanceEndpoint.setSessionTimeout(Long.parseLong(
-                            sessionTimeout.getText().trim()));
-                } catch (NumberFormatException nfe) {
-                    handleException("Invalid session timeout value : " + sessionTimeout.getText());
-                }
-            }
-
-            String type = sessionElement.getAttributeValue(new QName("type"));
-
-            if (type.equalsIgnoreCase("soap")) {
-                Dispatcher soapDispatcher = new SoapSessionDispatcher();
-                loadbalanceEndpoint.setDispatcher(soapDispatcher);
-
-            } else if (type.equalsIgnoreCase("http")) {
-                Dispatcher httpDispatcher = new HttpSessionDispatcher();
-                loadbalanceEndpoint.setDispatcher(httpDispatcher);
-
-            }
-
-            loadbalanceEndpoint.setSessionAffinity(true);
-        }
-        loadbalanceEndpoint.setFailover(false);
-
-        return loadbalanceEndpoint;
-    }
-}
diff --git a/modules/core/src/main/java/org/apache/synapse/endpoints/ServiceDynamicLoadbalanceEndpoint.java b/modules/core/src/main/java/org/apache/synapse/endpoints/ServiceDynamicLoadbalanceEndpoint.java
deleted file mode 100644
index a96463d..0000000
--- a/modules/core/src/main/java/org/apache/synapse/endpoints/ServiceDynamicLoadbalanceEndpoint.java
+++ /dev/null
@@ -1,280 +0,0 @@
-/*
- *  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.
- */
-package org.apache.synapse.endpoints;
-
-import org.apache.axis2.addressing.EndpointReference;
-import org.apache.axis2.clustering.ClusteringAgent;
-import org.apache.axis2.clustering.Member;
-import org.apache.axis2.clustering.management.DefaultGroupManagementAgent;
-import org.apache.axis2.context.ConfigurationContext;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.http.protocol.HTTP;
-import org.apache.synapse.MessageContext;
-import org.apache.synapse.SynapseConstants;
-import org.apache.synapse.SynapseException;
-import org.apache.synapse.core.LoadBalanceMembershipHandler;
-import org.apache.synapse.core.SynapseEnvironment;
-import org.apache.synapse.core.axis2.Axis2MessageContext;
-import org.apache.synapse.core.axis2.Axis2SynapseEnvironment;
-import org.apache.synapse.core.axis2.ServiceLoadBalanceMembershipHandler;
-import org.apache.synapse.endpoints.algorithms.LoadbalanceAlgorithm;
-import org.apache.synapse.endpoints.dispatch.SALSessions;
-import org.apache.synapse.endpoints.dispatch.SessionInformation;
-import org.apache.synapse.transport.nhttp.NhttpConstants;
-
-import java.util.Collections;
-import java.util.Map;
-import java.util.Set;
-
-/**
- * Represents a dynamic load balance endpoint. The application membership is not static,
- * but discovered through some mechanism such as using a GCF
- */
-public class ServiceDynamicLoadbalanceEndpoint extends DynamicLoadbalanceEndpoint {
-
-    private static final Log log = LogFactory.getLog(ServiceDynamicLoadbalanceEndpoint.class);
-
-    /**
-     * Axis2 based membership handler which handles members in multiple clustering domains
-     */
-    private ServiceLoadBalanceMembershipHandler slbMembershipHandler;
-
-    /**
-     * Key - host, Value - domain
-     */
-    private Map<String, String> hostDomainMap;
-
-    @Override
-    public void init(SynapseEnvironment synapseEnvironment) {
-        if (!initialized) {
-            super.init(synapseEnvironment);
-            ConfigurationContext cfgCtx =
-                    ((Axis2SynapseEnvironment) synapseEnvironment).getAxis2ConfigurationContext();
-            ClusteringAgent clusteringAgent = cfgCtx.getAxisConfiguration().getClusteringAgent();
-            if (clusteringAgent == null) {
-                throw new SynapseException("Axis2 ClusteringAgent not defined in axis2.xml");
-            }
-            // Add the Axis2 GroupManagement agents
-            for (String domain : hostDomainMap.values()) {
-                if (clusteringAgent.getGroupManagementAgent(domain) == null) {
-                    clusteringAgent.addGroupManagementAgent(new DefaultGroupManagementAgent(), domain);
-                }
-            }
-            slbMembershipHandler = new ServiceLoadBalanceMembershipHandler(hostDomainMap,
-                                                                           getAlgorithm(),
-                                                                           cfgCtx,
-                                                                           isClusteringEnabled,
-                                                                           getName());
-
-            // Initialize the SAL Sessions if already has not been initialized.
-            SALSessions salSessions = SALSessions.getInstance();
-            if (!salSessions.isInitialized()) {
-                salSessions.initialize(isClusteringEnabled, cfgCtx);
-            }
-            initialized = true;
-            log.info("ServiceDynamicLoadbalanceEndpoint initialized");
-        }
-    }
-
-    public ServiceDynamicLoadbalanceEndpoint(Map<String, String> hostDomainMap,
-                                             LoadbalanceAlgorithm algorithm) {
-
-        this.hostDomainMap = hostDomainMap;
-        setAlgorithm(algorithm);
-    }
-
-    public LoadBalanceMembershipHandler getLbMembershipHandler() {
-        return slbMembershipHandler;
-    }
-
-    public Map<String, String> getHostDomainMap() {
-        return Collections.unmodifiableMap(hostDomainMap);
-    }
-
-    public void send(MessageContext synCtx) {
-        setCookieHeader(synCtx);
-        //TODO: Refactor Session Aware LB dispatching code
-
-        // Check whether a valid session for session aware dispatching is available
-        Member currentMember = null;
-        SessionInformation sessionInformation = null;
-        if (isSessionAffinityBasedLB()) {
-            // first check if this session is associated with a session. if so, get the endpoint
-            // associated for that session.
-            sessionInformation =
-                    (SessionInformation) synCtx.getProperty(
-                            SynapseConstants.PROP_SAL_CURRENT_SESSION_INFORMATION);
-
-            currentMember = (Member) synCtx.getProperty(
-                    SynapseConstants.PROP_SAL_ENDPOINT_CURRENT_MEMBER);
-
-            if (sessionInformation == null && currentMember == null) {
-                sessionInformation = dispatcher.getSession(synCtx);
-                if (sessionInformation != null) {
-
-                    if (log.isDebugEnabled()) {
-                        log.debug("Current session id : " + sessionInformation.getId());
-                    }
-
-                    currentMember = sessionInformation.getMember();
-                    synCtx.setProperty(
-                            SynapseConstants.PROP_SAL_ENDPOINT_CURRENT_MEMBER, currentMember);
-                    // This is for reliably recovery any session information if while response is getting ,
-                    // session information has been removed by cleaner.
-                    // This will not be a cost as  session information a not heavy data structure
-                    synCtx.setProperty(
-                            SynapseConstants.PROP_SAL_CURRENT_SESSION_INFORMATION, sessionInformation);
-                }
-            }
-
-        }
-
-        // Dispatch request the relevant member
-        String targetHost = getTargetHost(synCtx);
-        ConfigurationContext configCtx =
-                ((Axis2MessageContext) synCtx).getAxis2MessageContext().getConfigurationContext();
-        if (slbMembershipHandler.getConfigurationContext() == null) {
-            slbMembershipHandler.setConfigurationContext(configCtx);
-        }
-        ServiceDynamicLoadbalanceFaultHandlerImpl faultHandler = new ServiceDynamicLoadbalanceFaultHandlerImpl();
-        faultHandler.setHost(targetHost);
-        if (sessionInformation != null && currentMember != null) {
-            //send message on current session
-            sessionInformation.updateExpiryTime();
-            sendToApplicationMember(synCtx, currentMember, faultHandler, false);
-        } else {
-            // prepare for a new session
-            currentMember = slbMembershipHandler.getNextApplicationMember(targetHost);
-            if (currentMember == null) {
-                String msg = "No application members available";
-                log.error(msg);
-                throw new SynapseException(msg);
-            }
-            sendToApplicationMember(synCtx, currentMember, faultHandler, true);
-        }
-    }
-
-    private String getTargetHost(MessageContext synCtx) {
-        org.apache.axis2.context.MessageContext axis2MessageContext =
-                ((Axis2MessageContext) synCtx).getAxis2MessageContext();
-        Map<String, String> headers =
-                (Map<String, String>) axis2MessageContext.
-                        getProperty(org.apache.axis2.context.MessageContext.TRANSPORT_HEADERS);
-        String address = headers.get(HTTP.TARGET_HOST);
-        synCtx.setProperty("LB_REQUEST_HOST", address); // Need to set with the port
-        if (address.contains(":")) {
-            address = address.substring(0, address.indexOf(":"));
-        }
-        return address;
-    }
-
-    /**
-     * This FaultHandler will try to resend the message to another member if an error occurs
-     * while sending to some member. This is a failover mechanism
-     */
-    private class ServiceDynamicLoadbalanceFaultHandlerImpl extends DynamicLoadbalanceFaultHandler {
-
-        private EndpointReference to;
-        private Member currentMember;
-        private Endpoint currentEp;
-        private String host;
-
-        private static final int MAX_RETRY_COUNT = 5;
-
-        // ThreadLocal variable to keep track of how many times this fault handler has been
-        // called
-        private ThreadLocal<Integer> callCount = new ThreadLocal<Integer>() {
-            protected Integer initialValue() {
-                return 0;
-            }
-        };
-
-        public void setHost(String host) {
-            this.host = host;
-        }
-
-        public void setCurrentMember(Member currentMember) {
-            this.currentMember = currentMember;
-        }
-
-        public void setTo(EndpointReference to) {
-            this.to = to;
-        }
-
-        private ServiceDynamicLoadbalanceFaultHandlerImpl() {
-        }
-
-        public void onFault(MessageContext synCtx) {
-            if (currentMember == null) {
-                return;
-            }
-            currentMember.suspend(10000);     // TODO: Make this configurable.
-            log.info("Suspended member " + currentMember + " for 10s");
-
-            // Prevent infinite retrying to failed members
-            callCount.set(callCount.get() + 1);
-            if (callCount.get() >= MAX_RETRY_COUNT) {
-                return;
-            }
-
-            //cleanup endpoint if exists
-            if (currentEp != null) {
-                currentEp.destroy();
-            }
-            Integer errorCode = (Integer) synCtx.getProperty(SynapseConstants.ERROR_CODE);
-            if (errorCode != null) {
-                if (errorCode.equals(NhttpConstants.CONNECTION_FAILED) ||
-                    errorCode.equals(NhttpConstants.CONNECT_CANCEL) ||
-                    errorCode.equals(NhttpConstants.CONNECT_TIMEOUT)) {
-                    // Try to resend to another member
-                    Member newMember = slbMembershipHandler.getNextApplicationMember(host);
-                    if (newMember == null) {
-                        String msg = "No application members available";
-                        log.error(msg);
-                        throw new SynapseException(msg);
-                    }
-                    log.info("Failed over to " + newMember);
-                    synCtx.setTo(to);
-                    if (isSessionAffinityBasedLB()) {
-                        //We are sending the this message on a new session,
-                        // hence we need to remove previous session information
-                        Set pros = synCtx.getPropertyKeySet();
-                        if (pros != null) {
-                            pros.remove(SynapseConstants.PROP_SAL_CURRENT_SESSION_INFORMATION);
-                        }
-                    }
-                    try {
-                        Thread.sleep(1000);  // Sleep for sometime before retrying
-                    } catch (InterruptedException ignored) {
-                    }
-                    sendToApplicationMember(synCtx, newMember, this, true);
-                } else if (errorCode.equals(NhttpConstants.SND_IO_ERROR_SENDING) ||
-                           errorCode.equals(NhttpConstants.CONNECTION_CLOSED)) {
-                    // TODO: Envelope is consumed
-                }
-            }
-            // We cannot failover since we are using binary relay
-        }
-
-        public void setCurrentEp(Endpoint currentEp) {
-            this.currentEp = currentEp;
-        }
-    }
-}
diff --git a/modules/core/src/main/java/org/apache/synapse/endpoints/algorithms/RoundRobin.java b/modules/core/src/main/java/org/apache/synapse/endpoints/algorithms/RoundRobin.java
index 693643a..d6493f0 100644
--- a/modules/core/src/main/java/org/apache/synapse/endpoints/algorithms/RoundRobin.java
+++ b/modules/core/src/main/java/org/apache/synapse/endpoints/algorithms/RoundRobin.java
@@ -112,15 +112,15 @@
                 currentMemberIndex = 0;
             }
             int index = members.size();
-            do {
-                current = members.get(currentMemberIndex);
-                if (currentMemberIndex == members.size() - 1) {
-                    currentMemberIndex = 0;
-                } else {
-                    currentMemberIndex++;
-                }
-                index--;
-            } while (current.isSuspended() && index > 0);
+
+            current = members.get(currentMemberIndex);
+            if (currentMemberIndex == members.size() - 1) {
+                currentMemberIndex = 0;
+            } else {
+                currentMemberIndex++;
+            }
+            index--;
+
             algorithmContext.setCurrentEndpointIndex(currentMemberIndex);
             if (log.isDebugEnabled()) {
                 log.debug("Members       : " + members.size());
diff --git a/modules/core/src/main/java/org/apache/synapse/mediators/Value.java b/modules/core/src/main/java/org/apache/synapse/mediators/Value.java
index 63f9aec..88aa2a8 100644
--- a/modules/core/src/main/java/org/apache/synapse/mediators/Value.java
+++ b/modules/core/src/main/java/org/apache/synapse/mediators/Value.java
@@ -19,6 +19,8 @@
 
 package org.apache.synapse.mediators;
 
+import org.apache.axiom.om.OMContainer;
+import org.apache.axiom.om.OMDocument;
 import org.apache.axiom.om.OMElement;
 import org.apache.axiom.om.OMNamespace;
 import org.apache.commons.logging.Log;
@@ -155,11 +157,37 @@
     }
 
     public void setNamespaces(OMElement elem){
-        Iterator namespaces = elem.getNamespacesInScope();
+        OMElement currentElem = elem;
+
+        while (currentElem != null) {
+            Iterator it = currentElem.getAllDeclaredNamespaces();
+            while (it.hasNext()) {
+                OMNamespace n = (OMNamespace) it.next();
+                // Exclude the default namespace as explained in the Javadoc above
+                if (n != null && !"".equals(n.getPrefix())) {
+                    namespaceList.add(n);
+                }
+            }
+
+            OMContainer parent = currentElem.getParent();
+            //if the parent is a document element or parent is null ,then return
+            if (parent == null || parent instanceof OMDocument) {
+                return;
+            }
+            if (parent instanceof OMElement) {
+                currentElem = (OMElement) parent;
+            }
+        }
+
+
+        Iterator namespaces = elem.getAllDeclaredNamespaces();
         while (namespaces.hasNext()){
             OMNamespace ns = (OMNamespace) namespaces.next();
             namespaceList.add(ns);
         }
+
+
+
     }
 
     @Override
diff --git a/modules/core/src/main/java/org/apache/synapse/mediators/builtin/CacheMediator.java b/modules/core/src/main/java/org/apache/synapse/mediators/builtin/CacheMediator.java
index d475081..9107d73 100644
--- a/modules/core/src/main/java/org/apache/synapse/mediators/builtin/CacheMediator.java
+++ b/modules/core/src/main/java/org/apache/synapse/mediators/builtin/CacheMediator.java
@@ -19,16 +19,13 @@
 
 package org.apache.synapse.mediators.builtin;
 
-import org.apache.axiom.om.OMAbstractFactory;
-import org.apache.axiom.soap.SOAP11Constants;
-import org.apache.axiom.soap.SOAP12Constants;
-import org.apache.axiom.soap.SOAPFactory;
 import org.apache.axis2.AxisFault;
-import org.apache.axis2.clustering.ClusteringFault;
 import org.apache.axis2.clustering.state.Replicator;
+import org.apache.axis2.transport.http.HTTPConstants;
+import org.apache.axis2.saaj.util.IDGenerator;
+import org.apache.axis2.saaj.util.SAAJUtil;
+import org.apache.axis2.clustering.ClusteringFault;
 import org.apache.axis2.context.ConfigurationContext;
-import org.apache.axis2.context.OperationContext;
-import org.apache.axis2.i18n.Messages;
 import org.apache.synapse.ManagedLifecycle;
 import org.apache.synapse.MessageContext;
 import org.apache.synapse.SynapseException;
@@ -40,15 +37,20 @@
 import org.apache.synapse.mediators.base.SequenceMediator;
 import org.apache.synapse.util.FixedByteArrayOutputStream;
 import org.apache.synapse.util.MessageHelper;
-import org.apache.axiom.soap.SOAPEnvelope;
-import org.wso2.caching.*;
-import org.wso2.caching.util.SOAPMessageHelper;
+import org.wso2.caching.CacheManager;
+import org.wso2.caching.CachedObject;
+import org.wso2.caching.CachingConstants;
+import org.wso2.caching.CachingException;
 import org.wso2.caching.digest.DigestGenerator;
 
 import javax.xml.soap.SOAPException;
+import javax.xml.soap.MessageFactory;
+import javax.xml.soap.SOAPMessage;
+import javax.xml.soap.MimeHeaders;
 import javax.xml.stream.XMLStreamException;
 import java.io.ByteArrayOutputStream;
 import java.io.IOException;
+import java.io.ByteArrayInputStream;
 
 /**
  * CacheMediator will cache the response messages indexed using the hash value of the
@@ -151,10 +153,10 @@
         try {
 
             if (synCtx.isResponse()) {
-                processResponseMessage(synCtx, synLog);
+                processResponseMessage(synCtx, cfgCtx, synLog, cacheManager);
 
             } else {
-                result = processRequestMessage(synCtx, synLog, cacheManager);
+                result = processRequestMessage(synCtx, cfgCtx, synLog, cacheManager);
             }
 
         } catch (ClusteringFault clusteringFault) {
@@ -172,70 +174,66 @@
      *
      * @param synLog         the Synapse log to use
      * @param synCtx         the current message (response)
+     * @param cfgCtx         the abstract context in which the cache will be kept
+     * @param cacheManager   the cache manager
      * @throws ClusteringFault is there is an error in replicating the cfgCtx
      */
-    private void processResponseMessage(MessageContext synCtx,
-                                        SynapseLog synLog) throws ClusteringFault {
+    private void processResponseMessage(MessageContext synCtx, ConfigurationContext cfgCtx,
+        SynapseLog synLog, CacheManager cacheManager) throws ClusteringFault {
 
         if (!collector) {
             handleException("Response messages cannot be handled in a non collector cache", synCtx);
         }
 
-        org.apache.axis2.context.MessageContext msgCtx =
-                ((Axis2MessageContext)synCtx).getAxis2MessageContext();
-        OperationContext operationContext = msgCtx.getOperationContext();
+        String requestHash = (String) synCtx.getProperty(CachingConstants.REQUEST_HASH);
 
-        CachableResponse response =
-                (CachableResponse) operationContext.getPropertyNonReplicable(CachingConstants.CACHED_OBJECT);
-        if (response != null) {
+        if (requestHash != null) {
             if (synLog.isTraceOrDebugEnabled()) {
                 synLog.traceOrDebug("Storing the response message into the cache at scope : " +
-                        scope + " with ID : " + cacheKey + " for request hash : " + response.getRequestHash());
+                    scope + " with ID : " + cacheKey + " for request hash : " + requestHash);
             }
-            if (synLog.isTraceOrDebugEnabled()) {
-                synLog.traceOrDebug("Storing the response for the message with ID : " +
+
+            CachedObject cachedObj = cacheManager.getResponseForKey(cacheKey, requestHash, cfgCtx);
+            if (cachedObj != null) {
+
+                if (synLog.isTraceOrDebugEnabled()) {
+                    synLog.traceOrDebug("Storing the response for the message with ID : " +
                         synCtx.getMessageID() + " with request hash ID : " +
-                        response.getRequestHash() + " in the cache : " + cacheKey);
-            }
-
-            ByteArrayOutputStream outStream = new ByteArrayOutputStream();
-            try {
-                synCtx.getEnvelope().serialize(outStream);
-                response.setResponseEnvelope(outStream.toByteArray());
-            } catch (XMLStreamException e) {
-                handleException("Unable to set the response to the Cache", e, synCtx);
-            }
-
-            // this is not required yet, can commented this for perf improvements
-            // in the future there can be a situation where user sends the request
-            // with the response hash (if client side caching is on) in which case
-            // we can compare that response hash with the given response hash and
-            // respond with not-modified http header */
-            // cachedObj.setResponseHash(cache.getGenerator().getDigest(
-            //     ((Axis2MessageContext) synCtx).getAxis2MessageContext()));
-
-            if (response.getTimeout() > 0) {
-                response.setExpireTimeMillis(System.currentTimeMillis() + response.getTimeout());
-            }
-
-            // Finally, we may need to replicate the changes in the cache
-            CacheReplicationCommand cacheReplicationCommand
-                    = (CacheReplicationCommand) msgCtx.getPropertyNonReplicable(
-                    CachingConstants.STATE_REPLICATION_OBJECT);
-            if (cacheReplicationCommand != null) {
-                try {
-                    Replicator.replicateState(cacheReplicationCommand,
-                            msgCtx.getRootContext().getAxisConfiguration());
-                } catch (ClusteringFault clusteringFault) {
-                    log.error("Cannot replicate cache changes");
+                        cachedObj.getRequestHash() + " in the cache : " + cacheKey);
                 }
-            }
-        } else {
-            synLog.auditWarn("A response message without a valid mapping to the " +
+
+                ByteArrayOutputStream outStream = new ByteArrayOutputStream();
+                try {
+                    MessageHelper.cloneSOAPEnvelope(synCtx.getEnvelope()).serialize(outStream);
+                    cachedObj.setResponseEnvelope(outStream.toByteArray());
+                } catch (XMLStreamException e) {
+                    handleException("Unable to set the response to the Cache", e, synCtx);
+                }
+
+                /* this is not required yet, can commented this for perf improvements
+                   in the future there can be a situation where user sends the request
+                   with the response hash (if client side caching is on) in which case
+                   we can compare that response hash with the given response hash and
+                   respond with not-modified http header */
+                // cachedObj.setResponseHash(cache.getGenerator().getDigest(
+                //     ((Axis2MessageContext) synCtx).getAxis2MessageContext()));
+
+                if (cachedObj.getTimeout() > 0) {
+                    cachedObj.setExpireTimeMillis(System.currentTimeMillis() + cachedObj.getTimeout());
+                }
+
+                cfgCtx.setProperty(CachingConstants.CACHE_MANAGER, cacheManager);
+//                Replicator.replicate(cfgCtx, new String[]{cacheManagerKey});
+                Replicator.replicate(cfgCtx);
+            } else {
+                synLog.auditWarn("A response message without a valid mapping to the " +
                     "request hash found. Unable to store the response in cache");
+            }
+
+        } else {
+            synLog.auditWarn("A response message without a mapping to the " +
+                "request hash found. Unable to store the response in cache");
         }
-
-
     }
 
     /**
@@ -244,19 +242,18 @@
      * this message as a response and sends back directly to client.
      *
      * @param synCtx         incoming request message
+     * @param cfgCtx         the AbstractContext in which the cache will be kept
      * @param synLog         the Synapse log to use
      * @param cacheManager   the cache manager
      * @return should this mediator terminate further processing?
      * @throws ClusteringFault if there is an error in replicating the cfgCtx
      */
-    private boolean processRequestMessage(MessageContext synCtx,
+    private boolean processRequestMessage(MessageContext synCtx, ConfigurationContext cfgCtx,
         SynapseLog synLog, CacheManager cacheManager) throws ClusteringFault {
 
         if (collector) {
             handleException("Request messages cannot be handled in a collector cache", synCtx);
         }
-        OperationContext opCtx = ((Axis2MessageContext)synCtx).getAxis2MessageContext().
-                getOperationContext();
 
         String requestHash = null;
         try {
@@ -271,49 +268,57 @@
             synLog.traceOrDebug("Generated request hash : " + requestHash);
         }
 
-        ServiceName service;
-        if (id != null) {
-            service = new ServiceName(id);
-        } else {
-            service = new ServiceName(cacheKey);
-        }
+        if (cacheManager.containsKey(cacheKey, requestHash) &&
+            cacheManager.getResponseForKey(cacheKey, requestHash, cfgCtx) != null) {
 
-        RequestHash hash = new RequestHash(requestHash);
-        CachableResponse cachedResponse =
-                cacheManager.getCachedResponse(service, hash);
-
-        org.apache.axis2.context.MessageContext msgCtx = ((Axis2MessageContext)synCtx).getAxis2MessageContext();
-        opCtx.setNonReplicableProperty(CachingConstants.REQUEST_HASH, requestHash);
-        CacheReplicationCommand cacheReplicationCommand = new CacheReplicationCommand();
-
-        if (cachedResponse != null) {
             // get the response from the cache and attach to the context and change the
             // direction of the message
-            if (!cachedResponse.isExpired()) {
+            CachedObject cachedObj = cacheManager.getResponseForKey(cacheKey, requestHash, cfgCtx);
+
+            if (!cachedObj.isExpired() && cachedObj.getResponseEnvelope() != null) {
+
                 if (synLog.isTraceOrDebugEnabled()) {
                     synLog.traceOrDebug("Cache-hit for message ID : " + synCtx.getMessageID());
                 }
-                cachedResponse.setInUse(true);
+
                 // mark as a response and replace envelope from cache
                 synCtx.setResponse(true);
-                opCtx.setNonReplicableProperty(CachingConstants.CACHED_OBJECT, cachedResponse);
-
-                SOAPEnvelope omSOAPEnv;
                 try {
-                    omSOAPEnv = SOAPMessageHelper.buildSOAPEnvelopeFromBytes(
-                            cachedResponse.getResponseEnvelope());
-                    if (omSOAPEnv != null) {
-                        synCtx.setEnvelope(omSOAPEnv);
+                    MessageFactory mf = MessageFactory.newInstance();
+                    SOAPMessage smsg;
+                    if (synCtx.isSOAP11()) {
+                        smsg = mf.createMessage(new MimeHeaders(),
+                                new ByteArrayInputStream(cachedObj.getResponseEnvelope()));
+                    } else {
+                        MimeHeaders mimeHeaders = new MimeHeaders();
+                        mimeHeaders.addHeader("Content-ID", IDGenerator.generateID());
+                        mimeHeaders.addHeader("content-type",
+                                HTTPConstants.MEDIA_TYPE_APPLICATION_SOAP_XML);
+                        smsg = mf.createMessage(mimeHeaders,
+                                new ByteArrayInputStream((cachedObj).getResponseEnvelope()));
                     }
+
+                    if (smsg != null) {
+                        org.apache.axiom.soap.SOAPEnvelope omSOAPEnv =
+                                SAAJUtil.toOMSOAPEnvelope(
+                                        smsg.getSOAPPart().getDocumentElement());
+                        synCtx.setEnvelope(omSOAPEnv);
+                    } else {
+                        handleException("Unable to serve from the cache : " +
+                                "Couldn't build the SOAP response from the cached byte stream",
+                                synCtx);
+                    }
+
+                    // todo: if there is a WSA messageID in the response, is that need to be unique on each and every resp
                 } catch (AxisFault axisFault) {
                     handleException("Error setting response envelope from cache : "
-                            + cacheKey, synCtx);
+                        + cacheKey, synCtx);
                 } catch (IOException ioe) {
                     handleException("Error setting response envelope from cache : "
-                            + cacheKey, ioe, synCtx);
+                        + cacheKey, ioe, synCtx);
                 } catch (SOAPException soape) {
                     handleException("Error setting response envelope from cache : "
-                            + cacheKey, soape, synCtx);
+                        + cacheKey, soape, synCtx);
                 }
 
                 // take specified action on cache hit
@@ -327,7 +332,7 @@
 
                     if (synLog.isTraceOrDebugEnabled()) {
                         synLog.traceOrDebug("Delegating message to the onCachingHit " +
-                                "sequence : " + onCacheHitRef);
+                            "sequence : " + onCacheHitRef);
                     }
                     synCtx.getSequence(onCacheHitRef).mediate(synCtx);
 
@@ -335,7 +340,7 @@
 
                     if (synLog.isTraceOrDebugEnabled()) {
                         synLog.traceOrDebug("Request message " + synCtx.getMessageID() +
-                                " was served from the cache : " + cacheKey);
+                            " was served from the cache : " + cacheKey);
                     }
                     // send the response back if there is not onCacheHit is specified
                     synCtx.setTo(null);
@@ -345,52 +350,54 @@
                 return false;
 
             } else {
-                cachedResponse.reincarnate(timeout);
-                if (synLog.isTraceOrDebugEnabled()) {
-                    synLog.traceOrDebug("Existing cached response has expired. Reset cache element");
-                }
-                cacheManager.cacheResponse(service, hash, cachedResponse, cacheReplicationCommand);
-                opCtx.setNonReplicableProperty(CachingConstants.CACHED_OBJECT, cachedResponse);
-                opCtx.setNonReplicableProperty(CachingConstants.STATE_REPLICATION_OBJECT,
-                        cacheReplicationCommand);
+                // cache exists, but has expired...
+                cachedObj.expire();
+                cachedObj.setTimeout(timeout);
+                synLog.traceOrDebug("Existing cached response has expired. Reset cache element");
 
-                Replicator.replicate(opCtx);
+                cfgCtx.setProperty(CachingConstants.CACHE_MANAGER, cacheManager);
+//                Replicator.replicate(cfgCtx, new String[]{cacheManagerKey});
+                Replicator.replicate(cfgCtx);
             }
+
         } else {
+
             // if not found in cache, check if we can cache this request
-            if (cacheManager.getCacheSize(service) >= inMemoryCacheSize) { // If cache is full
-                cacheManager.removeExpiredResponses(service, cacheReplicationCommand); // try to remove expired responses
-                if (cacheManager.getCacheSize(service) >= inMemoryCacheSize) { // recheck if there is space
-                    if (log.isDebugEnabled()) {
-                        log.debug("In-memory cache is full. Unable to cache");
-                    }
-                } else { // if we managed to free up some space in the cache. Need state replication
-                    cacheNewResponse(msgCtx, service, hash, cacheManager,
-                                     cacheReplicationCommand);
+            if (cacheManager.getCacheKeys(cacheKey).size() == inMemoryCacheSize) {
+                cacheManager.removeExpiredResponses(cacheKey, cfgCtx);
+                if (cacheManager.getCacheKeys(cacheKey).size() == inMemoryCacheSize) {
+                    synLog.traceOrDebug("In-memory cache is full. Unable to cache");
+                } else {
+                    storeRequestToCache(cfgCtx, requestHash, cacheManager);
                 }
-            } else { // if there is more space in the cache. Need state replication
-                cacheNewResponse(msgCtx, service, hash, cacheManager,
-                                 cacheReplicationCommand);
+            } else {
+                storeRequestToCache(cfgCtx, requestHash, cacheManager);
             }
         }
-
         return true;
     }
 
-    private void cacheNewResponse(org.apache.axis2.context.MessageContext msgContext,
-                                  ServiceName serviceName, RequestHash requestHash,
-                                  CacheManager cacheManager,
-                                  CacheReplicationCommand cacheReplicationCommand) throws ClusteringFault {
-        OperationContext opCtx = msgContext.getOperationContext();
-        CachableResponse response = new CachableResponse();
-        response.setRequestHash(requestHash.getRequestHash());
-        response.setTimeout(timeout);
-        cacheManager.cacheResponse(serviceName, requestHash, response, cacheReplicationCommand);
-        opCtx.setNonReplicableProperty(CachingConstants.CACHED_OBJECT, response);
-        opCtx.setNonReplicableProperty(CachingConstants.STATE_REPLICATION_OBJECT,
-                                       cacheReplicationCommand);
+    /**
+     * Store request message to the cache
+     *
+     * @param cfgCtx        - the Abstract context in which the cache will be kept
+     * @param requestHash   - the request hash that has already been computed
+     * @param cacheManager  - the cache
+     * @throws ClusteringFault if there is an error in replicating the cfgCtx
+     */
+    private void storeRequestToCache(ConfigurationContext cfgCtx,
+        String requestHash, CacheManager cacheManager) throws ClusteringFault {
 
-        Replicator.replicate(opCtx);
+        CachedObject cachedObj = new CachedObject();
+        cachedObj.setRequestHash(requestHash);
+        // this does not set the expiretime but just sets the timeout and the espiretime will
+        // be set when the response is availabel
+        cachedObj.setTimeout(timeout);
+        cacheManager.addResponseWithKey(cacheKey, requestHash, cachedObj, cfgCtx);
+
+        cfgCtx.setProperty(CachingConstants.CACHE_MANAGER, cacheManager);
+//        Replicator.replicate(cfgCtx, new String[]{cacheManagerKey});
+        Replicator.replicate(cfgCtx);
     }
 
     public String getId() {
@@ -476,15 +483,4 @@
     public void setMaxMessageSize(int maxMessageSize) {
         this.maxMessageSize = maxMessageSize;
     }
-
-    public SOAPFactory getSOAPFactory(org.apache.axis2.context.MessageContext msgContext) throws AxisFault {
-        String nsURI = msgContext.getEnvelope().getNamespace().getNamespaceURI();
-        if (SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI.equals(nsURI)) {
-            return OMAbstractFactory.getSOAP12Factory();
-        } else if (SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI.equals(nsURI)) {
-            return OMAbstractFactory.getSOAP11Factory();
-        } else {
-            throw new AxisFault(Messages.getMessage("invalidSOAPversion"));
-        }
-    }
 }
\ No newline at end of file
diff --git a/modules/core/src/main/java/org/apache/synapse/util/AXIOMUtils.java b/modules/core/src/main/java/org/apache/synapse/util/AXIOMUtils.java
index 8540eb8..34309a3 100644
--- a/modules/core/src/main/java/org/apache/synapse/util/AXIOMUtils.java
+++ b/modules/core/src/main/java/org/apache/synapse/util/AXIOMUtils.java
@@ -22,9 +22,10 @@
 import javax.xml.transform.Source;
 import javax.xml.transform.dom.DOMSource;
 
-import org.apache.axiom.om.OMContainer;
+import org.apache.axiom.om.OMElement;
 import org.apache.axiom.om.OMNode;
-import org.w3c.dom.Node;
+import org.apache.axiom.om.impl.dom.NodeImpl;
+import org.apache.axiom.om.impl.jaxp.OMSource;
 
 /**
  * Utility class with AXIOM helper methods.
@@ -41,10 +42,10 @@
      */
     public static Source asSource(OMNode node) {
         // Note: Once we depend on JDK 1.6, we could also use StAXSource from JAXP 1.4.
-        if (node instanceof Node) {
-            return new DOMSource((Node)node);
+        if (node instanceof NodeImpl) {
+            return new DOMSource((NodeImpl)node);
         } else {
-            return ((OMContainer)node).getSAXSource(true);
+            return new OMSource((OMElement)node);
         }
     }
 }
diff --git a/modules/core/src/main/java/org/apache/synapse/util/Replicator.java b/modules/core/src/main/java/org/apache/synapse/util/Replicator.java
index fea6760..1206fe3 100644
--- a/modules/core/src/main/java/org/apache/synapse/util/Replicator.java
+++ b/modules/core/src/main/java/org/apache/synapse/util/Replicator.java
@@ -104,4 +104,4 @@
         log.error(msg, e);
         throw new SynapseException(msg, e);
     }
-}
+}
\ No newline at end of file
diff --git a/modules/core/src/main/java/org/apache/synapse/util/jaxp/AXIOMSourceBuilder.java b/modules/core/src/main/java/org/apache/synapse/util/jaxp/AXIOMSourceBuilder.java
index fc5953a..2446b80 100644
--- a/modules/core/src/main/java/org/apache/synapse/util/jaxp/AXIOMSourceBuilder.java
+++ b/modules/core/src/main/java/org/apache/synapse/util/jaxp/AXIOMSourceBuilder.java
@@ -19,18 +19,16 @@
 
 package org.apache.synapse.util.jaxp;
 
-import javax.xml.transform.sax.SAXSource;
-
-import org.apache.axiom.om.OMContainer;
 import org.apache.axiom.om.OMElement;
+import org.apache.axiom.om.impl.jaxp.OMSource;
 
 /**
  * {@link SourceBuilder} implementation that transforms the AXIOM tree to SAX
- * using {@link OMContainer#getSAXSource(boolean)}.
+ * using {@link OMSource}.
  */
 public class AXIOMSourceBuilder implements SourceBuilder {
-    public SAXSource getSource(OMElement node) {
-        return node.getSAXSource(true);
+    public OMSource getSource(OMElement node) {
+        return new OMSource(node);
     }
 
     public void release() {
diff --git a/modules/core/src/test/java/org/apache/synapse/mediators/AbstractMediatorTestCase.java b/modules/core/src/test/java/org/apache/synapse/mediators/AbstractMediatorTestCase.java
index 3edbea3..441b976 100644
--- a/modules/core/src/test/java/org/apache/synapse/mediators/AbstractMediatorTestCase.java
+++ b/modules/core/src/test/java/org/apache/synapse/mediators/AbstractMediatorTestCase.java
@@ -29,7 +29,7 @@
 import javax.xml.stream.XMLStreamException;
 import java.io.StringReader;
 
-public abstract class AbstractMediatorTestCase extends TestCase {
+public class AbstractMediatorTestCase extends TestCase {
 
     protected static OMElement createOMElement(String xml) {
         return SynapseConfigUtils.stringToOM(xml);
diff --git a/modules/core/src/test/java/org/apache/synapse/mediators/eip/AbstractSplitMediatorTestCase.java b/modules/core/src/test/java/org/apache/synapse/mediators/eip/AbstractSplitMediatorTestCase.java
index a817b93..7aee12c 100644
--- a/modules/core/src/test/java/org/apache/synapse/mediators/eip/AbstractSplitMediatorTestCase.java
+++ b/modules/core/src/test/java/org/apache/synapse/mediators/eip/AbstractSplitMediatorTestCase.java
@@ -15,7 +15,7 @@
 /**
  * Preperation of the split mediator test cases 
  */
-public abstract class AbstractSplitMediatorTestCase extends AbstractMediatorTestCase {
+public class AbstractSplitMediatorTestCase extends AbstractMediatorTestCase {
 
     SplitTestHelperMediator helperMediator;
     MessageContext testCtx;
diff --git a/modules/distribution/pom.xml b/modules/distribution/pom.xml
index bf7c203..5963fe6 100644
--- a/modules/distribution/pom.xml
+++ b/modules/distribution/pom.xml
@@ -17,15 +17,12 @@
   ~  under the License.
   -->
 
-<project
-    xmlns="http://maven.apache.org/POM/4.0.0"
-    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
     <modelVersion>4.0.0</modelVersion>
     <parent>
         <groupId>org.apache.synapse</groupId>
         <artifactId>Apache-Synapse</artifactId>
-        <version>2.2.0-SNAPSHOT</version>
+        <version>2.1.0</version>
         <relativePath>../../pom.xml</relativePath>
     </parent>
 
@@ -37,45 +34,38 @@
     <packaging>pom</packaging>
 
     <scm>
-        <connection>scm:svn:http://svn.apache.org/repos/asf/synapse/trunk/java/modules/distribution</connection>
-        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/synapse/trunk/java/modules/distribution</developerConnection>
-        <url>http://svn.apache.org/viewvc/synapse/trunk/java/modules/distribution</url>
+        <connection>scm:svn:http://svn.apache.org/repos/asf/synapse/tags/2.1.0/modules/distribution</connection>
+        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/synapse/tags/2.1.0/modules/distribution</developerConnection>
+        <url>http://svn.apache.org/viewvc/synapse/tags/2.1.0/modules/distribution</url>
     </scm>
 
     <dependencies>
         <dependency>
             <groupId>org.apache.synapse</groupId>
-            <artifactId>synapse-core</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.synapse</groupId>
-            <artifactId>synapse-commons</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.synapse</groupId>
             <artifactId>synapse-extensions</artifactId>
+            <version>${pom.version}</version>
         </dependency>
         <dependency>
             <groupId>org.apache.synapse</groupId>
             <artifactId>synapse-samples</artifactId>
+            <version>${pom.version}</version>
         </dependency>
         <dependency>
             <groupId>org.apache.synapse</groupId>
             <artifactId>synapse-experimental</artifactId>
+            <version>${pom.version}</version>
         </dependency>
         <dependency>
             <groupId>org.apache.synapse</groupId>
             <artifactId>synapse-config-migrator</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.synapse</groupId>
-            <artifactId>synapse-fix-transport</artifactId>
+            <version>${pom.version}</version>
         </dependency>
 
         <!-- Wrapper jars -->
         <dependency>
             <groupId>wrapper</groupId>
             <artifactId>wrapper</artifactId>
+            <version>${wrapper.version}</version>
         </dependency>
 
         <!-- The distribution is configured for log4j. Normally, log4j should not
@@ -89,21 +79,57 @@
         <dependency>
             <groupId>org.apache.rampart</groupId>
             <artifactId>rampart</artifactId>
+            <version>${rampart.version}</version>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.apache.woden</groupId>
+                    <artifactId>woden-api</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>xalan</groupId>
+                    <artifactId>xalan</artifactId>
+                </exclusion>
+            </exclusions>
             <type>mar</type>
         </dependency>
         <dependency>
             <groupId>org.apache.sandesha2</groupId>
             <artifactId>sandesha2</artifactId>
+            <version>${sandesha2.version}</version>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.apache.axis2</groupId>
+                    <artifactId>axis2</artifactId>
+                </exclusion>
+            </exclusions>
             <type>mar</type>
         </dependency>
         <dependency>
             <groupId>org.apache.sandesha2</groupId>
             <artifactId>sandesha2-policy</artifactId>
+            <version>${sandesha2.version}</version>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.apache.axis2</groupId>
+                    <artifactId>axis2</artifactId>
+                </exclusion>
+            </exclusions>
         </dependency>
         <dependency>
             <groupId>org.apache.axis2</groupId>
             <artifactId>addressing</artifactId>
+            <version>${addressing.version}</version>
             <type>mar</type>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.apache.geronimo.specs</groupId>
+                    <artifactId>geronimo-javamail_1.4_spec</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.apache.geronimo.specs</groupId>
+                    <artifactId>geronimo-activation_1.1_spec</artifactId>
+                </exclusion>
+            </exclusions>
         </dependency>
         
         <!-- Because of a design flaw in Axis2 (see AXIS2-4265), axis2-codegen is required
@@ -126,6 +152,11 @@
             <groupId>org.apache.synapse</groupId>
             <artifactId>synapse-vfs-transport</artifactId>
         </dependency>
+        <dependency>
+            <groupId>org.apache.synapse</groupId>
+            <artifactId>synapse-fix-transport</artifactId>
+            <version>${pom.version}</version>
+        </dependency>
 
         <dependency>
             <groupId>com.oopsconsultancy</groupId>
@@ -137,17 +168,10 @@
         <dependency>
             <groupId>org.apache.synapse</groupId>
             <artifactId>synapse-patches</artifactId>
+            <version>${pom.version}</version>
             <classifier>jars</classifier>
             <type>zip</type>
         </dependency>
-        <dependency>
-            <groupId>org.apache.woden</groupId>
-            <artifactId>woden-api</artifactId>
-        </dependency>
-        <!--dependency>
-            <groupId>xerces</groupId>
-            <artifactId>xercesImpl</artifactId>
-        </dependency-->
     </dependencies>
 
     <repositories>
@@ -168,7 +192,9 @@
     <build>
         <plugins>
             <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-assembly-plugin</artifactId>
+                <version>2.2-beta-2</version>
                 <executions>
                     <execution>
                         <id>distribution-package</id>
@@ -179,7 +205,7 @@
                         <configuration>
                             <descriptors>
                                 <descriptor>src/main/assembly/bin.xml</descriptor>
-                                <!--<descriptor>src/main/assembly/src.xml</descriptor>-->
+                                <descriptor>src/main/assembly/src.xml</descriptor>
                             </descriptors>
                             <finalName>synapse-${synapse.version}</finalName>
                         </configuration>
diff --git a/modules/distribution/src/main/assembly/bin.xml b/modules/distribution/src/main/assembly/bin.xml
index 6e17b20..cbde689 100644
--- a/modules/distribution/src/main/assembly/bin.xml
+++ b/modules/distribution/src/main/assembly/bin.xml
@@ -21,7 +21,7 @@
     <id>bin</id>

     <includeBaseDirectory>false</includeBaseDirectory>

     <formats>

-        <!--<format>tar.gz</format>-->

+        <format>tar.gz</format>

         <format>zip</format>

     </formats>

 

@@ -130,15 +130,7 @@
             <directory>src/main/bin/native</directory>

             <outputDirectory>synapse-${synapse.version}/bin/native</outputDirectory>

             <fileMode>755</fileMode>

-        </fileSet>      

-        <fileSet>

-            <directory>../../src/site/resources/images</directory>

-            <outputDirectory>synapse-${synapse.version}/docs/images</outputDirectory>

-        </fileSet>

-        <fileSet>

-            <directory>../../src/site/resources/logos</directory>

-            <outputDirectory>synapse-${synapse.version}/docs/logos</outputDirectory>

-        </fileSet>

+        </fileSet>             

         <fileSet>

             <directory>../../modules/samples/services</directory>

             <outputDirectory>synapse-${synapse.version}/samples/axis2Server/src</outputDirectory>

@@ -158,6 +150,10 @@
                 <exclude>**/*.sh</exclude>

             </excludes>

         </fileSet>

+ 	<fileSet>

+            <directory>../../target/site</directory>

+            <outputDirectory>synapse-${synapse.version}/docs</outputDirectory>            

+        </fileSet>

         <fileSet>

             <directory>../../modules/samples/src/main/scripts</directory>

             <outputDirectory>synapse-${synapse.version}/samples</outputDirectory>

@@ -189,32 +185,7 @@
         <!--</includes>-->

         <!--</fileSet>-->

     </fileSets>

-    <files>

-        <file>

-            <source>../../src/site/xdoc/Synapse_Configuration_Language.xml</source>

-            <outputDirectory>synapse-${synapse.version}/docs</outputDirectory>

-            <destName>Synapse_Configuration_Language.html</destName>

-        </file>

-        <file>

-            <source>../../src/site/xdoc/Synapse_Samples.xml</source>

-            <outputDirectory>synapse-${synapse.version}/docs</outputDirectory>

-            <destName>Synapse_Samples.html</destName>

-        </file>

-        <file>

-            <source>../../src/site/xdoc/Synapse_Samples_Setup.xml</source>

-            <outputDirectory>synapse-${synapse.version}/docs</outputDirectory>

-            <destName>Synapse_Samples_Setup.html</destName>

-        </file>

-        <file>

-            <source>../../src/site/xdoc/Synapse_QuickStart.xml</source>

-            <outputDirectory>synapse-${synapse.version}/docs</outputDirectory>

-            <destName>Synapse_QuickStart.html</destName>

-        </file>

-        <file>

-            <source>../../src/site/xdoc/Synapse_Extending.xml</source>

-            <outputDirectory>synapse-${synapse.version}/docs</outputDirectory>

-            <destName>Synapse_Extending.html</destName>

-        </file>

+    <files>        

         <file>

             <source>.empty</source>

             <outputDirectory>synapse-${synapse.version}/work/temp/sampleClient</outputDirectory>

@@ -237,12 +208,21 @@
                 <exclude>org.apache.axis2:addressing:mar</exclude>

                 <exclude>org.apache.rampart:rampart:mar</exclude>

                 <exclude>org.apache.sandesha2:sandesha2:mar</exclude>

+                <exclude>org.apache.ant:ant:jar</exclude>

+                <exclude>org.apache.ant:ant-launcher:jar</exclude>

                 <exclude>javax.servlet:servlet-api:jar</exclude>

                 <exclude>xml-apis:xml-apis:jar</exclude>

                 <exclude>xerces:xercesImpl:jar</exclude>

-                <exclude>org.apache.xerces:xercesImpl</exclude> <!-- Find the source of this -->

-                <exclude>org.apache.xerces:xml-apis</exclude>

-		        <exclude>xalan:xalan:jar</exclude>

+		        <exclude>org.apache.xerces:xercesImpl</exclude>

+		        <exclude>org.apache.xerces:xml-apis</exclude>

+                <exclude>junit:junit:jar</exclude>

+                <exclude>org.apache.mina:mina-core:jar</exclude>

+                <exclude>org.slf4j:slf4j-api:jar</exclude>

+                <exclude>org.slf4j:slf4j-jdk14:jar</exclude>

+                <exclude>org.slf4j:jcl-over-slf4j:jar</exclude>

+                <exclude>org.slf4j:log4j-over-slf4j:jar</exclude>

+                <exclude>com.oopsconsultancy:xmltask:jar</exclude>

+	    	    <exclude>xalan:xalan:jar</exclude>

                 <exclude>quickfixj:quickfixj-all:jar</exclude>

             </excludes>

         </dependencySet>

diff --git a/modules/distribution/src/main/release/BUILDING.txt b/modules/distribution/src/main/release/BUILDING.txt
index 78e809c..915d857 100644
--- a/modules/distribution/src/main/release/BUILDING.txt
+++ b/modules/distribution/src/main/release/BUILDING.txt
@@ -2,9 +2,9 @@
 
 The Synapse source code is available at http://svn.apache.org/repos/asf/webservices/synapse/trunk/java
 
-To build Synapse, you will need JDK 1.5.x., Maven 2.0.6
+To build Synapse, you will need JDK 1.5 and Maven 2.2.1 or above (Maven 3 recommended)
 
-The Synapse JARs could be built with Maven 2 as follows:
+The Synapse JARs could be built with Maven as follows:
 
   mvn clean install
 
diff --git a/modules/distribution/src/main/release/NOTICE b/modules/distribution/src/main/release/NOTICE
index 8e70298..9be38a7 100644
--- a/modules/distribution/src/main/release/NOTICE
+++ b/modules/distribution/src/main/release/NOTICE
@@ -1,9 +1,9 @@
 Apache Synapse
-Copyright (c) 2005 - 2008 The Apache Software Foundation
+Copyright (c) 2005 - 2011 The Apache Software Foundation
 
    =========================================================================
    ==  NOTICE file corresponding to the section 4 d of                    ==
-   ==  the Apache License, Version 2.0,                                   ==
+   ==  the Apache License, Version 2.1,                                   ==
    ==  in this case for the Apache Synapse distribution.                  ==
    =========================================================================
 
diff --git a/modules/distribution/src/main/release/README.txt b/modules/distribution/src/main/release/README.txt
index 0d53940..385442f 100644
--- a/modules/distribution/src/main/release/README.txt
+++ b/modules/distribution/src/main/release/README.txt
@@ -1,4 +1,4 @@
-Apache Synapse 2.0 build  (September 2010) - http://synapse.apache.org/
+Apache Synapse 2.1 build  (December 2011) - http://synapse.apache.org/
 ------------------------------------------------------------------------------------------
 
 -------------------
@@ -61,20 +61,18 @@
 Documentation can be found in the 'docs' directory included with the binary distribution 
 and in the 'src/site/resources' directory in the source distribution. 
 
-For Synapse mediation samples please see the Synapse_Quickstart.html, Synapse_Samples.html 
-and Synapse_Samples_Setup.html
+For Synapse mediation samples please see the quick_start.html and samples.html.
 
 For more information on the Synapse Configuration language syntax and usage refer to
-Synapse_Configuration_Language.html
+config.html
 
 -------------------
 Getting Started
 ===================
 
-Refer to the Synapse_Quickstart.html document to get started with Synapse in just a couple of minutes.
+Refer to the quick_start.html document to get started with Synapse in just a couple of minutes.
 
-More indepth samples could be found in Synapse_Samples_Setup.html and Synapse_Samples.html found in
-the docs directory.
+More in-depth samples could be found in samples.html found in the docs directory.
 
 The actual sample Synapse configurations could be found at <SYNAPSE>/respository/conf/sample.
 The resources sub-directory contains the sample XSLT transformations, XSD schemas, WS policies
diff --git a/modules/distribution/src/main/release/docs/endorsed_libs.txt b/modules/distribution/src/main/release/docs/endorsed_libs.txt
index 06f2e16..10229e8 100644
--- a/modules/distribution/src/main/release/docs/endorsed_libs.txt
+++ b/modules/distribution/src/main/release/docs/endorsed_libs.txt
@@ -1,3 +1,3 @@
 Place libraries which should be placed in endorsed directories here.
 
-e.g. Xerces and its dependencies (xercesImpl.jar and xml-apis.jar)
\ No newline at end of file
+e.g. Xerces
\ No newline at end of file
diff --git a/modules/distribution/src/main/release/docs/release_notes.txt b/modules/distribution/src/main/release/docs/release_notes.txt
index 3bc1a19..746c100 100644
--- a/modules/distribution/src/main/release/docs/release_notes.txt
+++ b/modules/distribution/src/main/release/docs/release_notes.txt
@@ -1,4 +1,4 @@
-Apache Synapse Enterprise Service Bus (ESB) - 1.2 Release Notes - June 2008
+Apache Synapse Enterprise Service Bus (ESB) - 2.1 Release Notes - December 2011
 
 1. Overview
     The Apache Synapse ESB is a robust, lightweight and highly scalable and distributed
@@ -18,44 +18,24 @@
     JDK 1.5.x, and Apache Maven 2.0.6 or later
 
 3. Quick start
-    Please see the docs/Synapse_Quickstart.html guide
+    Please see the docs/quick_start.html guide
 
 4. Building the Samples
-    Please see the documents docs/Synapse_Samples.html and docs/Synapse_Samples_Setup.html
+    Please see the documents docs/samples.html
 
 5. Synapse configuration language
-    Please see the document docs/Synapse_Configuration_Language.html
+    Please see the document docs/config.html
 
 6. Extending Synapse
-    Please see the document docs/Synapse_Extending.html
+    Please see the document docs/extending.html
     
 7. Known Issues and limitations
 
-  * SYNAPSE-180 Does not support throttling by concurrency within a cluster
-  * SYNAPSE-186 Does not support HTTP some of the REST operations (such as put/delete etc)
-  * SYNAPSE-181 Does not yet support JTA transactions
-  * SYNAPSE-330 Does not yet support load balancing with session affinity using SOAP sessions
-  * SYNAPSE-280 Does not preserve CDATA sections within payloads
-  * SYNAPSE-307 The XSLT mediator will not report errors encountered in a provided stylesheet
-
-  * The Synapse JMS implementation supports JMS 1.0.2b, however due to licensing issues we include
-    the JMS 1.1 spec JAR from Apache Geronimo (geronimo-jms_1.1_spec-1.1.jar) instead. If you have
-    any issues with JMS 1.0.x, please download the Sun JMS 1.0.2b JAR and replace supplied JAR from
-    Geronimo.
+  * All the know issues are reported in https://issues.apache.org/jira/browse/SYNAPSE
 
 8. Frequently asked questions
 
-  * How can I change the default logging level of Synapse?
-    Edit the lib/log4j.properties and set the line "log4j.category.org.apache.synapse=INFO" to
-    "log4j.category.org.apache.synapse=DEBUG" and restart Synapse.
-
-  * If you get an error related to WS-Security or when using it, check to ensure that your JDK
-    uses the "Unlimited Strength Jurisdiction Policy Files". These could be downloaded from
-    http://java.sun.com/javase/downloads/index_jdk5.jsp Refer to the associated documentation
-    for instructions on how to install it to your JDK.
-
-  * If you encounter issues with your JDK related to XML processing, try placing the Xerces jar
-    files xercesImpl-2.8.0.jar and xml-apis-1.3.03.jar in your <JDK>/jre/lib/endorsed/ directory.
+  * Please refer the FAQ section. (http://synapse.apache.org/faq.html)
 
 9. Reporting Problems
 
@@ -65,6 +45,33 @@
         synapse-user mailing list by sending email to user-subscribe@synapse.apache.org
 
 10. New features
+
+    The 2.1 release
+        * Support for creating and managing REST APIs with URL patterns and URI templates
+        * Define sequences and endpoints as templates and reuse seamlessly across the whole configuration
+        * Payload factory mediator for constructing custom XML payloads
+        * Recipient list endpoint
+        * HTTPD like access logging capability in the NHTTP transport
+        * Message stores and message processors for implementing complex integration patterns and advanced messaging scenarios
+        * Receiving sequence support in the send mediator to make service chaining easier
+        * Conditional Router mediator
+
+
+    The 2.0 release
+        * New, fine-grained configuration model
+        * Hot deployment and hot update support for configuration artifacts
+        * Priority based mediation support
+        * Comprehensive eventing capabilities with WS-Eventing support
+        * Secure vault for encrypting passwords in configuration files
+        * File locking support in the VFS transport for concurrent polling
+        * URLRewrite mediator for fast and simple URL rewriting
+        * Synapse configuration observer API
+        * Multiple identity support in the HTTPS transport
+        * Enhanced JMX monitoring support for the NHTTP transport
+        * Dead letter channel implementation (experimental)
+        * Synapse XAR Maven plugin for generating configuration artifacts
+
+
     The 1.2 release
         * Support for Hessian binary messages
         * FIX (Financial Information eXchange) protocol transport
@@ -73,7 +80,7 @@
         * Support for GZip encoding and HTTP 100 continue
         * Natural support for dual channel messaging with WS-Addressing
         * Cluster aware sticky load balancing support
-        * Non-blocking streaming of large messages at high concurreny with constant memory usage
+        * Non-blocking streaming of large messages at high concurrency with constant memory usage
         * Support for an ELSE clause for the Filter mediator
         * Ability to specify XPath expressions relative to the envelope or body
         * Support for separate policies for incoming/outgoing messages
@@ -112,6 +119,6 @@
     The 0.90 release adds support for:
         * WS-Security termination and initiation
         * WS-ReliableMessaging termination and initiation
-        * Support for dynamic reloading and remote reigstries
+        * Support for dynamic reloading and remote registries
         * Scripting mediators based on Apache BSF
         * Refactored and cleaner synapse configuration xml
diff --git a/modules/experimental/pom.xml b/modules/experimental/pom.xml
index b89c34d..bf315fc 100644
--- a/modules/experimental/pom.xml
+++ b/modules/experimental/pom.xml
@@ -1,77 +1,75 @@
-<?xml version="1.0" encoding="UTF-8"?>

-<!--

-  ~  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.

-  -->

-

-<project

-    xmlns="http://maven.apache.org/POM/4.0.0"

-    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

-    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

-    <modelVersion>4.0.0</modelVersion>

-    <parent>

-        <groupId>org.apache.synapse</groupId>

-        <artifactId>Apache-Synapse</artifactId>

-        <version>2.2.0-SNAPSHOT</version>

-        <relativePath>../../pom.xml</relativePath>

-    </parent>

-

-    <groupId>org.apache.synapse</groupId>

-    <artifactId>synapse-experimental</artifactId>

-    

-    <name>Apache Synapse - Experimental code</name>

-    <description>Apache Synapse - Experimental code (use at your own risk!)</description>

-    <packaging>bundle</packaging>

-

-    <scm>

-        <connection>scm:svn:http://svn.apache.org/repos/asf/synapse/trunk/java/modules/experimental</connection>

-        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/synapse/trunk/java/modules/experimental</developerConnection>

-        <url>http://svn.apache.org/viewvc/synapse/trunk/java/modules/experimental</url>

-    </scm>

-

-    <build>

-        <plugins>

-            <plugin>

-                <groupId>org.apache.felix</groupId>

-                <artifactId>maven-bundle-plugin</artifactId>

-                <extensions>true</extensions>

-                <configuration>

-                    <instructions>

-                        <Bundle-SymbolicName>${pom.artifactId}</Bundle-SymbolicName>

-                        <Export-Package>

-                            org.apache.synapse.experimental.*,

-                        </Export-Package>

-                        <Import-Package>

-                            !javax.xml.namespace,

-                            javax.xml.namespace; version=0.0.0,

-                            *;resolution:=optional,

-                        </Import-Package>

-                        <DynamicImport-Package>*</DynamicImport-Package>

-                    </instructions>

-                </configuration>

-            </plugin>

-        </plugins>

-    </build>

-

-    <dependencies>

-        <dependency>

-            <groupId>org.apache.synapse</groupId>

-            <artifactId>synapse-core</artifactId>

-        </dependency>

-    </dependencies>

-

-</project>

+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~  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.
+  -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.apache.synapse</groupId>
+        <artifactId>Apache-Synapse</artifactId>
+        <version>2.1.0</version>
+        <relativePath>../../pom.xml</relativePath>
+    </parent>
+
+    <groupId>org.apache.synapse</groupId>
+    <artifactId>synapse-experimental</artifactId>
+    
+    <name>Apache Synapse - Experimental code</name>
+    <description>Apache Synapse - Experimental code (use at your own risk!)</description>
+    <packaging>bundle</packaging>
+
+    <scm>
+        <connection>scm:svn:http://svn.apache.org/repos/asf/synapse/tags/2.1.0/modules/experimental</connection>
+        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/synapse/tags/2.1.0/modules/experimental</developerConnection>
+        <url>http://svn.apache.org/viewvc/synapse/tags/2.1.0/modules/experimental</url>
+    </scm>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+                <version>1.4.0</version>
+                <extensions>true</extensions>
+                <configuration>
+                    <instructions>
+                        <Bundle-SymbolicName>${pom.artifactId}</Bundle-SymbolicName>
+                        <Export-Package>
+                            org.apache.synapse.experimental.*,
+                        </Export-Package>
+                        <Import-Package>
+                            !javax.xml.namespace,
+                            javax.xml.namespace; version=0.0.0,
+                            *;resolution:=optional,
+                        </Import-Package>
+                        <DynamicImport-Package>*</DynamicImport-Package>
+                    </instructions>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.synapse</groupId>
+            <artifactId>synapse-core</artifactId>
+        </dependency>
+    </dependencies>
+
+</project>
diff --git a/modules/extensions/pom.xml b/modules/extensions/pom.xml
index 3276da2..079feb2 100644
--- a/modules/extensions/pom.xml
+++ b/modules/extensions/pom.xml
@@ -18,15 +18,12 @@
   ~  under the License.
   -->
 
-<project
-    xmlns="http://maven.apache.org/POM/4.0.0"
-    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
     <modelVersion>4.0.0</modelVersion>
     <parent>
         <groupId>org.apache.synapse</groupId>
         <artifactId>Apache-Synapse</artifactId>
-        <version>2.2.0-SNAPSHOT</version>
+        <version>2.1.0</version>
         <relativePath>../../pom.xml</relativePath>
     </parent>
 
@@ -38,20 +35,29 @@
     <packaging>bundle</packaging>
 
     <scm>
-        <connection>scm:svn:http://svn.apache.org/repos/asf/synapse/trunk/java/modules/extensions</connection>
-        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/synapse/trunk/java/modules/extensions</developerConnection>
-        <url>http://svn.apache.org/viewvc/synapse/trunk/java/modules/extensions</url>
+        <connection>scm:svn:http://svn.apache.org/repos/asf/synapse/tags/2.1.0/modules/extensions</connection>
+        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/synapse/tags/2.1.0/modules/extensions</developerConnection>
+        <url>http://svn.apache.org/viewvc/synapse/tags/2.1.0/modules/extensions</url>
     </scm>
 
     <build>
         <plugins>
+
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-surefire-plugin</artifactId>
+                <version>2.2</version>
+                <configuration>
+                    <excludes>
+                        <exclude>org/apache/synapse/mediators/throttle/ThrottleMediatorTest.java</exclude>
+                    </excludes>                    
+                </configuration>
             </plugin>
+
             <plugin>
                 <groupId>org.apache.felix</groupId>
                 <artifactId>maven-bundle-plugin</artifactId>
+                <version>1.4.0</version>
                 <extensions>true</extensions>
                 <configuration>
                     <instructions>
@@ -81,6 +87,7 @@
                     </instructions>
                 </configuration>
             </plugin>
+
         </plugins>
     </build>
 
@@ -89,60 +96,221 @@
             <groupId>org.apache.synapse</groupId>
             <artifactId>synapse-core</artifactId>
         </dependency>
+        
         <dependency>
             <groupId>org.apache.synapse</groupId>
             <artifactId>synapse-core</artifactId>
+            <version>${project.version}</version>
             <classifier>tests</classifier>
+            <scope>test</scope>
         </dependency>
+
         <dependency>
             <groupId>org.springframework</groupId>
             <artifactId>spring-core</artifactId>
+            <version>${spring.version}</version>
         </dependency>
         <dependency>
             <groupId>org.springframework</groupId>
             <artifactId>spring-beans</artifactId>
+            <version>${spring.version}</version>
         </dependency>
         <dependency>
             <groupId>org.springframework</groupId>
             <artifactId>spring-context</artifactId>
+            <version>${spring.version}</version>
         </dependency>
         <dependency>
             <groupId>xmlbeans</groupId>
             <artifactId>xbean</artifactId>
-        </dependency>
-        <dependency>
-             <groupId>net.sf.saxon</groupId>
-             <artifactId>saxon</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-             <groupId>net.sf.saxon</groupId>
-             <artifactId>saxon-xqj</artifactId>
+            <version>${xbean.version}</version>
         </dependency>
         <dependency>
             <groupId>org.apache.bsf</groupId>
             <artifactId>bsf-all</artifactId>
+            <version>${bsf.version}</version>
         </dependency>
-        <dependency>
-            <groupId>org.jruby</groupId>
-            <artifactId>jruby-complete</artifactId>
-        </dependency>
+	<dependency>
+	    <groupId>org.jruby</groupId>
+	    <artifactId>jruby-complete</artifactId>
+	    <version>${jruby.version}</version>
+	    <scope>test</scope>
+	</dependency>
         <dependency>
             <groupId>groovy</groupId>
             <artifactId>groovy-all</artifactId>
+            <version>${groovy.version}</version>
+            <exclusions>
+                <exclusion>
+                    <groupId>xerces</groupId>
+                    <artifactId>xerces</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>commons-cli</groupId>
+                    <artifactId>commons-cli</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>ant</groupId>
+                    <artifactId>ant</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>ant</groupId>
+                    <artifactId>ant-junit</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>ant</groupId>
+                    <artifactId>ant-launcher</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>mockobjects</groupId>
+                    <artifactId>mockobjects-core</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>junit</groupId>
+                    <artifactId>junit</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>jmock</groupId>
+                    <artifactId>jmock</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>jmock</groupId>
+                    <artifactId>jmock-cglib</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>cglib</groupId>
+                    <artifactId>cglib-nodep</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>bsf</groupId>
+                    <artifactId>bsf</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>mx4j</groupId>
+                    <artifactId>mx4j</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>openejb</groupId>
+                    <artifactId>openejb-loader</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>axion</groupId>
+                    <artifactId>axion</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>commons-primitives</groupId>
+                    <artifactId>commons-primitives</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>regexp</groupId>
+                    <artifactId>regexp</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>javax.servlet</groupId>
+                    <artifactId>servlet-api</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>radeox</groupId>
+                    <artifactId>radeox</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>radeox</groupId>
+                    <artifactId>radeox-oro</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>nekohtml</groupId>
+                    <artifactId>nekohtml</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>qdox</groupId>
+                    <artifactId>qdox</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>xstream</groupId>
+                    <artifactId>xstream</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>qdox</groupId>
+                    <artifactId>qdox</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>xpp3</groupId>
+                    <artifactId>xpp3</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>com.tonicsystems</groupId>
+                    <artifactId>jarjar</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>javax.servlet</groupId>
+                    <artifactId>jsp-api</artifactId>
+                </exclusion>
+            </exclusions>
         </dependency>
         <dependency>
             <groupId>org.wso2.throttle</groupId>
             <artifactId>wso2throttle-core</artifactId>
+            <version>${wso2throttle.version}</version>
+            <type>jar</type>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.apache.axis2</groupId>
+                    <artifactId>axis2-kernel</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.apache.axis2</groupId>
+                    <artifactId>axis2</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.apache.axis2</groupId>
+                    <artifactId>axis2-adb</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.apache.axis2</groupId>
+                    <artifactId>axis2-clustering</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.apache.neethi</groupId>
+                    <artifactId>neethi</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.apache.ws.commons.axiom</groupId>
+                    <artifactId>axiom-impl</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.apache.ws.commons.axiom</groupId>
+                    <artifactId>axiom-api</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.apache.ws.commons.axiom</groupId>
+                    <artifactId>axiom-dom</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>javax.servlet</groupId>
+                    <artifactId>servlet-api</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.apache.ant</groupId>
+                    <artifactId>ant-nodeps</artifactId>
+                </exclusion>
+            </exclusions>
         </dependency>
-        <dependency>
-            <groupId>rhino</groupId>
-            <artifactId>js</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>xerces</groupId>
-            <artifactId>xercesImpl</artifactId>
-        </dependency>
-    </dependencies>
 
+        <!--For Axiom/E4X -->
+        <!--<dependency>
+            <groupId>org.wso2.javascript.rhino</groupId>
+            <artifactId>js-axiom</artifactId>
+            <version>SNAPSHOT</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.mozilla.javascript</groupId>
+            <artifactId>js-core</artifactId>
+            <version>SNAPSHOT</version>
+        </dependency>-->
+    </dependencies>
+    
+    <properties>
+        <spring.version>1.2.8</spring.version>
+    </properties>
 </project>
diff --git a/modules/extensions/src/main/java/org/apache/synapse/mediators/throttle/ThrottleMediator.java b/modules/extensions/src/main/java/org/apache/synapse/mediators/throttle/ThrottleMediator.java
index c7362aa..4c72f77 100644
--- a/modules/extensions/src/main/java/org/apache/synapse/mediators/throttle/ThrottleMediator.java
+++ b/modules/extensions/src/main/java/org/apache/synapse/mediators/throttle/ThrottleMediator.java
@@ -132,7 +132,7 @@
 
             // Throttle only will be created ,if the massage flow is IN
             if (!isResponse) {
-                //check the availability of the ConcurrentAccessController
+                //check the availability of the ConcurrentAccessControler
                 //if this is a clustered environment
                 if (isClusteringEnable) {
                     concurrentAccessController =
@@ -212,8 +212,7 @@
 
                                     try {
                                         // Creates the throttle from the policy
-                                        throttle = ThrottleFactory.createMediatorThrottle(
-                                                (OMElement) entryValue);
+                                        throttle = ThrottleFactory.createMediatorThrottle((OMElement) entryValue);
 
                                         //For non-clustered  environment , must re-initiates
                                         //For  clustered  environment,
diff --git a/modules/extensions/src/test/java/org/apache/synapse/mediators/throttle/ThrottleMediatorTest.java b/modules/extensions/src/test/java/org/apache/synapse/mediators/throttle/ThrottleMediatorTest.java
index 0d7af54..208e189 100644
--- a/modules/extensions/src/test/java/org/apache/synapse/mediators/throttle/ThrottleMediatorTest.java
+++ b/modules/extensions/src/test/java/org/apache/synapse/mediators/throttle/ThrottleMediatorTest.java
@@ -24,6 +24,7 @@
 import org.apache.axiom.om.OMElement;
 import org.apache.axiom.om.impl.builder.StAXOMBuilder;
 import org.apache.axiom.soap.SOAPEnvelope;
+import org.apache.neethi.PolicyEngine;
 import org.apache.synapse.MessageContext;
 import org.apache.synapse.SynapseException;
 import org.apache.synapse.config.Entry;
@@ -51,6 +52,7 @@
     private static final String POLICY = " <wsp:Policy xmlns:wsp=\"http://schemas.xmlsoap.org/ws/2004/09/policy\"\n" +
             "                xmlns:throttle=\"http://www.wso2.org/products/wso2commons/throttle\">\n" +
             "        <throttle:ThrottleAssertion>\n" +
+            "            <throttle:MaximumConcurrentAccess>10</throttle:MaximumConcurrentAccess>\n" +
             "            <wsp:All>\n" +
             "                <throttle:ID throttle:type=\"IP\">other</throttle:ID>\n" +
             "                <wsp:ExactlyOne>\n" +
@@ -59,6 +61,7 @@
             "                        <throttle:UnitTime>800000</throttle:UnitTime>\n" +
             "                        <throttle:ProhibitTimePeriod wsp:Optional=\"true\">10</throttle:ProhibitTimePeriod>\n" +
             "                    </wsp:All>\n" +
+            "                    <throttle:IsAllow>true</throttle:IsAllow>\n" +
             "                </wsp:ExactlyOne>\n" +
             "            </wsp:All>\n" +
             "            <wsp:All>\n" +
@@ -69,6 +72,7 @@
             "                        <throttle:UnitTime>800000</throttle:UnitTime>\n" +
             "                        <throttle:ProhibitTimePeriod wsp:Optional=\"true\">10000</throttle:ProhibitTimePeriod>\n" +
             "                    </wsp:All>\n" +
+            "                    <throttle:IsAllow>true</throttle:IsAllow>\n" +
             "                </wsp:ExactlyOne>\n" +
             "            </wsp:All>\n" +
             "            <wsp:All>\n" +
@@ -79,6 +83,7 @@
             "                        <throttle:UnitTime>600000</throttle:UnitTime>\n" +
             "                        <throttle:ProhibitTimePeriod wsp:Optional=\"true\"></throttle:ProhibitTimePeriod>\n" +
             "                    </wsp:All>\n" +
+            "                    <throttle:IsAllow>true</throttle:IsAllow>\n" +
             "                </wsp:ExactlyOne>\n" +
             "            </wsp:All>\n" +
             "            <wsp:All>\n" +
@@ -89,6 +94,7 @@
             "                        <throttle:UnitTime>500000</throttle:UnitTime>\n" +
             "                        <throttle:ProhibitTimePeriod wsp:Optional=\"true\"></throttle:ProhibitTimePeriod>\n" +
             "                    </wsp:All>\n" +
+            "                    <throttle:IsAllow>true</throttle:IsAllow>\n" +
             "                </wsp:ExactlyOne>\n" +
             "            </wsp:All>\n" +
             "        </throttle:ThrottleAssertion>\n" +
@@ -188,7 +194,7 @@
 
     public void testMediate() throws Exception {
         ByteArrayInputStream in = new ByteArrayInputStream(POLICY.getBytes());
-        StAXOMBuilder builder = new StAXOMBuilder(in);
+        StAXOMBuilder builde = new StAXOMBuilder(in);
         ThrottleTestMediator throttleMediator = new ThrottleTestMediator();
         throttleMediator.setPolicyKey("throttlepolicy");
         MessageContext synCtx = createLightweightSynapseMessageContext("<empty/>");
@@ -197,7 +203,7 @@
         Entry prop = new Entry();
         prop.setKey("throttlepolicy");
         prop.setType(Entry.INLINE_XML);
-        prop.setValue(builder.getDocumentElement());
+        prop.setValue(builde.getDocumentElement());
         synCfg.addEntry("throttlepolicy", prop);
         synCtx.setConfiguration(synCfg);
         for (int i = 0; i < 6; i++) {
@@ -222,7 +228,7 @@
     }
 
     public void testMediateWithInLineXML() throws Exception {
-        ByteArrayInputStream in = new ByteArrayInputStream(POLICY.getBytes());
+        ByteArrayInputStream in = new ByteArrayInputStream(NEW_POLICY.getBytes());
         StAXOMBuilder build = new StAXOMBuilder(in);
         ThrottleTestMediator throttleMediator = new ThrottleTestMediator();
         throttleMediator.setInLinePolicy(build.getDocumentElement());
@@ -262,7 +268,7 @@
 
             init(synCtx);
             try {
-                return canAccess(synCtx);
+                return canAcess(synCtx);
             }
             catch (
                     ThrottleException e) {
@@ -271,7 +277,7 @@
 
         }
 
-        protected boolean canAccess(MessageContext synContext)
+        protected boolean canAcess(MessageContext synContext)
                 throws SynapseException, ThrottleException {
 
             if (throttle == null) {
@@ -283,20 +289,20 @@
             if (remoteIP == null) {
                 throw new ThrottleException("IP address of the caller can not find - " +
                         "Currently only support caller-IP base access control" +
-                        "- Throttling will not happen ");
+                        "- Thottling will not happen ");
 
             } else {
                 ThrottleContext throttleContext
                         = throttle.getThrottleContext(ThrottleConstants.IP_BASED_THROTTLE_KEY);
                 if (throttleContext == null) {
-                    throw new ThrottleException("Can not find a configuration for " +
+                    throw new ThrottleException("Can not find a configuartion for " +
                             "IP Based Throttle");
 
                 }
-                AccessRateController accessController;
+                AccessRateController accessControler;
                 try {
-                    accessController = new AccessRateController();
-                    boolean canAccess = accessController.canAccess(
+                    accessControler = new AccessRateController();
+                    boolean canAccess = accessControler.canAccess(
                             throttleContext, remoteIP, ThrottleConstants.IP_BASE).isAccessAllowed();
                     if (!canAccess) {
                         throw new SynapseException("Access has currently been denied by" +
@@ -350,7 +356,8 @@
         protected void createThrottleMetaData(OMElement policyOmElement) {
 
             try {
-                throttle = ThrottleFactory.createMediatorThrottle(policyOmElement);
+                throttle = ThrottleFactory.createMediatorThrottle(
+                        PolicyEngine.getPolicy(policyOmElement));
             }
             catch (ThrottleException e) {
 
diff --git a/modules/handler/pom.xml b/modules/handler/pom.xml
index d13899a..ee2c54e 100644
--- a/modules/handler/pom.xml
+++ b/modules/handler/pom.xml
@@ -18,15 +18,12 @@
   ~  under the License.
   -->
 
-<project
-        xmlns="http://maven.apache.org/POM/4.0.0"
-        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-        xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
     <modelVersion>4.0.0</modelVersion>
     <parent>
         <groupId>org.apache.synapse</groupId>
         <artifactId>Apache-Synapse</artifactId>
-        <version>2.2.0-SNAPSHOT</version>
+        <version>2.1.0</version>
         <relativePath>../../pom.xml</relativePath>
     </parent>
 
@@ -38,16 +35,19 @@
     <packaging>bundle</packaging>
 
     <scm>
-        <connection>scm:svn:http://svn.apache.org/repos/asf/synapse/trunk/java/modules/handler</connection>
-        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/synapse/trunk/java/modules/handler</developerConnection>
-        <url>http://svn.apache.org/viewvc/synapse/trunk/java/modules/handler</url>
+        <connection>scm:svn:http://svn.apache.org/repos/asf/synapse/tags/2.1.0/modules/handler</connection>
+        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/synapse/tags/2.1.0/modules/handler</developerConnection>
+        <url>http://svn.apache.org/viewvc/synapse/tags/2.1.0/modules/handler</url>
     </scm>
 
     <build>
+
         <plugins>
+
             <plugin>
                 <groupId>org.apache.felix</groupId>
                 <artifactId>maven-bundle-plugin</artifactId>
+                <version>1.4.0</version>
                 <extensions>true</extensions>
                 <configuration>
                     <instructions>
@@ -65,17 +65,18 @@
                     </instructions>
                 </configuration>
             </plugin>
+
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-antrun-plugin</artifactId>
+                <version>1.1</version>
                 <executions>
                     <execution>
                         <id>mar</id>
                         <phase>package</phase>
                         <configuration>
                             <tasks>
-                                <copy file="target/synapse-handler-${synapse.version}.jar"
-                                      tofile="target/synapse-handler-${synapse.version}.mar"/>
+                                <copy file="target/synapse-handler-${synapse.version}.jar" tofile="target/synapse-handler-${synapse.version}.mar" />
                             </tasks>
                         </configuration>
                         <goals>
@@ -84,9 +85,11 @@
                     </execution>
                 </executions>
             </plugin>
+
             <plugin>
                 <groupId>org.codehaus.mojo</groupId>
                 <artifactId>build-helper-maven-plugin</artifactId>
+                <version>1.0</version>
                 <executions>
                     <execution>
                         <id>mar</id>
diff --git a/modules/integration/pom.xml b/modules/integration/pom.xml
index fc03941..25d5fb3 100644
--- a/modules/integration/pom.xml
+++ b/modules/integration/pom.xml
@@ -18,15 +18,12 @@
   ~  under the License.
   -->
 
-<project
-        xmlns="http://maven.apache.org/POM/4.0.0"
-        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-        xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
     <modelVersion>4.0.0</modelVersion>
     <parent>
         <groupId>org.apache.synapse</groupId>
         <artifactId>Apache-Synapse</artifactId>
-        <version>2.2.0-SNAPSHOT</version>
+        <version>2.1.0</version>
         <relativePath>../../pom.xml</relativePath>
     </parent>
 
@@ -38,197 +35,200 @@
     <!--<packaging>bundle</packaging>-->
 
     <scm>
-        <connection>scm:svn:http://svn.apache.org/repos/asf/synapse/trunk/java/modules/integration</connection>
-        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/synapse/trunk/java/modules/integration</developerConnection>
-        <url>http://svn.apache.org/viewvc/synapse/trunk/java/modules/integration</url>
+        <connection>scm:svn:http://svn.apache.org/repos/asf/synapse/tags/2.1.0/modules/integration</connection>
+        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/synapse/tags/2.1.0/modules/integration</developerConnection>
+        <url>http://svn.apache.org/viewvc/synapse/tags/2.1.0/modules/integration</url>
     </scm>
 
     <build>
         <plugins>
+
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-antrun-plugin</artifactId>
+                <version>1.6</version>
                 <executions>
                     <execution>
                         <id>create_repo</id>
                         <phase>generate-test-resources</phase>
                         <configuration>
                             <tasks>
-                                <echo message="*** Creating testing repositories for synapse samples"/>
-                                <mkdir dir="target/test_repos"/>
-                                <mkdir dir="target/test_repos/axis2Server"/>
-                                <mkdir dir="target/test_repos/axis2Client"/>
-                                <mkdir dir="target/test_repos/synapse"/>
-                                <mkdir dir="target/test_repos/synapse"/>
-                                <mkdir dir="target/test_repos/synapse/modules"/>
-                                <mkdir dir="target/test_repos/synapse/conf"/>
-                                <mkdir dir="target/test_repos/axis2Server/services"/>
-                                <mkdir dir="target/test_repos/axis2Server/modules"/>
-                                <mkdir dir="target/test_repos/axis2Server/conf"/>
-                                <mkdir dir="target/test_repos/axis2Client/modules"/>
-                                <mkdir dir="target/test_repos/axis2Client/conf"/>
+                                <echo message="*** Creating testing repositories for synapse samples" />
+
+                                <mkdir dir="target/test_repos" />
+                                <mkdir dir="target/test_repos/axis2Server" />
+                                <mkdir dir="target/test_repos/axis2Client" />
+                                <mkdir dir="target/test_repos/synapse" />
+                                <mkdir dir="target/test_repos/synapse" />
+                                <mkdir dir="target/test_repos/synapse/modules" />
+                                <mkdir dir="target/test_repos/synapse/conf" />
+                                <mkdir dir="target/test_repos/axis2Server/services" />
+                                <mkdir dir="target/test_repos/axis2Server/modules" />
+                                <mkdir dir="target/test_repos/axis2Server/conf" />
+                                <mkdir dir="target/test_repos/axis2Client/modules" />
+                                <mkdir dir="target/test_repos/axis2Client/conf" />
 
                                 <copy todir="target/test_repos/axis2Server/conf/">
                                     <fileset dir="src/test/resources/axis2Xml/axis2Server">
-                                        <include name="*.xml"/>
+                                        <include name="*.xml" />
                                     </fileset>
                                 </copy>
                                 <copy todir="target/test_repos/synapse/conf/">
                                     <fileset dir="src/test/resources/axis2Xml/synapse">
-                                        <include name="*.xml"/>
+                                        <include name="*.xml" />
                                     </fileset>
                                 </copy>
                                 <copy todir="target/test_repos/axis2Client/conf/">
                                     <fileset dir="src/test/resources/axis2Xml/axis2Client">
-                                        <include name="*.xml"/>
+                                        <include name="*.xml" />
                                     </fileset>
                                 </copy>
 
                                 <!--<copy file="src/test/resources/trust.jks"-->
-                                <!--tofile="target/test_repos/synapse/conf/trust.jks"/>-->
+                                <!--tofile="target/test_repos/synapse/conf/trust.jks" />-->
                                 <!--<copy file="src/test/resources/identity.jks"-->
-                                <!--tofile="target/test_repos/synapse/conf/identity.jks"/>-->
+                                <!--tofile="target/test_repos/synapse/conf/identity.jks" />-->
                                 <!--<copy file="../core/src/test/resources/keystore.jks"-->
-                                <!--tofile="target/test_repos/synapse/conf/keystore.jks"/>-->
+                                <!--tofile="target/test_repos/synapse/conf/keystore.jks" />-->
 
-                                <property name="temp.dir" value="target/temp"/>
-                                <property name="classes" value="${temp.dir}/classes"/>
-                                <property name="services" value="target/test_repos/axis2Server/services"/>
+                                <property name="temp.dir" value="target/temp" />
+                                <property name="classes" value="${temp.dir}/classes" />
+                                <property name="services" value="target/test_repos/axis2Server/services" />
 
-                                <property name="src" value="../samples/services/SimpleStockQuoteService/src"/>
+                                <property name="src" value="../samples/services/SimpleStockQuoteService/src" />
 
-                                <mkdir dir="${temp.dir}"/>
-                                <mkdir dir="${classes}"/>
+                                <mkdir dir="${temp.dir}" />
+                                <mkdir dir="${classes}" />
 
                                 <javac debug="on" destdir="${classes}" fork="true" includeantruntime="false">
-                                    <src path="${src}"/>
-                                    <classpath refid="maven.compile.classpath"/>
+                                    <src path="${src}" />
+                                    <classpath refid="maven.compile.classpath" />
                                 </javac>
 
-                                <property name="SSQ.dir" value="${temp.dir}/SimpleStockQuote"/>
-                                <mkdir dir="${SSQ.dir}"/>
+                                <property name="SSQ.dir" value="${temp.dir}/SimpleStockQuote" />
+                                <mkdir dir="${SSQ.dir}" />
 
-                                <mkdir dir="${SSQ.dir}/META-INF"/>
-                                <copy file="${src}/../conf/services.xml" tofile="${SSQ.dir}/META-INF/services.xml"/>
+                                <mkdir dir="${SSQ.dir}/META-INF" />
+                                <copy file="${src}/../conf/services.xml" tofile="${SSQ.dir}/META-INF/services.xml" />
                                 <!--<copy file="${src}/../wsdl/SimpleStockQuoteService.wsdl"-->
-                                <!--tofile="${SSQ.dir}/META-INF/service.wsdl"/>-->
+                                <!--tofile="${SSQ.dir}/META-INF/service.wsdl" />-->
                                 <copy toDir="${SSQ.dir}">
                                     <fileset dir="${classes}">
-                                        <include name="**/*.class"/>
+                                        <include name="**/*.class" />
                                     </fileset>
                                 </copy>
 
                                 <jar destfile="${services}/SimpleStockQuoteService.aar">
-                                    <fileset dir="${SSQ.dir}"/>
+                                    <fileset dir="${SSQ.dir}" />
                                 </jar>
 
-                                <property name="src2" value="../samples/services/SecureStockQuoteService/src"/>
-                                <delete dir="${temp.dir}"/>
-                                <mkdir dir="${temp.dir}"/>
-                                <mkdir dir="${classes}"/>
+                                <property name="src2" value="../samples/services/SecureStockQuoteService/src" />
+                                <delete dir="${temp.dir}" />
+                                <mkdir dir="${temp.dir}" />
+                                <mkdir dir="${classes}" />
                                 <javac debug="on" destdir="${classes}" fork="true" includeantruntime="false">
-                                    <src path="${src2}"/>
-                                    <classpath refid="maven.compile.classpath"/>
+                                    <src path="${src2}" />
+                                    <classpath refid="maven.compile.classpath" />
                                 </javac>
-                                <property name="SSQ2.dir" value="${temp.dir}/SecureStockQuoteService"/>
-                                <mkdir dir="${SSQ2.dir}"/>
-                                <mkdir dir="${SSQ2.dir}/META-INF"/>
-                                <copy file="${src2}/../conf/services.xml" tofile="${SSQ2.dir}/META-INF/services.xml"/>
+                                <property name="SSQ2.dir" value="${temp.dir}/SecureStockQuoteService" />
+                                <mkdir dir="${SSQ2.dir}" />
+                                <mkdir dir="${SSQ2.dir}/META-INF" />
+                                <copy file="${src2}/../conf/services.xml" tofile="${SSQ2.dir}/META-INF/services.xml" />
                                 <!--<copy file="${src2}/../wsdl/SimpleStockQuoteService.wsdl"-->
-                                <!--tofile="${SSQ2.dir}/META-INF/service.wsdl"/>-->
-                                <copy file="${src2}/../store.jks" tofile="${SSQ2.dir}/store.jks"/>
+                                <!--tofile="${SSQ2.dir}/META-INF/service.wsdl" />-->
+                                <copy file="${src2}/../store.jks" tofile="${SSQ2.dir}/store.jks" />
                                 <copy toDir="${SSQ2.dir}">
                                     <fileset dir="${classes}">
-                                        <include name="**/*.class"/>
+                                        <include name="**/*.class" />
                                     </fileset>
                                 </copy>
                                 <jar destfile="${services}/SecureStockQuoteService.aar">
-                                    <fileset dir="${SSQ2.dir}"/>
+                                    <fileset dir="${SSQ2.dir}" />
                                 </jar>
 
-                                <property name="src3" value="../samples/services/MTOMSwASampleService/src"/>
-                                <delete dir="${temp.dir}"/>
-                                <mkdir dir="${temp.dir}"/>
-                                <mkdir dir="${classes}"/>
+                                <property name="src3" value="../samples/services/MTOMSwASampleService/src" />
+                                <delete dir="${temp.dir}" />
+                                <mkdir dir="${temp.dir}" />
+                                <mkdir dir="${classes}" />
                                 <javac debug="on" destdir="${classes}" fork="true" includeantruntime="false">
-                                    <src path="${src3}"/>
-                                    <classpath refid="maven.compile.classpath"/>
+                                    <src path="${src3}" />
+                                    <classpath refid="maven.compile.classpath" />
                                 </javac>
-                                <property name="SSQ3.dir" value="${temp.dir}/MTOMSwASampleService"/>
-                                <mkdir dir="${SSQ3.dir}"/>
-                                <mkdir dir="${SSQ3.dir}/META-INF"/>
-                                <copy file="${src3}/../conf/services.xml" tofile="${SSQ3.dir}/META-INF/services.xml"/>
+                                <property name="SSQ3.dir" value="${temp.dir}/MTOMSwASampleService" />
+                                <mkdir dir="${SSQ3.dir}" />
+                                <mkdir dir="${SSQ3.dir}/META-INF" />
+                                <copy file="${src3}/../conf/services.xml" tofile="${SSQ3.dir}/META-INF/services.xml" />
                                 <copy toDir="${SSQ3.dir}">
                                     <fileset dir="${classes}">
-                                        <include name="**/*.class"/>
+                                        <include name="**/*.class" />
                                     </fileset>
                                 </copy>
                                 <jar destfile="${services}/MTOMSwASampleService.aar">
-                                    <fileset dir="${SSQ3.dir}"/>
+                                    <fileset dir="${SSQ3.dir}" />
                                 </jar>
 
-                                <property name="src4" value="../samples/services/ReliableStockQuoteService/src"/>
-                                <delete dir="${temp.dir}"/>
-                                <mkdir dir="${temp.dir}"/>
-                                <mkdir dir="${classes}"/>
+                                <property name="src4" value="../samples/services/ReliableStockQuoteService/src" />
+                                <delete dir="${temp.dir}" />
+                                <mkdir dir="${temp.dir}" />
+                                <mkdir dir="${classes}" />
                                 <javac debug="on" destdir="${classes}" fork="true" includeantruntime="false">
-                                    <src path="${src4}"/>
-                                    <classpath refid="maven.compile.classpath"/>
+                                    <src path="${src4}" />
+                                    <classpath refid="maven.compile.classpath" />
                                 </javac>
-                                <property name="RSQ.dir" value="${temp.dir}/ReliableStockQuoteService"/>
-                                <mkdir dir="${RSQ.dir}"/>
+                                <property name="RSQ.dir" value="${temp.dir}/ReliableStockQuoteService" />
+                                <mkdir dir="${RSQ.dir}" />
 
-                                <mkdir dir="${RSQ.dir}/META-INF"/>
-                                <copy file="${src4}/../conf/services.xml" tofile="${RSQ.dir}/META-INF/services.xml"/>
+                                <mkdir dir="${RSQ.dir}/META-INF" />
+                                <copy file="${src4}/../conf/services.xml" tofile="${RSQ.dir}/META-INF/services.xml" />
                                 <!--<copy file="${src4}/../wsdl/ReliableStockQuoteService.wsdl"-->
-                                <!--tofile="${RSQ.dir}/META-INF/service.wsdl"/>-->
+                                <!--tofile="${RSQ.dir}/META-INF/service.wsdl" />-->
                                 <copy toDir="${RSQ.dir}">
                                     <fileset dir="${classes}">
-                                        <include name="**/*.class"/>
+                                        <include name="**/*.class" />
                                     </fileset>
                                 </copy>
 
                                 <jar destfile="${services}/ReliableStockQuoteService.aar">
-                                    <fileset dir="${RSQ.dir}"/>
+                                    <fileset dir="${RSQ.dir}" />
                                 </jar>
 
-                                <property name="src5" value="../samples/services/LoadbalanceFailoverService/src"/>
-                                <delete dir="${temp.dir}"/>
-                                <mkdir dir="${temp.dir}"/>
-                                <mkdir dir="${classes}"/>
+                                <property name="src5" value="../samples/services/LoadbalanceFailoverService/src" />
+                                <delete dir="${temp.dir}" />
+                                <mkdir dir="${temp.dir}" />
+                                <mkdir dir="${classes}" />
                                 <javac debug="on" destdir="${classes}" fork="true" includeantruntime="false">
-                                    <src path="${src5}"/>
-                                    <classpath refid="maven.compile.classpath"/>
+                                    <src path="${src5}" />
+                                    <classpath refid="maven.compile.classpath" />
                                 </javac>
 
-                                <property name="LBFA1.dir" value="${temp.dir}/LBService1"/>
-                                <mkdir dir="${LBFA1.dir}"/>
+                                <property name="LBFA1.dir" value="${temp.dir}/LBService1" />
+                                <mkdir dir="${LBFA1.dir}" />
 
-                                <mkdir dir="${LBFA1.dir}/META-INF"/>
-                                <copy file="${src5}/../conf/service1/services.xml" tofile="${LBFA1.dir}/META-INF/services.xml"/>
+                                <mkdir dir="${LBFA1.dir}/META-INF" />
+                                <copy file="${src5}/../conf/service1/services.xml" tofile="${LBFA1.dir}/META-INF/services.xml" />
                                 <copy toDir="${LBFA1.dir}">
                                     <fileset dir="${classes}">
-                                        <include name="**/LBService1.class"/>
+                                        <include name="**/LBService1.class" />
                                     </fileset>
                                 </copy>
 
                                 <jar destfile="${services}/LBService1.aar">
-                                    <fileset dir="${LBFA1.dir}"/>
+                                    <fileset dir="${LBFA1.dir}" />
                                 </jar>
 
-                                <property name="LBFA2.dir" value="${temp.dir}/LBService2"/>
-                                <mkdir dir="${LBFA2.dir}"/>
+                                <property name="LBFA2.dir" value="${temp.dir}/LBService2" />
+                                <mkdir dir="${LBFA2.dir}" />
 
-                                <mkdir dir="${LBFA2.dir}/META-INF"/>
-                                <copy file="${src5}/../conf/service2/services.xml" tofile="${LBFA2.dir}/META-INF/services.xml"/>
+                                <mkdir dir="${LBFA2.dir}/META-INF" />
+                                <copy file="${src5}/../conf/service2/services.xml" tofile="${LBFA2.dir}/META-INF/services.xml" />
                                 <copy toDir="${LBFA2.dir}">
                                     <fileset dir="${classes}">
-                                        <include name="**/LBService2.class"/>
+                                        <include name="**/LBService2.class" />
                                     </fileset>
                                 </copy>
 
                                 <jar destfile="${services}/LBService2.aar">
-                                    <fileset dir="${LBFA2.dir}"/>
+                                    <fileset dir="${LBFA2.dir}" />
                                 </jar>
 
                             </tasks>
@@ -244,6 +244,7 @@
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-dependency-plugin</artifactId>
+                <version>2.3</version>
                 <executions>
                     <execution>
                         <id>copy</id>
@@ -261,6 +262,7 @@
                                     <outputDirectory>target/test_repos/axis2Server/modules
                                     </outputDirectory>
                                 </artifactItem>
+
                                 <artifactItem>
                                     <groupId>org.apache.rampart</groupId>
                                     <artifactId>rampart</artifactId>
@@ -293,6 +295,7 @@
                                     <outputDirectory>target/test_repos/axis2Client/modules
                                     </outputDirectory>
                                 </artifactItem>
+
                                 <artifactItem>
                                     <groupId>org.apache.axis2</groupId>
                                     <artifactId>addressing</artifactId>
@@ -323,9 +326,11 @@
                     </execution>
                 </executions>
             </plugin>
+
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-surefire-plugin</artifactId>
+                <version>2.9</version>
                 <configuration>
                     <systemPropertyVariables>
                         <property>
@@ -352,6 +357,7 @@
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-surefire-report-plugin</artifactId>
+                <version>2.7.2</version>
                 <configuration>
                     <outputName>sample_automation</outputName>
                 </configuration>
@@ -377,12 +383,9 @@
             <artifactId>synapse-samples</artifactId>
         </dependency>
         <dependency>
-            <groupId>org.apache.axis2</groupId>
-            <artifactId>axis2-adb</artifactId>
-        </dependency>
-        <dependency>
             <groupId>org.apache.rampart</groupId>
             <artifactId>rampart-core</artifactId>
+            <version>${rampart.version}</version>
             <scope>test</scope>
             <exclusions>
                 <exclusion>
@@ -392,74 +395,82 @@
             </exclusions>
         </dependency>
         <dependency>
-            <groupId>org.apache.sandesha2</groupId>
-            <artifactId>sandesha2-core</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
             <groupId>org.apache.axis2</groupId>
             <artifactId>axis2-transport-base</artifactId>
+            <version>${axis2.transport.version}</version>
             <scope>test</scope>
         </dependency>
         <dependency>
             <groupId>org.apache.axis2</groupId>
             <artifactId>axis2-transport-jms</artifactId>
+            <version>${axis2.transport.version}</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.axis2</groupId>
+            <artifactId>axis2-transport-udp</artifactId>
+            <version>${axis2.transport.version}</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.axis2</groupId>
+            <artifactId>axis2-transport-tcp</artifactId>
+            <version>1.0.0</version>
             <scope>test</scope>
         </dependency>
         <dependency>
             <groupId>org.jruby</groupId>
             <artifactId>jruby-complete</artifactId>
+            <version>${jruby.version}</version>
             <scope>test</scope>
         </dependency>
         <dependency>
             <groupId>org.apache.httpcomponents</groupId>
             <artifactId>httpclient</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.derby</groupId>
-            <artifactId>derbyclient</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.derby</groupId>
-            <artifactId>derbynet</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.derby</groupId>
-            <artifactId>derby</artifactId>
+            <version>4.1</version>
             <scope>test</scope>
         </dependency>
         <dependency>
             <groupId>org.apache.activemq</groupId>
             <artifactId>activemq-core</artifactId>
+            <version>5.2.0</version>
             <scope>test</scope>
         </dependency>
         <dependency>
-            <groupId>rhino</groupId>
-            <artifactId>js</artifactId>
+            <groupId>org.apache.derby</groupId>
+            <artifactId>derbyclient</artifactId>
+            <version>10.8.1.2</version>
             <scope>test</scope>
         </dependency>
         <dependency>
-            <groupId>commons-dbcp</groupId>
-            <artifactId>commons-dbcp</artifactId>
+            <groupId>org.apache.derby</groupId>
+            <artifactId>derbynet</artifactId>
+            <version>10.8.1.2</version>
             <scope>test</scope>
         </dependency>
         <dependency>
-             <groupId>net.sf.saxon</groupId>
-             <artifactId>saxon</artifactId>
-             <scope>test</scope>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-log4j12</artifactId>
+            <version>1.6.1</version>
+            <scope>test</scope>
         </dependency>
         <dependency>
-             <groupId>net.sf.saxon</groupId>
-             <artifactId>saxon-xqj</artifactId>
-             <scope>test</scope>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-api</artifactId>
+            <version>1.6.1</version>
+            <scope>test</scope>
         </dependency>
         <dependency>
-            <groupId>org.wso2.caching</groupId>
-            <artifactId>wso2caching-core</artifactId>
-            <type>jar</type>
+            <groupId>org.apache.derby</groupId>
+            <artifactId>derby</artifactId>
+            <version>10.8.1.2</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.neethi</groupId>
+            <artifactId>neethi</artifactId>
+            <version>3.0.1</version>
+            <scope>test</scope>
         </dependency>
     </dependencies>
 
diff --git a/modules/integration/src/test/java/org/apache/synapse/samples/framework/Axis2BackEndServerController.java b/modules/integration/src/test/java/org/apache/synapse/samples/framework/Axis2BackEndServerController.java
index e62342a..38669bc 100644
--- a/modules/integration/src/test/java/org/apache/synapse/samples/framework/Axis2BackEndServerController.java
+++ b/modules/integration/src/test/java/org/apache/synapse/samples/framework/Axis2BackEndServerController.java
@@ -154,4 +154,4 @@
             cdLatch.countDown();
         }
     }
-}
+}
\ No newline at end of file
diff --git a/modules/integration/src/test/java/org/apache/synapse/samples/framework/DerbyServerController.java b/modules/integration/src/test/java/org/apache/synapse/samples/framework/DerbyServerController.java
index 46997d7..6d65f8f 100644
--- a/modules/integration/src/test/java/org/apache/synapse/samples/framework/DerbyServerController.java
+++ b/modules/integration/src/test/java/org/apache/synapse/samples/framework/DerbyServerController.java
@@ -42,6 +42,7 @@
             server = new NetworkServerControl
                     (InetAddress.getByName("localhost"), 1527);
             server.start(null);
+
             while (true) {
                 try {
                     server.ping();
diff --git a/modules/integration/src/test/java/org/apache/synapse/samples/framework/SynapseTestCase.java b/modules/integration/src/test/java/org/apache/synapse/samples/framework/SynapseTestCase.java
index eb9b00e..945f76a 100644
--- a/modules/integration/src/test/java/org/apache/synapse/samples/framework/SynapseTestCase.java
+++ b/modules/integration/src/test/java/org/apache/synapse/samples/framework/SynapseTestCase.java
@@ -493,4 +493,4 @@
     protected void assertResponseReceived(SampleClientResult result) {
         assertTrue("Client did not receive the expected response", result.responseReceived());
     }
-}
+}
\ No newline at end of file
diff --git a/modules/integration/src/test/java/org/apache/synapse/samples/framework/SynapseTestUtils.java b/modules/integration/src/test/java/org/apache/synapse/samples/framework/SynapseTestUtils.java
index af4025f..6e0f795 100644
--- a/modules/integration/src/test/java/org/apache/synapse/samples/framework/SynapseTestUtils.java
+++ b/modules/integration/src/test/java/org/apache/synapse/samples/framework/SynapseTestUtils.java
@@ -51,7 +51,7 @@
             NetworkInterface ni = (NetworkInterface) e.nextElement();
             // Clustering doesn't work for loop-back addresses, so we are not interested
             // we are not interested in inactive interfaces either
-            // if (ni.isLoopback() || !ni.isUp()) continue; TODO: Find Java 5 alternative
+            // if (ni.isLoopback() || !ni.isUp()) continue;
 
             Enumeration e2 = ni.getInetAddresses();
             while (e2.hasMoreElements()) {
@@ -78,4 +78,4 @@
         return ipAddress;
     }
 
-}
+}
\ No newline at end of file
diff --git a/modules/integration/src/test/java/org/apache/synapse/samples/framework/TestSamplesHandlerSuite.java b/modules/integration/src/test/java/org/apache/synapse/samples/framework/TestSamplesHandlerSuite.java
index 5cd3e10..a2c8b87 100644
--- a/modules/integration/src/test/java/org/apache/synapse/samples/framework/TestSamplesHandlerSuite.java
+++ b/modules/integration/src/test/java/org/apache/synapse/samples/framework/TestSamplesHandlerSuite.java
@@ -188,7 +188,7 @@
         sampleClassRepo.put("59", Sample59.class);
 
         //QoS
-        //sampleClassRepo.put("100", Sample100.class);
+        sampleClassRepo.put("100", Sample100.class);
         sampleClassRepo.put("101", Sample101.class);
 
         //Proxy Service
@@ -198,7 +198,7 @@
         //sampleClassRepo.put("153", Sample153.class); // unable to load the JKS files
         sampleClassRepo.put("154", Sample154.class);
         sampleClassRepo.put("155", Sample155.class);
-        //sampleClassRepo.put("156", Sample156.class);
+        sampleClassRepo.put("156", Sample156.class);
         sampleClassRepo.put("157", Sample157.class);
 
         //Advanced
@@ -210,7 +210,7 @@
         sampleClassRepo.put("360", Sample360.class);
         sampleClassRepo.put("361", Sample361.class);
         sampleClassRepo.put("362", Sample362.class);
-        sampleClassRepo.put("370", Sample370.class);   // neethi 3.0.x and wso2throttle incompatibility
+        sampleClassRepo.put("370", Sample370.class);
         sampleClassRepo.put("371", Sample371.class);
         sampleClassRepo.put("372", Sample372.class);
         sampleClassRepo.put("380", Sample380.class);
diff --git a/modules/integration/src/test/resources/test-log4j.properties b/modules/integration/src/test/resources/test-log4j.properties
index 9db03e5..70484fd 100644
--- a/modules/integration/src/test/resources/test-log4j.properties
+++ b/modules/integration/src/test/resources/test-log4j.properties
@@ -42,7 +42,7 @@
 # The standard log file that may be set upto DEBUG/TRACE for general purpose logging
 # Logs information at startup/initialization etc. and also could be used as the developer log
 log4j.appender.LOG_APPENDER=org.apache.log4j.RollingFileAppender
-log4j.appender.LOG_APPENDER.File=modules/integration/target/sampleAutomationLogs/synapse-${timeStamp}.log
+log4j.appender.LOG_APPENDER.File=sampleAutomationLogs/synapse-${timeStamp}.log
 log4j.appender.LOG_APPENDER.MaxFileSize=1000KB
 log4j.appender.LOG_APPENDER.MaxBackupIndex=10
 log4j.appender.LOG_APPENDER.layout=org.apache.log4j.PatternLayout
diff --git a/modules/migrator/pom.xml b/modules/migrator/pom.xml
index cd0716c..4ff45c8 100644
--- a/modules/migrator/pom.xml
+++ b/modules/migrator/pom.xml
@@ -18,15 +18,13 @@
   ~  under the License.
   -->
 
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
 
     <modelVersion>4.0.0</modelVersion>
     <parent>
         <groupId>org.apache.synapse</groupId>
         <artifactId>Apache-Synapse</artifactId>
-        <version>2.2.0-SNAPSHOT</version>
+        <version>2.1.0</version>
         <relativePath>../../pom.xml</relativePath>
     </parent>
 
@@ -40,9 +38,9 @@
     </description>
 
     <scm>
-        <connection>scm:svn:http://svn.apache.org/repos/asf/synapse/trunk/java/modules/migrator</connection>
-        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/synapse/trunk/java/modules/migrator</developerConnection>
-        <url>http://svn.apache.org/viewvc/synapse/trunk/java/modules/migrator</url>
+        <connection>scm:svn:http://svn.apache.org/repos/asf/synapse/tags/2.1.0/modules/migrator</connection>
+        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/synapse/tags/2.1.0/modules/migrator</developerConnection>
+        <url>http://svn.apache.org/viewvc/synapse/tags/2.1.0/modules/migrator</url>
     </scm>
 
     <build>
@@ -50,6 +48,7 @@
             <plugin>
                 <groupId>org.apache.felix</groupId>
                 <artifactId>maven-bundle-plugin</artifactId>
+                <version>1.4.0</version>
                 <extensions>true</extensions>
                 <configuration>
                     <instructions>
diff --git a/modules/packaging/package-archetype/pom.xml b/modules/packaging/package-archetype/pom.xml
index db8cdc7..3372034 100644
--- a/modules/packaging/package-archetype/pom.xml
+++ b/modules/packaging/package-archetype/pom.xml
@@ -17,15 +17,12 @@
   ~  specific language governing permissions and limitations
   ~  under the License.
   -->
-<project
-    xmlns="http://maven.apache.org/POM/4.0.0"
-    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
     <modelVersion>4.0.0</modelVersion>
     <parent>
         <groupId>org.apache.synapse</groupId>
         <artifactId>Apache-Synapse</artifactId>
-        <version>2.2.0-SNAPSHOT</version>
+        <version>2.1.0</version>
         <relativePath>../../../pom.xml</relativePath>
     </parent>
     <artifactId>synapse-package-archetype</artifactId>
@@ -37,9 +34,9 @@
     </description>
 
     <scm>
-        <connection>scm:svn:http://svn.apache.org/repos/asf/synapse/trunk/java/modules/packaging/package-archetype</connection>
-        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/synapse/trunk/java/modules/packaging/package-archetype</developerConnection>
-        <url>http://svn.apache.org/viewvc/synapse/trunk/java/modules/packaging/package-archetype</url>
+        <connection>scm:svn:http://svn.apache.org/repos/asf/synapse/tags/2.1.0/modules/packaging/package-archetype</connection>
+        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/synapse/tags/2.1.0/modules/packaging/package-archetype</developerConnection>
+        <url>http://svn.apache.org/viewvc/synapse/tags/2.1.0/modules/packaging/package-archetype</url>
     </scm>
 
     <build>
@@ -53,12 +50,13 @@
             <extension>
                 <groupId>org.apache.maven.archetype</groupId>
                 <artifactId>archetype-packaging</artifactId>
-                <version>2.2</version>
+                <version>2.0-alpha-4</version>
             </extension>
         </extensions>
         <plugins>
             <plugin>
                 <artifactId>maven-resources-plugin</artifactId>
+                <version>2.3</version>
                 <configuration>
                     <escapeString>\</escapeString>
                     <encoding>UTF-8</encoding>
@@ -66,6 +64,7 @@
             </plugin>
             <plugin>
                 <artifactId>maven-archetype-plugin</artifactId>
+                <version>2.0-alpha-4</version>
                 <extensions>true</extensions>
             </plugin>
         </plugins>
diff --git a/modules/packaging/package-archetype/src/main/resources/archetype-resources/pom.xml b/modules/packaging/package-archetype/src/main/resources/archetype-resources/pom.xml
index bca9a6b..0ca82c7 100644
--- a/modules/packaging/package-archetype/src/main/resources/archetype-resources/pom.xml
+++ b/modules/packaging/package-archetype/src/main/resources/archetype-resources/pom.xml
@@ -34,7 +34,7 @@
             <activation>
                 <property>
                     <name>synapse.version</name>
-                    <value>2.2.0-SNAPSHOT</value>
+                    <value>2.1.0</value>
                 </property>
             </activation>
             <repositories>
diff --git a/modules/packaging/package-skeleton/pom.xml b/modules/packaging/package-skeleton/pom.xml
index b29f9ee..e20fcff 100644
--- a/modules/packaging/package-skeleton/pom.xml
+++ b/modules/packaging/package-skeleton/pom.xml
@@ -17,15 +17,12 @@
   ~  specific language governing permissions and limitations
   ~  under the License.
   -->
-<project
-    xmlns="http://maven.apache.org/POM/4.0.0"
-    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
     <modelVersion>4.0.0</modelVersion>
     <parent>
         <groupId>org.apache.synapse</groupId>
         <artifactId>Apache-Synapse</artifactId>
-        <version>2.2.0-SNAPSHOT</version>
+        <version>2.1.0</version>
         <relativePath>../../../pom.xml</relativePath>
     </parent>
     <artifactId>synapse-package-skeleton</artifactId>
@@ -38,25 +35,28 @@
     </description>
 
     <scm>
-        <connection>scm:svn:http://svn.apache.org/repos/asf/synapse/trunk/java/modules/packaging/package-skeleton</connection>
-        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/synapse/trunk/java/modules/packaging/package-skeleton</developerConnection>
-        <url>http://svn.apache.org/viewvc/synapse/trunk/java/modules/packaging/package-skeleton</url>
+        <connection>scm:svn:http://svn.apache.org/repos/asf/synapse/tags/2.1.0/modules/packaging/package-skeleton</connection>
+        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/synapse/tags/2.1.0/modules/packaging/package-skeleton</developerConnection>
+        <url>http://svn.apache.org/viewvc/synapse/tags/2.1.0/modules/packaging/package-skeleton</url>
     </scm>
 
     <dependencies>
         <dependency>
             <groupId>org.apache.synapse</groupId>
             <artifactId>synapse-core</artifactId>
+            <version>${pom.version}</version>
         </dependency>
         <dependency>
             <groupId>wrapper</groupId>
             <artifactId>wrapper</artifactId>
+            <version>${wrapper.version}</version>
         </dependency>
     </dependencies>
     <build>
         <plugins>
             <plugin>
                 <artifactId>maven-assembly-plugin</artifactId>
+                <version>2.2-beta-2</version>
                 <executions>
                     <execution>
                         <id>skeleton-package</id>
diff --git a/modules/packaging/package-skeleton/src/main/assembly/skeleton.xml b/modules/packaging/package-skeleton/src/main/assembly/skeleton.xml
index 69f742c..0eb6fd7 100644
--- a/modules/packaging/package-skeleton/src/main/assembly/skeleton.xml
+++ b/modules/packaging/package-skeleton/src/main/assembly/skeleton.xml
@@ -18,7 +18,6 @@
   ~  under the License.
   -->
 <assembly>
-    <id>skeleton</id>
     <includeBaseDirectory>false</includeBaseDirectory>
     <formats>
         <format>zip</format>
diff --git a/modules/patches/pom.xml b/modules/patches/pom.xml
index d90fb58..2f61fa0 100644
--- a/modules/patches/pom.xml
+++ b/modules/patches/pom.xml
@@ -17,15 +17,12 @@
   ~  specific language governing permissions and limitations
   ~  under the License.
   -->
-<project
-        xmlns="http://maven.apache.org/POM/4.0.0"
-        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-        xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
     <modelVersion>4.0.0</modelVersion>
     <parent>
         <groupId>org.apache.synapse</groupId>
         <artifactId>Apache-Synapse</artifactId>
-        <version>2.2.0-SNAPSHOT</version>
+        <version>2.1.0</version>
         <relativePath>../../pom.xml</relativePath>
     </parent>
     <artifactId>synapse-patches</artifactId>
@@ -38,9 +35,9 @@
     </description>
 
     <scm>
-        <connection>scm:svn:http://svn.apache.org/repos/asf/synapse/trunk/java/modules/patches</connection>
-        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/synapse/trunk/java/modules/patches</developerConnection>
-        <url>http://svn.apache.org/viewvc/synapse/trunk/java/modules/patches</url>
+        <connection>scm:svn:http://svn.apache.org/repos/asf/synapse/tags/2.1.0/modules/patches</connection>
+        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/synapse/tags/2.1.0/modules/patches</developerConnection>
+        <url>http://svn.apache.org/viewvc/synapse/tags/2.1.0/modules/patches</url>
     </scm>
 
     <build>
@@ -48,6 +45,7 @@
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-jar-plugin</artifactId>
+                <version>2.3.2</version>
                 <executions>
                     <execution>
                         <phase>process-classes</phase>
@@ -69,19 +67,20 @@
                             <goal>run</goal>
                         </goals>
                         <configuration>
-                            <target>
+                            <tasks>
                                 <unjar dest="${project.build.outputDirectory}">
                                     <fileset dir="${basedir}/jars">
-                                        <include name="**/*.jar"/>
+                                        <include name="**/*.jar" />
                                     </fileset>
                                 </unjar>
-                            </target>
+                            </tasks>
                         </configuration>
                     </execution>
                 </executions>
             </plugin>
             <plugin>
                 <artifactId>maven-assembly-plugin</artifactId>
+                <version>2.2-beta-2</version>
                 <executions>
                     <execution>
                         <phase>package</phase>
@@ -103,6 +102,7 @@
         <dependency>
             <groupId>org.apache.commons</groupId>
             <artifactId>commons-vfs2</artifactId>
+            <version>${commons.vfs.version}</version>
         </dependency>
     </dependencies>
 </project>
diff --git a/modules/samples/pom.xml b/modules/samples/pom.xml
index 28fd7a9..c2f7896 100644
--- a/modules/samples/pom.xml
+++ b/modules/samples/pom.xml
@@ -18,15 +18,12 @@
   ~  under the License.
   -->
 
-<project
-        xmlns="http://maven.apache.org/POM/4.0.0"
-        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-        xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
     <modelVersion>4.0.0</modelVersion>
     <parent>
         <groupId>org.apache.synapse</groupId>
         <artifactId>Apache-Synapse</artifactId>
-        <version>2.2.0-SNAPSHOT</version>
+        <version>2.1.0</version>
         <relativePath>../../pom.xml</relativePath>
     </parent>
 
@@ -38,9 +35,9 @@
     <packaging>bundle</packaging>
 
     <scm>
-        <connection>scm:svn:http://svn.apache.org/repos/asf/synapse/trunk/java/modules/samples</connection>
-        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/synapse/trunk/java/modules/samples</developerConnection>
-        <url>http://svn.apache.org/viewvc/synapse/trunk/java/modules/samples</url>
+        <connection>scm:svn:http://svn.apache.org/repos/asf/synapse/tags/2.1.0/modules/samples</connection>
+        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/synapse/tags/2.1.0/modules/samples</developerConnection>
+        <url>http://svn.apache.org/viewvc/synapse/tags/2.1.0/modules/samples</url>
     </scm>
 
     <profiles>
@@ -51,195 +48,170 @@
                     <plugin>
                         <groupId>org.apache.maven.plugins</groupId>
                         <artifactId>maven-antrun-plugin</artifactId>
+                        <version>1.1</version>
                         <executions>
                             <execution>
                                 <id>create_repo</id>
                                 <phase>generate-test-resources</phase>
                                 <configuration>
                                     <tasks>
-                                        <echo message="*** Creating a sample n2n testing repository ***"/>
+                                        <echo message="*** Creating a sample n2n testing repository ***" />
 
-                                        <mkdir dir="target/test_repos"/>
-                                        <mkdir dir="target/test_repos/axis2Server"/>
-                                        <mkdir dir="target/test_repos/axis2Client"/>
-                                        <mkdir dir="target/test_repos/synapse"/>
-                                        <mkdir dir="target/test_repos/synapse"/>
-                                        <mkdir dir="target/test_repos/synapse/modules"/>
-                                        <mkdir dir="target/test_repos/synapse/conf"/>
-                                        <mkdir dir="target/test_repos/axis2Server/services"/>
-                                        <mkdir dir="target/test_repos/axis2Server/modules"/>
-                                        <mkdir dir="target/test_repos/axis2Server/conf"/>
-                                        <mkdir dir="target/test_repos/axis2Client/modules"/>
-                                        <mkdir dir="target/test_repos/axis2Client/conf"/>
+                                        <mkdir dir="target/test_repos" />
+                                        <mkdir dir="target/test_repos/axis2Server" />
+                                        <mkdir dir="target/test_repos/axis2Client" />
+                                        <mkdir dir="target/test_repos/synapse" />
+                                        <mkdir dir="target/test_repos/synapse" />
+                                        <mkdir dir="target/test_repos/synapse/modules" />
+                                        <mkdir dir="target/test_repos/synapse/conf" />
+                                        <mkdir dir="target/test_repos/axis2Server/services" />
+                                        <mkdir dir="target/test_repos/axis2Server/modules" />
+                                        <mkdir dir="target/test_repos/axis2Server/conf" />
+                                        <mkdir dir="target/test_repos/axis2Client/modules" />
+                                        <mkdir dir="target/test_repos/axis2Client/conf" />
 
-                                        <copy file="../../repository/conf/sample/resources/misc/server/axis2.xml"
-                                              tofile="target/test_repos/axis2Server/conf/axis2.xml"/>
-                                        <copy file="../../repository/conf/sample/resources/misc/client/axis2.xml"
-                                              tofile="target/test_repos/axis2Client/conf/axis2.xml"/>
-                                        <copy file="../../repository/conf/axis2.xml"
-                                              tofile="target/test_repos/synapse/conf/axis2.xml"/>
-                                        <copy file="../core/src/main/resources/trust.jks"
-                                              tofile="target/test_repos/synapse/conf/trust.jks"/>
-                                        <copy file="../core/src/main/resources/identity.jks"
-                                              tofile="target/test_repos/synapse/conf/identity.jks"/>
-                                        <copy file="../core/src/test/resources/keystore.jks"
-                                              tofile="target/test_repos/synapse/conf/keystore.jks"/>
+                                        <copy file="../../repository/conf/sample/resources/misc/server/axis2.xml" tofile="target/test_repos/axis2Server/conf/axis2.xml" />
+                                        <copy file="../../repository/conf/sample/resources/misc/client/axis2.xml" tofile="target/test_repos/axis2Client/conf/axis2.xml" />
+                                        <copy file="../../repository/conf/axis2.xml" tofile="target/test_repos/synapse/conf/axis2.xml" />
+                                        <copy file="../core/src/main/resources/trust.jks" tofile="target/test_repos/synapse/conf/trust.jks" />
+                                        <copy file="../core/src/main/resources/identity.jks" tofile="target/test_repos/synapse/conf/identity.jks" />
+                                        <copy file="../core/src/test/resources/keystore.jks" tofile="target/test_repos/synapse/conf/keystore.jks" />
 
-                                        <property name="temp.dir" value="target/temp"/>
-                                        <property name="classes" value="${temp.dir}/classes"/>
-                                        <property name="services"
-                                                  value="target/test_repos/axis2Server/services"/>
+                                        <property name="temp.dir" value="target/temp" />
+                                        <property name="classes" value="${temp.dir}/classes" />
+                                        <property name="services" value="target/test_repos/axis2Server/services" />
 
-                                        <property name="src"
-                                                  value="services/SimpleStockQuoteService/src"/>
+                                        <property name="src" value="services/SimpleStockQuoteService/src" />
 
-                                        <mkdir dir="${temp.dir}"/>
-                                        <mkdir dir="${classes}"/>
+                                        <mkdir dir="${temp.dir}" />
+                                        <mkdir dir="${classes}" />
 
                                         <javac debug="on" destdir="${classes}" fork="true">
-                                            <src path="${src}"/>
-                                            <classpath refid="maven.compile.classpath"/>
+                                            <src path="${src}" />
+                                            <classpath refid="maven.compile.classpath" />
                                         </javac>
 
-                                        <property name="SSQ.dir"
-                                                  value="${temp.dir}/SimpleStockQuote"/>
-                                        <mkdir dir="${SSQ.dir}"/>
+                                        <property name="SSQ.dir" value="${temp.dir}/SimpleStockQuote" />
+                                        <mkdir dir="${SSQ.dir}" />
 
-                                        <mkdir dir="${SSQ.dir}/META-INF"/>
-                                        <copy file="${src}/../conf/services.xml"
-                                              tofile="${SSQ.dir}/META-INF/services.xml"/>
-                                        <copy file="${src}/../wsdl/SimpleStockQuoteService.wsdl"
-                                              tofile="${SSQ.dir}/META-INF/service.wsdl"/>
+                                        <mkdir dir="${SSQ.dir}/META-INF" />
+                                        <copy file="${src}/../conf/services.xml" tofile="${SSQ.dir}/META-INF/services.xml" />
+                                        <copy file="${src}/../wsdl/SimpleStockQuoteService.wsdl" tofile="${SSQ.dir}/META-INF/service.wsdl" />
                                         <copy toDir="${SSQ.dir}">
                                             <fileset dir="${classes}">
-                                                <include name="**/*.class"/>
+                                                <include name="**/*.class" />
                                             </fileset>
                                         </copy>
 
                                         <jar destfile="${services}/SimpleStockQuoteService.aar">
-                                            <fileset dir="${SSQ.dir}"/>
+                                            <fileset dir="${SSQ.dir}" />
                                         </jar>
 
-                                        <property name="src2"
-                                                  value="services/SecureStockQuoteService/src"/>
-                                        <delete dir="${temp.dir}"/>
-                                        <mkdir dir="${temp.dir}"/>
-                                        <mkdir dir="${classes}"/>
+                                        <property name="src2" value="services/SecureStockQuoteService/src" />
+                                        <delete dir="${temp.dir}" />
+                                        <mkdir dir="${temp.dir}" />
+                                        <mkdir dir="${classes}" />
                                         <javac debug="on" destdir="${classes}" fork="true">
-                                            <src path="${src2}"/>
-                                            <classpath refid="maven.compile.classpath"/>
+                                            <src path="${src2}" />
+                                            <classpath refid="maven.compile.classpath" />
                                         </javac>
-                                        <property name="SSQ2.dir"
-                                                  value="${temp.dir}/SecureStockQuoteService"/>
-                                        <mkdir dir="${SSQ2.dir}"/>
-                                        <mkdir dir="${SSQ2.dir}/META-INF"/>
-                                        <copy file="${src2}/../conf/services.xml"
-                                              tofile="${SSQ2.dir}/META-INF/services.xml"/>
-                                        <copy file="${src2}/../wsdl/SimpleStockQuoteService.wsdl"
-                                              tofile="${SSQ2.dir}/META-INF/service.wsdl"/>
-                                        <copy file="${src2}/../store.jks"
-                                              tofile="${SSQ2.dir}/store.jks"/>
+                                        <property name="SSQ2.dir" value="${temp.dir}/SecureStockQuoteService" />
+                                        <mkdir dir="${SSQ2.dir}" />
+                                        <mkdir dir="${SSQ2.dir}/META-INF" />
+                                        <copy file="${src2}/../conf/services.xml" tofile="${SSQ2.dir}/META-INF/services.xml" />
+                                        <copy file="${src2}/../wsdl/SimpleStockQuoteService.wsdl" tofile="${SSQ2.dir}/META-INF/service.wsdl" />
+                                        <copy file="${src2}/../store.jks" tofile="${SSQ2.dir}/store.jks" />
                                         <copy toDir="${SSQ2.dir}">
                                             <fileset dir="${classes}">
-                                                <include name="**/*.class"/>
+                                                <include name="**/*.class" />
                                             </fileset>
                                         </copy>
                                         <jar destfile="${services}/SecureStockQuoteService.aar">
-                                            <fileset dir="${SSQ2.dir}"/>
+                                            <fileset dir="${SSQ2.dir}" />
                                         </jar>
 
-                                        <property name="src3"
-                                                  value="services/MTOMSwASampleService/src"/>
-                                        <delete dir="${temp.dir}"/>
-                                        <mkdir dir="${temp.dir}"/>
-                                        <mkdir dir="${classes}"/>
+                                        <property name="src3" value="services/MTOMSwASampleService/src" />
+                                        <delete dir="${temp.dir}" />
+                                        <mkdir dir="${temp.dir}" />
+                                        <mkdir dir="${classes}" />
                                         <javac debug="on" destdir="${classes}" fork="true">
-                                            <src path="${src3}"/>
-                                            <classpath refid="maven.compile.classpath"/>
+                                            <src path="${src3}" />
+                                            <classpath refid="maven.compile.classpath" />
                                         </javac>
-                                        <property name="SSQ3.dir"
-                                                  value="${temp.dir}/MTOMSwASampleService"/>
-                                        <mkdir dir="${SSQ3.dir}"/>
-                                        <mkdir dir="${SSQ3.dir}/META-INF"/>
-                                        <copy file="${src3}/../conf/services.xml"
-                                              tofile="${SSQ3.dir}/META-INF/services.xml"/>
+                                        <property name="SSQ3.dir" value="${temp.dir}/MTOMSwASampleService" />
+                                        <mkdir dir="${SSQ3.dir}" />
+                                        <mkdir dir="${SSQ3.dir}/META-INF" />
+                                        <copy file="${src3}/../conf/services.xml" tofile="${SSQ3.dir}/META-INF/services.xml" />
                                         <copy toDir="${SSQ3.dir}">
                                             <fileset dir="${classes}">
-                                                <include name="**/*.class"/>
+                                                <include name="**/*.class" />
                                             </fileset>
                                         </copy>
                                         <jar destfile="${services}/MTOMSwASampleService.aar">
-                                            <fileset dir="${SSQ3.dir}"/>
+                                            <fileset dir="${SSQ3.dir}" />
                                         </jar>
 
-                                        <property name="src4"
-                                                  value="services/ReliableStockQuoteService/src"/>
-                                        <delete dir="${temp.dir}"/>
-                                        <mkdir dir="${temp.dir}"/>
-                                        <mkdir dir="${classes}"/>
+                                        <property name="src4" value="services/ReliableStockQuoteService/src" />
+                                        <delete dir="${temp.dir}" />
+                                        <mkdir dir="${temp.dir}" />
+                                        <mkdir dir="${classes}" />
                                         <javac debug="on" destdir="${classes}" fork="true">
-                                            <src path="${src4}"/>
-                                            <classpath refid="maven.compile.classpath"/>
+                                            <src path="${src4}" />
+                                            <classpath refid="maven.compile.classpath" />
                                         </javac>
-                                        <property name="RSQ.dir"
-                                                  value="${temp.dir}/ReliableStockQuoteService"/>
-                                        <mkdir dir="${RSQ.dir}"/>
+                                        <property name="RSQ.dir" value="${temp.dir}/ReliableStockQuoteService" />
+                                        <mkdir dir="${RSQ.dir}" />
 
-                                        <mkdir dir="${RSQ.dir}/META-INF"/>
-                                        <copy file="${src4}/../conf/services.xml"
-                                              tofile="${RSQ.dir}/META-INF/services.xml"/>
-                                        <copy file="${src4}/../wsdl/ReliableStockQuoteService.wsdl"
-                                              tofile="${RSQ.dir}/META-INF/service.wsdl"/>
+                                        <mkdir dir="${RSQ.dir}/META-INF" />
+                                        <copy file="${src4}/../conf/services.xml" tofile="${RSQ.dir}/META-INF/services.xml" />
+                                        <copy file="${src4}/../wsdl/ReliableStockQuoteService.wsdl" tofile="${RSQ.dir}/META-INF/service.wsdl" />
                                         <copy toDir="${RSQ.dir}">
                                             <fileset dir="${classes}">
-                                                <include name="**/*.class"/>
+                                                <include name="**/*.class" />
                                             </fileset>
                                         </copy>
 
                                         <jar destfile="${services}/ReliableStockQuoteService.aar">
-                                            <fileset dir="${RSQ.dir}"/>
+                                            <fileset dir="${RSQ.dir}" />
                                         </jar>
 
-                                        <property name="src5"
-                                                  value="services/LoadbalanceFailoverService/src"/>
-                                        <delete dir="${temp.dir}"/>
-                                        <mkdir dir="${temp.dir}"/>
-                                        <mkdir dir="${classes}"/>
+                                        <property name="src5" value="services/LoadbalanceFailoverService/src" />
+                                        <delete dir="${temp.dir}" />
+                                        <mkdir dir="${temp.dir}" />
+                                        <mkdir dir="${classes}" />
                                         <javac debug="on" destdir="${classes}" fork="true">
-                                            <src path="${src5}"/>
-                                            <classpath refid="maven.compile.classpath"/>
+                                            <src path="${src5}" />
+                                            <classpath refid="maven.compile.classpath" />
                                         </javac>
 
-                                        <property name="LBFA1.dir" value="${temp.dir}/LBService1"/>
-                                        <mkdir dir="${LBFA1.dir}"/>
+                                        <property name="LBFA1.dir" value="${temp.dir}/LBService1" />
+                                        <mkdir dir="${LBFA1.dir}" />
 
-                                        <mkdir dir="${LBFA1.dir}/META-INF"/>
-                                        <copy file="${src5}/../conf/service1/services.xml"
-                                              tofile="${LBFA1.dir}/META-INF/services.xml"/>
+                                        <mkdir dir="${LBFA1.dir}/META-INF" />
+                                        <copy file="${src5}/../conf/service1/services.xml" tofile="${LBFA1.dir}/META-INF/services.xml" />
                                         <copy toDir="${LBFA1.dir}">
                                             <fileset dir="${classes}">
-                                                <include name="**/LBService1.class"/>
+                                                <include name="**/LBService1.class" />
                                             </fileset>
                                         </copy>
 
                                         <jar destfile="${services}/LBService1.aar">
-                                            <fileset dir="${LBFA1.dir}"/>
+                                            <fileset dir="${LBFA1.dir}" />
                                         </jar>
 
-                                        <property name="LBFA2.dir" value="${temp.dir}/LBService2"/>
-                                        <mkdir dir="${LBFA2.dir}"/>
+                                        <property name="LBFA2.dir" value="${temp.dir}/LBService2" />
+                                        <mkdir dir="${LBFA2.dir}" />
 
-                                        <mkdir dir="${LBFA2.dir}/META-INF"/>
-                                        <copy file="${src5}/../conf/service2/services.xml"
-                                              tofile="${LBFA2.dir}/META-INF/services.xml"/>
+                                        <mkdir dir="${LBFA2.dir}/META-INF" />
+                                        <copy file="${src5}/../conf/service2/services.xml" tofile="${LBFA2.dir}/META-INF/services.xml" />
                                         <copy toDir="${LBFA2.dir}">
                                             <fileset dir="${classes}">
-                                                <include name="**/LBService2.class"/>
+                                                <include name="**/LBService2.class" />
                                             </fileset>
                                         </copy>
 
                                         <jar destfile="${services}/LBService2.aar">
-                                            <fileset dir="${LBFA2.dir}"/>
+                                            <fileset dir="${LBFA2.dir}" />
                                         </jar>
 
                                     </tasks>
@@ -254,6 +226,7 @@
                     <plugin>
                         <groupId>org.apache.maven.plugins</groupId>
                         <artifactId>maven-dependency-plugin</artifactId>
+                        <version>2.0-alpha-1</version>
                         <executions>
                             <execution>
                                 <id>copy</id>
@@ -355,6 +328,7 @@
                     <plugin>
                         <groupId>org.apache.maven.plugins</groupId>
                         <artifactId>maven-surefire-plugin</artifactId>
+                        <version>2.3</version>
                         <configuration>
                             <forkMode>pertest</forkMode>
                             <includes>
@@ -395,6 +369,7 @@
             <plugin>
                 <groupId>org.apache.felix</groupId>
                 <artifactId>maven-bundle-plugin</artifactId>
+                <version>1.4.0</version>
                 <extensions>true</extensions>
                 <configuration>
                     <instructions>
@@ -421,13 +396,20 @@
             <artifactId>synapse-extensions</artifactId>
         </dependency>
         <dependency>
+            <groupId>org.jruby</groupId>
+            <artifactId>jruby-complete</artifactId>
+            <version>${jruby.version}</version>
+        </dependency>
+        <dependency>
             <groupId>org.apache.geronimo.specs</groupId>
             <artifactId>geronimo-jms_1.1_spec</artifactId>
+            <version>${jms-1.1-spec.version}</version>
         </dependency>
         <!-- Rampart -->
         <dependency>
             <groupId>org.apache.rampart</groupId>
             <artifactId>rampart-core</artifactId>
+            <version>${rampart.version}</version>
             <exclusions>
                 <exclusion>
                     <groupId>org.apache.woden</groupId>
diff --git a/modules/securevault/pom.xml b/modules/securevault/pom.xml
index 293fe2a..764910c 100644
--- a/modules/securevault/pom.xml
+++ b/modules/securevault/pom.xml
@@ -1,107 +1,159 @@
-<?xml version="1.0" encoding="UTF-8"?>

-<!--

-  ~  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.

-  -->

-

-<project

-        xmlns="http://maven.apache.org/POM/4.0.0"

-        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

-        xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

-    <modelVersion>4.0.0</modelVersion>

-    <parent>

-        <groupId>org.apache.synapse</groupId>

-        <artifactId>Apache-Synapse</artifactId>

-        <version>2.2.0-SNAPSHOT</version>

-        <relativePath>../../pom.xml</relativePath>

-    </parent>

-    <artifactId>synapse-securevault</artifactId>

-    <name>Apache Synapse - Secure Vault</name>

-    <description>Apache Synapse - Secure vault</description>

-    <packaging>bundle</packaging>

-

-    <scm>

-        <connection>scm:svn:http://svn.apache.org/repos/asf/synapse/trunk/java/modules/securevault</connection>

-        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/synapse/trunk/java/modules/securevault</developerConnection>

-        <url>http://svn.apache.org/viewvc/synapse/trunk/java/modules/securevault</url>

-    </scm>

-

-    <build>

-        <plugins>

-            <plugin>

-                <artifactId>maven-compiler-plugin</artifactId>

-            </plugin>

-            <plugin>

-                <artifactId>maven-surefire-plugin</artifactId>

-            </plugin>

-            <plugin>

-                <groupId>org.apache.felix</groupId>

-                <artifactId>maven-bundle-plugin</artifactId>

-                <extensions>true</extensions>

-                <configuration>

-                    <instructions>

-                        <Bundle-SymbolicName>${pom.artifactId}</Bundle-SymbolicName>

-                        <Export-Package>

-                            org.apache.synapse.securevault.*,

-                        </Export-Package>

-                        <Import-Package>

-                            !javax.xml.namespace,

-                            javax.xml.namespace; version=0.0.0,

-                            *;resolution:=optional,

-                        </Import-Package>

-                        <DynamicImport-Package>*</DynamicImport-Package>

-                    </instructions>

-                </configuration>

-            </plugin>

-        </plugins>

-    </build>

-    <dependencies>

-        <dependency>

-            <groupId>org.apache.ws.commons.axiom</groupId>

-            <artifactId>axiom-api</artifactId>

-        </dependency>

-        <dependency>

-            <groupId>org.apache.ws.commons.axiom</groupId>

-            <artifactId>axiom-impl</artifactId>

-        </dependency>

-        <dependency>

-            <groupId>log4j</groupId>

-            <artifactId>log4j</artifactId>

-        </dependency>

-        <dependency>

-            <groupId>jline</groupId>

-            <artifactId>jline</artifactId>

-        </dependency>

-        <dependency>

-            <groupId>junit</groupId>

-            <artifactId>junit</artifactId>

-            <scope>test</scope>

-        </dependency>

-        <dependency>

-            <groupId>commons-cli</groupId>

-            <artifactId>commons-cli</artifactId>

-        </dependency>

-        <dependency>

-            <groupId>commons-io</groupId>

-            <artifactId>commons-io</artifactId>

-        </dependency>

-        <dependency>

-            <groupId>commons-codec</groupId>

-            <artifactId>commons-codec</artifactId>

-        </dependency>

-    </dependencies>

-</project>

+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~  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.
+  -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.apache.synapse</groupId>
+        <artifactId>Apache-Synapse</artifactId>
+        <version>2.1.0</version>
+        <relativePath>../../pom.xml</relativePath>
+    </parent>
+    <groupId>org.apache.synapse</groupId>
+    <artifactId>synapse-securevault</artifactId>
+    <name>Apache Synapse - Secure Vault</name>
+    <description>Apache Synapse - Secure vault</description>
+    <packaging>bundle</packaging>
+
+    <scm>
+        <connection>scm:svn:http://svn.apache.org/repos/asf/synapse/tags/2.1.0/modules/securevault</connection>
+        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/synapse/tags/2.1.0/modules/securevault</developerConnection>
+        <url>http://svn.apache.org/viewvc/synapse/tags/2.1.0/modules/securevault</url>
+    </scm>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <version>2.0</version>
+                <configuration>
+                    <source>1.5</source>
+                    <target>1.5</target>
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-surefire-plugin</artifactId>
+                <version>2.2</version>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+                <version>1.4.0</version>
+                <extensions>true</extensions>
+                <configuration>
+                    <instructions>
+                        <Bundle-SymbolicName>${pom.artifactId}</Bundle-SymbolicName>
+                        <Export-Package>
+                            org.apache.synapse.securevault.*,
+                        </Export-Package>
+                        <Import-Package>
+                            !javax.xml.namespace,
+                            javax.xml.namespace; version=0.0.0,
+                            *;resolution:=optional,
+                        </Import-Package>
+                        <DynamicImport-Package>*</DynamicImport-Package>
+                    </instructions>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.ws.commons.axiom</groupId>
+            <artifactId>axiom-api</artifactId>
+            <version>${axiom.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.ws.commons.axiom</groupId>
+            <artifactId>axiom-impl</artifactId>
+            <version>${axiom.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>log4j</groupId>
+            <artifactId>log4j</artifactId>
+            <version>${log4j.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>jline</groupId>
+            <artifactId>jline</artifactId>
+            <version>${jline.version}</version>
+        </dependency>
+        <!-- direct dependencies for 3rd party JARs / Util JARs -->
+        <dependency>
+            <groupId>commons-logging</groupId>
+            <artifactId>commons-logging</artifactId>
+            <version>${commons.logging.version}</version>
+            <exclusions>
+                <exclusion>
+                    <groupId>javax.servlet</groupId>
+                    <artifactId>servlet-api</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>logkit</groupId>
+                    <artifactId>logkit</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>javax.servlet</groupId>
+                    <artifactId>servlet-api</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>avalon-framework</groupId>
+                    <artifactId>avalon-framework</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <version>${junit.version}</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>commons-cli</groupId>
+            <artifactId>commons-cli</artifactId>
+            <version>${commons-cli.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>commons-io</groupId>
+            <artifactId>commons-io</artifactId>
+            <version>${commons_io.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>commons-codec</groupId>
+            <artifactId>commons-codec</artifactId>
+            <version>${commons-codec.version}</version>
+        </dependency>
+
+    </dependencies>
+    <properties>
+        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+        <axiom.version>1.2.9</axiom.version>
+        <commons.logging.version>1.1.1</commons.logging.version>
+        <junit.version>3.8.2</junit.version>
+        <log4j.version>1.2.14</log4j.version>
+        <commons-cli.version>1.0</commons-cli.version>
+        <jline.version>0.9.94</jline.version>
+        <commons_io.version>2.0</commons_io.version>
+        <commons-codec.version>1.2</commons-codec.version>
+    </properties>
+</project>
diff --git a/modules/tasks/pom.xml b/modules/tasks/pom.xml
index 9b8a4f1..e468ec5 100644
--- a/modules/tasks/pom.xml
+++ b/modules/tasks/pom.xml
@@ -1,87 +1,104 @@
-<?xml version="1.0" encoding="UTF-8"?>

-<!--

-  ~  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.

-  -->

-

-<project

-        xmlns="http://maven.apache.org/POM/4.0.0"

-        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

-        xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

-    <modelVersion>4.0.0</modelVersion>

-    <parent>

-        <groupId>org.apache.synapse</groupId>

-        <artifactId>Apache-Synapse</artifactId>

-        <version>2.2.0-SNAPSHOT</version>

-        <relativePath>../../pom.xml</relativePath>

-    </parent>

-

-    <groupId>org.apache.synapse</groupId>

-    <artifactId>synapse-tasks</artifactId>

-    <name>Apache Synapse - Tasks</name>

-    <description>Apache Synapse - Scheduled Tasks Core</description>

-    <packaging>bundle</packaging>

-

-    <scm>

-        <connection>scm:svn:http://svn.apache.org/repos/asf/synapse/trunk/java/modules/tasks</connection>

-        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/synapse/trunk/java/modules/tasks</developerConnection>

-        <url>http://svn.apache.org/viewvc/synapse/trunk/java/modules/tasks</url>

-    </scm>

-

-    <build>

-        <plugins>

-            <plugin>

-                <groupId>org.apache.maven.plugins</groupId>

-                <artifactId>maven-surefire-plugin</artifactId>

-            </plugin>

-            <plugin>

-                <groupId>org.apache.felix</groupId>

-                <artifactId>maven-bundle-plugin</artifactId>

-                <extensions>true</extensions>

-                <configuration>

-                    <instructions>

-                        <Bundle-SymbolicName>${pom.artifactId}</Bundle-SymbolicName>

-                        <Export-Package>

-                            org.apache.synapse.task.*,

-                        </Export-Package>

-                        <Import-Package>

-                            !javax.xml.namespace,

-                            javax.xml.namespace; version=0.0.0,

-                            *;resolution:=optional,

-                        </Import-Package>

-                        <DynamicImport-Package>*</DynamicImport-Package>

-                    </instructions>

-                </configuration>

-            </plugin>

-        </plugins>

-    </build>

-

-    <dependencies>

-        <dependency>

-            <groupId>org.apache.synapse</groupId>

-            <artifactId>synapse-commons</artifactId>

-        </dependency>

-        <dependency>

-            <groupId>org.opensymphony</groupId>

-            <artifactId>quartz</artifactId>

-        </dependency>

-        <dependency>

-            <groupId>commons-collections</groupId>

-            <artifactId>commons-collections</artifactId>

-        </dependency>

-    </dependencies>

-</project>

+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~  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.
+  -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.apache.synapse</groupId>
+        <artifactId>Apache-Synapse</artifactId>
+        <version>2.1.0</version>
+        <relativePath>../../pom.xml</relativePath>
+    </parent>
+
+    <groupId>org.apache.synapse</groupId>
+    <artifactId>synapse-tasks</artifactId>
+
+    <name>Apache Synapse - Tasks classes</name>
+    <description>Apache Synapse - Tasks classes</description>
+    <packaging>bundle</packaging>
+
+    <scm>
+        <connection>scm:svn:http://svn.apache.org/repos/asf/synapse/tags/2.1.0/modules/tasks</connection>
+        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/synapse/tags/2.1.0/modules/tasks</developerConnection>
+        <url>http://svn.apache.org/viewvc/synapse/tags/2.1.0/modules/tasks</url>
+    </scm>
+
+    <build>
+        <plugins>
+
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-surefire-plugin</artifactId>
+                <version>2.2</version>
+            </plugin>
+
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+                <version>1.4.0</version>
+                <extensions>true</extensions>
+                <configuration>
+                    <instructions>
+                        <Bundle-SymbolicName>${pom.artifactId}</Bundle-SymbolicName>
+                        <Export-Package>
+                            org.apache.synapse.task.*,
+                        </Export-Package>
+                        <Import-Package>
+                            !javax.xml.namespace,
+                            javax.xml.namespace; version=0.0.0,
+                            *;resolution:=optional,
+                        </Import-Package>
+                        <DynamicImport-Package>*</DynamicImport-Package>
+                    </instructions>
+                </configuration>
+            </plugin>
+
+        </plugins>
+    </build>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.synapse</groupId>
+            <artifactId>synapse-commons</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.opensymphony</groupId>
+            <artifactId>quartz</artifactId>
+            <version>${quartz.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.geronimo.specs</groupId>
+            <artifactId>geronimo-jta_1.1_spec</artifactId>
+            <version>${geronimo-spec.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>commons-collections</groupId>
+            <artifactId>commons-collections</artifactId>
+            <version>${commons-collections.version}</version>
+        </dependency>
+    </dependencies>
+    <properties>
+        <!-- startup, quartz -->
+        <commons-collections.version>3.1</commons-collections.version>
+        <quartz.version>1.6.0</quartz.version>
+        <geronimo-spec.version>1.1</geronimo-spec.version>
+    </properties>
+</project>
diff --git a/modules/transports/core/nhttp/pom.xml b/modules/transports/core/nhttp/pom.xml
index e2f8adb..a2f920f 100644
--- a/modules/transports/core/nhttp/pom.xml
+++ b/modules/transports/core/nhttp/pom.xml
@@ -18,15 +18,12 @@
   ~  under the License.
   -->
 
-<project
-    xmlns="http://maven.apache.org/POM/4.0.0"
-    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
     <modelVersion>4.0.0</modelVersion>
     <parent>
         <groupId>org.apache.synapse</groupId>
         <artifactId>synapse-transports</artifactId>
-        <version>2.2.0-SNAPSHOT</version>
+        <version>2.1.0</version>
         <relativePath>../../pom.xml</relativePath>
     </parent>
 
@@ -37,9 +34,9 @@
     <packaging>bundle</packaging>
 
     <scm>
-        <connection>scm:svn:http://svn.apache.org/repos/asf/synapse/trunk/java/modules/transports/core/nhttp</connection>
-        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/synapse/trunk/java/modules/transports/core/nhttp</developerConnection>
-        <url>http://svn.apache.org/viewvc/synapse/trunk/java/modules/transports/core/nhttp</url>
+        <connection>scm:svn:http://svn.apache.org/repos/asf/synapse/tags/2.1.0/modules/transports/core/nhttp</connection>
+        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/synapse/tags/2.1.0/modules/transports/core/nhttp</developerConnection>
+        <url>http://svn.apache.org/viewvc/synapse/tags/2.1.0/modules/transports/core/nhttp</url>
     </scm>
 
     <build>
@@ -47,6 +44,7 @@
             <plugin>
                 <groupId>org.apache.felix</groupId>
                 <artifactId>maven-bundle-plugin</artifactId>
+                <version>1.4.0</version>
                 <extensions>true</extensions>
                 <configuration>
                     <instructions>
@@ -65,6 +63,7 @@
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-dependency-plugin</artifactId>
+                <version>2.0</version>
                 <executions>
                     <execution>
                         <id>copy</id>
@@ -88,6 +87,7 @@
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-surefire-plugin</artifactId>
+                <version>2.3</version>
                 <configuration>
                     <systemProperties>
                         <property>
@@ -137,10 +137,12 @@
         <dependency>
             <groupId>org.apache.httpcomponents</groupId>
             <artifactId>httpcore</artifactId>
+            <version>${httpcore.nio.version}</version>
         </dependency>
         <dependency>
             <groupId>org.apache.httpcomponents</groupId>
             <artifactId>httpcore-nio</artifactId>
+            <version>${httpcore.nio.version}</version>
         </dependency>
         <!-- The HTTP NIO transport depends on a few methods from the blocking HTTP transport,
              so we need to add this as an explicit dependency. -->
@@ -154,4 +156,8 @@
         </dependency>
     </dependencies>
 
+    <properties>
+        <httpcore.nio.version>4.1.3</httpcore.nio.version>
+    </properties>
+
 </project>
diff --git a/modules/transports/core/nhttp/src/main/java/org/apache/synapse/transport/nhttp/ClientWorker.java b/modules/transports/core/nhttp/src/main/java/org/apache/synapse/transport/nhttp/ClientWorker.java
index d160e03..2dd78c0 100644
--- a/modules/transports/core/nhttp/src/main/java/org/apache/synapse/transport/nhttp/ClientWorker.java
+++ b/modules/transports/core/nhttp/src/main/java/org/apache/synapse/transport/nhttp/ClientWorker.java
@@ -114,7 +114,6 @@
                 responseMsgCtx.setOperationContext(outMsgCtx.getOperationContext());
             }
 
-            responseMsgCtx.setProperty(MessageContext.IN_MESSAGE_CONTEXT, outMsgCtx);
             responseMsgCtx.setServerSide(true);
             responseMsgCtx.setDoingREST(outMsgCtx.isDoingREST());
             responseMsgCtx.setProperty(MessageContext.TRANSPORT_IN, outMsgCtx
diff --git a/modules/transports/core/nhttp/src/main/java/org/apache/synapse/transport/nhttp/ListenerContext.java b/modules/transports/core/nhttp/src/main/java/org/apache/synapse/transport/nhttp/ListenerContext.java
index 98059a1..f075224 100644
--- a/modules/transports/core/nhttp/src/main/java/org/apache/synapse/transport/nhttp/ListenerContext.java
+++ b/modules/transports/core/nhttp/src/main/java/org/apache/synapse/transport/nhttp/ListenerContext.java
@@ -27,8 +27,6 @@
 import org.apache.axis2.description.Parameter;
 import org.apache.axis2.description.TransportInDescription;
 import org.apache.axis2.transport.TransportListener;
-import org.apache.axis2.transport.base.endpoint.URLEndpointsConfiguration;
-import org.apache.axis2.transport.base.endpoint.config.URLEndpointsConfigurationFactory;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.http.nio.params.NIOReactorPNames;
@@ -83,9 +81,6 @@
 
     private HttpParams params = null;
 
-    /** Endpoints configuration for specific HTTP Urls */
-    private URLEndpointsConfiguration endpoints = null;
-
     public ListenerContext(ConfigurationContext cfgCtx,
                            TransportInDescription transportIn,
                            boolean ssl) {
@@ -153,12 +148,6 @@
         }
 
         params = getListenerParameters();
-
-
-        param = transportIn.getParameter(NhttpConstants.ENDPOINTS_CONFIGURATION);
-        if (param != null && param.getValue() != null) {
-            endpoints = new URLEndpointsConfigurationFactory().create(param.getValue().toString());
-        }
     }
 
 /**
@@ -313,10 +302,6 @@
         return params;
     }
 
-    public URLEndpointsConfiguration getEndpoints() {
-        return endpoints;
-    }
-
     private void handleException(String msg, Exception e) throws AxisFault {
         log.error(msg, e);
         throw new AxisFault(msg, e);
diff --git a/modules/transports/core/nhttp/src/main/java/org/apache/synapse/transport/nhttp/ServerWorker.java b/modules/transports/core/nhttp/src/main/java/org/apache/synapse/transport/nhttp/ServerWorker.java
index cb2b3a6..b34cf9f 100644
--- a/modules/transports/core/nhttp/src/main/java/org/apache/synapse/transport/nhttp/ServerWorker.java
+++ b/modules/transports/core/nhttp/src/main/java/org/apache/synapse/transport/nhttp/ServerWorker.java
@@ -28,10 +28,7 @@
 import org.apache.axis2.description.Parameter;
 import org.apache.axis2.engine.AxisEngine;
 import org.apache.axis2.transport.RequestResponseTransport;
-import org.apache.axis2.transport.TransportUtils;
 import org.apache.axis2.transport.base.MetricsCollector;
-import org.apache.axis2.transport.base.endpoint.URLEndpoint;
-import org.apache.axis2.transport.base.endpoint.URLEndpointsConfiguration;
 import org.apache.axis2.transport.http.HTTPTransportUtils;
 import org.apache.axis2.util.MessageContextBuilder;
 import org.apache.commons.logging.Log;
@@ -82,8 +79,6 @@
     private boolean isRestDispatching = true;
     /** WSDL processor for Get requests */
     private HttpGetRequestProcessor httpGetRequestProcessor = null;
-
-    private URLEndpointsConfiguration endpointsConfiguration = null;
     
     private static final String SOAPACTION   = "SOAPAction";
     private static final String LOCATION     = "Location";
@@ -128,7 +123,6 @@
         this.msgContext = createMessageContext(request);
         this.isRestDispatching = listenerContext.isRestDispatching();
         this.httpGetRequestProcessor = listenerContext.getHttpGetRequestProcessor();
-        this.endpointsConfiguration = listenerContext.getEndpoints();
     }
 
     /**
@@ -418,47 +412,19 @@
             String charSetEncoding = BuilderUtil.getCharSetEncoding(contentTypeStr);
             msgContext.setProperty(
                     Constants.Configuration.CHARACTER_SET_ENCODING, charSetEncoding);
-            boolean eprFound = false;
-            if (endpointsConfiguration != null) {
-                URLEndpoint epr = endpointsConfiguration.getEndpoint(request.getRequestLine().getUri());
-                if (epr != null) {
-                    eprFound = true;
-                    String type = TransportUtils.getContentType(contentTypeStr, msgContext);
-                    msgContext.setProperty(Constants.Configuration.MESSAGE_TYPE, type);
-                    epr.setParameters(msgContext);
 
-                    Builder builder = epr.getBuilder(type);
-                    if (HTTPTransportUtils.isRESTRequest(contentTypeStr)) {
-                        RESTUtil.processPOSTRequest(msgContext, is, os,
-                                request.getRequestLine().getUri(), contentType, builder, isRestDispatching);
-                    } else {
+            if (HTTPTransportUtils.isRESTRequest(contentTypeStr)) {
+                RESTUtil.processPOSTRequest(msgContext, is, os,
+                        request.getRequestLine().getUri(), contentType, isRestDispatching);
+            } else {
 
-                        Header soapAction = request.getFirstHeader(SOAPACTION);
-                        HTTPTransportUtils.processHTTPPostRequest(
-                                msgContext, is,
-                                os,
-                                contentTypeStr, builder,
-                                (soapAction != null ? soapAction.getValue() : null),
-                                request.getRequestLine().getUri());
-                    }
-                }
-            }
-
-            if (!eprFound) {
-                if (HTTPTransportUtils.isRESTRequest(contentTypeStr)) {
-                    RESTUtil.processPOSTRequest(msgContext, is, os,
-                            request.getRequestLine().getUri(), contentType, isRestDispatching);
-                } else {
-
-                    Header soapAction = request.getFirstHeader(SOAPACTION);
-                    HTTPTransportUtils.processHTTPPostRequest(
-                            msgContext, is,
-                            os,
-                            contentTypeStr,
-                            (soapAction != null ? soapAction.getValue() : null),
-                            request.getRequestLine().getUri());
-                }
-
+                Header soapAction  = request.getFirstHeader(SOAPACTION);
+                HTTPTransportUtils.processHTTPPostRequest(
+                        msgContext, is,
+                        os,
+                        contentTypeStr,
+                        (soapAction != null  ? soapAction.getValue()  : null),
+                        request.getRequestLine().getUri());
             }
         } catch (AxisFault e) {
             handleException("Error processing POST request ", e);
@@ -498,40 +464,15 @@
      */
     private void processGetAndDelete(String method) {
         try {
-            Header contentType = request.getFirstHeader(HTTP.CONTENT_TYPE);
-            String contentTypeStr = contentType != null ?
-                    contentType.getValue() : inferContentType();
-
-            boolean eprFound = false;
-            if (endpointsConfiguration != null) {
-                URLEndpoint epr = endpointsConfiguration.getEndpoint(request.getRequestLine().getUri());
-                if (epr != null) {
-                    eprFound = true;
-                    String type = TransportUtils.getContentType(contentTypeStr, msgContext);
-                    msgContext.setProperty(Constants.Configuration.MESSAGE_TYPE, type);
-
-                    epr.setParameters(msgContext);
-
-                    Builder builder = epr.getBuilder(type);
-                    RESTUtil.processGetAndDeleteRequest(
-                            msgContext, os, request.getRequestLine().getUri(),
-                            request.getFirstHeader(HTTP.CONTENT_TYPE), builder,
-                            method, isRestDispatching);
-                }
-            }
-
-            if (!eprFound) {
-                RESTUtil.processGetAndDeleteRequest(
-                        msgContext, os, request.getRequestLine().getUri(),
-                        request.getFirstHeader(HTTP.CONTENT_TYPE), method, isRestDispatching);
-            }
+            RESTUtil.processGetAndDeleteRequest(
+                    msgContext, os, request.getRequestLine().getUri(),
+                    request.getFirstHeader(HTTP.CONTENT_TYPE), method, isRestDispatching);
             // do not let the output stream close (as by default below) since
             // we are serving this GET/DELETE request through the Synapse engine
         } catch (AxisFault axisFault) {
             handleException("Error processing " + method + " request for: " +
                     request.getRequestLine().getUri(), axisFault);
         }
-
     }
 
     private void handleException(String msg, Exception e) {
diff --git a/modules/transports/core/nhttp/src/main/java/org/apache/synapse/transport/nhttp/util/RESTUtil.java b/modules/transports/core/nhttp/src/main/java/org/apache/synapse/transport/nhttp/util/RESTUtil.java
index 7836d9b..be0da99 100755
--- a/modules/transports/core/nhttp/src/main/java/org/apache/synapse/transport/nhttp/util/RESTUtil.java
+++ b/modules/transports/core/nhttp/src/main/java/org/apache/synapse/transport/nhttp/util/RESTUtil.java
@@ -141,33 +141,7 @@
                 contentType);
     }
 
-    /**
-     * Processes the HTTP GET / DELETE request and builds the SOAP info-set of the REST message
-     *
-     * @param msgContext        The MessageContext of the Request Message
-     * @param out               The output stream of the response
-     * @param requestURI        The URL that the request came to
-     * @param contentTypeHeader The contentType header of the request
-     * @param builder           The message builder to use
-     * @param httpMethod        The http method of the request
-     * @param dispatching   Weather we should do service dispatching
-     * @throws AxisFault - Thrown in case a fault occurs
-     */
-    public static void processGetAndDeleteRequest(MessageContext msgContext, OutputStream out,
-                                                  String requestURI, Header contentTypeHeader,
-                                                  Builder builder, String httpMethod,
-                                                  boolean dispatching)
-            throws AxisFault {
 
-        String contentType = contentTypeHeader != null ? contentTypeHeader.getValue() : null;
-
-        prepareMessageContext(msgContext, requestURI, httpMethod, out, contentType, dispatching);
-
-        msgContext.setProperty(NhttpConstants.NO_ENTITY_BODY, Boolean.TRUE);
-
-        org.apache.axis2.transport.http.util.RESTUtil.processURLRequest(msgContext, out,
-                contentType, builder);
-    }
 
     /**
      * Processes the HTTP GET request and builds the SOAP info-set of the REST message
@@ -218,29 +192,7 @@
                 contentType);
     }
 
-    /**
-     * Processes the HTTP POST request and builds the SOAP info-set of the REST message
-     *
-     * @param msgContext        The MessageContext of the Request Message
-     * @param is                The  input stream of the request
-     * @param os                The output stream of the response
-     * @param requestURI        The URL that the request came to
-     * @param contentTypeHeader The contentType header of the request
-     * @param builder           The message builder to use
-     * @param dispatching  Weather we should do dispatching
-     * @throws AxisFault - Thrown in case a fault occurs
-     */
-    public static void processPOSTRequest(MessageContext msgContext, InputStream is,
-                                          OutputStream os, String requestURI,
-                                          Header contentTypeHeader, Builder builder,
-                                          boolean dispatching) throws AxisFault {
 
-        String contentType = contentTypeHeader != null ? contentTypeHeader.getValue() : null;
-        prepareMessageContext(msgContext, requestURI, HTTPConstants.HTTP_METHOD_POST,
-                os, contentType, dispatching);
-        org.apache.axis2.transport.http.util.RESTUtil.processXMLRequest(msgContext, is, os,
-                contentType, builder);
-    }
 
     /**
      * prepare message context prior to call axis2 RestUtils
diff --git a/modules/transports/core/nhttp/src/test/java/org/apache/synapse/transport/nhttp/HttpCoreNIOListenerTest.java b/modules/transports/core/nhttp/src/test/java/org/apache/synapse/transport/nhttp/HttpCoreNIOListenerTest.java
index 1a1abbc..2b0de20 100644
--- a/modules/transports/core/nhttp/src/test/java/org/apache/synapse/transport/nhttp/HttpCoreNIOListenerTest.java
+++ b/modules/transports/core/nhttp/src/test/java/org/apache/synapse/transport/nhttp/HttpCoreNIOListenerTest.java
@@ -23,6 +23,7 @@
 import junit.framework.TestSuite;
 
 import org.apache.axis2.transport.testkit.ManagedTestSuite;
+import org.apache.axis2.transport.testkit.axis2.SimpleTransportDescriptionFactory;
 import org.apache.axis2.transport.testkit.axis2.TransportDescriptionFactory;
 import org.apache.axis2.transport.testkit.http.HttpTransportTestSuiteBuilder;
 
@@ -33,8 +34,9 @@
         // These tests don't work because of a problem similar to SYNAPSE-418
         suite.addExclude("(test=EchoXML)");
         
-        TransportDescriptionFactory tdfNIO = new HttpTransportDescriptionFactory();
-        
+        TransportDescriptionFactory tdfNIO =
+                new SimpleTransportDescriptionFactory("http", HttpCoreNIOListener.class,
+                HttpCoreNIOSender.class);
         HttpTransportTestSuiteBuilder builder = new HttpTransportTestSuiteBuilder(suite, tdfNIO);
         
         builder.addAxisTestClientConfigurator(new HttpAxisTestClientConfigurator(false));
diff --git a/modules/transports/core/nhttp/src/test/java/org/apache/synapse/transport/nhttp/HttpTransportDescriptionFactory.java b/modules/transports/core/nhttp/src/test/java/org/apache/synapse/transport/nhttp/HttpTransportDescriptionFactory.java
deleted file mode 100644
index dff7a8c..0000000
--- a/modules/transports/core/nhttp/src/test/java/org/apache/synapse/transport/nhttp/HttpTransportDescriptionFactory.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- *  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.
- */
-
-package org.apache.synapse.transport.nhttp;
-
-import org.apache.axis2.description.Parameter;
-import org.apache.axis2.description.TransportInDescription;
-import org.apache.axis2.description.TransportOutDescription;
-import org.apache.axis2.transport.testkit.axis2.TransportDescriptionFactory;
-import org.apache.axis2.transport.testkit.http.HttpTestEnvironment;
-import org.apache.axis2.transport.testkit.tests.Setup;
-
-public class HttpTransportDescriptionFactory implements TransportDescriptionFactory {
-    private int port;
-    
-    @Setup @SuppressWarnings("unused")
-    private void setUp(HttpTestEnvironment env) {
-        port = env.getServerPort();
-    }
-
-    public TransportInDescription createTransportInDescription() throws Exception {
-        TransportInDescription desc = new TransportInDescription("http");
-        desc.setReceiver(new HttpCoreNIOListener());
-        desc.addParameter(new Parameter(HttpCoreNIOListener.PARAM_PORT, String.valueOf(port)));
-        return desc;
-    }
-
-    public TransportOutDescription createTransportOutDescription() throws Exception {
-        TransportOutDescription desc = new TransportOutDescription("http");
-        desc.setSender(new HttpCoreNIOSender());
-        return desc;
-    }
-}
diff --git a/modules/transports/core/pipe/pom.xml b/modules/transports/core/pipe/pom.xml
index f4a8f25..a312850 100644
--- a/modules/transports/core/pipe/pom.xml
+++ b/modules/transports/core/pipe/pom.xml
@@ -18,15 +18,12 @@
   ~  under the License.
   -->
 
-<project
-    xmlns="http://maven.apache.org/POM/4.0.0"
-    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
     <modelVersion>4.0.0</modelVersion>
     <parent>
         <groupId>org.apache.synapse</groupId>
         <artifactId>synapse-transports</artifactId>
-        <version>2.2.0-SNAPSHOT</version>
+        <version>2.1.0</version>
         <relativePath>../../pom.xml</relativePath>
     </parent>
 
@@ -37,9 +34,9 @@
     <packaging>bundle</packaging>
 
     <scm>
-        <connection>scm:svn:http://svn.apache.org/repos/asf/synapse/trunk/java/modules/transports/core/pipe</connection>
-        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/synapse/trunk/java/modules/transports/core/pipe</developerConnection>
-        <url>http://svn.apache.org/viewvc/synapse/trunk/java/modules/transports/core/pipe</url>
+        <connection>scm:svn:http://svn.apache.org/repos/asf/synapse/tags/2.1.0/modules/transports/core/pipe</connection>
+        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/synapse/tags/2.1.0/modules/transports/core/pipe</developerConnection>
+        <url>http://svn.apache.org/viewvc/synapse/tags/2.1.0/modules/transports/core/pipe</url>
     </scm>
 
     <build>
@@ -47,6 +44,7 @@
             <plugin>
                 <groupId>org.apache.felix</groupId>
                 <artifactId>maven-bundle-plugin</artifactId>
+                <version>1.4.0</version>
                 <extensions>true</extensions>
                 <configuration>
                     <instructions>
@@ -63,4 +61,6 @@
         </plugins>
     </build>
 
+    <dependencies>
+    </dependencies>
 </project>
\ No newline at end of file
diff --git a/modules/transports/core/pipe/src/main/java/org/apache/synapse/transport/pipe/PipeEndpoint.java b/modules/transports/core/pipe/src/main/java/org/apache/synapse/transport/pipe/PipeEndpoint.java
index 155bfb1..d11fd68 100644
--- a/modules/transports/core/pipe/src/main/java/org/apache/synapse/transport/pipe/PipeEndpoint.java
+++ b/modules/transports/core/pipe/src/main/java/org/apache/synapse/transport/pipe/PipeEndpoint.java
@@ -57,8 +57,8 @@
     }
 
     @Override
-	public EndpointReference[] getEndpointReferences(AxisService service, String ip) {
+	public EndpointReference[] getEndpointReferences(String ip) {
 		return new EndpointReference[] { new EndpointReference("pipe://" + pipe.getAbsolutePath()
 		        + "?contentType=" + getContentType()) };
 	}
-}
+}
\ No newline at end of file
diff --git a/modules/transports/core/pipe/src/main/java/org/apache/synapse/transport/pipe/PipeEndpointListener.java b/modules/transports/core/pipe/src/main/java/org/apache/synapse/transport/pipe/PipeEndpointListener.java
index 42796e4..33ad42c 100644
--- a/modules/transports/core/pipe/src/main/java/org/apache/synapse/transport/pipe/PipeEndpointListener.java
+++ b/modules/transports/core/pipe/src/main/java/org/apache/synapse/transport/pipe/PipeEndpointListener.java
@@ -104,7 +104,7 @@
                         readBuffer.rewind();
                     }
                     byte[] message = decoder.getNext();
-                    callback.receive(endpoint, message, message.length, null);
+                    callback.receive(endpoint, message, message.length);
                 }
             }
         }
diff --git a/modules/transports/core/pipe/src/main/java/org/apache/synapse/transport/pipe/PipeListener.java b/modules/transports/core/pipe/src/main/java/org/apache/synapse/transport/pipe/PipeListener.java
index f6400a0..fa50012 100644
--- a/modules/transports/core/pipe/src/main/java/org/apache/synapse/transport/pipe/PipeListener.java
+++ b/modules/transports/core/pipe/src/main/java/org/apache/synapse/transport/pipe/PipeListener.java
@@ -26,6 +26,8 @@
 import org.apache.axis2.transport.base.ParamUtils;
 import org.apache.axis2.transport.base.datagram.AbstractDatagramTransportListener;
 import org.apache.axis2.transport.base.datagram.DatagramDispatcherCallback;
+import org.apache.axis2.context.ConfigurationContext;
+
 
 /**
  * Transport listener for UNIX pipes.
@@ -53,10 +55,10 @@
  */
 public class PipeListener extends AbstractDatagramTransportListener<PipeEndpoint> implements ManagementSupport {
     private Protocol protocol;
-    
+
     @Override
-    protected void doInit() throws AxisFault {
-        TransportInDescription transportIn = getTransportInDescription();
+    public void init(ConfigurationContext cfgCtx, TransportInDescription transportIn) throws AxisFault {
+        super.init(cfgCtx, transportIn);
         String protocolClassName = ParamUtils.getRequiredParam(transportIn, "protocol");
         Class<? extends Protocol> protocolClass;
         try {
@@ -87,4 +89,4 @@
         endpoint.setProtocol(protocol);
         return endpoint;
     }
-}
+}
\ No newline at end of file
diff --git a/modules/transports/core/vfs/pom.xml b/modules/transports/core/vfs/pom.xml
index 0f36a70..1aeb421 100644
--- a/modules/transports/core/vfs/pom.xml
+++ b/modules/transports/core/vfs/pom.xml
@@ -18,15 +18,12 @@
   ~  under the License.
   -->
 
-<project
-    xmlns="http://maven.apache.org/POM/4.0.0"
-    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
     <modelVersion>4.0.0</modelVersion>
     <parent>
         <groupId>org.apache.synapse</groupId>
         <artifactId>synapse-transports</artifactId>
-        <version>2.2.0-SNAPSHOT</version>
+        <version>2.1.0</version>
         <relativePath>../../pom.xml</relativePath>
     </parent>
 
@@ -37,9 +34,9 @@
     <packaging>bundle</packaging>
 
     <scm>
-        <connection>scm:svn:http://svn.apache.org/repos/asf/synapse/trunk/java/modules/transports/core/vfs</connection>
-        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/synapse/trunk/java/modules/transports/core/vfs</developerConnection>
-        <url>http://svn.apache.org/viewvc/synapse/trunk/java/modules/transports/core/vfs</url>
+        <connection>scm:svn:http://svn.apache.org/repos/asf/synapse/tags/2.1.0/modules/transports/core/vfs</connection>
+        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/synapse/tags/2.1.0/modules/transports/core/vfs</developerConnection>
+        <url>http://svn.apache.org/viewvc/synapse/tags/2.1.0/modules/transports/core/vfs</url>
     </scm>
 
     <build>
@@ -47,6 +44,7 @@
             <plugin>
                 <groupId>org.apache.felix</groupId>
                 <artifactId>maven-bundle-plugin</artifactId>
+                <version>1.4.0</version>
                 <extensions>true</extensions>
                 <configuration>
                     <instructions>
@@ -67,6 +65,7 @@
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-dependency-plugin</artifactId>
+                <version>2.0</version>
                 <executions>
                     <execution>
                         <id>copy</id>
@@ -90,6 +89,7 @@
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-surefire-plugin</artifactId>
+                <version>2.3</version>
                 <configuration>
                     <systemProperties>
                         <property>
@@ -114,6 +114,7 @@
                 <plugins>
                     <plugin>
                         <artifactId>maven-assembly-plugin</artifactId>
+                        <version>2.2-beta-2</version>
                         <configuration>
                             <descriptors>
                                 <descriptor>src/main/assembly/testkit-logs.xml</descriptor>
@@ -138,18 +139,44 @@
         <dependency>
             <groupId>org.apache.commons</groupId>
             <artifactId>commons-vfs2</artifactId>
+            <version>${commons.vfs.version}</version>
         </dependency>
         <dependency>
+            <groupId>org.apache.mina</groupId>
+            <artifactId>mina-core</artifactId>
+            <version>${mina.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-api</artifactId>
+            <version>${slf4j.version}</version>
+        </dependency>
+
+        <dependency>
             <groupId>de.schlichtherle.io</groupId>
             <artifactId>truezip</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>com.jcraft</groupId>
-            <artifactId>jsch</artifactId>
+            <version>${truezip.version}</version>
+            <optional>true</optional>
         </dependency>
         <dependency>
             <groupId>commons-net</groupId>
             <artifactId>commons-net</artifactId>
+            <version>${commons.net.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>com.jcraft</groupId>
+            <artifactId>jsch</artifactId>
+            <version>${jsch.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>oro</groupId>
+            <artifactId>oro</artifactId>
+            <version>${oro.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>commons-io</groupId>
+            <artifactId>commons-io</artifactId>
+            <version>${commons_io.version}</version>
         </dependency>
     </dependencies>
 </project>
diff --git a/modules/transports/core/vfs/src/main/java/org/apache/synapse/transport/vfs/PollTableEntry.java b/modules/transports/core/vfs/src/main/java/org/apache/synapse/transport/vfs/PollTableEntry.java
index cb72aab..3ceef80 100644
--- a/modules/transports/core/vfs/src/main/java/org/apache/synapse/transport/vfs/PollTableEntry.java
+++ b/modules/transports/core/vfs/src/main/java/org/apache/synapse/transport/vfs/PollTableEntry.java
@@ -20,7 +20,6 @@
 
 import org.apache.axis2.AxisFault;
 import org.apache.axis2.addressing.EndpointReference;
-import org.apache.axis2.description.AxisService;
 import org.apache.axis2.description.ParameterInclude;
 import org.apache.axis2.transport.base.AbstractPollTableEntry;
 import org.apache.axis2.transport.base.ParamUtils;
@@ -103,11 +102,12 @@
             return failedRecordTimestampFormat;
       }
 
-      @Override
-    public EndpointReference[] getEndpointReferences(AxisService service, String ip) {
+    @Override
+    public EndpointReference[] getEndpointReferences(String ip) {
         return new EndpointReference[] { new EndpointReference("vfs:" + fileURI) };
     }
 
+
     public String getFileURI() {
         return fileURI;
     }
diff --git a/modules/transports/core/vfs/src/main/java/org/apache/synapse/transport/vfs/VFSTransportListener.java b/modules/transports/core/vfs/src/main/java/org/apache/synapse/transport/vfs/VFSTransportListener.java
index 1354fcc..afa4d9d 100644
--- a/modules/transports/core/vfs/src/main/java/org/apache/synapse/transport/vfs/VFSTransportListener.java
+++ b/modules/transports/core/vfs/src/main/java/org/apache/synapse/transport/vfs/VFSTransportListener.java
@@ -24,7 +24,9 @@
 import org.apache.axis2.builder.Builder;
 import org.apache.axis2.builder.BuilderUtil;
 import org.apache.axis2.builder.SOAPBuilder;
+import org.apache.axis2.context.ConfigurationContext;
 import org.apache.axis2.context.MessageContext;
+import org.apache.axis2.description.TransportInDescription;
 import org.apache.axis2.description.Parameter;
 import org.apache.axis2.format.DataSourceMessageBuilder;
 import org.apache.axis2.format.ManagedDataSource;
@@ -128,15 +130,15 @@
     private volatile int removeTaskState = STATE_STOPPED;
 
     @Override
-    protected void doInit() throws AxisFault {
-        super.doInit();
+    public void init(ConfigurationContext cfgCtx, TransportInDescription trpInDesc)
+        throws AxisFault {
+        super.init(cfgCtx, trpInDesc);
         try {
             StandardFileSystemManager fsm = new StandardFileSystemManager();
             fsm.setConfiguration(getClass().getClassLoader().getResource("providers.xml"));
             fsm.init();
-            this.workerPool = super.workerPool;
             fsManager = fsm;
-            Parameter lockFlagParam = getTransportInDescription().getParameter(VFSConstants.TRANSPORT_FILE_LOCKING);
+            Parameter lockFlagParam = trpInDesc.getParameter(VFSConstants.TRANSPORT_FILE_LOCKING);
             if (lockFlagParam != null) {
                 String strLockingFlag = lockFlagParam.getValue().toString();
                 // by-default enabled, if explicitly specified as "disable" make it disable
diff --git a/modules/transports/optional/fix/pom.xml b/modules/transports/optional/fix/pom.xml
index b21ad7d..471b0a9 100644
--- a/modules/transports/optional/fix/pom.xml
+++ b/modules/transports/optional/fix/pom.xml
@@ -18,15 +18,12 @@
   ~  under the License.
   -->
 
-<project
-    xmlns="http://maven.apache.org/POM/4.0.0"
-    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
     <modelVersion>4.0.0</modelVersion>
     <parent>
         <groupId>org.apache.synapse</groupId>
         <artifactId>synapse-transports</artifactId>
-        <version>2.2.0-SNAPSHOT</version>
+        <version>2.1.0</version>
         <relativePath>../../pom.xml</relativePath>
     </parent>
 
@@ -37,9 +34,9 @@
     <packaging>bundle</packaging>
 
     <scm>
-        <connection>scm:svn:http://svn.apache.org/repos/asf/synapse/trunk/java/modules/transports/optional/fix</connection>
-        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/synapse/trunk/java/modules/transports/optional/fix</developerConnection>
-        <url>http://svn.apache.org/viewvc/synapse/trunk/java/modules/transports/core/optional/fix</url>
+        <connection>scm:svn:http://svn.apache.org/repos/asf/synapse/tags/2.1.0/modules/transports/optional/fix</connection>
+        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/synapse/tags/2.1.0/modules/transports/optional/fix</developerConnection>
+        <url>http://svn.apache.org/viewvc/synapse/tags/2.1.0/modules/transports/optional/fix</url>
     </scm>
 
     <build>
@@ -47,6 +44,7 @@
             <plugin>
                 <groupId>org.apache.felix</groupId>
                 <artifactId>maven-bundle-plugin</artifactId>
+                <version>1.4.0</version>
                 <extensions>true</extensions>
                 <configuration>
                     <instructions>
@@ -112,11 +110,17 @@
         <dependency>
             <groupId>quickfixj</groupId>
             <artifactId>quickfixj-all</artifactId>
+            <version>${qfj.version}</version>
         </dependency>
         <dependency>
-            <groupId>xmlunit</groupId>
-            <artifactId>xmlunit</artifactId>
+            <groupId>org.apache.synapse</groupId>
+            <artifactId>synapse-core</artifactId>
+            <scope>test</scope>            
         </dependency>
     </dependencies>
 
+    <properties>
+        <qfj.version>1.4.0</qfj.version>
+    </properties>
+
 </project>
diff --git a/modules/transports/pom.xml b/modules/transports/pom.xml
index 8e19be1..a57ad7c 100644
--- a/modules/transports/pom.xml
+++ b/modules/transports/pom.xml
@@ -18,15 +18,12 @@
   ~  under the License.
   -->
 
-<project
-    xmlns="http://maven.apache.org/POM/4.0.0"
-    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
     <modelVersion>4.0.0</modelVersion>
     <parent>
         <groupId>org.apache.synapse</groupId>
         <artifactId>Apache-Synapse</artifactId>
-        <version>2.2.0-SNAPSHOT</version>
+        <version>2.1.0</version>
         <relativePath>../../pom.xml</relativePath>
     </parent>
 
@@ -37,9 +34,9 @@
     <packaging>pom</packaging>
 
     <scm>
-        <connection>scm:svn:http://svn.apache.org/repos/asf/synapse/trunk/java/modules/transports</connection>
-        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/synapse/trunk/java/modules/transports</developerConnection>
-        <url>http://svn.apache.org/viewvc/synapse/trunk/java/modules/transports</url>
+        <connection>scm:svn:http://svn.apache.org/repos/asf/synapse/tags/2.1.0/modules/transports</connection>
+        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/synapse/tags/2.1.0/modules/transports</developerConnection>
+        <url>http://svn.apache.org/viewvc/synapse/tags/2.1.0/modules/transports</url>
     </scm>
 
     <modules>
@@ -49,6 +46,16 @@
         <module>optional/fix</module>
     </modules>
 
+    <dependencyManagement>
+        <dependencies>
+            <dependency>
+                <groupId>org.aspectj</groupId>
+                <artifactId>aspectjweaver</artifactId>
+                <version>${aspectj.version}</version>
+            </dependency>
+        </dependencies>
+    </dependencyManagement>
+
     <dependencies>
         <dependency>
             <groupId>org.apache.synapse</groupId>
@@ -64,10 +71,17 @@
             <groupId>org.apache.axis2</groupId>
             <artifactId>axis2-transport-base</artifactId>
         </dependency>
+
         <dependency>
             <groupId>org.apache.axis2</groupId>
             <artifactId>axis2-transport-testkit</artifactId>
+            <version>${axis2.transport.version}</version>
+            <scope>test</scope>
         </dependency>
     </dependencies>
 
+    <properties>
+        <aspectj.version>1.6.1</aspectj.version>
+    </properties>
+
 </project>
diff --git a/modules/war/pom.xml b/modules/war/pom.xml
index 5cd9791..bff0f33 100644
--- a/modules/war/pom.xml
+++ b/modules/war/pom.xml
@@ -18,42 +18,43 @@
   ~  under the License.
   -->
 
-<project
-        xmlns="http://maven.apache.org/POM/4.0.0"
-        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-        xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
     <modelVersion>4.0.0</modelVersion>
     <parent>
         <groupId>org.apache.synapse</groupId>
         <artifactId>Apache-Synapse</artifactId>
-        <version>2.2.0-SNAPSHOT</version>
+        <version>2.1.0</version>
         <relativePath>../../pom.xml</relativePath>
     </parent>
 
     <groupId>org.apache.synapse</groupId>
     <artifactId>synapse-war</artifactId>
+
     <name>Apache Synapse - Web Application</name>
     <description>Apache Synapse - Web Application</description>
     <packaging>war</packaging>
 
     <scm>
-        <connection>scm:svn:http://svn.apache.org/repos/asf/synapse/trunk/java/modules/war</connection>
-        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/synapse/trunk/java/modules/war</developerConnection>
-        <url>http://svn.apache.org/viewvc/synapse/trunk/java/modules/war</url>
+        <connection>scm:svn:http://svn.apache.org/repos/asf/synapse/tags/2.1.0/modules/war</connection>
+        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/synapse/tags/2.1.0/modules/war</developerConnection>
+        <url>http://svn.apache.org/viewvc/synapse/tags/2.1.0/modules/war</url>
     </scm>
 
     <dependencies>
         <dependency>
             <groupId>org.apache.synapse</groupId>
             <artifactId>synapse-extensions</artifactId>
+            <version>${pom.version}</version>
         </dependency>
         <dependency>
             <groupId>org.apache.synapse</groupId>
             <artifactId>synapse-samples</artifactId>
+            <version>${pom.version}</version>
         </dependency>
         <dependency>
             <groupId>org.apache.synapse</groupId>
             <artifactId>synapse-experimental</artifactId>
+            <version>${pom.version}</version>
         </dependency>
         
         <!-- Because of a design flaw in Axis2 (see AXIS2-4265), axis2-codegen is required
@@ -81,6 +82,7 @@
         <dependency>
             <groupId>org.apache.synapse</groupId>
             <artifactId>synapse-patches</artifactId>
+            <version>${pom.version}</version>
         </dependency>
     </dependencies>
 
@@ -90,6 +92,7 @@
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-dependency-plugin</artifactId>
+                <version>2.1</version>
                 <executions>
                     <execution>
                         <id>copy</id>
@@ -139,9 +142,11 @@
                     </execution>
                 </executions>
             </plugin>
+
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-war-plugin</artifactId>
+                <version>2.1-alpha-2</version>
                 <configuration>
                     <warName>synapse</warName>
                     <archive>
@@ -202,15 +207,8 @@
                             </includes>
                         </resource>
                         <resource>
-                            <directory>../../src/site/resources</directory>
-                            <targetPath>docs</targetPath>
-                            <includes>
-                                <include>Synapse_Configuration_Language.html</include>
-                                <include>Synapse_Samples.html</include>
-                                <include>Synapse_Samples_Setup.html</include>
-                                <include>Synapse_QuickStart.html</include>
-                                <include>Synapse_Extending.html</include>
-                            </includes>
+                            <directory>../../target/site</directory>
+                            <targetPath>docs</targetPath>                            
                         </resource>
                         <!--<resource>-->
                             <!--<directory>modules/samples/services</directory>-->
diff --git a/modules/xar-maven-plugin/pom.xml b/modules/xar-maven-plugin/pom.xml
index beff204..a51c954 100644
--- a/modules/xar-maven-plugin/pom.xml
+++ b/modules/xar-maven-plugin/pom.xml
@@ -17,48 +17,58 @@
   ~  specific language governing permissions and limitations
   ~  under the License.
   -->
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
     <modelVersion>4.0.0</modelVersion>
     <parent>
         <groupId>org.apache.synapse</groupId>
         <artifactId>Apache-Synapse</artifactId>
-        <version>2.2.0-SNAPSHOT</version>
+        <version>2.1.0</version>
         <relativePath>../../pom.xml</relativePath>
     </parent>
-
     <artifactId>synapse-xar-maven-plugin</artifactId>
     <packaging>maven-plugin</packaging>
     <name>Apache Synapse - XAR Maven Plugin</name>
     <description>Maven 2 plugin to create Synapse extension archives</description>
 
     <scm>
-        <connection>scm:svn:http://svn.apache.org/repos/asf/synapse/trunk/java/modules/xar-maven-plugin</connection>
-        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/synapse/trunk/java/modules/xar-maven-plugin</developerConnection>
-        <url>http://svn.apache.org/viewvc/synapse/trunk/java/modules/xar-maven-plugin</url>
+        <connection>scm:svn:http://svn.apache.org/repos/asf/synapse/tags/2.1.0/modules/xar-maven-plugin</connection>
+        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/synapse/tags/2.1.0/modules/xar-maven-plugin</developerConnection>
+        <url>http://svn.apache.org/viewvc/synapse/tags/2.1.0/modules/xar-maven-plugin</url>
     </scm>
     
+    <properties>
+        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+        <maven.version>2.0.7</maven.version>
+        <maven.artifact.version>2.0.8</maven.artifact.version>
+        <maven.archiver.version>2.2</maven.archiver.version>
+        <plexus.utils.version>1.5.4</plexus.utils.version>
+    </properties>
+    
     <dependencies>
         <dependency>
             <groupId>org.apache.maven</groupId>
             <artifactId>maven-plugin-api</artifactId>
+            <version>${maven.version}</version>
         </dependency>
         <dependency>
             <groupId>org.apache.maven</groupId>
             <artifactId>maven-project</artifactId>
+            <version>${maven.version}</version>
         </dependency>
         <dependency>
             <groupId>org.apache.maven</groupId>
             <artifactId>maven-artifact</artifactId>
+            <version>${maven.artifact.version}</version>
         </dependency>
         <dependency>
             <groupId>org.apache.maven</groupId>
             <artifactId>maven-archiver</artifactId>
+            <version>${maven.archiver.version}</version>
         </dependency>
         <dependency>
             <groupId>org.codehaus.plexus</groupId>
             <artifactId>plexus-utils</artifactId>
+            <version>${plexus.utils.version}</version>
         </dependency>
     </dependencies>
     
@@ -66,6 +76,10 @@
         <plugins>
             <plugin>
                 <artifactId>maven-compiler-plugin</artifactId>
+                <configuration>
+                    <source>1.5</source>
+                    <target>1.5</target>
+                </configuration>
             </plugin>
         </plugins>
     </build>
diff --git a/pom.xml b/pom.xml
index 484c706..bab3111 100644
--- a/pom.xml
+++ b/pom.xml
@@ -18,10 +18,7 @@
   ~  under the License.
   -->
 
-<project
-        xmlns="http://maven.apache.org/POM/4.0.0"
-        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-        xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
     <modelVersion>4.0.0</modelVersion>
 
     <parent>
@@ -32,7 +29,7 @@
 
     <groupId>org.apache.synapse</groupId>
     <artifactId>Apache-Synapse</artifactId>
-    <version>2.2.0-SNAPSHOT</version>
+    <version>2.1.0</version>
 
     <name>Apache Synapse</name>
     <description>Apache Synapse</description>
@@ -59,7 +56,7 @@
             <post>user@synapse.apache.org</post>
             <archive>http://mail-archives.apache.org/mod_mbox/synapse-user/</archive>
         </mailingList>
-	    <mailingList>
+	<mailingList>
             <name>Apache Synapse Commits List</name>
             <subscribe>commits-subscribe@synapse.apache.org</subscribe>
             <unsubscribe>commits-unsubscribe@synapse.apache.org</unsubscribe>
@@ -79,9 +76,9 @@
     </licenses>
 
     <scm>
-        <connection>scm:svn:http://svn.apache.org/repos/asf/synapse/trunk/java</connection>
-        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/synapse/trunk/java</developerConnection>
-        <url>http://svn.apache.org/viewvc/synapse/trunk/java/</url>
+        <connection>scm:svn:http://svn.apache.org/repos/asf/synapse/tags/2.1.0</connection>
+        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/synapse/tags/2.1.0</developerConnection>
+        <url>http://svn.apache.org/viewvc/synapse/tags/2.1.0</url>
     </scm>
 
     <organization>
@@ -96,6 +93,7 @@
                 <plugins>
                     <plugin>
                         <artifactId>maven-javadoc-plugin</artifactId>
+                        <version>2.1</version>
                         <executions>
                             <execution>
                                 <goals>
@@ -204,197 +202,93 @@
         <pluginManagement>
             <plugins>
                 <plugin>
-                    <groupId>org.apache.maven.plugins</groupId>
                     <artifactId>maven-clean-plugin</artifactId>
-                    <version>2.4.1</version>
+                    <version>2.2</version>
                 </plugin>
                 <plugin>
-                    <groupId>org.apache.maven.plugins</groupId>
                     <artifactId>maven-resources-plugin</artifactId>
-                    <version>2.5</version>
+                    <version>2.2</version>
                 </plugin>
                 <plugin>
-                    <groupId>org.apache.maven.plugins</groupId>
                     <artifactId>maven-site-plugin</artifactId>
-                    <version>3.0</version>
-                </plugin>
-                <plugin>
-                    <groupId>org.apache.maven.plugins</groupId>
-                    <artifactId>maven-compiler-plugin</artifactId>
-                    <version>2.3.2</version>
-                    <configuration>
-                        <source>1.5</source>
-                        <target>1.5</target>
-                    </configuration>
-                </plugin>
-                <plugin>
-                    <groupId>org.apache.maven.plugins</groupId>
-                    <artifactId>maven-jar-plugin</artifactId>
-                    <version>2.3.2</version>
-                    <configuration>
-                        <archive>
-                            <manifestEntries>
-                                <Extension-Name>${pom.groupId}</Extension-Name>
-                                <Specification-Title>${pom.artifactId}</Specification-Title>
-                                <Specification-Vendor>Apache Software Foundation</Specification-Vendor>
-                                <Specification-Version>${pom.version}</Specification-Version>
-                                <Implementation-Title>Apache Synapse</Implementation-Title>
-                                <Implementation-Vendor-Id>org.apache</Implementation-Vendor-Id>
-                                <Implementation-Vendor>Apache Software Foundation</Implementation-Vendor>
-                                <Implementation-Version>${pom.version}</Implementation-Version>
-                            </manifestEntries>
-                        </archive>
-                    </configuration>
-                </plugin>
-                <plugin>
-                    <groupId>org.apache.maven.plugins</groupId>
-                    <artifactId>maven-surefire-plugin</artifactId>
-                    <version>2.11</version>
-                    <configuration>
-                        <argLine>-Xms128m -Xmx256m</argLine>
-                    </configuration>
-                </plugin>
-                <plugin>
-                    <groupId>org.apache.maven.plugins</groupId>
-                    <artifactId>maven-surefire-report-plugin</artifactId>
-                    <version>2.11</version>
-                </plugin>
-                <plugin>
-                    <groupId>org.apache.felix</groupId>
-                    <artifactId>maven-bundle-plugin</artifactId>
-                    <version>2.3.6</version>
-                </plugin>
-                <plugin>
-                    <groupId>org.apache.maven.plugins</groupId>
-                    <artifactId>maven-dependency-plugin</artifactId>
-                    <version>2.4</version>
-                </plugin>
-                <plugin>
-                    <groupId>org.apache.maven.plugins</groupId>
-                    <artifactId>maven-antrun-plugin</artifactId>
-                    <version>1.7</version>
-                </plugin>
-                <plugin>
-                    <groupId>org.apache.maven.plugins</groupId>
-                    <artifactId>maven-assembly-plugin</artifactId>
-                    <!-- The latest version (2.2.2) has a problem with file permissions -->
-                    <version>2.2-beta-2</version>
-                </plugin>
-                <plugin>
-                    <groupId>org.apache.maven.plugins</groupId>
-                    <artifactId>maven-war-plugin</artifactId>
-                    <version>2.1.1</version>
-                </plugin>
-                <plugin>
-                    <groupId>org.codehaus.mojo</groupId>
-                    <artifactId>build-helper-maven-plugin</artifactId>
-                    <version>1.7</version>
-                </plugin>
-                <plugin>
-                    <groupId>org.apache.maven.plugins</groupId>
-                    <artifactId>maven-archetype-plugin</artifactId>
-                    <version>2.2</version>
-                </plugin>
-                <plugin>
-                    <groupId>org.apache.maven.plugins</groupId>
-                    <artifactId>maven-javadoc-plugin</artifactId>
-                    <version>2.8</version>
-                </plugin>
-                <plugin>
-                    <groupId>org.apache.maven.plugins</groupId>
-                    <artifactId>maven-project-info-reports-plugin</artifactId>
-                    <version>2.2</version>
+                    <version>2.1</version>
                 </plugin>
             </plugins>
         </pluginManagement>
+        
         <plugins>
             <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <version>2.0</version>
+                <configuration>
+                    <source>1.5</source>
+                    <target>1.5</target>
+                </configuration>
+            </plugin>
+
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-surefire-plugin</artifactId>
+                <version>2.3</version>
+                <configuration>
+                    <argLine>-Xms128m -Xmx256m</argLine>
+                </configuration>
+            </plugin>
+
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-jar-plugin</artifactId>
+                <version>2.1</version>
+                <configuration>
+                    <archive>
+                        <manifestEntries>
+                            <Extension-Name>${pom.groupId}</Extension-Name>
+                            <Specification-Title>${pom.artifactId}</Specification-Title>
+                            <Specification-Vendor>Apache Software Foundation</Specification-Vendor>
+                            <Specification-Version>${pom.version}</Specification-Version>
+                            <Implementation-Title>Apache Synapse</Implementation-Title>
+                            <Implementation-Vendor-Id>org.apache</Implementation-Vendor-Id>
+                            <Implementation-Vendor>Apache Software Foundation</Implementation-Vendor>
+                            <Implementation-Version>${pom.version}</Implementation-Version>
+                        </manifestEntries>
+                    </archive>
+                </configuration>
+            </plugin>
+            <plugin>
+                <artifactId>maven-site-plugin</artifactId>
+                <version>2.1</version>
                 <inherited>false</inherited>
-                <artifactId>maven-javadoc-plugin</artifactId>
                 <executions>
                     <execution>
-                        <id>javadoc-aggregate</id>
-                        <configuration>
-                            <links>
-                                <link>http://java.sun.com/j2se/1.5.0/docs/api/</link>
-                                <link>http://java.sun.com/j2ee/1.4/docs/api/</link>
-                                <link>http://jaxen.codehaus.org/apidocs/</link>
-                                <link>http://ws.apache.org/commons/axiom/apidocs/</link>
-                                <link>http://ws.apache.org/axis2/1_5_1/api/</link>
-                            </links>
-                        </configuration>
+                        <phase>package</phase>
                         <goals>
-                            <goal>aggregate</goal>
+                            <goal>site</goal>
                         </goals>
                     </execution>
                 </executions>
             </plugin>
+            <plugin>
+                <inherited>false</inherited>
+                <artifactId>maven-javadoc-plugin</artifactId>
+                <version>2.1</version>
+                <configuration>
+                    <links>
+                        <link>http://java.sun.com/j2se/1.5.0/docs/api/</link>
+                        <link>http://java.sun.com/j2ee/1.4/docs/api/</link>
+                        <link>http://jaxen.codehaus.org/apidocs/</link>
+                        <link>http://ws.apache.org/commons/axiom/apidocs/</link>
+                        <link>http://ws.apache.org/axis2/1_5_1/api/</link>
+                    </links>
+                    <aggregate>true</aggregate>
+                </configuration>
+            </plugin>
         </plugins>
     </build>
 
     <dependencyManagement>
         <dependencies>
-            <!-- Synapse Child Modules -->
-            <dependency>
-                <groupId>org.apache.synapse</groupId>
-                <artifactId>synapse-commons</artifactId>
-                <version>${project.version}</version>
-            </dependency>
-            <dependency>
-                <groupId>org.apache.synapse</groupId>
-                <artifactId>synapse-config-migrator</artifactId>
-                <version>${project.version}</version>
-            </dependency>
-            <dependency>
-                <groupId>org.apache.synapse</groupId>
-                <artifactId>synapse-core</artifactId>
-                <version>${project.version}</version>
-            </dependency>
-            <dependency>
-                <groupId>org.apache.synapse</groupId>
-                <artifactId>synapse-core</artifactId>
-                <!-- Synapse core tests library -->
-                <classifier>tests</classifier>
-                <scope>test</scope>
-                <version>${project.version}</version>
-            </dependency>
-            <dependency>
-                <groupId>org.apache.synapse</groupId>
-                <artifactId>synapse-experimental</artifactId>
-                <version>${project.version}</version>
-            </dependency>
-            <dependency>
-                <groupId>org.apache.synapse</groupId>
-                <artifactId>synapse-extensions</artifactId>
-                <version>${project.version}</version>
-            </dependency>
-            <dependency>
-                <groupId>org.apache.synapse</groupId>
-                <artifactId>synapse-fix-transport</artifactId>
-                <version>${project.version}</version>
-            </dependency>
-            <dependency>
-                <groupId>org.apache.synapse</groupId>
-                <artifactId>synapse-nhttp-transport</artifactId>
-                <version>${project.version}</version>
-            </dependency>
-            <dependency>
-                <groupId>org.apache.synapse</groupId>
-                <artifactId>synapse-patches</artifactId>
-                <version>${project.version}</version>
-            </dependency>
-            <dependency>
-                <groupId>org.apache.synapse</groupId>
-                <artifactId>synapse-patches</artifactId>
-                <version>${project.version}</version>
-                <classifier>jars</classifier>
-                <type>zip</type>
-            </dependency>
-            <dependency>
-                <groupId>org.apache.synapse</groupId>
-                <artifactId>synapse-samples</artifactId>
-                <version>${project.version}</version>
-            </dependency>
+            <!-- Synapse -->
             <dependency>
                 <groupId>org.apache.synapse</groupId>
                 <artifactId>synapse-securevault</artifactId>
@@ -402,16 +296,41 @@
             </dependency>
             <dependency>
                 <groupId>org.apache.synapse</groupId>
+                <artifactId>synapse-commons</artifactId>
+                <version>${project.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.synapse</groupId>
                 <artifactId>synapse-tasks</artifactId>
                 <version>${project.version}</version>
             </dependency>
             <dependency>
                 <groupId>org.apache.synapse</groupId>
+                <artifactId>synapse-core</artifactId>
+                <version>${project.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.synapse</groupId>
+                <artifactId>synapse-extensions</artifactId>
+                <version>${project.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.synapse</groupId>
+                <artifactId>synapse-samples</artifactId>
+                <version>${project.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.synapse</groupId>
+                <artifactId>synapse-nhttp-transport</artifactId>
+                <version>${project.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.synapse</groupId>
                 <artifactId>synapse-vfs-transport</artifactId>
                 <version>${project.version}</version>
             </dependency>
 
-            <!-- Apache Axis2 -->
+            <!-- Axis2 -->
             <dependency>
                 <groupId>org.apache.axis2</groupId>
                 <artifactId>axis2-kernel</artifactId>
@@ -439,11 +358,6 @@
             </dependency>
             <dependency>
                 <groupId>org.apache.axis2</groupId>
-                <artifactId>axis2-transport-local</artifactId>
-                <version>${axis2.transport.version}</version>
-            </dependency>
-            <dependency>
-                <groupId>org.apache.axis2</groupId>
                 <artifactId>axis2-transport-mail</artifactId>
                 <version>${axis2.transport.version}</version>
             </dependency>
@@ -500,24 +414,8 @@
                 <version>${axis2.version}</version>
                 <classifier>impl</classifier>
             </dependency>
-            <dependency>
-                <groupId>org.apache.axis2</groupId>
-                <artifactId>addressing</artifactId>
-                <version>${addressing.version}</version>
-                <type>mar</type>
-                <exclusions>
-                    <exclusion>
-                        <groupId>org.apache.geronimo.specs</groupId>
-                        <artifactId>geronimo-javamail_1.4_spec</artifactId>
-                    </exclusion>
-                    <exclusion>
-                        <groupId>org.apache.geronimo.specs</groupId>
-                        <artifactId>geronimo-activation_1.1_spec</artifactId>
-                    </exclusion>
-                </exclusions>
-            </dependency>
 
-            <!-- Apache Rampart -->
+            <!-- Rampart -->
             <dependency>
                 <groupId>org.apache.rampart</groupId>
                 <artifactId>rampart-policy</artifactId>
@@ -563,24 +461,7 @@
                     </exclusion>
                 </exclusions>
             </dependency>
-            <dependency>
-                <groupId>org.apache.rampart</groupId>
-                <artifactId>rampart</artifactId>
-                <version>${rampart.version}</version>
-                <exclusions>
-                    <exclusion>
-                        <groupId>org.apache.woden</groupId>
-                        <artifactId>woden-api</artifactId>
-                    </exclusion>
-                    <exclusion>
-                        <groupId>xalan</groupId>
-                        <artifactId>xalan</artifactId>
-                    </exclusion>
-                </exclusions>
-                <type>mar</type>
-            </dependency>
 
-            <!-- Apache Axiom -->
             <dependency>
                 <groupId>org.apache.ws.commons.axiom</groupId>
                 <artifactId>axiom-api</artifactId>
@@ -597,44 +478,24 @@
                 <version>${axiom.version}</version>
             </dependency>
 
-            <!-- XML Schema -->
             <dependency>
                 <groupId>org.apache.ws.commons.schema</groupId>
                 <artifactId>XmlSchema</artifactId>
                 <version>${xml_schema.version}</version>
             </dependency>
 
-            <!-- Apache Sandesha -->
+            <dependency>
+                <groupId>xml-apis</groupId>
+                <artifactId>xml-apis</artifactId>
+                <version>${xml_apis.version}</version>
+            </dependency>
+
             <dependency>
                 <groupId>org.apache.sandesha2</groupId>
                 <artifactId>sandesha2-core</artifactId>
                 <version>${sandesha2.version}</version>
             </dependency>
-            <dependency>
-                <groupId>org.apache.sandesha2</groupId>
-                <artifactId>sandesha2</artifactId>
-                <version>${sandesha2.version}</version>
-                <exclusions>
-                    <exclusion>
-                        <groupId>org.apache.axis2</groupId>
-                        <artifactId>axis2</artifactId>
-                    </exclusion>
-                </exclusions>
-                <type>mar</type>
-            </dependency>
-            <dependency>
-                <groupId>org.apache.sandesha2</groupId>
-                <artifactId>sandesha2-policy</artifactId>
-                <version>${sandesha2.version}</version>
-                <exclusions>
-                    <exclusion>
-                        <groupId>org.apache.axis2</groupId>
-                        <artifactId>axis2</artifactId>
-                    </exclusion>
-                </exclusions>
-            </dependency>
 
-            <!-- Apache Commons -->
             <dependency>
                 <groupId>commons-dbcp</groupId>
                 <artifactId>commons-dbcp</artifactId>
@@ -648,330 +509,254 @@
             <dependency>
                 <groupId>commons-lang</groupId>
                 <artifactId>commons-lang</artifactId>
-                <version>${commons.lang.version}</version>
-            </dependency>
-            <dependency>
-                <groupId>org.apache.commons</groupId>
-                <artifactId>commons-vfs2</artifactId>
-                <version>${commons.vfs.version}</version>
-            </dependency>
-            <dependency>
-                <!-- For VFS (FTP) Transport -->
-                <groupId>commons-net</groupId>
-                <artifactId>commons-net</artifactId>
-                <version>${commons.net.version}</version>
-            </dependency>
-            <dependency>
-                <groupId>commons-io</groupId>
-                <artifactId>commons-io</artifactId>
-                <version>${commons.io.version}</version>
-            </dependency>
-            <dependency>
-                <groupId>commons-cli</groupId>
-                <artifactId>commons-cli</artifactId>
-                <version>${commons.cli.version}</version>
-            </dependency>
-            <dependency>
-                <groupId>commons-codec</groupId>
-                <artifactId>commons-codec</artifactId>
-                <version>${commons.codec.version}</version>
-            </dependency>
-            <dependency>
-                <groupId>commons-collections</groupId>
-                <artifactId>commons-collections</artifactId>
-                <version>${commons.collections.version}</version>
+                <version>${commons-lang.version}</version>
             </dependency>
 
-            <!-- Caching -->
             <dependency>
-                <groupId>org.wso2.caching</groupId>
-                <artifactId>wso2caching-core</artifactId>
-                <version>${wso2caching.version}</version>
-                <type>jar</type>
-                <exclusions>
-                    <exclusion>
-                        <groupId>log4j</groupId>
-                        <artifactId>log4j</artifactId>
-                    </exclusion>
-                    <exclusion>
-                        <groupId>org.apache.neethi</groupId>
-                        <artifactId>neethi</artifactId>
-                    </exclusion>
-                </exclusions>
+                <groupId>log4j</groupId>
+                <artifactId>log4j</artifactId>
+                <version>${log4j.version}</version>
             </dependency>
 
-            <!-- Eventing -->
             <dependency>
                 <groupId>org.wso2.eventing</groupId>
                 <artifactId>wso2eventing-api</artifactId>
                 <version>${wso2eventing-api.version}</version>
             </dependency>
 
-            <!-- Secure Vault -->
             <dependency>
                 <groupId>jline</groupId>
                 <artifactId>jline</artifactId>
                 <version>${jline.version}</version>
             </dependency>
-            <dependency>
-                <groupId>javax.activation</groupId>
-                <artifactId>activation</artifactId>
-                <version>${activation.version}</version>
-            </dependency>
 
-            <!-- Throttling -->
-            <dependency>
-                <groupId>org.wso2.throttle</groupId>
-                <artifactId>wso2throttle-core</artifactId>
-                <version>${wso2throttle.version}</version>
-                <type>jar</type>
-                <exclusions>
-                    <exclusion>
-                        <groupId>org.apache.ant</groupId>
-                        <artifactId>ant-nodeps</artifactId>
-                    </exclusion>
-                </exclusions>
-            </dependency>
-
-            <!-- HTTP Core -->
-            <dependency>
-                <groupId>org.apache.httpcomponents</groupId>
-                <artifactId>httpcore</artifactId>
-                <version>${httpcore.nio.version}</version>
-            </dependency>
-            <dependency>
-                <groupId>org.apache.httpcomponents</groupId>
-                <artifactId>httpcore-nio</artifactId>
-                <version>${httpcore.nio.version}</version>
-            </dependency>
-
-            <!-- Testing -->
-            <dependency>
-                <groupId>junit</groupId>
-                <artifactId>junit</artifactId>
-                <version>${junit.version}</version>
-                <scope>test</scope>
-            </dependency>
-            <dependency>
-                <groupId>xmlunit</groupId>
-                <artifactId>xmlunit</artifactId>
-                <version>${xmlunit.version}</version>
-                <scope>test</scope>
-            </dependency>
-            <dependency>
-                <groupId>org.apache.axis2</groupId>
-                <artifactId>axis2-transport-testkit</artifactId>
-                <version>${axis2.transport.version}</version>
-                <scope>test</scope>
-            </dependency>
-            <dependency>
-                <groupId>org.aspectj</groupId>
-                <artifactId>aspectjweaver</artifactId>
-                <version>${aspectj.version}</version>
-            </dependency>
-            <dependency>
-                <groupId>de.schlichtherle.io</groupId>
-                <artifactId>truezip</artifactId>
-                <version>${truezip.version}</version>
-                <optional>true</optional>
-                <scope>test</scope>
-            </dependency>
-            <dependency>
-                <groupId>org.apache.derby</groupId>
-                <artifactId>derby</artifactId>
-                <version>${derby.version}</version>
-                <scope>test</scope>
-            </dependency>
-            <dependency>
-                <groupId>org.apache.derby</groupId>
-                <artifactId>derbyclient</artifactId>
-                <version>${derby.version}</version>
-                <scope>test</scope>
-            </dependency>
-            <dependency>
-                <groupId>org.apache.derby</groupId>
-                <artifactId>derbynet</artifactId>
-                <version>${derby.version}</version>
-                <scope>test</scope>
-            </dependency>
-            <dependency>
-                <groupId>org.jruby</groupId>
-                <artifactId>jruby-complete</artifactId>
-                <version>${jruby.version}</version>
-                <scope>test</scope>
-            </dependency>
-            <dependency>
-                <groupId>groovy</groupId>
-                <artifactId>groovy-all</artifactId>
-                <version>${groovy.version}</version>
-                <scope>test</scope>
-            </dependency>
-            <dependency>
-                <groupId>org.apache.httpcomponents</groupId>
-                <artifactId>httpclient</artifactId>
-                <version>${http.client.version}</version>
-                <scope>test</scope>
-            </dependency>
-            <dependency>
-                <groupId>org.apache.activemq</groupId>
-                <artifactId>activemq-core</artifactId>
-                <version>${activemq.version}</version>
-                <scope>test</scope>
-            </dependency>
-
-
-            <!-- Saxon -->
-            <dependency>
-                 <groupId>net.sf.saxon</groupId>
-                 <artifactId>saxon</artifactId>
-                 <version>${saxon.version}</version>
-            </dependency>
-            <dependency>
-                 <groupId>net.sf.saxon</groupId>
-                 <artifactId>saxon-dom</artifactId>
-                 <version>${saxon.version}</version>
-            </dependency>
-            <dependency>
-                 <groupId>net.sf.saxon</groupId>
-                 <artifactId>saxon-xqj</artifactId>
-                 <version>${saxon.version}</version>
-            </dependency>
-
-            <!-- Spring Framework -->
-            <dependency>
-                <groupId>org.springframework</groupId>
-                <artifactId>spring-core</artifactId>
-                <version>${spring.version}</version>
-            </dependency>
-            <dependency>
-                <groupId>org.springframework</groupId>
-                <artifactId>spring-beans</artifactId>
-                <version>${spring.version}</version>
-            </dependency>
-            <dependency>
-                <groupId>org.springframework</groupId>
-                <artifactId>spring-context</artifactId>
-                <version>${spring.version}</version>
-            </dependency>
-
-            <!-- Scripting -->
-            <dependency>
-                <groupId>xmlbeans</groupId>
-                <artifactId>xbean</artifactId>
-                <version>${xbean.version}</version>
-            </dependency>
-            <dependency>
-                <groupId>org.apache.bsf</groupId>
-                <artifactId>bsf-all</artifactId>
-                <version>${bsf.version}</version>
-            </dependency>
-            <dependency>
-                <groupId>rhino</groupId>
-                <artifactId>js</artifactId>
-                <version>${rhino.version}</version>
-            </dependency>
-
-            <!-- Maven Tools -->
-            <dependency>
-                <groupId>org.apache.maven</groupId>
-                <artifactId>maven-plugin-api</artifactId>
-                <version>${maven.version}</version>
-            </dependency>
-            <dependency>
-                <groupId>org.apache.maven</groupId>
-                <artifactId>maven-project</artifactId>
-                <version>${maven.version}</version>
-            </dependency>
-            <dependency>
-                <groupId>org.apache.maven</groupId>
-                <artifactId>maven-artifact</artifactId>
-                <version>${maven.artifact.version}</version>
-            </dependency>
-            <dependency>
-                <groupId>org.apache.maven</groupId>
-                <artifactId>maven-archiver</artifactId>
-                <version>${maven.archiver.version}</version>
-            </dependency>
-            <dependency>
-                <groupId>org.codehaus.plexus</groupId>
-                <artifactId>plexus-utils</artifactId>
-                <version>${plexus.utils.version}</version>
-            </dependency>
-
-            <!-- Quickfix/J (FIX Transport) -->
-            <dependency>
-                <groupId>quickfixj</groupId>
-                <artifactId>quickfixj-all</artifactId>
-                <version>${qfj.version}</version>
-            </dependency>
-
-            <!-- Quartz (Scheduled Tasks) -->
-            <dependency>
-                <groupId>org.opensymphony</groupId>
-                <artifactId>quartz</artifactId>
-                <version>${quartz.version}</version>
-            </dependency>
-
-            <!-- Miscellaneous -->
-            <dependency>
-                <groupId>log4j</groupId>
-                <artifactId>log4j</artifactId>
-                <version>${log4j.version}</version>
-            </dependency>
-            <dependency>
-                <!-- For REST API Support -->
-                <groupId>org.wso2.uri.template</groupId>
-                <artifactId>wso2-uri-templates</artifactId>
-                <version>${wso2uri-template.version}</version>
-            </dependency>
-            <dependency>
-                <groupId>xalan</groupId>
-                <artifactId>xalan</artifactId>
-                <version>${xalan.version}</version>
-            </dependency>
-            <dependency>
-                <groupId>org.apache.geronimo.specs</groupId>
-                <artifactId>geronimo-jms_1.1_spec</artifactId>
-                <version>${jms-1.1-spec.version}</version>
-            </dependency>
-            <dependency>
-                <groupId>wrapper</groupId>
-                <artifactId>wrapper</artifactId>
-                <version>${wrapper.version}</version>
-            </dependency>
-            <dependency>
-                <!-- For VFS (SFTP) Transport -->
-                <groupId>com.jcraft</groupId>
-                <artifactId>jsch</artifactId>
-                <version>${jsch.version}</version>
-            </dependency>
-            <dependency>
-                <groupId>org.apache.woden</groupId>
-                <artifactId>woden-api</artifactId>
-                <version>${woden.version}</version>
-            </dependency>
-            <dependency>
-                <groupId>wsdl4j</groupId>
-                <artifactId>wsdl4j</artifactId>
-                <version>${wsdl4j.version}</version>
-            </dependency>
-            <dependency>
-                <groupId>xerces</groupId>
-                <artifactId>xercesImpl</artifactId>
-                <version>${xerces.version}</version>
-            </dependency>
         </dependencies>
     </dependencyManagement>
 
+    <dependencies>
+        <dependency>
+            <groupId>jline</groupId>
+            <artifactId>jline</artifactId>
+            <scope>provided</scope>
+        </dependency>
+        
+        <dependency>
+            <groupId>org.apache.axis2</groupId>
+            <artifactId>axis2-transport-local</artifactId>
+            <scope>test</scope>
+        </dependency>
+
+
+        <!-- Axis2 -->
+        <dependency>
+            <groupId>org.apache.axis2</groupId>
+            <artifactId>axis2-kernel</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.axis2</groupId>
+            <artifactId>axis2-adb</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.axis2</groupId>
+            <artifactId>axis2-clustering</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.axis2</groupId>
+            <artifactId>axis2-mtompolicy</artifactId>
+        </dependency>
+
+        <!-- Sandesha2 -->
+        <dependency>
+            <groupId>org.apache.sandesha2</groupId>
+            <artifactId>sandesha2-core</artifactId>
+            <version>${sandesha2.version}</version>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.apache.axis2</groupId>
+                    <artifactId>axis2</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+
+        <!-- direct dependencies for 3rd party JARs / Util JARs -->
+        <dependency>
+            <groupId>commons-logging</groupId>
+            <artifactId>commons-logging</artifactId>
+            <version>${commons.logging.version}</version>
+            <exclusions>
+                <exclusion>
+                    <groupId>javax.servlet</groupId>
+                    <artifactId>servlet-api</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>logkit</groupId>
+                    <artifactId>logkit</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>javax.servlet</groupId>
+                    <artifactId>servlet-api</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>avalon-framework</groupId>
+                    <artifactId>avalon-framework</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <!--dependency>
+            <groupId>log4j</groupId>
+            <artifactId>log4j</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-log4j12</artifactId>
+            <version>${slf4j.version}</version>
+        </dependency-->
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <version>${junit.version}</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>xmlunit</groupId>
+            <artifactId>xmlunit</artifactId>
+            <version>${xmlunit.version}</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.derby</groupId>
+            <artifactId>derby</artifactId>
+            <version>${derby.version}</version>
+            <scope>test</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>xalan</groupId>
+            <artifactId>xalan</artifactId>
+            <version>${xalan.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>xerces</groupId>
+            <artifactId>xercesImpl</artifactId>
+            <version>${xerces.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>rhino</groupId>
+            <artifactId>js</artifactId>
+            <version>${js.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>commons-dbcp</groupId>
+            <artifactId>commons-dbcp</artifactId>
+            <version>${commons.dbcp.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>commons-pool</groupId>
+            <artifactId>commons-pool</artifactId>
+            <version>${commons.pool.version}</version>
+        </dependency>
+
+        <!-- dependencies for xsltc in xalan -->
+        <dependency>
+            <groupId>org.apache.bcel</groupId>
+            <artifactId>bcel</artifactId>
+            <version>${bcel.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>jakarta-regexp</groupId>
+            <artifactId>jakarta-regexp</artifactId>
+            <version>${regexp.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>java-cup</groupId>
+            <artifactId>java-cup</artifactId>
+            <version>${java-cup.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>JLex</groupId>
+            <artifactId>JLex</artifactId>
+            <version>${JLex.version}</version>
+        </dependency>
+
+        <!--dependency>
+            <groupId>commons-collections</groupId>
+            <artifactId>commons-collections</artifactId>
+            <version>${commons-collections.version}</version>
+        </dependency-->
+        <!-- task scheduling -->
+        <dependency>
+            <groupId>org.opensymphony</groupId>
+            <artifactId>quartz</artifactId>
+            <version>${quartz.version}</version>
+        </dependency>
+
+        <!-- Saxon Dependency - is not a direct dependency, but optional runtime -->
+        <dependency>
+            <groupId>net.sf.saxon</groupId>
+            <artifactId>saxon</artifactId>
+            <version>${saxon.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>net.sf.saxon</groupId>
+            <artifactId>saxon-dom</artifactId>
+            <version>${saxon.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>net.sf.saxon</groupId>
+            <artifactId>saxon-xqj</artifactId>
+            <version>${saxon.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>commons-cli</groupId>
+            <artifactId>commons-cli</artifactId>
+            <version>${commons-cli.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>commons-lang</groupId>
+            <artifactId>commons-lang</artifactId>
+            <scope>test</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.wso2.uri.template</groupId>
+            <artifactId>wso2-uri-templates</artifactId>
+            <version>1.0.0</version>
+        </dependency>
+        
+        <!-- Caching dependencies -->
+        <dependency>
+            <groupId>org.wso2.caching</groupId>
+            <artifactId>wso2caching-core</artifactId>
+            <version>${wso2caching.version}</version>
+            <type>jar</type>
+            <exclusions>
+                <exclusion>
+                    <groupId>log4j</groupId>
+                    <artifactId>log4j</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+
+        <!-- Eventing dependencies-->
+        <dependency>
+            <groupId>org.wso2.eventing</groupId>
+            <artifactId>wso2eventing-api</artifactId>
+        </dependency>
+
+    </dependencies>
+
     <reporting>
         <plugins>
             <plugin>
                 <artifactId>maven-site-plugin</artifactId>
+                <version>2.1</version>
                 <inherited>false</inherited>
             </plugin>
             <plugin>
                 <artifactId>maven-project-info-reports-plugin</artifactId>
-                <version>2.2</version>
+                <version>2.1.1</version>
                 <configuration>
                     <!-- These features are disabled since they cause "mvn site" to hang -->
                     <dependencyLocationsEnabled>false</dependencyLocationsEnabled>
@@ -981,6 +766,23 @@
         </plugins>
     </reporting>
 
+    <distributionManagement>
+        <!--snapshotRepository>
+            <id>apache-snapshots</id>
+            <name>Apache Development Repository</name>
+            <url>scpexe://people.apache.org//www/people.apache.org/repo/m2-snapshot-repository</url>
+        </snapshotRepository>
+        <repository>
+            <id>apache-releases</id>
+            <name>Apache Ibiblio rsync Repository</name>
+            <url>scpexe://people.apache.org/www/people.apache.org/repo/m2-ibiblio-rsync-repository</url>
+        </repository-->
+        <site>
+            <id>apache.website</id>
+            <url>scpexe://people.apache.org/www/synapse.apache.org/</url>
+        </site>
+    </distributionManagement>
+
     <repositories>
         <repository>
             <id>apache-snapshots</id>
@@ -1041,78 +843,76 @@
     <properties>
         <!-- Sets the source encoding to UTF-8 -->
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-
-        <synapse.version>2.2.0-SNAPSHOT</synapse.version>
-
-        <!-- Apache Commons -->
-        <commons.dbcp.version>1.3</commons.dbcp.version> <!-- We need this version to support JDK 5 -->
-        <commons.pool.version>1.5.7</commons.pool.version>
+        <!-- Synapse and related components -->
+        <synapse.version>${project.version}</synapse.version>
+        <commons.dbcp.version>1.2.2</commons.dbcp.version>
+        <commons.pool.version>1.3</commons.pool.version>
         <commons.vfs.version>2.0</commons.vfs.version>
-        <commons.net.version>3.0.1</commons.net.version>
-        <commons.collections.version>3.2.1</commons.collections.version>
-        <commons.io.version>2.1</commons.io.version>
-        <commons.cli.version>1.2</commons.cli.version>
-        <commons.lang.version>2.6</commons.lang.version>
-        <commons.codec.version>1.6</commons.codec.version>
+        <truezip.version>6.6</truezip.version>
+        <commons.net.version>1.4.1</commons.net.version>
+        <jsch.version>0.1.31</jsch.version>
+        <oro.version>2.0.8</oro.version>
+        <slf4j.version>1.5.6</slf4j.version>
+        <mina.version>1.1.0</mina.version>
+        <jms-1.1-spec.version>1.1</jms-1.1-spec.version>
 
         <!-- Axis2 and its dependencies -->
-        <axis2.version>1.7.0-SNAPSHOT</axis2.version>
-        <axis2.transport.version>1.7.0-SNAPSHOT</axis2.transport.version>
-        <axiom.version>1.2.13-SNAPSHOT</axiom.version>
-        <xml_schema.version>1.4.3</xml_schema.version>
+        <axis2.version>1.6.1</axis2.version>
+        <axis2.transport.version>1.0.0</axis2.transport.version>
+        <axiom.version>1.2.12</axiom.version>
+        <xml_schema.version>1.4.7</xml_schema.version>
+        <xml_apis.version>2.0.2</xml_apis.version>
         <wsdl4j.version>1.6.2</wsdl4j.version>
 
+        <commons.logging.version>1.1.1</commons.logging.version>
+
         <!-- addressing, rampart -->
         <addressing.version>${axis2.version}</addressing.version>
-        <rampart.version>1.7.0-SNAPSHOT</rampart.version>
-        <sandesha2.version>1.7.0-SNAPSHOT</sandesha2.version>
+        <rampart.version>1.6.1</rampart.version>
+        <sandesha2.version>1.6.1</sandesha2.version>
+        <wss4j.version>1.5.12</wss4j.version>
         <jruby.version>1.3.0</jruby.version>
+        <xmlsec.version>1.4.5</xmlsec.version>
         <bcprov.jdk15.version>140</bcprov.jdk15.version>
 
+        <xalan.version>2.7.1</xalan.version>
+        <xerces.version>2.9.1</xerces.version>
+        <js.version>1.6R5</js.version>
+
         <!-- startup, quartz -->
+        <commons-collections.version>3.2.1</commons-collections.version>
         <quartz.version>1.6.0</quartz.version>
         <geronimo-spec.version>1.1</geronimo-spec.version>
 
+        <!-- xalan xsltc  -->
+        <bcel.version>5.2</bcel.version>
+        <regexp.version>1.4</regexp.version>
+        <java-cup.version>0.0</java-cup.version>
+        <JLex.version>0.0</JLex.version>
         <!-- misc -->
         <junit.version>3.8.2</junit.version>
         <!-- Warning: log4j versions above 1.2.14 introduce additional transitive dependencies,
              some of which are not available from the Maven central repository. -->
         <log4j.version>1.2.14</log4j.version>
-        <xmlunit.version>1.3</xmlunit.version>
+        <xmlunit.version>1.1</xmlunit.version>
         <derby.version>10.4.2.0</derby.version>
         <wrapper.version>3.2.3</wrapper.version>
         <saxon.version>8.9</saxon.version>
+        <commons_io.version>2.0</commons_io.version>
+        <commons-cli.version>1.0</commons-cli.version>
         <jline.version>0.9.94</jline.version>
-        <xalan.version>2.7.1</xalan.version>
-        <xerces.version>2.9.1</xerces.version>
-        <truezip.version>6.6</truezip.version>
-        <jsch.version>0.1.31</jsch.version>
-        <jms-1.1-spec.version>1.1</jms-1.1-spec.version>
-        <httpcore.nio.version>4.1.4</httpcore.nio.version>
-        <http.client.version>4.1</http.client.version>
-        <aspectj.version>1.6.1</aspectj.version>
-        <qfj.version>1.4.0</qfj.version>
-        <wso2uri-template.version>1.0.0</wso2uri-template.version>
-        <woden.version>1.0M9</woden.version>
-        <activemq.version>5.2.0</activemq.version>
 
         <!-- dependencies of Synapse extensions module -->
         <wso2commons.version>1.2</wso2commons.version>
-        <wso2caching.version>3.5.0</wso2caching.version>
+        <wso2caching.version>3.4.0</wso2caching.version>
         <wso2throttle.version>3.2.1</wso2throttle.version>
-        <wso2eventing-api.version>SNAPSHOT</wso2eventing-api.version>
+        <wso2eventing-api.version>2.1</wso2eventing-api.version>
         <xbean.version>2.2.0</xbean.version>
         <bsf.version>3.0</bsf.version>
         <groovy.version>1.1-rc-1</groovy.version>
-        <spring.version>1.2.8</spring.version>
-        <rhino.version>1.6R5</rhino.version>
-        <activation.version>1.1</activation.version>
+        <servlet-api.version>2.3</servlet-api.version>
+        <commons-lang.version>2.4</commons-lang.version>
 
-        <!-- Maven Tools -->
-        <maven.version>2.0.7</maven.version>
-        <maven.artifact.version>2.0.8</maven.artifact.version>
-        <maven.archiver.version>2.2</maven.archiver.version>
-        <plexus.utils.version>1.5.4</plexus.utils.version>
     </properties>
 
     <developers>
@@ -1128,7 +928,7 @@
             <id>azeez</id>
             <email>azeez AT wso2.com</email>
             <organization>WSO2</organization>
-	        <url>http://afkham.org/</url>
+	    <url>http://afkham.org/</url> 	
         </developer>
         <developer>
             <name>Paul Fremantle</name>
@@ -1167,7 +967,7 @@
             <name>Davanum Srinivas</name>
             <id>dims</id>
             <email>davanum@gmail.com</email>
-            <organization></organization>
+            <organization />
         </developer>
         <developer>
             <name>Sanjiva Weerawarana</name>
diff --git a/repository/conf/sample/resources/policy/throttle_policy.xml b/repository/conf/sample/resources/policy/throttle_policy.xml
index 1d3f747..b833d43 100644
--- a/repository/conf/sample/resources/policy/throttle_policy.xml
+++ b/repository/conf/sample/resources/policy/throttle_policy.xml
@@ -10,7 +10,6 @@
                     <throttle:UnitTime>800000</throttle:UnitTime>
                     <throttle:ProhibitTimePeriod wsp:Optional="true">1000</throttle:ProhibitTimePeriod>
                 </wsp:All>
-                <throttle:IsAllow>true</throttle:IsAllow>
             </wsp:ExactlyOne>
         </wsp:All>
         <wsp:All>
@@ -21,7 +20,6 @@
                     <throttle:UnitTime>800000</throttle:UnitTime>
                     <throttle:ProhibitTimePeriod wsp:Optional="true">100000</throttle:ProhibitTimePeriod>
                 </wsp:All>
-                <throttle:IsAllow>true</throttle:IsAllow>
             </wsp:ExactlyOne>
         </wsp:All>
         <wsp:All>
@@ -32,7 +30,6 @@
                     <throttle:UnitTime>600000</throttle:UnitTime>
                     <throttle:ProhibitTimePeriod wsp:Optional="true"></throttle:ProhibitTimePeriod>
                 </wsp:All>
-                <throttle:IsAllow>true</throttle:IsAllow>
             </wsp:ExactlyOne>
         </wsp:All>
         <wsp:All>
@@ -43,8 +40,7 @@
                     <throttle:UnitTime>500000</throttle:UnitTime>
                     <throttle:ProhibitTimePeriod wsp:Optional="true"></throttle:ProhibitTimePeriod>
                 </wsp:All>
-                <throttle:IsAllow>true</throttle:IsAllow>
             </wsp:ExactlyOne>
         </wsp:All>
     </throttle:ThrottleAssertion>
-</wsp:Policy>
\ No newline at end of file
+</wsp:Policy>
diff --git a/repository/conf/sample/synapse_sample_750.xml b/repository/conf/sample/synapse_sample_750.xml
new file mode 100644
index 0000000..86c4c48
--- /dev/null
+++ b/repository/conf/sample/synapse_sample_750.xml
@@ -0,0 +1,68 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+~  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.
+-->
+
+<!-- Introduction to Synapse Scheduled Message Forwarding Processor -->
+
+<definitions xmlns="http://ws.apache.org/ns/synapse">
+
+    <proxy name="StockQuoteProxy">
+        <target>
+            <inSequence>
+                <!--use sequence template to transform incoming request-->
+                <call-template target="xslt_func">
+                    <with-param name="xslt_key" value="xslt-key-req"/>
+                </call-template>
+                <send>
+                    <endpoint>
+                        <address uri="http://localhost:9000/services/SimpleStockQuoteService"/>
+                    </endpoint>
+                </send>
+            </inSequence>
+
+            <outSequence>
+                <!--use sequence template to transform incoming response-->
+                <call-template target="xslt_func">
+                    <with-param name="xslt_key" value="xslt-key-back"/>
+                </call-template>
+                <send/>
+            </outSequence>
+        </target>
+    </proxy>
+
+    <!--this sequence template will transform requests with the given xslt local entry key And will log
+    the message before and after. Takes Iterate local entry key as an argument-->
+    <template xmlns="http://ws.apache.org/ns/synapse" name="xslt_func">
+        <parameter name="xslt_key"/>
+        <sequence>
+            <log level="full">
+                <property name="BEFORE_TRANSFORM" value="true"/>
+            </log>
+            <xslt key="{$func:xslt_key}"/>
+            <log level="full">
+                <property name="AFTER_TRANSFORM" value="true"/>
+            </log>
+        </sequence>
+    </template>
+
+    <localEntry key="xslt-key-req"
+                src="file:repository/samples/resources/transform/transform.xslt"/>
+    <localEntry key="xslt-key-back"
+                src="file:repository/samples/resources/transform/transform_back.xslt"/>
+</definitions>
\ No newline at end of file
diff --git a/repository/conf/sample/synapse_sample_800.xml b/repository/conf/sample/synapse_sample_800.xml
new file mode 100644
index 0000000..7cddff2
--- /dev/null
+++ b/repository/conf/sample/synapse_sample_800.xml
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~  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.
+  -->
+
+<definitions xmlns="http://ws.apache.org/ns/synapse">
+
+    <!-- You can add any flat sequences, endpoints, etc.. to this synapse.xml file if you do
+    *not* want to keep the artifacts in several files -->
+<api name="StockQuoteAPI" context="/stockquote">
+   <resource uri-template="/view/{symbol}" methods="GET">
+      <inSequence>
+         <payloadFactory>
+	    <format>
+		<m0:getQuote xmlns:m0="http://services.samples">
+	            <m0:request>
+        	       <m0:symbol>$1</m0:symbol>
+	            </m0:request>
+        	 </m0:getQuote>
+	    </format>
+	    <args>
+		<arg expression="get-property('uri.var.symbol')"/>
+	    </args>
+	 </payloadFactory>
+	 <send>
+	    <endpoint>
+		<address uri="http://localhost:9000/services/SimpleStockQuoteService" format="soap11"/>
+	    </endpoint>
+	 </send>
+      </inSequence>
+      <outSequence>
+	 <send/>
+      </outSequence>
+   </resource>
+   <resource url-pattern="/order/*" methods="POST">
+      <inSequence>
+        <property name="FORCE_SC_ACCEPTED" value="true" scope="axis2"/>
+	<property name="OUT_ONLY" value="true"/>
+	<send>
+            <endpoint>
+                <address uri="http://localhost:9000/services/SimpleStockQuoteService" format="soap11"/>
+            </endpoint>
+         </send>
+      </inSequence>
+   </resource>
+</api>
+</definitions>
diff --git a/src/site/apt/deployment.apt b/src/site/apt/deployment.apt
deleted file mode 100644
index 9f2035a..0000000
--- a/src/site/apt/deployment.apt
+++ /dev/null
@@ -1,226 +0,0 @@
-{Contents}
-
-%{toc}
-
-{Platform requirements}
-
-  Synapse requires Java 1.5 or higher and has been tested on Java runtime environments from Sun,
-  IBM and Apple. Note that the recommended Java version is 1.5 and that there is at least one
-  known issue on Java 1.6 (see below). Synapse is used on various operation systems, including
-  Linux, Mac OS X, Solaris, Windows and AIX, as well as mainframe environments. The recommended
-  operation system for production use is Linux since it offers a wider range of options to tune
-  the TCP/IP stack. This is important to optimize the performance of the NIO HTTP transport.
-  
-  When selecting the environment for deployment, the following known issues should be taken
-  into account:
-  
-  * There is a known issue related to the script mediator when used with Java 1.6 on Windows.
-    It has been observed that with this combination, random failures can occur during startup of
-    Synapse. It is suspected that this issue is caused by a bug in BSF, but there is no solution
-    or workaround yet.
-  
-  * The <<<synapse.bat>>> and <<<synapse.sh>>> scripts included in the binary distribution use
-    the <<<-server>>> option which is not supported by IBM's JRE. This problem can be easily
-    solved by manually editing these scripts to remove the unsupported <<<-server>>> option.
-    See {{{https://issues.apache.org/jira/browse/SYNAPSE-454}SYNAPSE-454}}.
-    
-  * In the past several issues related to subtle concurrency problems have been reported with
-    the non-blocking HTTP transport (which is the recommended HTTP implementation for Synapse)
-    when used on more "exotic" platforms. While this has been improved it is recommended to
-    thoroughly test the HTTP transport before deploying Synapse in a production environment based
-    on these platforms. Please don't hesitate to report any issues using JIRA or by posting a
-    message on the mailing list.
-
-{Overview of available deployment options}
-
-  Synapse can be deployed in two different ways:
-
-  * Stand-alone, i.e. as an independently managed Java process.
-  
-  * As a J2EE application (WAR) deployed into a simple servlet container (e.g. Tomcat) or a
-    full-featured J2EE application server.
-  
-  []
-  
-  Since Synapse doesn't rely on any container API, the features offered are the same in both
-  deployment scenarios, with very few exceptions:
-  
-  * There is a minor issue that prevents classpath resources from being used in a WAR deployment.
-    See {{{https://issues.apache.org/jira/browse/SYNAPSE-207}SYNAPSE-207}}.
-  
-  * When deployed as a WAR file, Synapse can be configured with the standard Axis2 servlet based
-    HTTP transport: while the recommended HTTP implementation for Synapse is the NIO HTTP
-    transport, there might be situations where it is preferable or mandatory to use the HTTP
-    protocol implementation of the application server.
-
-  []
-  
-  In some scenarios Synapse is used to proxy services that are deployed themselves on an
-  application server. In these cases it would be interesting to deploy Synapse on the same
-  application server and use an in-VM transport instead of HTTP to communicate with these
-  services. Note that for the moment no production-grade implementation of this type of transport
-  exists yet for Axis2, but this might change in the future.
-  
-  Since the features offered are almost the same, the differences between the two deployment
-  options are mainly related to packaging and operational considerations:
-  
-  * Many IT departments prefer deploying J2EE applications than managing stand-alone Java
-    processes, because this allows them to leverage the management and monitoring facilities
-    offered by the application server.
-  
-  * If the use case relies on JNDI resources such as JMS connection factories, JDBC data source
-    and transactions it might be easier to set up and configure these resources when Synapse is
-    deployed directly on the application server that hosts these resources.
-
-{Stand-alone deployment}
-
-* {Using the standard binary distribution}
-
-  The easiest way to get started with a stand-alone deployment is using the standard binary
-  distribution ZIP or tarball (see {{download.html}}). It already contains everything that is
-  needed to run Synapse stand-alone and you only need to customize it according to your requirements:
-  
-  * Place your mediations in <<<repository/conf/synapse.xml>>>.
-  
-  * Place any additional files such as WSDL files, endpoint definitions, etc. referenced by your
-    mediations in the <<<repository>>> directory.
-  
-  * Customize <<<repository/conf/axis2.xml>>> to enable and disable transports according to your needs.
-  
-  * Add any additional libraries required by your mediations to the <<<lib>>> directory. Alternatively
-    modify <<<repository/conf/wrapper.conf>>> to add directories and JAR files to the classpath.
-  
-  * Add any required modules to <<<repository/modules>>>.
-  
-  * If necessary, modify <<<lib/log4j.properties>>> to configure logging.
-
-  []
-  
-  Since the standard binary distribution also contains samples and documentation, you might want
-  to remove the following folders:
-  
-  * <<<docs>>>
-  
-  * <<<repository/conf/sample>>>
-  
-  * <<<samples>>>
-  
-  []
-
-  The <<<bin>>> directory contains Unix and Windows scripts to run Synapse:
-  
-  * <<<synapse.sh>>> and <<<synapse.bat>>> allow to run Synapse in non daemon mode.
-  
-  * <<<synapse-daemon.sh>>> is a Sys V init script that can be used on Unix systems to start and
-    stop Synapse in daemon mode.
-  
-  * <<<install-synapse-service.bat>>> and <<<uninstall-synapse-service.bat>>> can be used on
-    Windows to install Synapse as an NT service.
-
-* {Using Maven to build a custom distribution}
-
-  Building a custom Synapse package based on the standard binary distribution is a manual process
-  and this has some drawbacks:
-  
-  * The JAR files required to run Synapse must be selected manually and it is not easy to identify
-    unused JARs that could be safely removed.
-  
-  * The process is not suitable if there is a requirement for strict configuration management.
-    In particular:
-    
-    * Because of the large number of JAR files, managing the artifacts using a source control
-      repository is not practical.
-    
-    * The process is not repeatable and there is no way to go back to a previous version of
-      the artifacts.
-    
-  * When upgrading to a newer version of Synapse (or when working with snapshot versions), it
-    is necessary either to manually replace the JARs in the current package or to start again
-    from a new version of the standard binary distribution.
-    
-  * If Synapse needs to be deployed with slightly different configurations in multiple
-    environments (e.g. test and production), the corresponding packages need to be prepared
-    manually.
-  
-  []
-  
-  Note that these problems not only arise in the development and maintenance phases of a project,
-  but also when doing proof of concepts that you want to keep in a safe place for later reuse.
-  One approach to overcome these difficulties is to use Maven to assemble a custom package. When
-  used correctly, this approach solves all of the issues identified above. In particular Maven's
-  dependency management together with the excellent
-  {{{http://maven.apache.org/plugins/maven-assembly-plugin/}assembly plugin}} can be used to
-  automatically select the relevant JARs to include and pull them from Maven repositories.
-  The remaining artifacts required to assemble the package can then be easily stored in a source
-  control repository.
-  
-  Synapse provides a Maven archetype that allows to set up this kind of project in only a few
-  simple steps. To begin with, change to the directory where you want to create the project and
-  issue the following command:
-
--------------------------------------------------------------------
-mvn archetype:generate -DarchetypeCatalog=http://synapse.apache.org
--------------------------------------------------------------------
- 
-  In case of problems, you can try to use the latest version of the archetype catalog:
- 
--------------------------------------------------------------------
-mvn archetype:generate -DarchetypeCatalog=http://svn.apache.org/repos/asf/synapse/trunk/java/src/site/resources
--------------------------------------------------------------------
- 
-  Finally, if you have build Synapse from sources, you don't need to specify a catalog at all:
-  the archetype is added automatically to the local catalog during the build.
-  
-  In any case, when prompted by Maven, select <<<synapse-package-archetype>>> for the Synapse
-  version you want to use. In the next step enter the values for <<<groupId>>>, <<<artifactId>>>
-  and <<<version>>> for your project. You will also be prompted for a package name. Since the
-  archetype doesn't contain any source code, this value is irrelevant and you can continue with the default value.
-  
-  At this stage a Maven project has been created in a subdirectory with the same name as the
-  <<<artifactId>>> specified previously. You should now customize this projects according to your needs:
-  
-  * Add your mediations to <<<repository/conf/synapse.xml>>>.
-
-  * Customize the dependencies in <<<pom.xml>>>. In particular if additional transports such as
-    JMS are needed, add the required dependencies here. Additional Axis2 modules should also be added here.
-  
-  * Enable and configure additional transports in <<<repository/conf/axis2.xml>>>.
-  
-  * Place any other files referenced by <<<synapse.xml>>> into the <<<repository>>> directory.
-
-  []
-  
-  The project is built as usually with the following command:
- 
------------
-mvn package
------------
- 
-  This will create a ZIP file (in the <<<target>>> directory) containing everything that is needed
-  to run your custom Synapse configuration. You only need to uncompress it and use the appropriate
-  script in the <<<bin>>> directory to start Synapse.
-
-{WAR deployment}
-
-  Synapse provides a standard WAR file that can be used to deploy mediations on a servlet container
-  or on a J2EE application server. Note that this WAR file is not part of the downloadable
-  distributions. It can be retrieved from the following location:
-  
-  * {{http://repo1.maven.org/maven2/org/apache/synapse/synapse-war/}} for released versions.
-  
-  * {{http://hudson.zones.apache.org/hudson/job/Synapse%20-%20Trunk/org.apache.synapse$synapse-war/}}
-    for snapshot versions.
-  
-  []
-  
-  Customization of the Web application is similar to the stand-alone option, but the default
-  directory structure is different:
-  
-  * <<<synapse.xml>>> and <<<axis2.xml>>> are placed into the <<<WEB-INF/conf>>> directory. All
-    other files referenced by your mediations should go to the <<<WEB-INF/repository>>> directory.
-  
-  * Additional libraries must be placed into the standard <<<WEB-INF/lib>>> directory.
-
-  * Axis2 modules are located in <<<repository/modules>>>.
-
-  * <<<log4j.properties>>> is located in <<<WEB-INF/classes>>>.
diff --git a/src/site/apt/transports.apt b/src/site/apt/transports.apt
deleted file mode 100644
index ce671f9..0000000
--- a/src/site/apt/transports.apt
+++ /dev/null
@@ -1,553 +0,0 @@
-{Introduction}
-
-  The Synapse project has developed a set of transport implementations that provide protocol
-  support and/or features that go beyond what is provided out of the box by Axis2:
-  
-  * A non blocking HTTP transport that gives better performance in a highly asynchronous
-    environment like Synapse.
-  
-  * A VFS transport that can read messages from files and write outgoing messages to a file system.
-    The file system can be local or remote, and several remote protocols are supported, such as
-    FTP, SSH, WebDAV, etc.
-  
-  * A transport supporting the {{{http://www.fixprotocol.org}Financial Information eXchange}}
-    protocol. FIX is a public-domain messaging standard developed specifically for the real-time electronic
-    exchange of securities transactions. It has a large user base and is developed by the
-    collaborative effort of banks, broker-dealers, exchanges, industry utilities and associations,
-    institutional investors, and IT providers around the world. 
-  
-  []
-  
-  Note that while these transports are developed as part of the Synapse project, they can be used
-  with any Axis2 based application.
-  
-  The Synapse distribution also comes bundled with the following transports from the WS-Commons
-  Transport project:
-  
-  * A JMS transport supporting any JMS 1.0 or 1.1 provider.
-  
-  * A mail transport able to send messages using SMTP and poll messages from a POP3 or IMAP account.
-
-  Apache Synapse is also compatible with the following transport implementations from the Apache
-  Axis2 Transports project:
-
-  * TCP
-
-  * UDP
-
-  These transports are not shipped with Apache Synapse by default and hence they should be
-  downloaded separately from the Axis2 website and installed in the Synapse runtime.
-
-{Contents}
-
-%{toc}
-
-{Non-blocking HTTP transport}
-
-* {Example configurations}
-
-+--------------------------------------------------------------------------------------------+
-<transportReceiver name="http" class="org.apache.synapse.transport.nhttp.HttpCoreNIOListener">
-    <parameter name="port">8280</parameter>
-    <parameter name="non-blocking">true</parameter>
-</transportReceiver>
-
-<transportReceiver name="https" class="org.apache.synapse.transport.nhttp.HttpCoreNIOSSLListener">
-    <parameter name="port" locked="false">8243</parameter>
-    <parameter name="non-blocking" locked="false">true</parameter>
-    <parameter name="keystore" locked="false">
-        <KeyStore>
-            <Location>lib/identity.jks</Location>
-            <Type>JKS</Type>
-            <Password>password</Password>
-            <KeyPassword>password</KeyPassword>
-        </KeyStore>
-    </parameter>
-    <parameter name="truststore" locked="false">
-        <TrustStore>
-            <Location>lib/trust.jks</Location>
-            <Type>JKS</Type>
-            <Password>password</Password>
-        </TrustStore>
-    </parameter>
-</transportReceiver>
-
-<transportSender name="http"  class="org.apache.synapse.transport.nhttp.HttpCoreNIOSender">
-    <parameter name="non-blocking" locked="false">true</parameter>
-    <parameter name="warnOnHTTP500" locked="false">*</parameter>
-</transportSender>
-
-<transportSender name="https" class="org.apache.synapse.transport.nhttp.HttpCoreNIOSSLSender">
-    <parameter name="non-blocking" locked="false">true</parameter>
-    <parameter name="warnOnHTTP500" locked="false">*</parameter>
-    <parameter name="keystore" locked="false">
-        <KeyStore>
-            <Location>lib/identity.jks</Location>
-            <Type>JKS</Type>
-            <Password>password</Password>
-            <KeyPassword>password</KeyPassword>
-        </KeyStore>
-    </parameter>
-    <parameter name="truststore" locked="false">
-        <TrustStore>
-            <Location>lib/trust.jks</Location>
-            <Type>JKS</Type>
-            <Password>password</Password>
-        </TrustStore>
-    </parameter>
-</transportSender>
-+--------------------------------------------------------------------------------------------+
-
-* {Transport listener parameters}
-
-  The following parameters are supported by both the HTTP and the HTTPS listener:
-
-  [<<<port>>>] The TCP port to bind the listener to.
-  
-  [<<<bind-address>>>] The IP address to bind the listener to.
-  This can be used on hosts that have more than one network interface or IP address
-  to run multiple Synapse instances listening to the same port. If this parameter is not specified,
-  the listener will accept connections on any IP address.
-  
-  [<<<hostname>>>] The host name to use when computing endpoint references in generated WSDL files.
-  The default value is the host name as provided by the operation system or <<<localhost>>> if
-  the host name can't be determined. The value of this parameter is ignored if <<<WSDLEPRPrefix>>>
-  is specified.
-  
-  [<<<WSDLEPRPrefix>>>] The URL prefix to use when computing endpoint references in generated WSDL
-  files. The value must be a valid URL with at least a protocol and host. If this value is
-  unspecified, endpoint references will be computed based on the listener type (HTTP or HTTPS)
-  and <<<hostname>>> and <<<port>>> parameters.
-  
-  This parameter should be used if clients connect to Synapse through a frontend server, e.g. a
-  (load balancing) Apache, and these clients rely on the address information in the WSDL documents
-  exposed through <<<...?wsdl>>> URLs.
-  
-  []
-  
-  The following parameters are specific to the HTTPS listener: 
-  
-  [<<<keystore>>>] The keystore configuration. The value of this parameter must be a
-  <<<\<KeyStore\>>>> element as shown in the example configurations above.
-  
-  [<<<truststore>>>] The truststore configuration. The value of this parameter must be a
-  <<<\<TrustStore\>>>> element as shown in the example configurations above.
-  
-  [<<<SSLVerifyClient>>>] This parameter has the same meaning as the corresponding
-  {{{http://httpd.apache.org/docs/2.2/mod/mod_ssl.html#sslverifyclient}mod_ssl directive}} and
-  sets the desired certificate verification level for client authentication:
-  
-  * <<<none>>> (default): no client certificate is required at all
-  
-  * <<<optional>>>: the client may present a valid certificate, but is not required to do so
-  
-  * <<<require>>>: the client has to present a valid certificate, otherwise the connection
-  request will be terminated during SSL handshake
-
-* {Transport sender parameters}
-
-  The following property can be used to control based on content-types whether the HTTP/HTTPS
-  sender shall output a warning for responses with HTTP status code 500.
-
-  [<<<warnOnHTTP500>>>] A list of content-types for which Synapse shall output a warning when 
-  receiving an HTTP 500 response (each value each seperated by a |).
-  By default Synapse outputs a warning for any HTTP 500 response, irrespective of the content-type.
-  Consequently, also for each SOAP fault a warning will be logged.
-  If only for specific content-types a warning shall be logged, please provide a |-separated 
-  list. To output the warning for messages which do not have a content-type set, please
-  use the value "none"!
-  
-  Example value: x-application/hessian|none
-
-  []
-
-  The following properties can be used to configure the HTTP sender to use a proxy. They can
-  be specified either as transport parameters in declared in <<<\<transportSender\>>>> or as
-  system properties. 
-
-  [<<<http.proxyHost>>>] The host name or address of the proxy server.
-  
-  [<<<http.proxyPort>>>] The TCP port of the proxy server.
-  
-  [<<<http.nonProxyHosts>>>] The hosts to which the HTTP sender should connect directly and
-  not through the proxy server. The value can be a list of hosts, each seperated by a |, and
-  in addition a wildcard character (*) can be used for matching.
-  
-  Example value: <<<*.foo.com|localhost>>>
-  
-  []
-
-  Note that the HTTPS sender has no proxy support yet.
-  
-  The following parameters are specific to the HTTP sender:
-  
-  [<<<keystore>>>] The keystore configuration. The value of this parameter must be a
-  <<<\<KeyStore\>>>> element as shown in the example configurations above.
-  
-  [<<<truststore>>>] The truststore configuration. The value of this parameter must be a
-  <<<\<TrustStore\>>>> element as shown in the example configurations above.
-  
-  [<<<novalidatecert>>>] When set to <<<true>>>, this parameter disables server certificate
-  validation (trust). The default value is <<<false>>>. This parameter will be ignored if
-  <<<truststore>>> is set.
-  
-  Setting his parameter to <<<true>>> is useful in development and test environments, but
-  should not be used in production environments. If validation is disabled, a warning
-  message will be logged at startup.
-  
-  [<<<HostnameVerifier>>>] This optional parameter specifies the policy to apply when
-  checking that the hostname of the server matches the names stored inside the X.509 certificate
-  presented by the server. Possible values are <<<Strict>>>, <<<AllowAll>>> and
-  <<<DefaultAndLocalhost>>>. See the
-  {{{apidocs/org/apache/synapse/transport/nhttp/HostnameVerifier.html}HostnameVerifier Javadoc}}
-  for more details.
-
-{VFS transport}
-
-* {Transport listener}
-
-  The VFS transport listener receives messages dropped in a given local or remote file system
-  location. The location is specified by a URL that either identifies a single file or a directory.
-  The transport listener will periodically poll the specified location and process any file(s)
-  found. After a file has been processed it will be deleted or moved to another location. Note that
-  this is absolutely mandatory to prevent the listener from processing files multiple times.
-  Therefore the VFS transport listener can only be used in situations where it has write access to
-  the file system location and where deleting or moving the dropped files is acceptable.
-
-  The transport is based on {{{http://commons.apache.org/vfs/}Apache Commons VFS}} and supports any
-  protocol for which a VFS provider is available. The transport is preconfigured with providers
-  for local files (<<<file:>>> scheme), HTTP, HTTPS, FTP and SFTP (i.e. file transfer over SSH).
-
-  There is a fundamental difference between the VFS transport and transports such as HTTP and it
-  is important to understand this difference to be able to use the VFS transport correctly.
-  The HTTP transport binds to a single protocol endpoint, i.e. a TCP port on which it accepts
-  incoming HTTP requests. These requests are then dispatched to the right service based on the
-  request URI. On the other hand, the VFS transport only receives the payload of a message, but no
-  additional information that could be used to dispatch the message to a service. This means that
-  file system locations must be explicitly mapped to services. This is done using a set of
-  service parameters.
-
-  For Synapse this means that the VFS transport listener can only be used in conjunction with proxy
-  services. The relevant service parameters are then specified as follows: 
-
-+-------------------------------------+  
-<proxy name="MyVFSService" transports="vfs">
-    <parameter name="transport.vfs.FileURI">file:///var/spool/synapse/in</parameter>
-    <parameter name="transport.vfs.ContentType">application/xml</parameter>
-    ...
-    <target>
-        ...
-    </target>
-</proxy>
-+-------------------------------------+  
-
-  In this example the file system location <<<file:///var/spool/synapse/in>>> is explicitly bound
-  to <<<MyVFSService>>>, i.e. any message dropped in that location will be predispatched to that
-  service, bypassing any other configured dispatch mechanisms that would apply to messages received
-  through HTTP.
-  
-  The VFS transport recognizes the following service parameters:
-
-  [<<<transport.vfs.FileURI>>> (Required)]
-  The primary File (or Directory) URI in the vfs* transport format,
-  for this service
-  
-  [<<<transport.vfs.ContentType>>> (Required)]
-  The expected content type for files retrieved for this service. The
-  VFS transport uses this information to select the appropriate
-  message builder.
-  
-  Examples:
-  
-  * <<<text/xml>>> for plain XML or SOAP
-  
-  * <<<text/plain; charset=ISO-8859-1>>> for text files
-  
-  * <<<application/octet-stream>>> for binary data
-  
-  []
-  
-  [<<<transport.vfs.FileNamePattern>>> (Optional)]
-  A file name regex pattern to match files against a directory
-  specified by the FileURI
-  
-  [<<<transport.PollInterval>>> (Optional)]
-  The poll interval (in seconds)
-  
-  [<<<transport.vfs.ActionAfterProcess>>> (Optional)]
-  DELETE or MOVE
-  
-  [<<<transport.vfs.MoveAfterProcess>>> (Optional)]
-  The directory to move files after processing (i.e. all files process
-  successfully)
-  
-  [<<<transport.vfs.ActionAfterErrors>>> (Optional)]
-  DELETE or MOVE
-  
-  [<<<transport.vfs.MoveAfterErrors>>> (Optional)]
-  The directory to move files after errors (i.e. some of the files
-  succeed but some fail)
-  
-  [<<<transport.vfs.ActionAfterFailure>>> (Optional)]
-  DELETE or MOVE
-  
-  [<<<transport.vfs.MoveAfterFailure>>> (Optional)]
-  The directory to move after failure (i.e. all files fail)
-
-  [<<<transport.vfs.ReplyFileURI>>> (Optional)]
-  Reply file URI
-  
-  [<<<transport.vfs.ReplyFileName>>> (Optional)]
-  Reply file name (defaults to response.xml)
-  
-  [<<<transport.vfs.MoveTimestampFormat>>> (Optional)]
-  Timestamp prefix format for processed file name. java.text.SimpleDateFormat compatible string. e.g. yyMMddHHmmss'-'
-
-  [<<<transport.vfs.Locking>>> (Optional)]
-  By-default file locking is turned on in the VFS transport, and this parameter lets you configure
-  the locking behaviour on a per service basis. Possible values are <<<enable>>> or <<<disable>>>,
-  and both these values are important because the locking can be disabled at the global level by
-  specifying that at the receiver level and selectively enable locking only for a set of services.
-
-  [<<<transport.vfs.Streaming>>> (Optional)]
-  If this parameter is set to <<<true>>>, the transport will attempt to use a
-  <<<javax.activation.DataSource>>> (instead of a <<<java.io.InputStream>>>) object to pass
-  the content of the file to the message builder. Note that this is only supported by some
-  message builders, e.g. for plain text and binary.
-  
-  This allows processing of the message without storing the entire content in memory.
-  It also has two other side effects:
-  
-  * The incoming file (or connection in case of a remote file) will only
-    be opened on demand.
-    
-  * Since the data is not cached, the file might be read several times.
-  
-  []
-  
-  This option can be used to achieve streaming of large payloads. Note that this feature is
-  still somewhat experimental and might be superseded by a more flexible mechanism in a future
-  release.
-
-  [<<<transport.vfs.MoveAfterFailedMove >>> (Optional)]
-  New destination to move the failed file
-
-  [<<<transport.vfs.FailedRecordsFileName >>> (Optional)]
-  The file name to maintain the list of failure files. Default is vfs-move-failed-records.properties.
-
-  [<<<transport.vfs.FailedRecordsFileDestination  >>> (Optional)]
-  The destination of the failed file. Default is repository/conf/.
-
-  [<<<transport.vfs.MoveFailedRecordTimestampFormat >>> (Optional)]
-  When adding record to the failed file entries is logged the as: file_name time_stamp. This will
-  configure the time stamp format. Default format is dd-MM-yyyy HH:mm:ss.
-
-  [<<<transport.vfs.FailedRecordNextRetryDuration  >>> (Optional)]
-  The time in millisecond for the move task to wait until next re-try. Default is 3000 milliseconds.
-
-  []
-  
-  Note that since the VFS endpoints are configured at the level of the service, the only parameter
-  that is available at the listener is the file locking configuration parameter whcih is optional 
-  and the transport listener is enabled in <<<axis2.xml>>> simply as
-  follows:
-
-+-------------------------------------+  
-<transportReceiver name="vfs" class="org.apache.synapse.transport.vfs.VFSTransportListener">
-    <parameter name="transport.vfs.Locking">enable | disable</parameter> ?
-</transportReceiver>
-+-------------------------------------+  
-
-* {Transport sender}
-
-  The VFS transport sender allows to write outgoing messages to local or remote files. As with
-  the listener, the transport sender supports any protocol for which there is a VFS provider.
-
-  The sender is enabled be the following directive in <<<axis2.xml>>> file locking which is
-  by-default enabled can be configured using the <<<transport.vfs.Locking>>> parameter:
-
-+-------------------------------------+  
-<transportSender name="vfs" class="org.apache.synapse.transport.vfs.VFSTransportSender">
-    <parameter name="transport.vfs.Locking">enable | disable</parameter> ?
-</transportSender>
-+-------------------------------------+  
-
-  To send a message using the VFS transport, the destination URI must start with <<<vfs:>>>
-  followed by a valid VFS URL. For example, in a Synapse mediation, one would use: 
-
-+-------------------------------------+  
-<endpoint>
-    <address uri="vfs:file:///var/spool/synapse/out"/>
-</endpoint>
-+-------------------------------------+
-
-  Other examples of valid VFS URLs are (see {{http://commons.apache.org/vfs/filesystems.html}} for
-  more samples):
-
-  * <<<file:///directory/filename.ext>>>
-  
-  * <<<file:////somehost/someshare/afile.txt>>>
-  
-  * <<<jar:../lib/classes.jar!/META-INF/manifest.mf>>>
-  
-  * <<<jar:zip:outer.zip!/nested.jar!/somedir>>>
-  
-  * <<<ftp://myusername:mypassword@somehost/pub/downloads/somefile.tgz[?vfs.passive=true]>>>
-
-  []
-  
-  The global configuration of the file locking can be overriden by providing the
-  <<<transport.vfs.Locking>>> as a URL parameter with the appropriate value (<<<enable>>>, or
-  <<<disable>>>) on a given endpoint.
-
-  It should be noted that by its nature, the VFS transport sender doesn't support synchronous
-  responses and should only be invoked using the out-only message exchange pattern.
-  In a Synapse mediation, this can be forced using the following mediator:
-
-+-------------------------------------+  
-<property action="set" name="OUT_ONLY" value="true"/>
-+-------------------------------------+  
-
-* {Using SFTP}
-
-  To avoid man-in-the-middle attacks, SSH clients will only connect to hosts with a known
-  host key. When connecting for the first time to an SSH server, a typical command line SSH client
-  would request confirmation from the user to add the server and its fingerprint to the list of known
-  hosts.
-  
-  The VFS transports supports SFTP through the {{{http://www.jcraft.com/jsch/}JSch}} library
-  and this library also requires a list of known hosts. Since Synapse is not an interactive
-  process, it can't request confirmation from the user and is therefore unable to automatically add
-  a host to the list. This implies that the list of known hosts must be set up manually before the
-  transport can connect.
-
-  Jsch loads the list of known hosts from a file called <<<known_hosts>>> in the <<<.ssh>>>
-  subdirectory of the user's home directory, i.e. <<<$HOME/.ssh>>> in Unix and
-  <<<%HOMEPATH%\\.ssh>>> in Windows. The location and format of this file are compatible with
-  the {{{http://www.openssh.com/}OpenSSH}} client.
-
-  Since the file not only contains a list of hostnames but also the fingerprints of their host keys,
-  the easiest way to add a new host to that file is to simply use the OpenSSH client to open an SSH
-  session on the target host. The client will then ask to add the credentials to the
-  <<<known_hosts>>> file. Note that if the SSH server is configured to only allow SFTP sessions,
-  but no interactive sessions, the connection will actually fail. Since this doesn't rollback
-  the change to the <<<known_hosts>>> file, this error can be ignored.
-
-* {Known issues}
-
-  The VFS listener will start reading a file as soon as it appears in the configured location.
-  To avoid processing half written files, the creation of these files should be made atomic.
-  On most platforms this can be achieved by writing the data to a temporary file and then
-  moving the file to the target location. Note however that a move operation is only atomic
-  if the source and destination are on the same physical file system. The location for the
-  temporary file should be chosen with that constraint in mind.
-  
-  It should also be noted that the VFS transport sender doesn't create files atomically.
-
-{FIX transport}
-
-  A general overview about the FIX transport can be found in the following articles:
-  
-  * {{{http://wso2.org/library/3449}Apache Synapse FIX'ed}}
-  
-  * {{{http://wso2.org/library/3837}Using the WSO2 ESB and FIX}} (also applies to Synapse)
-
-* {Setting up the FIX Transport}
-
-  To use the FIX transport, you need a local {{{http://www.quickfixj.org}Quickfix/J}} installation.
-  Download Quickfix/J from {{http://www.quickfixj.org/downloads}}.
-  
-  To enable the FIX transport, you need to uncomment the FIX
-  transport sender and FIX transport receiver configurations in the 
-  SYNAPSE_HOME/repository/conf/axis2.xml. Simply locate and uncomment the
-  FIXTransportSender and FIXTransportListener sample configurations. Also
-  add the following jars to the Synapse class path (SYNAPSE_HOME/lib directory).
-  
-  * quickfixj-core.jar
-  
-  * quickfixj-msg-fix40.jar
-  
-  * quickfixj-msg-fix41.jar
-  
-  * quickfixj-msg-fix42.jar
-  
-  * quickfixj-msg-fix43.jar
-  
-  * quickfixj-msg-fix44.jar
-  
-  * mina-core-1.1.0.jar
-  
-  * slf4j-api-1.3.0.jar
-  
-  * slf4j-jdk14-1.3.0.jar
-  
-  []
-  
-  All these jars are shipped with the Quickfix/J binary distribution.
-
-* {FIX Transport Parameters}
-
-  This is the list of all parameters accepted by the FIX transport. Refer
-  the sample 257 and 258 to see how some of them are used in practice.
-
-  [<<<transport.fix.AcceptorConfigURL>>>] If a service needs to listen to incoming
-  FIX messages from a remote initiator then Synapse needs to create an acceptor.
-  This parameter should contain the URL of the file which contains the FIX
-  configuration for the acceptor. (See sample 257)
-
-  [<<<transport.fix.InitiatorConfigURL>>>] If a service needs to send FIX messages
-  to a remote acceptor Synapse should create an initiator. This parameter should
-  contain the URL of the file which contains the FIX configuration for the
-  initiator. (See sample 257)
-
-  [<<<transport.fix.AcceptorMessageStore>>>] The type of message store to be used
-  with the acceptor. Allowed values for this parameter are 'file', 'jdbc', 'memory'
-  and 'sleepycat'. If not specified memory based message store will be used by
-  default. Additional parameters required to configure each of the message stores
-  should be specified in the acceptor configuration file.
-
-  [<<<transport.fix.InitiatorMessageStore>>>] Same as the above but applies only
-  for the initiators. Additional parameters required to configure each of
-  the message stores should be specified in the initiator configuration file.
-
-  [<<<transport.fix.AcceptorLogFactory>>>] Specifies the transport level log factory
-  to be used to log messages going through the acceptor. FIX messages are logged
-  without putting them in SOAP envelopes at this level. Accepted values are
-  'console', 'file' and 'jdbc'. If not specified no logging will be done at the transport
-  level. Additional parameters required to configure each of the lof factories should be
-  specified in the acceptor configuration file.
-
-  [<<<transport.fix.InitiatorLogFactory>>>] Specifies the transport level log factory
-  to be used to log messages going through the initiator. Functionality is similar
-  to the above. Additional parameters required to configure each of the lof factories
-  should be specified in the initiator configuration file.
-
-  [<<<transport.fix.ResponseDeliverToCompID>>>] If a response FIX message sent from
-  Synapse to a remote FIX engine should be forwarded from the remote engine to
-  another party this parameter can be used to set the DeliverToCompID field
-  of the messages at Synapse.
-
-  [<<<transport.fix.ResponseDeliverToSubID>>>] If a response FIX message sent from
-  Synapse to a remote FIX engine should be forwarded from the remote engine to
-  another party this parameter can be used to set the DeliverToSubID field
-  of the messages at Synapse.
-
-  [<<<transport.fix.ResponseDeliverToLocationID>>>] If a response FIX message sent from
-  Synapse to a remote FIX engine should be forwarded from the remote engine to
-  another party this parameter can be used to set the DeliverToLocationID field
-  of the messages at Synapse.
-
-  [<<<transport.fix.ServiceName>>>] Used when messages coming over a different protocol
-  has to be forwarded over FIX. The value must be equal to the name of the service
-  and the scope must be 'axis2-client' (See sample 258)
-
-  [<<<transport.fix.SendAllToInSequence>>>] When there are multiple responses to a FIX
-  request and when we need only one of them to be sent to the original requester
-  this parameter has to be set to 'false'. This mostly comes handy when the original
-  requester is communicating over a different protocol (like HTTP). If this parameter
-  is not set to 'false' at such scenarios messages might get into a loop. (See
-  sample 258)
-
-  [<<<transport.fix.BeginStringValidation>>>] When the FIX messages sent to Synapse should not
-  be forwarded to a FIX session with a different BeginString value this parameter can be
-  set to 'true'. Setting this parameter to 'true' will enforce this restriction.
diff --git a/src/site/fml/faq.fml b/src/site/fml/faq.fml
deleted file mode 100644
index 7f15714..0000000
--- a/src/site/fml/faq.fml
+++ /dev/null
@@ -1,37 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>

-<faqs xmlns="http://maven.apache.org/FML/1.0"

-      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

-      xsi:schemaLocation="http://maven.apache.org/FML/1.0 http://maven.apache.org/xsd/fml-1.0.xsd"

-      title="Frequently Asked Questions"

-      toplink="false">

-    <part id="general">

-        <faq id="cdata">

-            <question>

-                Synapse seems to replace CDATA sections in incoming messages by text nodes.

-                Why does this happen?

-            </question>

-            <answer>

-                <p>Woodstox, the XML parser used by Synapse, by default works in coalescing mode,

-                implying that adjacent CDATA sections and text nodes are combined and reported as

-                a single CHARACTER event. Therefore information about CDATA sections is lost. Note

-                that enabling coalescing by default is contrary to the StAX specifications and this

-                is a <a href="http://jira.codehaus.org/browse/WSTX-140">bug</a> in the Woodstox

-                version used by Synapse.</p>

-                <p>Starting with version 1.2.9, Axiom has a feature that allows to control the

-                settings of the underlying StAX implementation (see the Javadoc of the StAXUtils

-                class for more details). This can be used to switch off coalescing, so that CDATA

-                sections will be preserved. To achieve this, create an

-                <tt>XMLInputFactory.properties</tt> file with the following content:</p>

-<pre>

-javax.xml.stream.isCoalescing=false

-</pre>

-                <p>This file needs to be placed in the classpath of Synapse. For a standalone

-                deployment, the right place is the <tt>lib</tt> directory and for a WAR deployment,

-                place the file into <tt>WEB-INF/classes</tt>. Since Synapse 1.3 only ships with

-                Axiom 1.2.8, you will also have to replace the corresponding JARs by newer versions.

-                Note that at the time of writing, Axiom 1.2.9 has not yet been released and the

-                required feature is only available in snapshot versions of Axiom.</p>

-            </answer>

-        </faq>

-    </part>

-</faqs>

diff --git a/src/site/resources/archetype-catalog.xml b/src/site/resources/archetype-catalog.xml
deleted file mode 100644
index f9a21a2..0000000
--- a/src/site/resources/archetype-catalog.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~  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.
-  -->
-<archetype-catalog>
-    <archetypes>
-        <archetype>
-            <groupId>org.apache.synapse</groupId>
-            <artifactId>synapse-package-archetype</artifactId>
-            <version>1.3</version>
-            <repository>http://repo1.maven.org/maven2</repository>
-            <description>Create a Synapse 1.3 custom package</description>
-        </archetype>
-        <archetype>
-            <groupId>org.apache.synapse</groupId>
-            <artifactId>synapse-package-archetype</artifactId>
-            <version>2.2.0-SNAPSHOT</version>
-            <repository>http://people.apache.org/repo/m2-snapshot-repository</repository>
-            <description>Create a Synapse 2.2.0-SNAPSHOT custom package</description>
-        </archetype>
-    </archetypes>
-</archetype-catalog>
diff --git a/src/site/resources/css/maven-base.css b/src/site/resources/css/maven-base.css
deleted file mode 100755
index b47862a..0000000
--- a/src/site/resources/css/maven-base.css
+++ /dev/null
@@ -1,143 +0,0 @@
-body {
-  margin: 0px;
-  padding: 0px;
-}
-img {
-  border:none;
-}
-table {
-  padding:0px;
-  width: 100%;
-  margin-left: -2px;
-  margin-right: -2px;
-}
-acronym {
-  cursor: help;
-  border-bottom: 1px dotted #feb;
-}
-table.bodyTable th, table.bodyTable td {
-  padding: 2px 4px 2px 4px;
-  vertical-align: top;
-}
-div.clear{
-  clear:both;
-  visibility: hidden;
-}
-div.clear hr{
-  display: none;
-}
-#bannerLeft, #bannerRight {
-  font-size: xx-large;
-  font-weight: bold;
-}
-#bannerLeft img, #bannerRight img {
-  margin: 0px;
-}
-.xleft, #bannerLeft img {
-  float:left;
-}
-.xright, #bannerRight {
-  float:right;
-}
-#banner {
-  padding: 0px;
-}
-#banner img {
-  border: none;
-}
-#breadcrumbs {
-  padding: 3px 10px 3px 10px;
-}
-#leftColumn {
- width: 170px;
- float:left;
- overflow: auto;
-}
-#bodyColumn {
-  margin-right: 1.5em;
-  margin-left: 197px;
-}
-#legend {
-  padding: 8px 0 8px 0;
-}
-#navcolumn {
-  padding: 8px 4px 0 8px;
-}
-#navcolumn h5 {
-  margin: 0;
-  padding: 0;
-  font-size: small;
-}
-#navcolumn ul {
-  margin: 0;
-  padding: 0;
-  font-size: small;
-}
-#navcolumn li {
-  list-style-type: none;
-  background-image: none;
-  background-repeat: no-repeat;
-  background-position: 0 0.4em;
-  padding-left: 16px;
-  list-style-position: outside;
-  line-height: 1.2em;
-  font-size: smaller;
-}
-#navcolumn li.expanded {
-  background-image: url(../images/expanded.gif);
-}
-#navcolumn li.collapsed {
-  background-image: url(../images/collapsed.gif);
-}
-#poweredBy {
-  text-align: center;
-}
-#navcolumn img {
-  margin-top: 10px;
-  margin-bottom: 3px;
-}
-#poweredBy img {
-  display:block;
-  margin: 20px 0 20px 17px;
-}
-#search img {
-    margin: 0px;
-    display: block;
-}
-#search #q, #search #btnG {
-    border: 1px solid #999;
-    margin-bottom:10px;
-}
-#search form {
-    margin: 0px;
-}
-#lastPublished {
-  font-size: x-small;
-}
-.navSection {
-  margin-bottom: 2px;
-  padding: 8px;
-}
-.navSectionHead {
-  font-weight: bold;
-  font-size: x-small;
-}
-.section {
-  padding: 4px;
-}
-#footer {
-  padding: 3px 10px 3px 10px;
-  font-size: x-small;
-}
-#breadcrumbs {
-  font-size: x-small;
-  margin: 0pt;
-}
-.source {
-  padding: 12px;
-  margin: 1em 7px 1em 7px;
-}
-.source pre {
-  margin: 0px;
-  padding: 0px;
-}
\ No newline at end of file
diff --git a/src/site/resources/css/maven-theme.css b/src/site/resources/css/maven-theme.css
deleted file mode 100755
index 67bb41b..0000000
--- a/src/site/resources/css/maven-theme.css
+++ /dev/null
@@ -1,129 +0,0 @@
-body {
-  padding: 0px 0px 10px 0px;
-}
-body, td, select, input, li{
-  font-family: Verdana, Helvetica, Arial, sans-serif;
-  font-size: 13px;
-}
-code{
-  font-family: Courier, monospace;
-  font-size: 13px;
-}
-#legend li.externalLink {
-  background: url(../images/external.png) left top no-repeat;
-  padding-left: 18px;
-}
-a.externalLink, a.externalLink:link, a.externalLink:visited, a.externalLink:active, a.externalLink:hover {
-  background: url(../images/external.png) right center no-repeat;
-  padding-right: 18px;
-}
-#legend li.newWindow {
-  background: url(../images/newwindow.png) left top no-repeat;
-  padding-left: 18px;
-}
-a.newWindow, a.newWindow:link, a.newWindow:visited, a.newWindow:active, a.newWindow:hover {
-  background: url(../images/newwindow.png) right center no-repeat;
-  padding-right: 18px;
-}
-h2 {
-  padding: 4px 4px 4px 6px;
-  border: 1px solid #999;
-  color: #900;
-  background-color: #ddd;
-  font-weight:900;
-  font-size: x-large;
-}
-h3 {
-  padding: 4px 4px 4px 6px;
-  border: 1px solid #aaa;
-  color: #900;
-  background-color: #eee;
-  font-weight: normal;
-  font-size: large;
-}
-h4 {
-  padding: 4px 4px 4px 6px;
-  border: 1px solid #bbb;
-  color: #900;
-  background-color: #fff;
-  font-weight: normal;
-  font-size: large;
-}
-h5 {
-  padding: 4px 4px 4px 6px;
-  color: #900;
-  font-size: normal;
-}
-p {
-  line-height: 1.3em;
-  font-size: small;
-}
-#breadcrumbs {
-  border-top: 1px solid #aaa;
-  border-bottom: 1px solid #aaa;
-  background-color: #ccc;
-}
-#leftColumn {
-  margin: 10px 0 0 5px;
-  border: 1px solid #999;
-  background-color: #eee;
-}
-#navcolumn h5 {
-  font-size: smaller;
-  border-bottom: 1px solid #aaaaaa;
-  padding-top: 2px;
-  color: #000;
-}
-
-table.bodyTable th {
-  color: white;
-  background-color: #bbb;
-  text-align: left;
-  font-weight: bold;
-}
-
-table.bodyTable th, table.bodyTable td {
-  font-size: 1em;
-}
-
-table.bodyTable tr.a {
-  background-color: #ddd;
-}
-
-table.bodyTable tr.b {
-  background-color: #eee;
-}
-
-.source {
-  border: 1px solid #999;
-}
-dl {
-  padding: 4px 4px 4px 6px;
-  border: 1px solid #aaa;
-  background-color: #ffc;
-}
-dt {
-  color: #900;
-}
-#organizationLogo img, #projectLogo img, #projectLogo span{
-  margin: 8px;
-}
-#banner {
-  border-bottom: 1px solid #fff;
-}
-.errormark, .warningmark, .donemark, .infomark {
-  background: url(../images/icon_error_sml.gif) no-repeat;
-}
-
-.warningmark {
-  background-image: url(../images/icon_warning_sml.gif);
-}
-
-.donemark {
-  background-image: url(../images/icon_success_sml.gif);
-}
-
-.infomark {
-  background-image: url(../images/icon_info_sml.gif);
-}
-
diff --git a/src/site/resources/css/print.css b/src/site/resources/css/print.css
deleted file mode 100755
index 49aae7e..0000000
--- a/src/site/resources/css/print.css
+++ /dev/null
@@ -1,7 +0,0 @@
-#banner, #footer, #leftcol, #breadcrumbs, .docs #toc, .docs .courtesylinks, #leftColumn, #navColumn {
-	display: none !important;
-}
-#bodyColumn, body.docs div.docs {
-	margin: 0 !important;
-	border: none !important
-}
\ No newline at end of file
diff --git a/src/site/resources/css/site.css b/src/site/resources/css/site.css
old mode 100755
new mode 100644
index 8c7e5b9..053010c
--- a/src/site/resources/css/site.css
+++ b/src/site/resources/css/site.css
@@ -1,237 +1,174 @@
-/* page general styles */
+@import url(http://fonts.googleapis.com/css?family=Buenard);
+body, p, div, ul, li, a, tr, td,th{
+    font-family: 'Buenard', serif;
+    font-size:15px;
+}
 body{
-    padding:0px;
-    margin:0px;
-    width:1000px;
-}
-a{
-    color:#557f95;
-    text-decoration:none;
-}
-a:hover{
-    color:#000000;
-    text-decoration:underline;
-}
-body, td, tr, input,h1,h2,h3,h4,h5,h6,a{
-    font: 12px Verdana, Arial, Helvetica, sans-serif;
-    line-height:18px;
+    border-top:solid 5px #000;
+    padding-bottom:0px;
+    background:transparent url(../images/page-back.png) no-repeat right 5px;
 }
 h2{
-    padding:0px;
-    margin:0px;
-    font-size:14px;
-    font-weight:bold;
-    height:22px;
-    background-color:#bcbcbc;
-    text-indent:10px;
-    margin-left:-15px;
-    margin-right:-15px;
-    margin-top:-5px;
-    color:#000000;
-}
-h3{
-    padding:0px;
-    margin:0px;
-    font-weight:bold;
-}
-h4{
-    font-weight:bold;
-    color:#777777;
-}
-p{
-    padding-top:5px;
-    padding-bottom:5px;
-    line-height:18px;
-}
-/* page styles */
-.page-padding{
-    padding-left:10px;
-    padding-right:10px;
-}
-.composite{
-/* Uncomment these lines to give a fixed width with centered positioning ....*/
-    position:absolute;
-    left:50%;
-    width:980px;
-    margin-left:-490px;
-    border:solid 1px #83b0c0;
-    margin-top:5px;
-}
-
-/* header styles */
-#banner{
-    background-image:url(../images/apache-synapse-banner-background.jpg);
-    background-repeat:repeat-x;
-    background-position:0px 0px;
-    height:98px;
-}
-#bannerLeft{
-    background-image:url(../images/apache-synapse-logo.jpg);
-    background-repeat:no-repeat;
-    background-position:0px 0px;
-    height:103px;
-    text-align:right;
-    padding-right:10px;
-    display:block;
-}
-#breadcrumbs{
-    position:absolute;
-    top:70px;
-    background-color:transparent;
-    border-bottom:none;
-    border-top:none;
-    font-size:auto;
-    margin:0pt;
-    padding:0px;
-}
-#bannerRight{
-    background-image:url(../images/apache-synapse-banner.jpg);
-    background-repeat:no-repeat;
-    background-position:right 0px;
-    display:block;
-    height:65px;
-    position:absolute;
-    right:0px;
-    top:0px;
-}
-.xleft{
-    color:#929292;
-    right:200px;
-    position:absolute;
-}
-.top-menu a{
-    color:#000000;
-    text-decoration:none;
-}
-.top-menu a:hover{
-    text-decoration:underline;
-}
-.top-menu-gap{
-    padding-left:30px;
-}
-
-/* content text */
-.content{
-
-}
-#leftColumn{
-    width:179px;
     background-color:transparent;
     border:none;
-    margin:10px 0px 0px 5px;
+    font-size:30px;
+    color:#171515;
+    /*text-shadow:-1px -1px 2px #ADA9A9;*/
+    margin:3px 0px;    
 }
-#navcolumn h5{
-    text-indent:15px;
-    height:23px;
-    color:#ffffff;
-    background-image:url(../images/apache-synapse-menu-top.jpg);
-    background-repeat:no-repeat;
-    background-position:left 0px;
+h3{
+    background-color:transparent;
+    border:none;
+    font-size:25px;
+    color:#171515;
+    /*text-shadow:-1px -1px 2px #ADA9A9;*/
+    margin:3px 0px;
 }
-#navcolumn{
-    background-image:url(../images/apache-synapse-menu.jpg);
-    background-repeat:no-repeat;
-    background-position:0px 0px;
-    background-color:#e5e5e5;
-    border-bottom:solid 1px #b4b4b4;
-    padding:0px 0px 0pt 0px;
+div#contentBox h4{
+    margin:3px 0px;
+    font-size:15px;
+    color: #666666;
+    font-weight:bold;
+    border:none;
+    padding:0;
+    background-color:transparent;
+}
+div#contentBox h5{
+    margin:3px 0px;
+    font-size:15px;
+}
+div#contentBox{
+    padding-top:10px;
+}
+p,li{
+    line-height:25px;
+}
+#bannerLeft{
+    text-align:right;
+    position:absolute;
+    right:270px;
+    top:30px;
+    color:#4c4c4c;
+}
+#banner{
+    height:90px;
+    background:transparent url(../images/synapse-logo.png) no-repeat left top;
+}
+#footer{
+    background:transparent url(../images/footer-back.png) repeat-x left top;
+    color:#fff;
     font-size:11px;
+    height:80px;
+    padding:10px;
+    text-align:center;
+    margin:0px 0px !important;
+    border-top:solid 5px #000;
 }
-#navcolumn ul{
-    padding:0px;
-    margin:0px;
-    list-style:none;
-    padding-left:10px;
+.xright{
+    float:none;
 }
-#navcolumn ul ul{
-    margin-left:-10px;
+#breadcrumbs{
+     background-image: -webkit-gradient(linear, left top, left bottom, from(#c2c2c2), to(#d7d7d7)); /* mozilla - FF3.6+ */
+    background-image: -moz-linear-gradient(top, #c2c2c2 0%, #d7d7d7 100%); /* IE 5.5 - 7 */
+    filter:progid:DXImageTransform.Microsoft.Gradient(GradientType=0,StartColorStr='#c2c2c2',EndColorStr='#d7d7d7'); /* IE8 */
+    -ms-filter: progid: DXImageTransform . Microsoft . gradient(gradientType = 0, startColor = '#c2c2c2', endColoStr = '#d7d7d7'); /*Transparent back */
+
+      /*Rounded corners */
+    -moz-border-radius: 3px;
+    border-radius: 3px;
+    border: solid 1px #888888;
+
+    /*The shadow */
+    -moz-box-shadow: 3px 3px 2px #ddd;
+    -webkit-box-shadow: 3px 3px 2px #ddd;
+    box-shadow: 3px 3px 2px #ddd;
+
+    color:#707070;
+
+    margin:0px 20px;
+    padding:5px;
+
+    /*text-shadow: -1px -1px 2px #918D8D;*/
 }
-#navcolumn li{
-    margin-top:3px;
+#leftColumn{
+    margin:20px 20px;
+
+
+    background-color:#e9e9e9;
+
+       /*Rounded corners */
+    -moz-border-radius: 3px;
+    border-radius: 3px;
+
+    /*The shadow */
+    -moz-box-shadow: 3px 3px 2px #ddd;
+    -webkit-box-shadow: 3px 3px 2px #ddd;
+    box-shadow: 3px 3px 2px #ddd;
+
+    width:250px;
 }
 #navcolumn strong{
+    color:#ff6800;
+    font-size:13px;
+}
+#navcolumn h5{
+    color:#2b2b2b;
     font-weight:bold;
+    font-size:20px;
 }
-#navcolumn ul li a {
-    text-indent:0px;
-    font-size:12px;
-    color:#224351;
+#navcolumn li{
+    margin:10px 0px;
 }
-#navcolumn li.expanded {
-    background-image:url(../images/apache-synapse-menu-button.gif);
-    background-repeat:no-repeat;
-    background-position:0px 5px;
-}
-#navcolumn ul li ul li a{
-    background-image:none;
-    text-indent:0px;
-    font-size:11px;
-    color:#557f95;
-    font-size:11px;
+#navcolumn li a{
+    font-size:13px;    
 }
 #bodyColumn{
-    background-color:#F3F3F3;
-    border:1px solid #B4B4B4;
-    margin-right:10px;
-    margin-left:194px;
-    margin-top:10px;
-    padding-left:10px;
-    padding-right:10px;
+    margin-left:300px;
 }
-.menu-bottom-left{
-    background-image:url(../images/apache-synapse-menu-bottom.jpg);
-    background-repeat:no-repeat;
-    background-position:0px 0px;
-    background-color:#e5e5e5;
-    width:15px;
-    height:13px;
-    float:left;
+#bodyColumn ul li{
+    margin-bottom:10px;        
 }
-.menu-bottom-right{
-    background-color:#e5e5e5;
-    border-bottom:solid 1px #b4b4b4;
-    height:13px;
-    float:right;
-    width:164px;
+table.bodyTable {
+    border-left: solid 1px #468aa6;
+    border-top: solid 1px #468aa6;
+    border-collapse: collapse;
 }
-.content-back1{
-    background-image:url(../images/apache-synapse-spliter.jpg);
-    background-repeat:no-repeat;
-    background-position:0px 0px;
-}
-.content-back2{
-    background-image:url(../images/apache-synapse-content-back.jpg);
-    background-repeat:repeat-y;
-    background-position:0px 0px;
-    background-color:#f3f3f3;
-    border-bottom:solid 1px #b4b4b4;
-    border-right:solid 1px #b4b4b4;
-    margin-right:10px;
-}
-.content-display{
-    margin-left:32px;
-    padding-bottom:10px;
-}
-.poweredBy{
-    margin-left:30px;
-    margin-top:5px;
-}
-.footer{
-    color:#929292;
-    margin-top:10px;
-    margin-left:10px;
-}
-.command {
-    border: 1px dashed #3c78b5;
+
+table.bodyTable th {
+    background-image: -webkit-gradient(linear, left top, left bottom, from(#56aed2), to(#417f98));
+    background-image: -moz-linear-gradient(top, #56aed2 0%, #417f98 100%);
+    filter: progid:DXImageTransform.Microsoft.gradient(gradientType = 0, startColor = 0, endColorStr = #417f98);
+    -ms-filter: progid:DXImageTransform.Microsoft.gradient(gradientType = 0, startColor = 0, endColoStr = #417f98);
+    color: #fff;
+    font-size: 15px;
     text-align: left;
-    background-color: #f0f0f0;
     padding: 3px;
-    font-size: 11px;
-    font-family: Courier;
-    margin: 10px;
-    line-height: 13px;
+
+    border-right: solid 1px #468aa6;
+    border-bottom: solid 1px #468aa6;
 }
+
+table.bodyTable td {
+    border-right: solid 1px #468aa6;
+    border-bottom: solid 1px #468aa6;
+    margin: 0px;
+    padding: 3px;
+}
+table.bodyTable tr:nth-child(even) {background: #ccdde1}
+table.bodyTable tr:nth-child(odd) {background: #FFF}
+
+/*div#contentBox > div:first-child  p:first-letter{
+    font-weight:bold;
+    font-size:40px;
+}*/
+
+
+
+/* Pre defined styles */
+
 .consoleOutput {
+    overflow: auto;
+    white-space: pre;
     border: 1px dashed #3c78b5;
     font-size: 11px;
     font-family: Courier;
@@ -242,48 +179,34 @@
     padding: 3px;
     border-style: solid;
 }
-.info {
+
+.xmlConf {
+    overflow: auto;
+    white-space: pre;
+    border: 1px dashed #3c78b5;
+    font-size: 11px;
+    font-family: Courier;
+    margin: 10px;
+    line-height: 25px;
+    background-color: #f0f0f0;
+    border-bottom: 1px dashed #3c78b5;
+    padding: 3px;
     border-style: solid;
-    border-width: 1px;
-    border-color: #090;
-    background-color: #dfd;
-    text-align:left;
-    margin-top: 5px;
-    margin-bottom: 5px;
-}
-.data-table{
-    font-family:Verdana,Arial,Helvetica,sans-serif;
-    font-size:11px;
-    border:0px;
-    margin:0px;
-    border:solid 1px #cdcdcd;
-}
-.data-table th{
-    background-color:#eeeeee;
-    border-bottom:solid 1px #8d8d8d;
-    padding-top:5px;
-    padding-left:3px;
-    text-align:left;
-}
-.data-table td{
-    padding-top:4px;
-    padding-left:3px;
-    border-bottom:solid 1px #e1e1e1;
-}
-.download-pre {
-    font-family:Verdana,Arial,Helvetica,sans-serif;
-    font-size:11px;
-    font-style:normal;
-    margin:0;
-    padding-bottom:3px;
-    padding-top:3px;
 }
 
-.download-header-pre {
-    font-family:Verdana,Arial,Helvetica,sans-serif;
-    font-size:12px;
-    font-weight:bold;
-    margin:0;
-    padding-top:3px;
-    padding-bottom:3px;
+.command {
+    overflow: auto;
+    border: 1px dashed #3c78b5;
+    text-align: left;
+    background-color: #f0f0f0;
+    padding: 3px;
+    font-size: 11px;
+    font-family: Courier;
+    margin: 10px;
+    line-height: 13px;
+}
+.xmlConf a {
+    font-size:13px;
+    line-height:20px;
+    font-family: Courier;
 }
\ No newline at end of file
diff --git a/src/site/resources/css/style.css b/src/site/resources/css/style.css
deleted file mode 100755
index 642e983..0000000
--- a/src/site/resources/css/style.css
+++ /dev/null
@@ -1,184 +0,0 @@
-/* page general styles */
-body{
-padding:0px;
-margin:0px;
-}
-a{
-color:#557f95;
-text-decoration:none;
-}
-a:hover{
-color:#000000;
-text-decoration:underline;
-}
-body, td, tr, input,h1,h2{
-font: 12px Verdana, Arial, Helvetica, sans-serif;
-line-height:18px;
-}
-h1{
-padding:0px;
-margin:0px;
-font-size:14px;
-font-weight:bold;
-height:22px;
-background-color:#bcbcbc;
-text-indent:10px;
-}
-h2{
-padding:0px;
-margin:0px;
-font-weight:bold;
-}
-h3{
-font-weight:bold;
-color:#777777;
-}
-p{
-padding-top:5px;
-padding-bottom:5px;
-line-height:18px;
-}
-/* page styles */
-.page-padding{
-padding-left:10px;
-padding-right:10px;
-}
-.page-external{
-/* Uncomment these lines to give a fixed width with centered positioning ....
-position:absolute;
-left:50%;
-width:980px;
-margin-left:-490px;
-border:solid 1px #83b0c0;
-*/
-}
-
-/* header styles */
-.header{
-background-image:url(../images/apache-synapse-banner-background.jpg);
-background-repeat:repeat-x;
-background-position:0px 0px;
-height:98px;
-}
-.header-logo{
-background-image:url(../images/apache-synapse-logo.jpg);
-background-repeat:no-repeat;
-background-position:0px 0px;
-height:103px;
-text-align:right;
-padding-right:10px;
-}
-.top-menu{
-background-image:url(../images/apache-synapse-banner.jpg);
-background-repeat:no-repeat;
-background-position:right 0px;
-padding-top:65px;
-}
-.top-menu a{
-color:#000000;
-text-decoration:none;
-}
-.top-menu a:hover{
-text-decoration:underline;
-}
-.top-menu-gap{
-padding-left:30px;
-}
-.last-update-text{
-color:#929292;
-}
-
-/* content text */
-.content{
-
-}
-.menu{
-width:179px;
-padding-left:10px;
-}
-.menu-top{
-text-indent:15px;
-height:23px;
-color:#ffffff;
-background-image:url(../images/apache-synapse-menu-top.jpg);
-background-repeat:no-repeat;
-background-position:left 0px;
-}
-.menu-middle{
-background-image:url(../images/apache-synapse-menu.jpg);
-background-repeat:no-repeat;
-background-position:0px 0px;
-background-color:#e5e5e5;
-border-left:solid 1px #b4b4b4;
-padding-top:5px;
-font-size:11px;
-}
-.menu-middle ul{
-padding:0px;
-margin:0px;
-list-style:none;
-padding-left:10px;
-}
-.menu-middle ul ul{
-padding-left:15px;
-}
-.menu-middle li{
-margin-top:3px;
-}
-.menu-selected{
-font-weight:bold;
-}
-.navHeadings{
-background-image:url(../images/apache-synapse-menu-button.gif);
-background-repeat:no-repeat;
-background-position:0px 5px;
-text-indent:15px;
-font-size:12px;
-color:#224351;
-}
-.navHeadings-link{
-display:block;
-}
-.menu-bottom-left{
-background-image:url(../images/apache-synapse-menu-bottom.jpg);
-background-repeat:no-repeat;
-background-position:0px 0px;
-background-color:#e5e5e5;
-width:15px;
-height:13px;
-float:left;
-}
-.menu-bottom-right{
-background-color:#e5e5e5;
-border-bottom:solid 1px #b4b4b4;
-height:13px;
-float:right;
-width:164px;
-}
-.content-back1{
-background-image:url(../images/apache-synapse-spliter.jpg);
-background-repeat:no-repeat;
-background-position:0px 0px;
-}
-.content-back2{
-background-image:url(../images/apache-synapse-content-back.jpg);
-background-repeat:repeat-y;
-background-position:0px 0px;
-background-color:#f3f3f3;
-border-bottom:solid 1px #b4b4b4;
-border-right:solid 1px #b4b4b4;
-margin-right:10px;
-}
-.content-display{
-margin-left:32px;
-padding-bottom:10px;
-}
-.poweredBy{
-margin-left:30px;
-margin-top:5px;
-}
-.footer{
-color:#929292;
-margin-top:10px;
-margin-left:10px;
-}
\ No newline at end of file
diff --git a/src/site/resources/doap_Synapse.rdf b/src/site/resources/doap_Synapse.rdf
deleted file mode 100644
index 2c72981..0000000
--- a/src/site/resources/doap_Synapse.rdf
+++ /dev/null
@@ -1,114 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet type="text/xsl"?>
-<rdf:RDF xml:lang="en"
-         xmlns="http://usefulinc.com/ns/doap#" 
-         xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" 
-         xmlns:asfext="http://projects.apache.org/ns/asfext#"
-         xmlns:foaf="http://xmlns.com/foaf/0.1/">
-<!--
-  =======================================================================
-
-   Copyright (c) 2006 The Apache Software Foundation.  
-   All rights reserved.
-
-  =======================================================================
--->
-  <Project rdf:about="http://synapse.apache.org/">
-    <created>2007-06-08</created>
-    <license rdf:resource="http://usefulinc.com/doap/licenses/asl20" />
-    <name>Apache Synapse</name>
-    <homepage rdf:resource="http://synapse.apache.org/" />
-    <asfext:pmc rdf:resource="http://synapse.apache.org" />
-    <shortdesc>Apache Synapse is a lightweight ESB engine and XML router.</shortdesc>
-    <description>Apache Synapse is a simple and highly effective ESB, Web Services intermediary and SOA framework. It can be
-added to your existing network very simply either as a services gateway or as an HTTP proxy. Once Apache
-Synapse is mediating your service requests it can perform many functions including routing, load-balancing,
-transformation and protocol switching. Apache Synapse can be used to build an Enterprise Service Bus (ESB) or
-Service Oriented Architecture (SOA).
-
-Apache Synapse has been designed to support very fast XML routing with a streaming XML design based upon
-Apache Axiom. in addition, the use of a completely asynchronous architecture and non-blocking IO based on Java NIO
-ensures that Synapse has very low overhead and can scale to support thousands of concurrent clients without dropping
-messages.</description>
-    <bug-database rdf:resource="https://issues.apache.org/jira/browse/SYNAPSE" />
-    <mailing-list rdf:resource="http://synapse.apache.org/mail-lists.html" />
-    <download-page rdf:resource="http://synapse.apache.org/download.cgi" />
-    <programming-language>Java</programming-language>
-    <category rdf:resource="http://projects.apache.org/category/xml" />
-    <category rdf:resource="http://projects.apache.org/category/http"/> 
-    <category rdf:resource="http://projects.apache.org/category/network-server"/> 
-    <category rdf:resource="http://projects.apache.org/category/network-client"/>
-    
-    <release>
-      <Version>
-        <name>Apache Synapse 1.2</name>
-        <created>2008-06-09</created>
-        <revision>1.2</revision>
-      </Version>
-    </release>
-    <release>
-      <Version>
-        <name>Apache Synapse 1.1.1</name>
-        <created>2008-01-24</created>
-        <revision>1.1.1</revision>
-      </Version>
-    </release>
-    <repository>
-      <SVNRepository>
-        <location rdf:resource="http://svn.apache.org/repos/asf/synapse/trunk/java"/>
-        <browse rdf:resource="http://svn.apache.org/viewvc/synapse/trunk/java/"/>
-      </SVNRepository>
-    </repository>
-    <maintainer>
-      <foaf:Person>
-        <foaf:name>Paul Fremantle</foaf:name>
-          <foaf:mbox rdf:resource="mailto:pzf@apache.org"/>
-      </foaf:Person>
-    </maintainer>
-    <asfext:implements><asfext:Standard>
-      <asfext:title>SOAP1.1</asfext:title>
-      <asfext:body>W3C</asfext:body>
-      <asfext:id>SOAP1.1</asfext:id>
-      <asfext:url rdf:resource="http://www.w3.org/TR/soap/"/>
-    </asfext:Standard></asfext:implements>
-    <asfext:implements><asfext:Standard>
-      <asfext:title>SOAP1.2</asfext:title>
-      <asfext:body>W3C</asfext:body>
-      <asfext:id>SOAP1.2</asfext:id>
-      <asfext:url rdf:resource="http://www.w3.org/TR/soap12-part1/"/>
-    </asfext:Standard></asfext:implements>
-    <asfext:implements><asfext:Standard>
-      <asfext:title>MTOM</asfext:title>
-      <asfext:body>W3C</asfext:body>
-      <asfext:id>SOAP-MTOM</asfext:id>
-      <asfext:url rdf:resource="http://www.w3.org/TR/soap12-mtom/"/>
-    </asfext:Standard></asfext:implements>
-    <asfext:implements><asfext:Standard>
-      <asfext:title>HTTP</asfext:title>
-      <asfext:body>IETF</asfext:body>
-      <asfext:id>HTTP 1.1</asfext:id>
-      <asfext:url rdf:resource="http://www.w3.org/Protocols/rfc2616/rfc2616.html"/>
-    </asfext:Standard></asfext:implements>
-    <asfext:implements><asfext:Standard>
-      <asfext:title>WS-Addressing</asfext:title>
-      <asfext:body>W3C</asfext:body>
-      <asfext:id>WSA</asfext:id>
-      <asfext:url rdf:resource="http://www.w3.org/2002/ws/addr/"/>
-    </asfext:Standard></asfext:implements>
-    <asfext:implements><asfext:Standard>
-      <asfext:title>WS-ReliableMessaging</asfext:title>
-      <asfext:body>OASIS</asfext:body>
-      <asfext:id>WSRM</asfext:id>
-      <asfext:url rdf:resource="http://www.oasis-open.org/committees/tc_home.php?wg_abbrev=ws-rx"/>
-    </asfext:Standard></asfext:implements>
-    <asfext:implements><asfext:Standard>
-      <asfext:title>WS-Security</asfext:title>
-      <asfext:body>OASIS</asfext:body>
-      <asfext:id>WSSEC</asfext:id>
-      <asfext:url rdf:resource="http://www.oasis-open.org/committees/download.php/16790/wss-v1.1-spec-os-SOAPMessageSecurity.pdf"/>
-    </asfext:Standard></asfext:implements>
-    
-    
-    
-  </Project>
-</rdf:RDF>
diff --git a/src/site/resources/download/1.0/download.cgi b/src/site/resources/download/1.0/download.cgi
deleted file mode 100755
index 8bdb438..0000000
--- a/src/site/resources/download/1.0/download.cgi
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/sh
-# Wrapper script around mirrors.cgi script
-# (we must change to that directory in order for python to pick up the
-#  python includes correctly)
-cd /www/www.apache.org/dyn/mirrors
-/www/www.apache.org/dyn/mirrors/mirrors.cgi $*
\ No newline at end of file
diff --git a/src/site/resources/download/1.1.1/download.cgi b/src/site/resources/download/1.1.1/download.cgi
deleted file mode 100755
index 8bdb438..0000000
--- a/src/site/resources/download/1.1.1/download.cgi
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/sh
-# Wrapper script around mirrors.cgi script
-# (we must change to that directory in order for python to pick up the
-#  python includes correctly)
-cd /www/www.apache.org/dyn/mirrors
-/www/www.apache.org/dyn/mirrors/mirrors.cgi $*
\ No newline at end of file
diff --git a/src/site/resources/download/1.1/download.cgi b/src/site/resources/download/1.1/download.cgi
deleted file mode 100755
index 8bdb438..0000000
--- a/src/site/resources/download/1.1/download.cgi
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/sh
-# Wrapper script around mirrors.cgi script
-# (we must change to that directory in order for python to pick up the
-#  python includes correctly)
-cd /www/www.apache.org/dyn/mirrors
-/www/www.apache.org/dyn/mirrors/mirrors.cgi $*
\ No newline at end of file
diff --git a/src/site/resources/download/1.2/download.cgi b/src/site/resources/download/1.2/download.cgi
deleted file mode 100755
index 8bdb438..0000000
--- a/src/site/resources/download/1.2/download.cgi
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/sh
-# Wrapper script around mirrors.cgi script
-# (we must change to that directory in order for python to pick up the
-#  python includes correctly)
-cd /www/www.apache.org/dyn/mirrors
-/www/www.apache.org/dyn/mirrors/mirrors.cgi $*
\ No newline at end of file
diff --git a/src/site/resources/images/apache-synapse-banner-background.jpg b/src/site/resources/images/apache-synapse-banner-background.jpg
deleted file mode 100755
index 29b5350..0000000
--- a/src/site/resources/images/apache-synapse-banner-background.jpg
+++ /dev/null
Binary files differ
diff --git a/src/site/resources/images/apache-synapse-banner.jpg b/src/site/resources/images/apache-synapse-banner.jpg
deleted file mode 100755
index e3b3738..0000000
--- a/src/site/resources/images/apache-synapse-banner.jpg
+++ /dev/null
Binary files differ
diff --git a/src/site/resources/images/apache-synapse-content-back.jpg b/src/site/resources/images/apache-synapse-content-back.jpg
deleted file mode 100755
index 58f9b88..0000000
--- a/src/site/resources/images/apache-synapse-content-back.jpg
+++ /dev/null
Binary files differ
diff --git a/src/site/resources/images/apache-synapse-logo.jpg b/src/site/resources/images/apache-synapse-logo.jpg
deleted file mode 100755
index 2d14006..0000000
--- a/src/site/resources/images/apache-synapse-logo.jpg
+++ /dev/null
Binary files differ
diff --git a/src/site/resources/images/apache-synapse-menu-bottom.jpg b/src/site/resources/images/apache-synapse-menu-bottom.jpg
deleted file mode 100755
index 96c85e5..0000000
--- a/src/site/resources/images/apache-synapse-menu-bottom.jpg
+++ /dev/null
Binary files differ
diff --git a/src/site/resources/images/apache-synapse-menu-button.gif b/src/site/resources/images/apache-synapse-menu-button.gif
deleted file mode 100755
index 319460c..0000000
--- a/src/site/resources/images/apache-synapse-menu-button.gif
+++ /dev/null
Binary files differ
diff --git a/src/site/resources/images/apache-synapse-menu-top.jpg b/src/site/resources/images/apache-synapse-menu-top.jpg
deleted file mode 100755
index 12c593e..0000000
--- a/src/site/resources/images/apache-synapse-menu-top.jpg
+++ /dev/null
Binary files differ
diff --git a/src/site/resources/images/apache-synapse-menu.jpg b/src/site/resources/images/apache-synapse-menu.jpg
deleted file mode 100755
index fad5611..0000000
--- a/src/site/resources/images/apache-synapse-menu.jpg
+++ /dev/null
Binary files differ
diff --git a/src/site/resources/images/apache-synapse-spliter.jpg b/src/site/resources/images/apache-synapse-spliter.jpg
deleted file mode 100755
index 926622d..0000000
--- a/src/site/resources/images/apache-synapse-spliter.jpg
+++ /dev/null
Binary files differ
diff --git a/src/site/resources/images/external.png b/src/site/resources/images/external.png
deleted file mode 100755
index 3f999fc..0000000
--- a/src/site/resources/images/external.png
+++ /dev/null
Binary files differ
diff --git a/src/site/resources/images/footer-back.png b/src/site/resources/images/footer-back.png
new file mode 100644
index 0000000..e14a836
--- /dev/null
+++ b/src/site/resources/images/footer-back.png
Binary files differ
diff --git a/src/site/resources/images/logos/asf_logo_wide.png b/src/site/resources/images/logos/asf_logo_wide.png
deleted file mode 100755
index c584eba..0000000
--- a/src/site/resources/images/logos/asf_logo_wide.png
+++ /dev/null
Binary files differ
diff --git a/src/site/resources/images/logos/build-by-maven-black.png b/src/site/resources/images/logos/build-by-maven-black.png
deleted file mode 100755
index 919fd0f..0000000
--- a/src/site/resources/images/logos/build-by-maven-black.png
+++ /dev/null
Binary files differ
diff --git a/src/site/resources/images/logos/build-by-maven-white.png b/src/site/resources/images/logos/build-by-maven-white.png
deleted file mode 100755
index 7d44c9c..0000000
--- a/src/site/resources/images/logos/build-by-maven-white.png
+++ /dev/null
Binary files differ
diff --git a/src/site/resources/images/logos/maven-feather.png b/src/site/resources/images/logos/maven-feather.png
deleted file mode 100755
index b5ada83..0000000
--- a/src/site/resources/images/logos/maven-feather.png
+++ /dev/null
Binary files differ
diff --git a/src/site/resources/images/page-back.png b/src/site/resources/images/page-back.png
new file mode 100644
index 0000000..94e9842
--- /dev/null
+++ b/src/site/resources/images/page-back.png
Binary files differ
diff --git a/src/site/resources/images/synapse-arch.png b/src/site/resources/images/synapse-arch.png
new file mode 100644
index 0000000..fd6ea58
--- /dev/null
+++ b/src/site/resources/images/synapse-arch.png
Binary files differ
diff --git a/src/site/resources/images/synapse-banner.jpg b/src/site/resources/images/synapse-banner.jpg
deleted file mode 100755
index 20666a9..0000000
--- a/src/site/resources/images/synapse-banner.jpg
+++ /dev/null
Binary files differ
diff --git a/src/site/resources/images/synapse-logo-web2.png b/src/site/resources/images/synapse-logo-web2.png
deleted file mode 100644
index 0b4fc12..0000000
--- a/src/site/resources/images/synapse-logo-web2.png
+++ /dev/null
Binary files differ
diff --git a/src/site/resources/images/synapse-logo.png b/src/site/resources/images/synapse-logo.png
new file mode 100644
index 0000000..ab3468b
--- /dev/null
+++ b/src/site/resources/images/synapse-logo.png
Binary files differ
diff --git a/src/site/resources/logos/synapse-PB-highRes.png b/src/site/resources/logos/synapse-PB-highRes.png
deleted file mode 100644
index 7155d75..0000000
--- a/src/site/resources/logos/synapse-PB-highRes.png
+++ /dev/null
Binary files differ
diff --git a/src/site/resources/logos/synapse-PB-web1.png b/src/site/resources/logos/synapse-PB-web1.png
deleted file mode 100644
index d10e085..0000000
--- a/src/site/resources/logos/synapse-PB-web1.png
+++ /dev/null
Binary files differ
diff --git a/src/site/resources/logos/synapse-PB-web2.png b/src/site/resources/logos/synapse-PB-web2.png
deleted file mode 100644
index a6a84e6..0000000
--- a/src/site/resources/logos/synapse-PB-web2.png
+++ /dev/null
Binary files differ
diff --git a/src/site/resources/logos/synapse-PB-web3.png b/src/site/resources/logos/synapse-PB-web3.png
deleted file mode 100644
index a38be9e..0000000
--- a/src/site/resources/logos/synapse-PB-web3.png
+++ /dev/null
Binary files differ
diff --git a/src/site/resources/logos/synapse-logo-highRes.png b/src/site/resources/logos/synapse-logo-highRes.png
deleted file mode 100644
index 16e589d..0000000
--- a/src/site/resources/logos/synapse-logo-highRes.png
+++ /dev/null
Binary files differ
diff --git a/src/site/resources/logos/synapse-logo-web1.png b/src/site/resources/logos/synapse-logo-web1.png
deleted file mode 100644
index 31377d3..0000000
--- a/src/site/resources/logos/synapse-logo-web1.png
+++ /dev/null
Binary files differ
diff --git a/src/site/resources/logos/synapse-logo-web2.png b/src/site/resources/logos/synapse-logo-web2.png
deleted file mode 100644
index 0b4fc12..0000000
--- a/src/site/resources/logos/synapse-logo-web2.png
+++ /dev/null
Binary files differ
diff --git a/src/site/resources/logos/synapse-logo-web3.png b/src/site/resources/logos/synapse-logo-web3.png
deleted file mode 100644
index de66105..0000000
--- a/src/site/resources/logos/synapse-logo-web3.png
+++ /dev/null
Binary files differ
diff --git a/src/site/resources/presentations/ApacheCon Synapse Tute.pdf b/src/site/resources/presentations/ApacheCon Synapse Tute.pdf
deleted file mode 100644
index df5ffe4..0000000
--- a/src/site/resources/presentations/ApacheCon Synapse Tute.pdf
+++ /dev/null
Binary files differ
diff --git a/src/site/resources/presentations/ApacheConUS2007SynapseTutorial.pdf b/src/site/resources/presentations/ApacheConUS2007SynapseTutorial.pdf
deleted file mode 100644
index 9a3c0d5..0000000
--- a/src/site/resources/presentations/ApacheConUS2007SynapseTutorial.pdf
+++ /dev/null
Binary files differ
diff --git a/src/site/resources/presentations/makingsoagroovyfremantle.pdf b/src/site/resources/presentations/makingsoagroovyfremantle.pdf
deleted file mode 100644
index a931ecc..0000000
--- a/src/site/resources/presentations/makingsoagroovyfremantle.pdf
+++ /dev/null
Binary files differ
diff --git a/src/site/site.xml b/src/site/site.xml
index 511d5a0..72a25f8 100644
--- a/src/site/site.xml
+++ b/src/site/site.xml
@@ -19,63 +19,54 @@
   -->
 
 <project name="Apache Synapse">
-
-    <bannerLeft>
-        <name></name>
-        <href>http://synapse.apache.org/</href>
-    </bannerLeft>
-
-    <bannerRight>
-        <src>images/apache-synapse-banner.jpg</src>
-        <href>http://www.apache.org</href>
-    </bannerRight>
-
     <skin>
         <groupId>org.apache.maven.skins</groupId>
         <artifactId>maven-default-skin</artifactId>
         <version>1.0</version>
     </skin>
-
-    <publishDate format="dd MMM yyyy"/>
-
     <body>
-        <links>
-            <item name="Apache" href="http://www.apache.org/"/>
-            <item name="WebServices" href="http://ws.apache.org/"/>
-        </links>
-
-        <menu name="Apache Synapse">
-            <item name="About" href="index.html"/>
-            <item name="Downloads" href="download_index.html">
-                <item name="Releases" href="download.html"/>
-                <item name="Source Code" href="source-repository.html"/>
-            </item>
-            <item name="Documentation" href="docs_index.html">
-                <item name="Quick Start Guide" href="Synapse_QuickStart.html"/>
-                <item name="Samples" href="Synapse_Samples.html"/>
-                <item name="Samples Setup" href="Synapse_Samples_Setup.html"/>
-                <item name="Extending Synapse" href="Synapse_Extending.html"/>
-                <item name="Configuration Language" href="Synapse_Configuration_Language.html"/>
-                <item name="Deployment" href="deployment.html"/>
-                <item name="Transports" href="transports.html"/>
-                <item name="Javadocs" href="apidocs/index.html"/>
-                <item name="FAQ" href="faq.html"/>
-            </item>
-            <item name="Previous Versions" href="history.html">
-                <item name="Version 1.1.1" href="1_1_1/content.html"/>
-                <item name="Version 1.1" href="1_1/content.html"/>
-                <item name="Version 1.0" href="1_0/content.html"/>
-            </item>
-            <item name="Project Information" href="project-info.html">
-                <item name="Mailing Lists" href="mail-lists.html"/>
-                <item name="Building" href="building.html"/>
-                <item name="Issue Tracking" href="issue-tracking.html"/>
-                <item name="Dependencies" href="dependencies.html"/>
-                <item name="Dependency Convergence" href="dependency-convergence.html"/>
-                <item name="Project Team" href="team-list.html"/>
-                <item name="Project Summary" href="project-summary.html"/>
-            </item>
+        <menu name="Main Menu">
+            <item name="Home" href="index.html"/>
+            <item name="Download" href="download.html"/>
+            <item name="History" href="history.html"/>
+            <item name="License" href="http://www.apache.org/licenses/LICENSE-2.0"/>
+            <item name="Thanks" href="http://www.apache.org/foundation/thanks.html"/>
+            <item name="Sponsorship" href="http://www.apache.org/foundation/sponsorship.html"/>
+            <item name="Security" href="http://www.apache.org/security/"/>
         </menu>
-
+        <menu name="Documentation">
+            <item name="Installation Guide" href="userguide/installation.html"/>
+            <item name="Quick Start Guide" href="userguide/quick_start.html"/>
+            <item name="Samples Setup Guide" href="userguide/samples/setup/index.html"/>
+            <item name="Samples Catalog" href="userguide/samples.html"/>
+            <item name="Configuration Language" href="userguide/config.html"/>
+            <item name="Mediators Catalog" href="userguide/mediators.html"/>
+            <item name="Transports Catalog" href="userguide/transports.html"/>
+            <item name="Extending Synapse" href="userguide/extending.html"/>
+            <item name="Upgrading" href="userguide/upgrading.html"/>
+            <item name="Deployment" href="userguide/deployment.html"/>
+            <item name="Javadocs" href="apidocs/"/>
+            <item name="FAQ" href="userguide/faq.html"/>
+        </menu>
+        <menu name="Developer Resources">
+            <item name="Developer Guide " href="dev/developer-guide.html"/>
+            <item name="Development Best Practices" href="dev/best-practices.html"/>
+            <item name="Release Process" href="dev/release-process.html"/>
+        </menu>
+        <menu name="Project Details">
+            <item name="Overview" href="project-info.html"/>
+            <item name="Mailing Lists" href="mail-lists.html"/>
+            <item name="Source Repository" href="source-repository.html"/>
+            <item name="Issue Tracking" href="issue-tracking.html"/>
+            <item name="Dependencies" href="dependencies.html"/>
+            <item name="Project Team" href="team-list.html"/>
+            <item name="Project Summary" href="project-summary.html"/>
+        </menu>
+        <menu name="Previous Releases">
+            <item name="Version 1.2" href="1_2/docs_index.html"/>
+            <item name="Version 1.1.1" href="1_1_1/content.html"/>
+            <item name="Version 1.1" href="1_1/content.html"/>
+            <item name="Version 1.0" href="1_0/content.html"/>
+        </menu>
     </body>
 </project>
diff --git a/src/site/xdoc/1_1_1/configuration.xml b/src/site/xdoc/1_1_1/configuration.xml
index 93f634e..148114f 100755
--- a/src/site/xdoc/1_1_1/configuration.xml
+++ b/src/site/xdoc/1_1_1/configuration.xml
@@ -16,7 +16,6 @@
 ~ specific language governing permissions and limitations
 ~ under the License.
 -->
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html>
 <head>
   <meta content="text/html; charset=iso-8859-1" http-equiv="content-type"/>
@@ -1538,4 +1537,4 @@
 it to act as a Mediator. The key will reference the Spring
 ApplicationContext/Configuration used for the bean</p>
 </body>
-</html>
\ No newline at end of file
+</html>
diff --git a/src/site/xdoc/Synapse_Configuration_Language.xml b/src/site/xdoc/Synapse_Configuration_Language.xml
deleted file mode 100644
index 20823a7..0000000
--- a/src/site/xdoc/Synapse_Configuration_Language.xml
+++ /dev/null
@@ -1,2241 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<document>
-    <properties>
-        <title>Apache Synapse - Configuration Language</title>
-    </properties>
-    <head>
-        <style type="text/css" xml:space="preserve">
-    .command {
-        border: 1px dashed #3c78b5;
-        text-align: left;
-        background-color: #f0f0f0;
-        padding: 3px;
-        font-size: 11px;
-        font-family: Courier;
-        margin: 10px;
-        line-height: 13px;
-    }
-    .consoleOutput {
-        border: 1px dashed #3c78b5;
-        font-size: 11px;
-        font-family: Courier;
-        margin: 10px;
-        line-height: 13px;
-        background-color: #f0f0f0;
-        border-bottom: 1px dashed #3c78b5;
-        padding: 3px;
-        border-style: solid;
-    }
-    .info {
-        border-style: solid;
-        border-width: 1px;
-        border-color: #090;
-        background-color: #dfd;
-        text-align:left;
-        margin-top: 5px;
-        margin-bottom: 5px;
-    }
-    li {
-        font-family: Verdana, arial, sans-serif;
-        font-size: 11px;
-        line-height: 16px;
-        color: #000000;
-        font-weight: normal;
-    }
-    p {
-        font-family: Verdana, arial, sans-serif;
-        font-size: 11px;
-        line-height: 16px;
-        color: #000000;
-        font-weight: normal;
-    }
-    pre {
-        padding: 0px;
-        margin-top: 5px;
-        margin-left: 15px;
-        margin-bottom: 5px;
-        margin-right: 5px;
-        text-align: left;
-        background-color: #f0f0f0;
-        padding: 3px;
-        border: 1px dashed #3c78b5;
-        font-size: 11px;
-        font-family: Courier;
-        margin: 10px;
-        line-height: 13px;
-    }
-    h1 {
-        font-size: 24px;
-        line-height: normal;
-        font-weight: bold;
-        background-color: #f0f0f0;
-        color: #003366;
-        border-bottom: 1px solid #3c78b5;
-        padding: 2px;
-        margin: 36px 0px 4px 0px;
-    }
-    h2 {
-        font-size: 18px;
-        line-height: normal;
-        font-weight: bold;
-        background-color: #f0f0f0;
-        border-bottom: 1px solid #3c78b5;
-        padding: 2px;
-        margin: 27px 0px 4px 0px;
-    }
-    h3 {
-        font-size: 14px;
-        line-height: normal;
-        font-weight: bold;
-        background-color: #f0f0f0;
-        padding: 2px;
-        margin: 21px 0px 4px 0px;
-    }
-    h4 {
-        font-size: 12px;
-        line-height: normal;
-        font-weight: bold;
-        background-color: #f0f0f0;
-        padding: 2px;
-        margin: 18px 0px 4px 0px;
-    }</style>
-    </head>
-    <body>
-    <div style="margin-top:-40px; float:right; _margin-top:0px;">
-      <img alt="Synapse logo"
-           src="images/synapse-logo-web2.png" width="197"
-           height="82"/>
-    </div>
-    <div>
-      <h1>
-        Apache Synapse ESB - Configuration
-      </h1>
-    </div>
-    <h3>
-      Overview
-    </h3>
-    <p>
-      An Apache Synapse Enterprise Service Bus (ESB) engine is driven off a set
-      of simple text/xml configuration files. This allows the configuration to
-      be easily hand edited, backed up from the file system, or even included
-      into version control for easier management and control (e.g. moving a
-      configuration from development, through QA, staging and into production).
-      The configuration files that drives the Synapse ESB are as follows:
-    </p>
-    <ul>
-      <li>
-        The Synapse configuration file - synapse.xml
-      </li>
-      <li>
-        The underlying Axis2 engine configuration file - axis2.xml
-      </li>
-      <li>
-        Resources referenced from the Registry
-      </li>
-    </ul>
-    <p>
-      While the axis2.xml configures the underlying transport and Web services
-      support, the synapse.xml configures the mediation rules and configuration
-      for the ESB. While any changes performed on the axis2.xml requires a
-      restart (e.g. for enabling a transport such as JMS), the synapse.xml could
-      be made to reference different configuration elements off a set of
-      multiple files - that are served through the built-in Registry. When using
-      the Registry to hold pieces of the configuration, certain elements such as
-      endpoint definitions, sequences and local entries could be updated
-      dynamically while the Synapse ESB executes, the the Registry could trigger
-      a re-load as configured.
-    </p>
-    <h2>
-      The Synapse Configuration (synapse.xml)
-    </h2>
-    <p>
-      As the diagram below depicts, the Synapse configuration defines the Proxy
-      services, Endpoints, Sequences and Startup jobs managed by the Synapse
-      ESB. It also defines the interface to the Registry/Repository being used
-      by the engine. Typically the Synapse ESB is deployed between the actual
-      client and a backend service implementation to mediate the message flow in
-      between. Thus the Synapse ESB can accept a message on behalf of the actual
-      service, perform authentication, validation, transformation, logging,
-      routing based on the content etc. and then decide the destination target
-      endpoint for the message and direct it to an actual service
-      implementation. The Synapse ESB can also detect timeouts, transport
-      failures during communication or introduce load balancing, throttling or
-      caching where necessary. For fault scenarios such as authentication
-      failure, or schema validation failure, the Synapse ESB can be configured
-      to return a custom message or a fault to the requesting client without
-      forwarding the request to the actual service.
-    </p>
-    <p>
-      <img alt="Synapse message flow"
-      src="images/synapse-flow.png" width="400" height="300"/>
-    </p>
-    <p/>
-    <p>
-      The Synapse ESB can operate in two modes:
-    </p>
-    <h3>
-      <a href="#service_mediation">Service mediation</a> / <a
-      href="#proxy">Proxy services</a>
-    </h3>
-    <p>
-      In Service mediation, the Synapse ESB exposes a service endpoint on the
-      ESB, that accepts messages from clients. Typically these services acts as
-      proxies for existing (external) services, and the role of Synapse would be
-      to "mediate" these messages before they are proxied to the actual service.
-      In this mode, Synapse could expose a service already available in one
-      transport, over a different transport; or expose a service that uses one
-      schema or WSDL as a service that uses a different schema or WSDL etc. A
-      Proxy service could define the transports over which the service is
-      exposed, and point to the mediation sequences that should be used to
-      process request and response messages through the proxy service. A proxy
-      service maybe a SOAP or REST/POX service over http/s or SOAP, POX, Plain
-      Text or Binary / Legacy service for other transports such as JMS and VFS
-      file systems - e.g. CSV content being the payload
-    </p>
-    <h3>
-      <a name="_message_mediation" id="_message_mediation">Message mediation</a>
-    </h3>
-    <p>
-      In Message mediation, Synapse can act as a transparent proxy for clients -
-      if they are directed to point to the Synapse ESB as a http proxy. This
-      way, Synapse could be configured to filter all messages on a network for
-      logging, access control etc, and could "mediate" messages without the
-      explicit knowledge of the original client. If Synapse receives a message
-      that is not accepted by any proxy service, this message is handled through
-      message mediation as well. Message mediation always processes messages
-      according to the mediation sequence defined as "main".
-    </p>
-    <h2>
-      Concepts and configuration elements overview
-    </h2>
-    <h3>
-      <a href="#mediator">Mediators</a> and <a href="#sequence">Mediation
-      Sequences</a>
-    </h3>
-    <p>
-      The Synapse ESB defines a 'mediator' as a component that is performs some
-      mediation action on a message during the process flow. Thus a mediator
-      gets full access to a message at the point where it is defined to gain
-      control, and could inspect the message, modify it or take an external
-      action depending on some attributes or values of the current message. A
-      mediation sequence, commonly called a 'sequence' is a list of such
-      mediators. A sequence may be named for re-use, or defined in-line or
-      anonymously within a configuration. Sequences may be defined within the
-      synapse.xml configuration or within the Registry. Writing a custom
-      mediator in Java is easy and the supplementary documentation provides more
-      details on this. The 'Class' and 'POJO (command)" mediators allows one to
-      plugin a Java class easily into the Synapse engine with minimal effort. In
-      addition, the Script mediator allows one to provide an Apache BSF script
-      (e.g. Javascript, Ruby, Groovy etc) for mediation.
-    </p>
-    <p>
-      A Synapse configuration holds two special sequences named as "main" and
-      "fault". These may be defined within the synapse.xml, or externally via
-      the Registry. If either is not found, a suitable default is generated at
-      runtime by the ESB. The default "main" sequence will simply send a message
-      without mediation, while the default "fault" sequence would log the
-      message including the payload and any error/exception encountered and stop
-      further processing. The 'fault' sequence executes whenever Synapse itself
-      encounters an error while processing a message - or when a fault handler
-      has not been defined to handle exceptions. A sequence can assign another
-      named sequence as its "fault" handler sequence, and control branches to
-      the fault handler if an error is encountered during the execution of the
-      initial sequence.
-    </p>
-    <h3>
-      <a href="#endpoint">Endpoints</a>
-    </h3>
-    <p>
-      An Endpoint definition within Synapse defines an external service endpoint
-      and any attributes or semantics that should be followed when communicating
-      with that endpoint. An endpoint definition can be named for re-use, or
-      defined in-line or anonymously within a configuration. Typically an
-      endpoint would be based on a service Address or a WSDL. Additionally the
-      Synapse ESB supports Failover and Load-balance endpoints - which are
-      defined over a group of endpoints. Endpoints may be defined within the
-      synapse.xml configuration or within the Registry.
-    </p>
-    <h3>
-      <a href="#task">Tasks</a>
-    </h3>
-    <p>
-      A Task is a custom Java class that implements the
-      org.apache.synapse.task.Task interface that defines a single "public
-      void execute()" method. Such a task can be scheduled and managed via the
-      Synapse ESB. The scheduling information for a task can be specified in the
-      cron format or a simple format by the user. A task may also be specified
-      as a one-time task where required, and can be used to trigger a callout or
-      inject a message into the Synapse ESB.
-    </p>
-    <h3>
-      <a href="#registry">Remote Registry</a> and <a name="Local"
-      id="Local" href="#localEntry">Local Registry (Local Entries)</a>
-    </h3>
-    <p>
-      A Synapse configuration can refer to an external Registry / Repository for
-      resources used such as WSDL's, Schemas, Scripts, XSLT or XQuery
-      transformations etc. One or more remote registries may be hidden or merged
-      behind a local Registry interface defined to a Synapse configuration.
-      Resources from an external registry are looked up using "keys" - which are
-      known to the external registry. The Synapse ESB ships with a simple URL
-      based registry implementation that uses the file system for storage of
-      resources, and URL's or fragments as "keys".
-    </p>
-    <p>
-      A Registry may define a duration for which a resource served may be cached
-      by the Synapse runtime. If such a duration is specified, the Synapse ESB
-      is capable of refreshing the resource after cache expiry to support
-      dynamic re-loading of resource at runtime. Optionally, a configuration
-      could define certain "keys" to map to locally defined entities. These
-      entities may refer to a source URL or file, or defined as in-line XML or
-      text within the configuration itself. If a Registry contains a resource
-      whose "key" matches the key of a locally defined entry, the local entry
-      shadows the resource available in the Registry. Thus it is possible to
-      override Registry resources locally from within a configuration. To
-      integrate Synapse with a custom / new Registry or repository, one needs to
-      implement the org.apache.synapse.registry.Registry interface to suit the
-      actual Registry being used.
-    </p>
-    <h3>
-      <a href="#eventsource">Event Source</a>
-    </h3>
-    <p>
-      An Event Source use to define the Event Source and the Subscription Manager configurations
-      use in the eventing implementation of Synapse. Event source provides a service URL that can be
-      used to the send subscriptions and events (events that do not required to go through a
-      mediation flow).
-
-    </p>
-    <h2>
-      The Axis2 Configuration (axis2.xml)
-    </h2>
-    <p>
-      The axis2.xml file configures the underlying Axis2 web services engine for
-      the Synapse ESB. The axis2.xml thus defines the transports enabled, and
-      other configuration parameters associated. A change to the axis2
-      configuration requires a hard re-start of the Synapse ESB. By default the
-      non-blocking http/s and the Apache VFS file system based transport are
-      enabled for listening of messages, while the non-blocking http/s, VFS and
-      JMS transports are enabled for sending messages out. Sample configurations
-      to enable/configure the other transports are provided within the default
-      axis2.xml file, and can be easily uncommented and modified. The sample JMS
-      configuration shipped is for a default ActiveMQ 4.1.x installation.
-    </p>
-    <h2>
-      The contents of the Synapse.xml configuration
-    </h2>
-    <p>
-      A Synapse configuration looks like the following at the top level:
-    </p>
-<pre xml:space="preserve"> &lt;definitions&gt;
-   &lt;<a href="#registry">registry</a> provider="string"&gt;...&lt;/registry&gt;?
-   &lt;<a href="#localEntry">localEntry</a> key="string"&gt;...&lt;/localEntry&gt;?
-   &lt;<a href="#sequence">sequence</a> name="string"&gt;...&lt;/sequence&gt;?
-   &lt;<a href="#endpoint">endpoint</a> name="string"&gt;...&lt;/endpoint&gt;?
-   &lt;<a href="#proxy">proxy</a> name="string" ...&gt;...&lt;/proxy&gt;?
-   &lt;<a href="#task">task</a> name="string" ...&gt;...&lt;/task&gt;?
-   &lt;<a href="#eventsource">eventsource</a> name="string" ...&gt;...&lt;/eventsource&gt;?
-   <a href="#mediator">mediator</a>*
- &lt;/definitions&gt;</pre>
-    <p/>
-    <p>
-      The &lt;definitions&gt; elements in a synapse.xml holds the Synapse ESB
-      configuration. While the &lt;registry&gt;, &lt;sequence&gt;, &lt;endpoint&gt;,
-      &lt;proxy&gt;, &lt;task&gt; and &lt;localEntry&gt; elements refer to those
-      discussed above, the built-in mediator elements names are already
-      registered with the Synapse engine. Custom mediators written by a user may
-      be included into the library directory, and would be dynamically picked up
-      in a Sun JDK environment. A list of mediators found directly as children
-      under the &lt;definitions&gt; element would be treated as the "main"
-      sequence, if a named sequence with the name "main" cannot be found.
-    </p>
-    <h2>
-      <a name="registry1" id="registry">Registry</a>
-    </h2>
-    <p>
-      The &lt;registry&gt; element is used to define the remote registry used by
-      the configuration. The registry provider specifies an implementation class
-      for the registry implementation used, and optionally a number of
-      configuration parameters as may be required for the configuration of the
-      connection to the registry.
-    </p>
-<pre xml:space="preserve"> &lt;registry provider="string"/&gt;
-   &lt;parameter name="string"&gt;text | xml&lt;/parameter&gt;*
- &lt;/registry&gt;</pre>
-    <p>
-      Registry entries loaded from a remote registry may be cached as dictated
-      by the registry, and reloaded after the cache periods expires if a newer
-      version is found. Hence it is possible to define configuration elements
-      such as (dynamic) sequences and endpoints, as well as resources such as
-      XSLT's, Scripts or XSDs off the registry, and update the configuration as
-      these are allowed to dynamically change over time.
-    </p>
-    <p>
-      Synapse ships with a built-in URL based registry implementation called the
-      "SimpleURLRegistry" and this can be configured as follows:
-    </p>
-<pre xml:space="preserve">e.g.
-&lt;registry provider="org.apache.synapse.registry.url.SimpleURLRegistry"&gt;
-  &lt;parameter name="root"&gt;file:./repository/conf/sample/resources/&lt;/parameter&gt;
-  &lt;parameter name="cachableDuration"&gt;15000&lt;/parameter&gt;
-&lt;/registry&gt;</pre>
-    <p>
-      The "root" parameter specifies the root URL of the Registry for loaded
-      resources. The SimpleURLRegistry keys are path fragments, that when
-      combined with the root prefix would form the full URL for the referenced
-      resource. The "cachableDuration" parameter specifies the number of
-      milliseconds for which resources loaded from the Registry should be
-      cached. More advanced registry implementations allows different cachable
-      durations to be specified for different resources, or mark some resources
-      as never expires. (e.g. Check the WSO2 ESB implementation built over the
-      Apache Synapse ESB core)
-    </p>
-    <p/>
-    <h3>
-      <a name="localEntry" id="localEntry">Local Registry / Local Entry</a>
-    </h3>
-    <p>
-      The &lt;localEntry&gt; element is used to declare registry entries that
-      are local to the Synapse instance, as shown below
-    </p>
-<pre xml:space="preserve">  &lt;localEntry key="string" [src="url"]&gt;text | xml&lt;/localEntry&gt;</pre>
-    <p>
-      These entries are top level entries which are globally visible within the
-      entire system. Values of these entries can be retrieved via the extension
-      XPath function "synapse:get-property(prop-name)" and the keys of these
-      entries could be specified wherever a registry key is expected within the
-      configuration.
-    </p>
-    <p>
-      An entry can be static text specified as inline text or static XML
-      specified as an inline XML fragment or specified as a URL (using the src
-      attribute). A local entry shadows any entry with the same name from a
-      remote Registry.
-    </p>
-<pre xml:space="preserve">e.g.
-&lt;localEntry key="version"&gt;0.1&lt;/localEntry&gt;
-&lt;localEntry key="validate_schema"&gt;
-        &lt;xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
-         ...
-        &lt;/xs:schema&gt;
-    &lt;/localEntry&gt;
-&lt;localEntry key="xslt-key-req" src="file:repository/conf/sample/resources/transform/transform.xslt"/&gt;</pre>
-    <h2>
-      <a name="sequence" id="sequence">Sequences</a>
-    </h2>
-    <p>
-      A &lt;sequence&gt; element is used to define a sequence of mediators that
-      can be invoked later by name. The sequences named "main" and "fault" has
-      special significance in a Synapse configuration. The "main" sequence
-      handles any message that is accepted for '<a href="#message_mediation">Message
-      Mediation</a>', and the "fault" sequence is invoked if Synapse
-      encounters a fault, and a custom fault handler is not specified for the
-      sequence via its "onError" attribute. If the "main" or "fault" sequences
-      are not defined locally or not found in the Registry, the Synapse ESB
-      defines suitable defaults at initialization.
-    </p>
-    <p>
-      A Dynamic Sequence may be defined by specifying a key reference to a
-      registry entry. As the remote registry entry changes, the sequence will
-      dynamically be updated according to the specified cache duration and
-      expiration. If tracing is enabled on a sequence, all messages being
-      processed through the sequence would write tracing information through
-      each mediation step to the trace.log file configured via the
-      log4j.properties configuration. Setting the trace log level to TRACE would
-      additionally dump the message and detailed trace information at each
-      mediation step. A tracing enabled sequence propagates this setting to
-      invoked sub-sequences.
-    </p>
-<pre xml:space="preserve"> &lt;sequence name="string" [onError="string"] [key="string"] [trace="enable"]&gt;
-   mediator*
- &lt;/sequence&gt;</pre>
-<pre xml:space="preserve">e.g.
-&lt;sequence name="main" onError="errorHandler"&gt;
-  .. &lt;!-- a 'main' sequence that invokes the sequence named 'errorHandler' on a fault --&gt; ..
-&lt;/sequence&gt;</pre>
-<pre xml:space="preserve">&lt;sequence key="sequence/dynamic_seq_1.xml"/&gt;
-where "sequence/dynamic_seq_1.xml" refers to the following sequence definition from the registry:
-
-&lt;sequence name="dynamic_sequence" xmlns="http://ws.apache.org/ns/synapse"&gt;
-  ..
-&lt;/sequence&gt;</pre>
-    <h2>
-      <a name="endpoint" id="endpoint">Endpoints</a>
-    </h2>
-    <p>
-      An &lt;endpoint&gt; element defines a destination for an outgoing message.
-      An endpoint may be specified as an address endpoint, WSDL based endpoint,
-      a load balancing endpoint or a fail-over endpoint as follows:
-    </p>
-<pre xml:space="preserve">&lt;endpoint [name="string"] [key="string"]&gt;
-  <a href="#address-endpoint">address-endpoint</a> | <a href="#default-endpoint">default-endpoint</a> | <a href="#wsdl-endpoint">wsdl-endpoint</a> | <a href="#load-balanced-endpoint">load-balanced-endpoint</a> | <a href="#fail-over-endpoint">fail-over-endpoint</a>
-&lt;/endpoint&gt; </pre>
-    <p>
-      All above endpoint types can have a name attribute, and such named
-      endpoints can be reffered by other endpoints, through the key attribute.
-      For example if there is an endpoint named as "foo", the following endpoint
-      can be used in any place, where "foo" has to be used.
-    </p>
-<pre xml:space="preserve">&lt;endpoint key="foo"/&gt;</pre>
-    <p>
-      The "trace" attribute turns on detailed trace information for messages
-      being sent to the endpoint. These are available in the trace.log
-      configured via the log4j.properties file. Setting the trace log level to
-      TRACE will dump detailed trace information including message payloads.
-    </p>
-    <h4>
-      <a name="address-endpoint" id="address-endpoint">Address Endpoint</a>
-    </h4>
-    <p>
-      Address endpoint is an endpoint defined by specifying the EPR and other
-      attributes of the endpoint directly in the configuration. The 'uri'
-      attribute of the address element contains the EPR of the target endpoint.
-      Message format for the endpoint and the method to optimize attachments can
-      be specified in the format and optimize attributes respectively. Reliable
-      messaging and security policies for the endpoint can be specified in the
-      policy attribute of the enableRM and enableSec elements respectively.
-      WS-Addressing can be engaged for the messaging going to the endpoint by
-      the enableAddressing element. suspendDurationOnFailure attribute specifies
-      the time duration in seconds to suspend this endpoint, if it is detected
-      as failed. If this attribute is not specified, endpoint will never be
-      recovered after a failure.
-    </p>
-    <p>
-        Endpoint can be in one of the four states Active, TimeOut, Suspended and
-        Switch Off. Endpoint can be active which represent the Active state of the
-        endpoint. With the new endpoint enhancements there is possibility to retry
-        in case of endpoint invocation failure. This behavior can be configured
-        at the endpoint level through synapse endpoint API. Configuration is called
-        'markForSuspension'. 'errorCodes' represent a list
-        of error codes. If these error codes are received from the endpoint,
-        the endpoint will be suspended. 'retriesBeforeSuspension' represents
-        the number of re-tries in case of a timeout, caused by the above listed error codes.
-        'retryDelay' is the delay between re-tries, in milli seconds. If the endpoint
-        required to retry it is moved to TimeOut state. If the endpoint fails in
-        subsequent re-tries it'll move to Suspended state. If endpoint succeeded in
-        further re-tries it'll move into Active state. Suspended state defines
-        configuration 'suspendOnFailure'. 'initialDuration' represent the duration that the endpoint
-        is suspended for the first time after receiving the suspend error codes.
-        'progressionFactor' is the duration to suspend can vary from the first time
-        suspension to the subsequent time. The factor value decides the suspense duration
-        variance between subsequent suspensions. 'maximumDuration' the maximum
-        duration that the endpoint is suspended after the receiving the suspend error codes.
-        Finally an endpoint can be in the Switch off state, where the endpoint is moved to
-        maintenance. State changes between Switch off and other states only can be done
-        manually through JMX based API that is provided. Endpoint which is in
-        'Switch Off' state can only be moved to 'Active' state and it too can only be
-        done through JMX.
-    </p>	
-    <p>
-      Address endpoints can timeout if responses fail to arrive at Synapse by a
-      predefined timeout-duration specified in seconds. The timeout responseAction
-      specifies whether to discard responses that arrive late, or to trigger a
-      fault. Synapse has a periodic timeout handler that triggers itself at each
-      15 second interval. Thus endpoint timeouts will have a +/- error on actual
-      trigger time. Though this can be minimized by setting a System property
-      "synapse.timeout_handler_interval" to a millisecond duration below the
-      desired endpoint timeout, care must be taken as a lesser value may have a
-      higher overhead on the system.
-    </p>
-    <p>
-      An endpoint that fails may be suspended for a specified duration after
-      such a failure, during which new messages will not be processed through
-      the endpoint. The 'suspendDurationOnFailure' could specify an optional
-      value in seconds for which this endpoint should be suspended.
-    </p>
-    <p>
-      QoS aspects such as WS-RM and WS-Security and WS-Addressing may be enabled
-      on messages sent to an endpoint using the enableRM, enableSec and
-      enableAddressing elements. Optionally, the WS-RM and WS-Security policies
-      could be specified using the 'policy' attributes.
-    </p>
-<pre xml:space="preserve">&lt;address uri="<em>endpoint address</em>" [format="soap11|soap12|pox|get"] [optimize="mtom|swa"]
-         [encoding="<em>charset encoding</em>"]
-         [statistics="enable|disable"] [trace="enable|disable"]&gt;
-  &lt;enableRM [policy="<em>key</em>"]/&gt;?
-  &lt;enableSec [policy="<em>key</em>"]/&gt;?
-  &lt;enableAddressing [version="final|submission"] [separateListener="true|false"]/&gt;?
-  
-  &lt;timeout&gt;
-    &lt;duration&gt;<em>timeout duration in milliseconds</em>&lt;/duration&gt;
-    &lt;responseAction&gt;discard|fault&lt;/responseAction&gt;
-  &lt;/timeout&gt;?
-  
-  &lt;markForSuspension&gt;
-        [&lt;errorCodes&gt;xxx,yyy&lt;/errorCodes&gt;]
-        &lt;retriesBeforeSuspension&gt;m&lt;/retriesBeforeSuspension&gt;
-        &lt;retryDelay&gt;d&lt;/retryDelay&gt;
-    &lt;/markForSuspension&gt;
-
-  &lt;suspendOnFailure&gt;
-        [&lt;errorCodes&gt;xxx,yyy&lt;/errorCodes&gt;]
-        &lt;initialDuration&gt;n&lt;/initialDuration&gt;
-        &lt;progressionFactor&gt;r&lt;/progressionFactor&gt;
-        &lt;maximumDuration&gt;l&lt;/maximumDuration&gt;
-    &lt;/suspendOnFailure&gt;
-&lt;/address&gt;</pre>
-    <p>
-      Following are some sample address URI definitions.
-    </p>
-    <table border="1" cellpadding="0" cellspacing="0" style="width: 100%; font-size:small" class="data-table">
-      <tbody>
-        <tr><th>Transport</th><th>Sample address</th></tr>
-        <tr><td>HTTP</td><td><tt>http://localhost:9000/services/SimpleStockQuoteService</tt></td></tr>
-        <tr><td>JMS</td><td><tt>jms:/SimpleStockQuoteService?<br/>
-              &#160;&#160;&#160;transport.jms.ConnectionFactoryJNDIName=QueueConnectionFactory&amp;<br/>
-              &#160;&#160;&#160;java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory&amp;<br/>
-              &#160;&#160;&#160;java.naming.provider.url=tcp://localhost:61616&amp;<br/>
-              &#160;&#160;&#160;transport.jms.DestinationType=topic</tt></td></tr>
-        <tr><td>Mail</td><td><tt>mailto:guest@host</tt></td></tr>
-        <tr><td>VFS</td><td><tt>vfs:file:///home/user/directory</tt></td></tr>
-        <tr><td/><td><tt>vfs:file:///home/user/file</tt></td></tr>
-        <tr><td/><td><tt>vfs:ftp://guest:guest@localhost/directory?vfs.passive=true</tt></td></tr>
-      </tbody>
-    </table>
-    <h4>
-      <a name="default-endpoint" id="default-endpoint">Default Endpoint</a>
-    </h4>
-    <p>
-      Default endpoint is an endpoint defined for adding QoS and other configurations
-      to the endpoint which is resolved from the 'To' address of the message context.
-      All the configurations such as message format for the endpoint, the method
-      to optimize attachments, reliable messaging, security policies for the endpoint
-      can be specified as in the Address Endpoint. This endpoint differs from the address
-      endpoint only in the uri attribute which will not be present in this endpoint.
-      Following section describes the configuration of a default endpoint
-    </p>
-    <pre xml:space="preserve">&lt;default [format="soap11|soap12|pox|get"] [optimize="mtom|swa"]
-         [encoding="<em>charset encoding</em>"]
-         [statistics="enable|disable"] [trace="enable|disable"]&gt;
-  &lt;enableRM [policy="<em>key</em>"]/&gt;?
-  &lt;enableSec [policy="<em>key</em>"]/&gt;?
-  &lt;enableAddressing [version="final|submission"] [separateListener="true|false"]/&gt;?
-
-  &lt;timeout&gt;
-    &lt;duration&gt;<em>timeout duration in milliseconds</em>&lt;/duration&gt;
-    &lt;responseAction&gt;discard|fault&lt;/responseAction&gt;
-  &lt;/timeout&gt;?
-
-   &lt;markForSuspension&gt;
-        [&lt;errorCodes&gt;xxx,yyy&lt;/errorCodes&gt;]
-        &lt;retriesBeforeSuspension&gt;m&lt;/retriesBeforeSuspension&gt;
-        &lt;retryDelay&gt;d&lt;/retryDelay&gt;
-    &lt;/markForSuspension&gt;
-
-  &lt;suspendOnFailure&gt;
-        [&lt;errorCodes&gt;xxx,yyy&lt;/errorCodes&gt;]
-        &lt;initialDuration&gt;n&lt;/initialDuration&gt;
-        &lt;progressionFactor&gt;r&lt;/progressionFactor&gt;
-        &lt;maximumDuration&gt;l&lt;/maximumDuration&gt;
-    &lt;/suspendOnFailure&gt;
-&lt;/default&gt;</pre>
-    <h4>
-      <a name="wsdl-endpoint" id="wsdl-endpoint">WSDL Endpoint</a>
-    </h4>
-    <p>
-      WSDL endpoint is an endpoint definition based on a specified WSDL
-      document. The WSDL document can be specified either as a URI or as an
-      inlined definition within the configuration. The service and port name
-      containing the target EPR has to be specified with the 'service' and
-      'port' (or 'endpoint') attributes respectively. enableRM, enableSec,
-      enableAddressing, suspendDurationOnFailure and timeout elements are same
-      as for an Address endpoint.
-    </p>
-<pre xml:space="preserve">&lt;wsdl [uri="wsdl-uri"] service="qname" port/endpoint="qname"&gt;
-  &lt;wsdl:definition&gt;...&lt;/wsdl:definition&gt;?
-  &lt;wsdl20:description&gt;...&lt;/wsdl20:description&gt;?
-  &lt;enableRM [policy="key"]/&gt;?
-  &lt;enableSec [policy="key"]/&gt;?
-  &lt;enableAddressing/&gt;?
-  
-  &lt;timeout&gt;
-    &lt;duration&gt;timeout duration in milliseconds&lt;/duration&gt;
-    &lt;responseAction&gt;discard|fault&lt;/responseAction&gt;
-  &lt;/timeout&gt;?
-  &lt;markForSuspension&gt;
-        [&lt;errorCodes&gt;xxx,yyy&lt;/errorCodes&gt;]
-        &lt;retriesBeforeSuspension&gt;m&lt;/retriesBeforeSuspension&gt;
-        &lt;retryDelay&gt;d&lt;/retryDelay&gt;
-    &lt;/markForSuspension&gt;
-
-  &lt;suspendOnFailure&gt;
-        [&lt;errorCodes&gt;xxx,yyy&lt;/errorCodes&gt;]
-        &lt;initialDuration&gt;n&lt;/initialDuration&gt;
-        &lt;progressionFactor&gt;r&lt;/progressionFactor&gt;
-        &lt;maximumDuration&gt;l&lt;/maximumDuration&gt;
-    &lt;/suspendOnFailure&gt; 
-	
-&lt;/wsdl&gt;</pre>
-    <h4>
-      <a name="load-balanced-endpoint" id="load-balanced-endpoint">Load
-      balanced Endpoint</a>
-    </h4>
-    <p>
-      A Load balanced endpoint distributes the messages (load) arriving at it
-      among a set of listed endpoints or static members by evaluating the load balancing policy
-      and any other relevant parameters. The policy attribute of the load balance
-      element specifies the load balance policy (algorithm) to be used for
-      selecting the target endpoint or static member. Currently only the roundRobin policy is
-      supported. The failover attribute determines if the next endpoint or static member should be
-      selected once the currently selected endpoint or static member has failed, and defaults to
-      true. The set of endpoints or static members amongst which the load has to be distributed
-      can be listed under the 'loadBalance' element. These endpoints can belong to any
-      endpoint type mentioned in this document. For example, failover endpoints
-      can be listed inside the load balance endpoint to load balance between
-      failover groups etc. The loadbalance element cannot have both endpoint &amp; member child
-      elements in the same configuration. In the case of the member child element, the hostName,
-      httpPort and/or httpsPort attributes could be specified.
-    </p>
-    <p>
-      The optional 'session' element makes the endpoint a session affinity based
-      load balancing endpoint. If it is specified, sessions are bound to
-      endpoints in the first message and all successive messages for those
-      sessions are directed to their associated endpoints. Currently there are two types
-      of sessions supported in SAL endpoints. Namely HTTP transport based session
-      which identifies the sessions based on http cookies and the client session which
-      identifies the session by looking at a SOAP header sent by the client with the QName
-      '{http://ws.apache.org/ns/synapse}ClientID'. The 'failover' attribute mentioned above
-      is not applicable for session affinity based endpoints and it is always
-      considered as set to false. If it is required to have failover behavior in session
-      affinity based load balance endpoints, list failover endpoints as the target endpoints.
-    </p>
-    <pre xml:space="preserve">
-    &lt;session type="http|simpleClientSession"/&gt;?
-    &lt;loadBalance [policy="roundRobin"] [algorithm="impl of org.apache.synapse.endpoints.algorithms.LoadbalanceAlgorithm"]
-                    [failover="true|false"]&gt;
-      &lt;endpoint .../&gt;+
-      &lt;member hostName="host" [httpPort="port"] [httpsPort="port2"]&gt;+  
-    &lt;/loadBalance&gt;
-    </pre>
-    <h4>
-      <a name="fail-over-endpoint" id="fail-over-endpoint">Failover Endpoint</a>
-    </h4>
-    <p>
-      Failover endpoints send messages to the listed endpoints with the
-      following failover behavior. At the start, the first listed endpoint is
-      selected as the primary and all other endpoints are treated as backups.
-      Incoming messages are always sent only to the primary endpoint. If the
-      primary endpoint fails, next active endpoint is selected as the primary
-      and failed endpoint is marked as inactive. Thus it sends messages
-      successfully as long as there is at least one active endpoint among the
-      listed endpoints.
-    </p>
-<pre xml:space="preserve">&lt;failover&gt;
-  &lt;endpoint .../&gt;+
-&lt;/failover&gt;</pre>
-
-            <h4>
-      <a name="dynamic-load-balanced-endpoint" id="dynamic-load-balanced-endpoint">Dynamic Load
-      balance Endpoint</a>
-    </h4>
-    <p>
-      A Dynamic Load balanced endpoint distributes the messages (load) arriving at it
-      among a application members by evaluating the load balancing policy
-      and any other relevant parameters. These application members will be discovered
-      using the membershipHandler class. Generally, this class will use a group
-      communication mechanism to discover the application members. The class attribute of the
-      membershipHandler element should be an implementation of
-      org.apache.synapse.core.LoadBalanceMembershipHandler. membershipHandler specific properties
-      can be specified using the property elements.  The policy attribute of the
-      dynamicLoadbalance
-      element specifies the load balance policy (algorithm) to be used for
-      selecting the next member to which the message has to be forwaded to.
-      Currently only the roundRobin policy is
-      supported. The failover attribute determines if the next member should be
-      selected once the currently selected member has failed, and defaults to
-      true.
-    </p>
-        <!--TODO: Session affinity documentation-->
-    <pre xml:space="preserve">
-    &lt;dynamicLoadBalance [policy="roundRobin"] [failover="true|false"]&gt;
-          &lt;membershipHandler
-                    class="impl of org.apache.synapse.core.LoadBalanceMembershipHandler"&gt;
-                    &lt;property name="name" value="value"/&gt;+
-          &lt;/membershipHandler&gt;
-    &lt;/dynamicLoadBalance&gt;
-    </pre>
-    <h2>
-      <a name="proxy" id="proxy">Proxy service</a>
-    </h2>
-    <p>
-      A &lt;proxy&gt; element is used to define a Synapse Proxy service.
-    </p>
-<pre xml:space="preserve"> &lt;proxy name="string" [transports="(http |https |jms |.. )+|all"] [pinnedServers="(serverName )+"] [serviceGroup="string"]&gt;
-   &lt;description&gt;...&lt;/description&gt;?
-   &lt;target [inSequence="name"] [outSequence="name"] [faultSequence="name"] [endpoint="name"]&gt;
-      &lt;inSequence&gt;...&lt;/inSequence&gt;?
-      &lt;outSequence&gt;...&lt;/outSequence&gt;?
-      &lt;faultSequence&gt;...&lt;/faultSequence&gt;?
-      &lt;endpoint&gt;...&lt;/endpoint&gt;?
-   &lt;/target&gt;?
-   &lt;publishWSDL key="string" uri="string"&gt;
-      ( &lt;wsdl:definition&gt;...&lt;/wsdl:definition&gt; | &lt;wsdl20:description&gt;...&lt;/wsdl20:description&gt; )?
-      &lt;resource location="..." key="..."/&gt;*
-   &lt;/publishWSDL&gt;?
-   &lt;enableAddressing/&gt;? 
-   &lt;enableSec/&gt;?
-   &lt;enableRM/&gt;?
-   &lt;policy key="string" [type="(in | out)"]/&gt;?       // optional service or message level policies such as (e.g. WS-Security and/or WS-RM policies)
-   &lt;parameter name="string"&gt;                 // optional service parameters such as (e.g. transport.jms.ConnectionFactory)
-      string | xml
-   &lt;/parameter&gt;
- &lt;/proxy&gt;</pre>
-    <p>
-      A proxy service is created and exposed on the specified transports through
-      the underlying Axis2 engine, exposing service EPR's as per the standard
-      Axis2 conventions - based on the service name. (Note: that currently Axis2
-      does not allow custom URI's to be set for services on some transports such
-      as http/s) The Proxy service could be exposed over all enabled Axis2
-      transports such as http, https, JMS, Mail and File etc. or on a subset of
-      these as specified with the optional 'transports' attribute.
-    </p>
-    <p>
-      You can give a list of Synapse server names where this proxy service
-      should be deployed using 'pinnedServers' attribute. It takes the server
-      names separated by comma or space character. If there is no pinned server
-      list then proxy service will be started in all server instances. If a
-      pinned server names list is given it will only start in the given named
-      Synapse server instances. The Synapse server name is picked up from the
-      system property 'SynapseServerName', failing which the hostname of the
-      machine would be used or default to 'localhost'. You can give a name to a
-      Synapse server instance as ./synapse.sh -serverName=&lt;ServerName&gt;
-      or by editing the wrapper.conf where Synapse is started as a service.
-    </p>
-    <p>
-      By default when a proxy service is created it is added to an Axis service
-      group which has the same name as the proxy service. With the 'serviceGroup'
-      attribute this behavior can be further configured. A custom Axis service
-      group can be specified for a proxy service using the 'serviceGroup' attribute.
-      This way multiple proxy services can be grouped together at Axis2 level
-      thus greeatly simplifying service management tasks.
-    </p>
-    <p>
-      Each service could define the target for received messages as a named
-      sequence or a direct endpoint. Target inSequence or endpoint is required
-      for the proxy configuration, and a target outSequence defines how
-      responses should be handled. Any supplied WS-Policies would apply as
-      service level policies, and any service parameters could be passed into
-      the proxy services' AxisService instance using the parameter elements
-      (e.g. the JMS destination etc). If the proxy service should enable
-      WS-Reliable Messaging or Security, the appropriate modules could be
-      engaged, and specified service level policies will apply.
-    </p>
-    <p>
-      A Dynamic Proxy may be defined by specifying the properties of the proxy
-      as dynamic entries by refering them with the key. (For example one could
-      specify the inSequence or endpoint with a remote key, without defining it
-      in the local configuration) As the remote registry entry changes, the
-      properties of the proxy will dynamically be updated accordingly. (Note:
-      proxy service definition itself can not be specified to be dynamic; i.e
-      &lt;proxy key="string"/&gt; is wrong)
-    </p>
-    <p>
-      A WSDL for the proxy service can be published using the &lt;publishWSDL&gt;
-      element. The WSDL document can be loaded from the registry by
-      specifying the 'key' attribute or from any other location by specifying the
-      'uri' attribute. Alternatively the WSDL can be provided inline as a child
-      element of &lt;publishWSDL&gt;. Artifacts (schemas or other WSDL documents)
-      imported by the WSDL can be resolved from the registry by specifying
-      appropriate &lt;resource&gt; elements:
-    </p>
-<pre> &lt;publishWSDL key="my.wsdl"&gt;
-   &lt;resource location="http://www.standards.org/standard.wsdl" key="standard.wsdl"/&gt;
- &lt;/publishWSDL&gt;
-</pre>
-    <p>
-      In this example the WSDL is retrieved from the registry using the key 'my.wsdl'. It
-      imports another WSDL from location 'http://www.standards.org/standard.wsdl'. Instead
-      of loading it from this location, Synapse will retrieve the imported WSDL from the
-      registry entry 'standard.wsdl'.
-    </p>
-    <p>
-      You can give the following as service parameters:
-    </p>
-    <table border="1" cellpadding="0" cellspacing="0" style="width: 100%; font-size:small" class="data-table">
-      <caption/>
-      <tbody>
-        <tr>
-          <th>
-            Parameter
-          </th>
-          <th>
-            Value
-          </th>
-          <th>
-            Default
-          </th>
-          <th>
-            Description
-          </th>
-        </tr>
-        <tr>
-          <td>
-            useOriginalwsdl
-          </td>
-          <td>
-            true|false
-          </td>
-          <td>
-            false
-          </td>
-          <td>
-            Use the given WSDL instead of generating the WSDL.
-          </td>
-        </tr>
-        <tr>
-          <td>
-            modifyUserWSDLPortAddress
-          </td>
-          <td>
-            true|false
-          </td>
-          <td>
-            true
-          </td>
-          <td>
-            (Effective only with useOriginalwsdl=true) If true (default) modify
-            the port addresses to current host.
-          </td>
-        </tr>
-        <tr>
-          <td>
-            showAbsoluteSchemaURL
-          </td>
-          <td>
-            true|false
-          </td>
-          <td>
-            false
-          </td>
-          <td>
-            Show the absolute path of the referred schemas of the WSDL without
-              showing the relative paths.
-          </td>
-        </tr>
-      </tbody>
-    </table>
-    <p/>
-    <p>
-      Transport specific parameters that may be set as service parameters:
-    </p>
-    <table border="1" cellpadding="0" cellspacing="0" style="width: 100%; font-size:small" class="data-table">
-      <caption/>
-      <tbody>
-        <tr>
-          <th>
-            Transport
-          </th>
-          <th>
-            Require
-          </th>
-          <th>
-            Parameter
-          </th>
-          <th>
-            Description
-          </th>
-        </tr>
-        <tr>
-          <td>
-            JMS
-          </td>
-          <td>
-            Optional
-          </td>
-          <td>
-            transport.jms.ConnectionFactory
-          </td>
-          <td>
-            The JMS connection factory definition (from axis2.xml) to be used to
-            listen for messages for this service
-          </td>
-        </tr>
-        <tr>
-          <td/>
-          <td>
-            Optional
-          </td>
-          <td>
-            transport.jms.Destination
-          </td>
-          <td>
-            The JMS destination name (Defaults to a Queue with the service name)
-          </td>
-        </tr>
-        <tr>
-          <td/>
-          <td>
-            Optional
-          </td>
-          <td>
-            transport.jms.DestinationType
-          </td>
-          <td>
-            The JMS destination type. Accept values 'queue' or 'topic' (default:
-            queue)
-          </td>
-        </tr>
-        <tr>
-          <td/>
-          <td>
-            Optional
-          </td>
-          <td>
-            transport.jms.ReplyDestination
-          </td>
-          <td>
-            The destination where a reply will be posted
-          </td>
-        </tr>
-        <tr>
-          <td/>
-          <td>
-            Optional
-          </td>
-          <td>
-            transport.jms.Wrapper
-          </td>
-          <td>
-            The wrapper element for the JMS message
-          </td>
-        </tr>
-      </tbody>
-    </table>
-    <h2>
-      <a name="task" id="task">Tasks</a>
-    </h2>
-    <p>
-      A &lt;task&gt; element is used to define a Synapse Startup Task.
-    </p>
-<pre xml:space="preserve"> &lt;task class="mypackage.MyTask" name="string" [pinnedServers="(serverName)+"]&gt;
-   &lt;property name="stringProp" value="String"/&gt;
-   &lt;property name="xmlProp"&gt;
-     &lt;somexml&gt;config&lt;/somexml&gt;
-   &lt;/property&gt;
-   &lt;trigger ([[count="10"]? interval="1000"] | [cron="0 * 1 * * ?"] | [once=(true | false)])/&gt;
- &lt;/task&gt;</pre>
-    <p>
-      A task is created and scheduled to run at specified time intervals or as
-      specified by the cron expression. The Task class specifies the actual task
-      implementation class (which must implement org.apache.synapse.task.Task
-      interface) to be executed at the specified interval/s, and name specifies
-      an identifier for the scheduled task.
-    </p>
-    <p>
-      Fields in the task class can be set using properties provided as string
-      literals or as XML fragments. (For example; if the task implementation
-      class has a field named "version" with a corresponding setter method, the
-      configuration value which will be assigned to this field before running
-      the task can be specified using a property with the name 'version')
-    </p>
-    <p>
-      There are three different trigger mechanisms to schedule tasks. A simple
-      trigger is specified specifying a 'count' and an 'interval', implying that
-      the task will run a 'count' number of times at specified intervals. A
-      trigger may also be specified as a cron trigger using a cron expression. A
-      one-time trigger is specified using the 'once' attribute as true in the
-      definition and could be specified as true in which case this task will be
-      executed only once just after the initialization of Synapse
-    </p>
-    <p>
-      You can give a list of Synapse server names where this task should be
-      started using pinnedServers attribute. Refer to the explanation of this
-      attribute under proxy services for more information.
-    </p>
-    <h2>
-      <a name="eventsource" id="eventsource">Event Source</a>
-    </h2>
-    <p>
-      A &lt;eventSource&gt; element is used to define a Synapse event source.
-    </p>
-<pre xml:space="preserve">&lt;eventSource name="string"&gt;
-	&lt;subscriptionManager class="mypackage.MyClass"&gt;
-		   &lt;parameter name="string"/&gt;
-	&lt;/subscriptionManager&gt;
-&lt;/eventSource&gt;</pre>
-    <p>
-      An event source required to implement eventing in Synpase. Event source used to inject
-      subscription messages in to Synpase and provide a service URL for the users to send subscriptions
-      to Synapse. User can send messages to manage the subscriptions (unsubscribe, renew, get-status)
-      to the event source.
-    </p>
-    <p>
-      Subscription manager configured inside the event source will be responsible to hold the subscriptions,
-      and provide operations to manage the subscriptions. Subscription storage will decide
-      based on the implementation of the subscription manager , e.g. Registry, memory, database.
-      Additional information required to setup the subscription manager can be set as properties. 
-    </p>
-    <h2>
-      <a name="mediator" id="mediator">Mediators</a>
-    </h2>
-    <p>
-      A mediator token refers to any of the following tokens:
-    </p>
-<pre xml:space="preserve">
-    <a href="#send">send</a> | <a href="#drop">drop</a> | <a href="#log">log</a> | <a href="#property">property</a>  | <a href="#sequence_ref">sequence</a> | <a href="#validate">validate</a> | <a href="#Callout">Callout</a> | <a href="#makefault">makefault</a> | <a href="#xslt">xslt</a> | <a href="#xquery">xquery</a> | <a href="#rewrite">rewrite</a> | <a href="#header">header</a> | <a href="#payloadfactory">payloadFactory</a> | <a href="#filter">filter</a> | <a href="#switch">switch</a> | <a href="#in">in</a> | <a href="#out">out</a>
-    | <a href="#dblookup">dblookup</a> | <a href="#dbreport">dbreport</a> | <a href="#throttle">throttle</a> | <a href="#cache">cache</a> | <a href="#clone">clone</a> | <a href="#iterate">iterate</a> | <a href="#aggregate">aggregate</a> | <a href="#class">class</a> | <a href="#pojoCommand">pojoCommand</a> | <a href="#spring">spring</a> | <a href="#script">script</a> | <a href="#RMSequence">RMSequence</a> | <a href="#eventPublisher">eventPublisher</a> | <a href="#transaction">transaction</a>
-
-    </pre>
-    <p>
-      In addition to the above, Synapse will be able to load custom mediators
-      via the J2SE Service Provider model. Mediator extensions must implement
-      the MediatorFactory interface. The Class and POJO Command mediators allow
-      custom Java code to be easily invoked during mediation, while the Script
-      mediator allows Apache BSF scripts such as Javascript, Ruby, Groovy etc to
-      be used for mediation.
-    </p>
-    <h3>
-      Core Mediators
-    </h3>
-    <h4>
-      <a name="send" id="send">Send</a>
-    </h4>
-    <p>
-      The send token represents a &lt;send&gt; element, used to send messages
-      out of Synapse to some endpoint. The send mediator also copies any message
-      context properties from the current message context to the reply message
-      received on the execution of the send operation so that the response could
-      be correlated back to the request. Messages may be correlated by WS-A
-      MessageID, or even simple custom text labels (see the property mediator
-      and samples)
-    </p>
-    <p>
-      In the simplest case shown below, the destination to send a message is
-      implicit in the message via the 'To' address. Thus a request message will
-      be sent to its 'To' address, and a response message would be sent back to
-      the client. Removing the 'To' address of a message targets it back to the
-      client, and thus a request message received may be returned to the client
-      after changing its direction. (Note: to mark a message as a response set
-      the property RESPONSE to true)
-    </p>
-    <p>
-      <strong>Note:</strong> A send operation may be blocking or
-      non-blocking depending on the actual transport implementation used. As the
-      default NIO based http/s implementation does not block on a send, care
-      must be taken if the same message must be sent and then further processed
-      (e.g. transformed). In such a scenario, it maybe required to first clone
-      the message into two copies and then perform processing to avoid
-      conflicts.
-    </p>
-<pre xml:space="preserve"> &lt;send/&gt;</pre>
-    <p>
-      If the message is to be sent to one or more endpoints, then the following
-      is used:
-    </p>
-<pre xml:space="preserve"> &lt;send&gt;
-   (endpointref | endpoint)+
- &lt;/send&gt;</pre>
-    <p>
-      where the endpointref token refers to the following:
-    </p>
-<pre xml:space="preserve"> &lt;endpoint key="name"/&gt;</pre>
-    <p>
-      and the endpoint token refers to an anonymous endpoint definition.
-    </p>
-    <p> If the response message is to be sent to a named sequence, the 'receive' attribute can be used: </p>
-    <pre xml:space="preserve"> &lt;send receive="recevingSequence"&gt;
-       (endpointref | endpoint)+
-    &lt;/send&gt;</pre>
-    <p/>
-    <h4>
-      <a name="drop" id="drop">Drop</a>
-    </h4>
-    <p>
-      The drop token refers to a &lt;drop&gt; element which is used to stop
-      further processing of a message:
-    </p>
-<pre xml:space="preserve"> &lt;drop/&gt;</pre>
-    <p>
-      Once the &lt;drop&gt; mediator executes, further processing of the current
-      message stops. A the drop mediator does not necessarily close transports.
-    </p>
-    <p/>
-    <h4>
-      <a name="log" id="log">Log</a>
-    </h4>
-    <p>
-      The log token refers to a &lt;log&gt; element which may be used to log
-      messages being mediated:
-    </p>
-<pre xml:space="preserve"> &lt;log [level="string"] [separator="string"]&gt;
-   &lt;property name="string" (value="literal" | expression="xpath")/&gt;*
- &lt;/log&gt;</pre>
-    <p>
-      The optional level attribute selects a pre-defined subset of properties to
-      be logged.
-    </p>
-    <p>
-      e.g.
-    </p>
-    <ul>
-      <li>
-        simple = To, From, WSAction, SOAPAction, ReplyTo, MessageID and any
-        properties
-      </li>
-      <li>
-        headers = All SOAP header blocks and any properties
-      </li>
-      <li>
-        full = all attributes included in log level 'simple' and the SOAP
-        envelope and any properties
-      </li>
-      <li>
-        custom = Only properties specified to the Log mediator
-      </li>
-    </ul>
-    <p>
-      A separator if defined will be used to separate the attributes being
-      logged. The default separator is the ',' comma.
-    </p>
-    <p/>
-    <h4>
-      <a name="property" id="property">Property</a>
-    </h4>
-<pre xml:space="preserve"> &lt;property name="string" [action=set|remove] [type="string"] (value="literal" | expression="xpath") [scope=transport|axis2|axis2-client] [pattern="regex" [group="integer"]]&gt;
-     &lt;xml-element/&gt;?
-&lt;/property&gt;</pre>
-    <p>
-      The property token refers to a &lt;property&gt; element which is a
-      mediator that has no direct impact on the message but rather on the
-      message context flowing through Synapse. The properties set on a message
-      can be later retrieved through the synapse:get-property(prop-name) XPath
-      extension function. If a scope is specified for a property, the property
-      could be set as a transport header property or an (underlying) Axis2
-      message context property, or as a Axis2 client option. If a scope is not
-      specified, it will default to the Synapse message context scope. Using the
-      property element with action specified as "remove" you can remove any
-      existing message context properties.
-    </p>
-    <p>
-      If a pattern is specified, this regular expression will be applied on
-      top of the value of the property. If group number is specified the matching
-      group will be set as the value of the property. If group is not specified,
-      it defaults to 0. If a patter is specified and it is not matched, the
-      value will be set to empty string.
-    </p>  
-    <p>
-      Using the type attribute one can set properties with specific types on
-      the message context. Currently the type attribute accepts following
-      data types.
-    </p>
-        <ul>
-            <li>STRING</li>
-            <li>BOOLEAN</li>
-            <li>DOUBLE</li>
-            <li>FLOAT</li>
-            <li>INTEGER</li>
-            <li>LONG</li>
-            <li>SHORT</li>
-            <li>OM</li>
-        </ul>
-    <p>
-      The type names are case sensitive. If a type is not explicitly specified
-      properties will be set as string values. Type 'OM' can be used to set XML
-      property values on the message context. This becomes useful when the expression
-      associated with the property mediator evaluates to an XML value during mediation.
-      With the type attribute set to 'OM' the resulting XML will be converted to
-      an AXIOM OMElement before setting it to the message context.
-    </p>
-    <p>
-      You can use the property mediator to set fixed XML property values on the
-      message context too. To do that instead of specifying a 'value' attribute
-      specify the XML property value as a child element of the property element.
-      The type attribute has no significance in this situation as the type of the
-      property value is always 'OM'.
-    </p>
-    <p>
-      There are some well-defined properties that you can get/set on the Synapse
-      message context scope:
-    </p>
-    <ul>
-      <li>
-        RESPONSE - 'true' means the message is to be marked as a response
-        message
-      </li>
-      <li>
-        OUT_ONLY - 'true' means the message is to be marked as an out-only
-        message that does not expect a response
-      </li>
-      <li>
-        ERROR_CODE - this is set to any error message code encountered during a
-        fault
-      </li>
-      <li>
-        ERROR_MESSAGE - this is set to any error message text encountered during
-        a fault
-      </li>
-      <li>
-        ERROR_DETAIL - this is set to any error message detail text encountered
-        during a fault
-      </li>
-      <li>
-        ERROR_EXCEPTION - this is set to any Java Exception encountered during a
-        fault
-      </li>
-    </ul>
-    <p>
-      There are some Axis2 and module properties that are useful which are set
-      at scope="axis2"
-    </p>
-    <ul>
-      <li>
-        Mercury2SequenceKey - can be an identifier specifying a Mercury
-        internal sequence key, and
-      </li>
-      <li>
-        Mercury2LastMessage - 'true' will make this the last message and
-        terminate the sequence
-      </li>
-      <li>
-        FORCE_HTTP_1.0 - forces outgoing http/s messages to use HTTP 1.0
-        (instead of the default 1.1)
-      </li>
-      <li>
-        POST_TO_URI - forces outgoing http/s messages to use the full URI
-          in a POST (instead of the default PATH)
-      </li>
-    </ul>
-    <h5>
-      The synapse:get-property() XPath extension function
-    </h5>
-    <p>
-      The get-property() function allows any XPath expression used in a
-      configuration to lookup information from the current message context. It
-      is possible to retrieve properties previously set with the property
-      mediator, and/or information from the Synapse or Axis2 message contexts or
-      transport header. The function accepts the scope as an optional parameter
-      as shown below:
-    </p>
-    <p>
-      synapse:get-property( [(axis2 | axis2-client | transport),] &lt;property_name&gt;
-      [,&lt;dateformat&gt;] )
-    </p>
-    <p/>
-    <p>
-      Some useful properties from the Synapse message context follows:
-    </p>
-    <ul>
-      <li>
-        SYSTEM_DATE - Returns the current date as a String. Optionally a date
-        format as per standard date format may be supplied. e.g.
-        synapse:get-property("SYSTEM_DATE", "yyyy.MM.dd G 'at' HH:mm:ss z") or
-        get-property('SYSTEM_DATE')
-      </li>
-      <li>
-        SYSTEM_TIME - Returns the current time in milliseconds. (i.e. the
-        difference, measured in milliseconds, between the current time and
-        midnight, January 1, 1970 UTC)
-      </li>
-      <li>
-        To, From, Action, FaultTo, ReplyTo, MessageID the message To and Action
-        and WS-Addressing properties
-      </li>
-      <li>
-        MESSAGE_FORMAT - returns the message format - i.e. returns pox, get,
-        soap11 or soap12
-      </li>
-      <li>
-        OperationName - returns the operation name for the message
-      </li>
-      <li>
-        OperationNamespace - returns the namespace of the operation for the message
-      </li>
-    </ul>
-    <p>
-      In addition to the above, one may use the get-property() function to
-      retrieve Axis2 message context properties or transport headers. e.g.
-      synapse:get-property('transport', 'USER_AGENT')
-    </p>
-    <h5>
-      SynapseXpath variables
-    </h5>
-    <p>
-      There are a set of predefined XPath variables when writing XPaths in
-      the Synapse Configuration. Those are as follows;
-    </p>
-    <ul>
-        <li>
-            body - The SOAP 1.1 or 1.2 body element
-        </li>
-        <p>
-            For example; expression="$body/getQuote" refers to the first
-            getQuote element in the SOAP body regardless of whether the message
-            is SOAP-11 or SOAP-12
-        </p>
-        <li>
-            header - The SOAP 1.1 or 1.2 header element
-        </li>
-        <p>
-            For example; expression="$header/wsa:To" refers to the addressing
-            To header regardless of whether this message is SOAP-11 or SOAP-12
-        </p>
-    </ul>
-    <p>
-      Further there are some variable prefixes defined in Synapse XPaths
-      which can be usefull in writing the configurations;
-    </p>
-    <ul>
-        <li>
-            ctx - Prefix for Synapse MessageContext properties
-        </li>
-        <p>
-            For example; expression="$ctx:RESPONSE" gives the value of the
-            Synapse message context property with name 'RESPONSE'
-        </p>
-        <li>
-            axis2 - Prefix for Axis2 MessageContext properties
-        </li>
-        <p>
-            For example; expression="$axis2:messageType" gives the value of the
-            axis2 message context property with name 'messageType'
-        </p>
-        <li>
-            trp - Prefix for the transport headers
-        </li>
-        <p>
-            For example; expression="$trp:Content-Type" gives the value of the
-            'Content-Type' transport header, which is going to be the
-            Content-Type of the current message
-        </p>
-    </ul>
-    <h4>
-      <a name="sequence_ref" id="sequence_ref">Sequence</a>
-    </h4>
-<pre xml:space="preserve"> &lt;sequence key="name"/&gt;</pre>
-    <p>
-      A sequence ref token refers to a &lt;sequence&gt; element which is used to
-      invoke a named sequence of mediators.
-    </p>
-    <p/>
-    <h4>
-      <a name="validate" id="validate">Validate</a>
-    </h4>
-<pre xml:space="preserve"> &lt;validate [source="xpath"]&gt;
-   &lt;property name="validation-feature-id" value="true|false"/&gt;*
-   &lt;schema key="string"/&gt;+
-   &lt;resource location="string" key="string"/&gt; +
-   &lt;on-fail&gt;
-     mediator+
-   &lt;/on-fail&gt;
- &lt;/validate&gt;</pre>
-    <p>
-      The &lt;validate&gt; mediator validates the result of the evaluation of
-      the source xpath expression, against the schema specified. If the source
-      attribute is not specified, the validation is performed against the first
-      child of the SOAP body of the current message. If the validation fails,
-      the on-fail sequence of mediators is executed. Properties could be used to
-      turn on/off some of the underlying features of the validator (See <a
-      href="http://xerces.apache.org/xerces2-j/features.html">http://xerces.apache.org/xerces2-j/features.html</a>)
-	  </p>
-	  <p>
-	  The &lt;resource&gt;  can be used to specify external schema resources, which can be used to 
-	  validate the messages. External schema resources can be defined as localentries and with &lt;resource&gt;
-	  user could point the specified localentries.
-	  </p>
-    <p/>
-    <h4>
-      <a name="Callout" id="Callout">Callout</a>
-    </h4>
-<pre xml:space="preserve"> &lt;callout serviceURL="string" [action="string"]&gt;
-   &lt;configuration [axis2xml="string"] [repository="string"]/&gt;?
-   &lt;source xpath="expression" | key="string"&gt;
-   &lt;target xpath="expression" | key="string"/&gt;
- &lt;/callout&gt;
-</pre>
-    <p>
-      The &lt;callout&gt; mediator performs a blocking external service invocation during 
-      mediation. The serviceURL and the optional action specifies the parameters for this external
-      call. The source element specifies the payload for the request message using an XPath expression;
-      or a registry key that will be used. The target element specifies a node, at which the resulting
-      payload will be attached into the current message, or the name of a key/property using which
-      the response would be attached to the current message context as a property.
-    </p>
-    <p>As the callout mediator performs a blocking call, it cannot use the default non-blocking http/s
-      transports based on Java NIO, and thus defaults to using the samples/axis2Client/client_repo/conf/axis2.xml
-      as the Axis2 configuration, and samples/axis2Client/client_repo as the client repository unless
-      these are specified separately
-    </p>
-    <h3>
-      Transformation Mediators
-    </h3>
-    <h4>
-      <a name="makefault" id="makefault">Makefault</a>
-    </h4>
-<pre xml:space="preserve"> &lt;makefault [version="soap11|soap12|pox"] [response="true|false"]&gt;
-   &lt;code (value="literal" | expression="xpath")/&gt;
-   &lt;reason (value="literal" | expression="xpath")/&gt;
-   &lt;node&gt;...&lt;/node&gt;?
-   &lt;role&gt;...&lt;/role&gt;?
-   (&lt;detail expression="xpath"/&gt; | &lt;detail&gt;...&lt;/detail&gt;)?
- &lt;/makefault&gt;</pre>
-    <p>
-      The &lt;makefault&gt; mediator transforms the current message into a fault
-      message, but does NOT send it. The &lt;send&gt; mediator needs to be
-      invoked to send a fault message created this way. The fault message "To"
-      header is set to the "Fault-To" of the original message if such a header
-      exists on the original message. If a 'version' attribute is specified,
-      the created fault message will be created as a selected SOAP 1.1, SOAP
-      1.2 or POX fault. At the same time if you specify the optional response
-      attribute value as 'true' makefault will mark the mesage as a response
-      regardless of whether the message is a request or a response.
-      The optional &lt;node&gt;, &lt;role&gt; and &lt;detail&gt; directives can
-      be used to set the corresponding elements in the resulting SOAP fault.
-    </p>
-    <p/>
-    <h4>
-      <a name="xslt" id="xslt">XSLT</a>
-    </h4>
-<pre xml:space="preserve"> &lt;xslt key="string" [source="xpath"] [target="string"]&gt;
-   &lt;property name="string" (value="literal" | expression="xpath")/&gt;*
-   &lt;feature name="string" value="true | false" /&gt;*
-   &lt;attribute name="string" value="string" /&gt;*
-   &lt;resource location="..." key="..."/&gt;*
- &lt;/xslt&gt;</pre>
-    <p>
-      The &lt;xslt&gt; mediator applies the specified XSLT transformation to the
-      selected element of the current message payload. If the source element is
-      not specified, it defaults to the first child of the SOAP body.
-      If no 'target' attribute is specified, the source node will be replaced
-      with the output of the transformation. Otherwise the output will be stored in
-      the specified property.
-    </p>
-    <p>
-      If the output method specified by the stylesheet is text (i.e. the stylesheet
-      has the following directive: <tt>&lt;xsl:output method="text"/&gt;</tt>),
-      then the output of the transformation is wrapped in an element with name
-      <tt>{http://ws.apache.org/commons/ns/payload}text</tt>. Note that when an
-      element with this name is present as the first child of the SOAP body of an
-      outgoing message, the JMS and VFS transports will automatically unwrap the
-      content and send it out as plain text. The XSLT mediator can therefore be used
-      for integration with systems relying on plain text messages.
-    </p>
-    <p>
-      Stylesheet parameters can be passed into the transformations through the
-      'property' elements.
-    </p>
-    <p>
-      The 'feature' element defines any features which
-      should be explicitly set to the TransformerFactory. The feature
-      'http://ws.apache.org/ns/synapse/transform/feature/dom' turns on DOM based
-      transformations instead of serializing elements into Byte streams and/or
-      temporary files. Though this would be better in performance than using
-      byte streams, sometimes it may not work for all transformations.
-    </p>
-    <p>
-      The 'attribute' element allows to define attributes which should be explicitly
-      set to the TransformerFactory.
-    </p>
-    <p>
-      Finally, the 'resource' element can be used to resolve XSLT imports and includes from the
-      repository. It works in exactly the same way as the corresponding element in a
-      &lt;proxy&gt; definition.
-    </p>
-    <h4>
-      <a name="xquery" id="xquery">XQuery</a>
-    </h4>
-<pre xml:space="preserve">&lt;xquery key="string" [target="xpath"]&gt;
-    &lt;variable name="string" type="string" [key="string"] [expression="xpath"] [value="string"]/&gt;?
-&lt;/xquery&gt; </pre>
-    <p/>
-    <p>
-      The XQuery mediator can be used to perform an XQuery transformation. The
-      'key' attribute specifies the XQuery transformation, and the optional
-      'target' attribute specifies the node of the message that should be
-      transformed. This defaults to the first child of the SOAP body of the
-      payload. The 'variable' elements define a variable that could be bound to
-      the dynamic context of the XQuery engine in order to access those
-      variables through the XQuery script .
-    </p>
-    <p>
-      It is possible to specify just a literal 'value', or an XPath expression
-      over the payload, or even specify a registry key or a registry key
-      combined with an XPath expression that selects the variable. The name of
-      the variable corresponds to the name of variable declaration in the XQuery
-      script. The 'type' of the variable must be a valid type defined by the
-      JSR-000225 (XQJ API).
-    </p>
-    <p>
-      The supported types are:
-    </p>
-    <ul>
-      <li>
-        XQItemType.XQBASETYPE_INT -&gt; INT
-      </li>
-      <li>
-        XQItemType.XQBASETYPE_INTEGER -&gt; INTEGER
-      </li>
-      <li>
-        XQItemType.XQBASETYPE_BOOLEAN -&gt; BOOLEAN
-      </li>
-      <li>
-        XQItemType.XQBASETYPE_BYTE - &gt; BYTE
-      </li>
-      <li>
-        XQItemType.XQBASETYPE_DOUBLE -&gt; DOUBLE
-      </li>
-      <li>
-        XQItemType.XQBASETYPE_SHORT -&gt; SHORT
-      </li>
-      <li>
-        XQItemType.XQBASETYPE_LONG -&gt; LONG
-      </li>
-      <li>
-        XQItemType.XQBASETYPE_FLOAT -&gt; FLOAT
-      </li>
-      <li>
-        XQItemType.XQBASETYPE_STRING -&gt; STRING
-      </li>
-      <li>
-        XQItemType.XQITEMKIND_DOCUMENT -&gt; DOCUMENT
-      </li>
-      <li>
-        XQItemType.XQITEMKIND_DOCUMENT_ELEMENT -&gt; DOCUMENT_ELEMENT
-      </li>
-      <li>
-        XQItemType.XQITEMKIND_ELEMENT -&gt; ELEMENT
-      </li>
-    </ul>
-    <p/>
-    <h4>
-      <a name="rewrite" id="rewrite">URLRewrite</a>
-    </h4>
-<pre xml:space="preserve">&lt;rewrite [inProperty="string"] [outProperty="string"]&gt;
-   &lt;rewriterule&gt;
-      &lt;condition&gt;
-         ...
-      &lt;/condition&gt;?
-      &lt;action [type="append|prepend|replace|remove|set"] [value="string"]
-          [xpath="xpath"] [fragment="protocol|host|port|path|query|ref|user|full"] [regex="regex"]&gt;+
-   &lt;/rewriterule&gt;+
-&lt;/rewrite&gt;</pre>
-    <p/>
-    <p>
-      The URL rewrite mediator is used to modify and transform the URL values available
-      in the message. By default the mediator will take the 'To' header of the message and
-      apply the provided rewrite rules on it. Alternatively one can specify a property name
-      in the 'inProperty' attribute, in which case the mediator will take the value of the
-      specified property as the input URL. Similarly the mediator by default sets the transformed
-      URL as the 'To' header of the message. Alternatively you can use the 'outProperty'
-      attribute to instruct the mediator to set the resulting URL as a property.
-    </p>
-    <p>
-      The rewrite mediator applies URL transformations by evaluating a set of rules on
-      the message. Rules are specified using the 'rewriterule' element. Rules are evaluated in the
-      order they are specified. A rule can consist of an optional condition and one or more
-      rewrite actions. If the condition is provided it will be evaluated first. If it evaluates
-      to 'true' all the specified rewrite actions will be executed. Otherwise the set of
-      actions will be skipped. If no condition is specified, the provided rewrite actions
-      will be always executed. The condition should be wrapped in a 'condition' element within
-      the 'rewriterule' element. Rewrite actions are specified using 'action' elements.
-    </p>
-    <p>
-      The 'type' attribute on the 'action' element states which type of action should be
-      executed on the URL. This defaults to 'set' value. The 'fragment' attribute can be
-      used to specify the URL fragment on which the action should be executed. If not specified
-      this will be taken as 'full' URL, which is the complete URL. The value to 'set', 'append'
-      or 'prepend' must be specified using either the 'value' attribute or the 'xpath' attribute.
-      One of these two attributes are always needed unless the value of the 'type' attribute is
-      set to 'remove'. When the 'type' is set to 'replace' an additional 'regex' attribute must
-      be specified which indicates the portion that should be replaced with the given value.
-    </p>
-    <p/>
-    <h4>
-      <a name="header" id="header">Header</a>
-    </h4>
-<pre xml:space="preserve"> &lt;header name="qname" (value="literal" | expression="xpath") [action="set"]/&gt;
- &lt;header name="qname" action="remove"/&gt;</pre>
-    <p>
-      The &lt;header&gt; mediator sets or removes a specified header from the
-      current soap infoset. Currently the set header only supports simple valued
-      headers. In the future we may extend this to have XML structured headers
-      by embedding the XML content within the element itself. The optional
-      action attribute specifies whether the mediator should set or remove the
-      header. If omitted, it defaults to a set-header.
-    </p>
-    <p>
-      The value of the 'name' attribute must be one of the following aliases or
-      a valid QName with a namespace prefix. (In the latter case the namespace prefix
-      must be mapped to a valid namespace URI using the standard xmlns attribute)
-    </p>
-    <ul>
-        <li>To</li>
-        <li>From</li>
-        <li>Action</li>
-        <li>FaultTo</li>
-        <li>ReplyTo</li>
-        <li>RelatesTo</li>
-    </ul>
-    <p/>
-    <h4>
-      <a name="payloadfactory" id="payloadfactory">Payload-factory</a>
-    </h4>
-<pre xml:space="preserve">&lt;payloadFactory&gt;
-  &lt;format&gt;&quot;xmlstring&quot;&lt;/format&gt;
-  &lt;args&gt;
-   &lt;arg (value=&quot;literal&quot; | expression=&quot;xpath&quot;)/&gt;*
-  &lt;/args&gt;
-&lt;/payloadFactory&gt;</pre>
-    <p>
-      The Payload-factory mediator creates a new SOAP payload for the message, replacing the 
-      existing one. printf() style formatting is used to configure the transformation 
-      performed by the mediator.
-    </p>
-    <p>
-      Each argument in the mediator configuration could be a static value or an XPath expression.
-      When an expression is used, argument value is fetched at runtime by evaluating the provided 
-      XPath expression against the existing SOAP message/message context.
-    </p>
-    <h3>
-      Selection Mediators
-    </h3>
-    <h4>
-      <a name="filter" id="filter">Filter</a>
-    </h4>
-<pre xml:space="preserve"> &lt;filter (source="xpath" regex="string") | xpath="xpath"&gt;
-   mediator+
- &lt;/filter&gt;</pre>
-    <p>
-      The &lt;filter&gt; mediator either test the given xpath expression as a
-      boolean expression, or match the evaluation result of a source xpath
-      expression as a String against the given regular expression. If the test
-      succeeds, the filter mediator will execute the enclosed mediators in
-      sequence.
-    </p>
-    <p>One could also use this mediator to handle the failure case as well, in which case the
-       configuration would be as follows
-    </p>
-<pre xml:space="preserve"> &lt;filter (source="xpath" regex="string") | xpath="xpath"&gt;
-   &lt;then [sequence="string"]&gt;
-     mediator+
-   &lt;/then&gt;
-   &lt;else [sequence="string"]&gt;
-     mediator+
-   &lt;/else&gt;
- &lt;/filter&gt;</pre>
-    <p>In this case the filter condition remains as earlier and the succeeded messages will be
-       mediated using the the set of mediators enclosed in the 'then' element in sequence, while
-       failed messages will be mediated using the set of mediators enclosed in the else element
-       in sequence
-    </p>
-    <p/>
-    <h4>
-      <a name="switch" id="switch">Switch</a>
-    </h4>
-<pre xml:space="preserve"> &lt;switch source="xpath"&gt;
-   &lt;case regex="string"&gt;
-     mediator+
-   &lt;/case&gt;+
-   &lt;default&gt;
-     mediator+
-   &lt;/default&gt;?
- &lt;/switch&gt;</pre>
-    <p>
-      The &lt;switch&gt; mediator will evaluate the given source xpath
-      expression into its string value, and match it against the given regular
-      expressions. If the specified cases does not match and a default case
-      exists, it will be executed.
-    </p>
-    <a name="in" id="in"/>
-    <h4>
-      <a name="out" id="out">In / Out</a>
-    </h4>
-<pre xml:space="preserve">&lt;in&gt;<br/>  mediator+
-&lt;/in&gt;<br/></pre>
-<pre xml:space="preserve">&lt;out&gt;
-  mediator+
-&lt;/out&gt;</pre>
-    <p>
-      <br/>
-    </p>
-    <p>
-      The In and Out mediators will execute the child mediators over the current
-      message if the message matches the direction of the mediator. Hence all
-      incoming messages would pass through the "&lt;in&gt;" mediators and vice
-      versa.
-    </p>
-    <p/>
-    <h3>
-      Database Mediators
-    </h3>
-    <h4>
-      <a name="dblookup" id="dblookup">DB-lookup</a>
-    </h4>
-<pre xml:space="preserve">&lt;dblookup&gt;
-   &lt;connection&gt;
-     &lt;pool&gt;
-      (
-       &lt;driver/&gt;
-       &lt;url/&gt;
-       &lt;user/&gt;
-       &lt;password/&gt;
-       &lt;property name="name" value="value"/&gt;*
-     |
-       &lt;dsName/&gt;
-     |
-       &lt;dsName/&gt;
-       &lt;icClass/&gt;
-       &lt;url/&gt;
-       &lt;user/&gt;
-       &lt;password/&gt;
-     )
-     &lt;/pool&gt;
-   &lt;/connection&gt;
-   &lt;statement&gt;
-     &lt;sql&gt;select something from table where something_else = ?&lt;/sql&gt;
-     &lt;parameter [value="" | expression=""] type="CHAR|VARCHAR|LONGVARCHAR|NUMERIC|DECIMAL|BIT|TINYINT|SMALLINT|INTEGER|BIGINT|REAL|FLOAT|DOUBLE|DATE|TIME|TIMESTAMP"/&gt;*
-     &lt;result name="string" column="int|string"/&gt;*
-   &lt;/statement&gt;+
-&lt;/dblookup&gt;</pre>
-    <p/>
-    <p>
-      The dblookup mediator is capable of executing an arbitrary SQL select
-      statement, and then set some resulting values as local message properties
-      on the message context. The DB connection used maybe looked up from an
-      external DataSource or specified in-line, in which case an Apache DBCP
-      connection pool is established and used. Apache DBCP connection pools
-      support the following properties:
-    </p>
-    <ul>
-      <li>
-        autocommit = true | false
-      </li>
-      <li>
-        isolation = Connection.TRANSACTION_NONE |
-        Connection.TRANSACTION_READ_COMMITTED |
-        Connection.TRANSACTION_READ_UNCOMMITTED |
-        Connection.TRANSACTION_REPEATABLE_READ |
-        Connection.TRANSACTION_SERIALIZABLE
-      </li>
-      <li>
-        initialsize = int
-      </li>
-      <li>
-        maxactive = int
-      </li>
-      <li>
-        maxidle = int
-      </li>
-      <li>
-        maxopenstatements = int
-      </li>
-      <li>
-        maxwait = long
-      </li>
-      <li>
-        minidle = int
-      </li>
-      <li>
-        poolstatements = true | false
-      </li>
-      <li>
-        testonborrow = true | false
-      </li>
-      <li>
-        testonreturn = true | false
-      </li>
-      <li>
-        testwhileidle = true | false
-      </li>
-      <li>
-        validationquery = String
-      </li>
-    </ul>
-    <p>
-      More than one statement may be specified, and the SQL statement may
-      specify parameters which could be specified as values or XPath
-      expressions. The types of parameters could be any valid SQL types. Only
-      the first row of a result set will be considered and any others are
-      ignored. The single &lt;result&gt; element contains the 'name' and the
-      'column' attributes. The 'name' attribute defines the name under which the
-      result is stored in the Synapse message context, and the column attribute
-      specifies a column number or name.
-    </p>
-    <h4>
-      <a name="dbreport" id="dbreport">DB-report</a>
-    </h4>
-<pre xml:space="preserve">&lt;dbreport useTransaction=(true|false)&gt;
-   &lt;connection&gt;
-     &lt;pool&gt;
-      (
-       &lt;driver/&gt;
-       &lt;url/&gt;
-       &lt;user/&gt;
-       &lt;password/&gt;
-       &lt;property name="name" value="value"/&gt;* 
-     |
-       &lt;dsName/&gt;
-     |
-       &lt;dsName/&gt;
-       &lt;icClass/&gt;
-       &lt;url/&gt;
-       &lt;user/&gt;
-       &lt;password/&gt;
-     )
-     &lt;/pool&gt;
-   &lt;/connection&gt;
-   &lt;statement&gt;
-     &lt;sql&gt;insert into something values(?, ?, ?, ?)&lt;/sql&gt;
-     &lt;parameter [value="" | expression=""] type="CHAR|VARCHAR|LONGVARCHAR|NUMERIC|DECIMAL|BIT|TINYINT|SMALLINT|INTEGER|BIGINT|REAL|FLOAT|DOUBLE|DATE|TIME|TIMESTAMP"/&gt;*
-    &lt;/statement&gt;+
-&lt;/dblreport&gt;</pre>
-    <p/>
-    <p>
-      The dbreport mediator is very similar to the dblookup mediator, but writes
-      information to a Database, using the specified insert SQL statement.
-    </p>
-    <p/>
-    <h3>
-      Advanced Mediators
-    </h3>
-    <h4>
-      <a name="throttle" id="throttle">Throttle</a>
-    </h4>
-<pre xml:space="preserve">&lt;throttle [onReject="string"] [onAccept="string"] id="string"&gt;
-    (&lt;policy key="string"/&gt; | &lt;policy&gt;..&lt;/policy&gt;)
-    &lt;onReject&gt;..&lt;/onReject&gt;?
-    &lt;onAccept&gt;..&lt;/onAccept&gt;?
-&lt;/throttle&gt;</pre>
-    <p/>
-    <p>
-      The Throttle mediator can be used for rate limiting as well as concurrency
-      based limiting. A WS-Policy dictates the throttling configuration and may
-      be specified inline or loaded from the registry. Please refer to the
-      samples document for sample throttling policies. The Throttle mediator
-      could be added in the request path for rate limiting and concurrent access
-      limitation. When using for concurrent access limitation, the same throttle
-      mediator 'id' must be triggered on the response flow so that completed
-      responses are deducted from the available limit. (i.e. two instances of
-      the throttle mediator with the same 'id' attribute in the request and
-      response flows). The 'onReject' and 'onAccept' sequence references or
-      inline sequences define how accepted and rejected messages are to be
-      handled.
-    </p>
-    <h4>
-      <a name="cache" id="cache">Cache</a>
-    </h4>
-<pre xml:space="preserve"> &lt;cache [id="string"] [hashGenerator="class"] [timeout="seconds"] [scope=(per-host | per-mediator)]
-     collector=(true | false) [maxMessageSize="in-bytes"]&gt;
-   &lt;onCacheHit [sequence="key"]&gt;
-     (mediator)+
-   &lt;/onCacheHit&gt;?
-   &lt;implementation type=(memory | disk) maxSize="int"/&gt;
- &lt;/cache&gt;</pre>
-    <p>
-      The &lt;cache&gt; mediator will evaluate the hash value of an incoming
-      message as described in the optional hash generator implementation (which
-      should be a class implementing the org.wso2.caching.digest.DigestGenerator
-      interface). The default hash generator is
-      'org.wso2.caching.digest.DOMHashGenerator'. If the generated hash value
-      has been found in the cache then the cache mediator will execute the
-      onCacheHit sequence which can be specified inline or referenced. The cache
-      mediator must be specified with an 'id' and two instances with this same
-      'id' that correlates the response message into the cache for the request
-      message hash. The optional 'timeout' specifies the valid duration for
-      cached elements, and the scope defines if mediator instances share a
-      common cache per every host instance, or per every cache mediator pair
-      (i.e. 'id') instance. The 'collector' attribute 'true' specifies that the
-      mediator instance is a response collection instance, and 'false' specifies
-      that its a cache serving instance. The maximum size of a message to be
-      cached could be specified with the optional 'maxMessageSize' attributes in
-      bytes and defaults to unlimited. Finally the 'implementation' element may
-      define if the cache is disk or memory based, and the 'maxSize' attribute
-      defines the maximum number of elements to be cached.
-    </p>
-    <h3>
-      EIP Mediators
-    </h3>
-    <h4>
-      <a name="clone" id="clone">Clone</a>
-    </h4>
-<pre xml:space="preserve"> &lt;clone [continueParent=(true | false)]&gt;
-   &lt;target [to="uri"] [soapAction="qname"] [sequence="sequence_ref"] [endpoint="endpoint_ref"]&gt;
-     &lt;sequence&gt;
-       (mediator)+
-     &lt;/sequence&gt;?
-     &lt;endpoint&gt;
-       endpoint
-     &lt;/endpoint&gt;?
-   &lt;/target&gt;+
- &lt;/clone&gt;</pre>
-    <p>
-      The clone mediator closely resembles the Message Splitter EIP and will
-      split the message into number of identical messages which will be
-      processed in parallel. The original message cloned can be continued or
-      dropped depending on the boolean value of the optional 'continueParent'
-      attribute. Optionally a custom 'To' address and/or a 'Action' may be
-      specified for cloned messages
-    </p>
-    <h4>
-      <a name="iterate" id="iterate">Iterate</a>
-    </h4>
-<pre xml:space="preserve"> &lt;iterate [continueParent=(true | false)] [preservePayload=(true | false)] (attachPath="xpath")? expression="xpath"&gt;
-   &lt;target [to="uri"] [soapAction="qname"] [sequence="sequence_ref"] [endpoint="endpoint_ref"]&gt;
-     &lt;sequence&gt;
-       (mediator)+
-     &lt;/sequence&gt;?
-     &lt;endpoint&gt;
-       endpoint
-     &lt;/endpoint&gt;?
-   &lt;/target&gt;+
- &lt;/iterate&gt;</pre>
-    <p>
-      The iterate mediator implements another EIP and will split the message
-      into number of different messages derived from the parent message by
-      finding matching elements for the XPath expression specified. New messages
-      will be created for each and every matching element and processed in
-      parallel using either the specified sequence or endpoint. Parent message
-      can be continued or dropped in the same way as in the clone mediator. The
-      'preservePayload' attribute specifies if the original message should be
-      used as a template when creating the splitted messages, and defaults to
-      'false', in which case the splitted messages would contain the split
-      elements as the SOAP body.
-    </p>
-    <h4>
-      <a name="aggregate" id="aggregate">Aggregate</a>
-    </h4>
-<pre xml:space="preserve"> &lt;aggregate&gt;
-   &lt;correlateOn expression="xpath"/&gt;?
-   &lt;completeCondition [timeout="time-in-seconds"]&gt;
-     &lt;messageCount min="int-min" max="int-max"/&gt;?
-   &lt;/completeCondition&gt;?
-   &lt;onComplete expression="xpath" [sequence="sequence-ref"]&gt;
-     (mediator +)?
-   &lt;/onComplete&gt;
- &lt;/aggregate&gt;</pre>
-    <p>
-      The aggregate mediator implements the Message Aggregator EIP and will
-      aggregate the messages or responses for splitted messages using either the
-      clone or iterate mediators. At the same time it can aggregate messages on
-      the presence of matching elements specified by the correlateOn XPATH
-      expression. Aggregate will collect the messages coming into it until the
-      messages collected on the aggregation satisfies the complete condition.
-      The completion condition can specify a minimum or maximum number of
-      messages to be collected, or a timeout value in seconds, after which the
-      aggregation terminates. On completion of the aggregation it will merge all
-      of the collected messages and invoke the onComplete sequence on it. The
-      merged message would be created using the XPath expression specified by
-      the attribute 'expression' on the 'onComplete' element.
-    </p>
-    <h3>
-      Extension mediators
-    </h3>
-    <h4>
-      <a name="class" id="class">Class</a>
-    </h4>
-<pre xml:space="preserve"> &lt;class name="class-name"&gt;
-   &lt;property name="string" value="literal"&gt;
-     (either literal or XML child)
-   &lt;/property&gt;
- &lt;/class&gt; </pre>
-    <p>
-      The class mediator creates an instance of a custom specified class and
-      sets it as a mediator. The class must implement the
-      org.apache.synapse.api.Mediator interface. If any properties are
-      specified, the corresponding setter methods are invoked on the class,
-      once, during initialization.
-    </p>
-    <p/>
-    <h4>
-      <a name="pojoCommand" id="pojoCommand">POJOCommand</a>
-    </h4>
-<pre xml:space="preserve"> &lt;pojoCommand name="class-name"&gt;
-   (
-   &lt;property name="string" value="string"/&gt; |
-   &lt;property name="string" context-name="literal" [action=(ReadContext | UpdateContext | ReadAndUpdateContext)]&gt;
-     (either literal or XML child)
-   &lt;/property&gt; |
-   &lt;property name="string" expression="xpath" [action=(ReadMessage | UpdateMessage | ReadAndUpdateMessage)]/&gt;
-   )*
- &lt;/pojoCommand&gt; </pre>
-    <p>
-      The pojoCommand mediator creates an instance of the specified command
-      class - which may implement the org.apache.synapse.Command interface or
-      should have a public void method "public void execute()". If any
-      properties are specified, the corresponding setter methods are invoked on
-      the class before each message is executed. It should be noted that a new
-      instance of the POJO Command class is created to process each message
-      processed. After execution of the POJO Command mediator, depending on the
-      'action' attribute of the property, the new value returned by a call to
-      the corresponding getter method is stored back to the message or to the
-      context. The 'action' attribute may specify whether this behaviour is
-      expected or not via the Read, Update and ReadAndUpdate properties.
-    </p>
-    <p/>
-    <h3>
-      <a name="script" id="script">Scripting language mediators</a>
-    </h3>
-    <p/>
-    <p>
-      Synapse supports Mediators implemented in a variety of scripting languages
-      such as JavaScript, Python or Ruby. There are two ways of defining script
-      mediators, either with the script program statements stored in a separate
-      file which is referenced via the local or remote registry entry, or with
-      the script program statements embedded in-line within the Synapse
-      configuration. A script mediator using a script off the registry (local or
-      remote) is defined as follows:
-    </p>
-<pre xml:space="preserve"> &lt;script key="string" language="string" [function="script-function-name"]/&gt;</pre>
-    <p>
-      The property key is the registry key to load the script. The language
-      attribute specifies the scripting language of the script code (e.g. "js"
-      for Javascript, "rb" for ruby, "groovy" for Groovy, "py" for Python..).
-      The function is an optional attribute defining the name of the script
-      function to invoke, if not specified it defaults to a function named
-      'mediate'. The function is passed a single parameter - which is the
-      Synapse MessageContext. The function may return a boolean, if it does not,
-      then true is assumed, and the script mediator returns this value. An
-      inline script mediator has the script source embedded in the configuration
-      as follows:
-    </p>
-<pre xml:space="preserve"> &lt;script language="string"&gt;...script source code...&lt;script/&gt;</pre>
-
-<p>           
-      If the script you specified is calling a function defined in another script,
-      then the latter script should also be included in the script mediator
-      configuration. It's done using the &lt;include&gt; element. The key attribute of the 
-      &lt;include&gt; element should point to the script which has to be included. The included
-      script could be stored as a local entry or in the remote registry.
-      Script includes are defined as follows:
-    </p>
-<pre xml:space="preserve"> &lt;script key="string" language="string" [function="script-function-name"]&gt;
-   &lt;include key="string"/&gt;
- &lt;/script&gt;</pre>
-    <p>
-      The execution context environment of the script has access to the Synapse
-      MessageContext predefined in a script variable named 'mc' . An example of
-      an inline mediator using JavaScript/E4X which returns false if the SOAP
-      message body contains an element named 'symbol' which has a value of 'IBM'
-      would be:
-    </p>
-<pre xml:space="preserve"> &lt;script language="js"&gt;mc.getPayloadXML()..symbol != "IBM";&lt;script/&gt;</pre>
-    <p>
-      Synapse uses the Apache <a href="http://jakarta.apache.org/bsf/">Bean
-      Scripting Framework</a> for the scripting language support, any
-      script language supported by BSF may be used to implement a Synapse
-      Mediator.
-    </p>
-    <p>
-      Implementing a Mediator with a script language can have advantages over
-      using the built in Synapse Mediator types or implementing a custom Java
-      class Mediator. Script Mediators have all the flexibility of a class
-      Mediator with access to the Synapse MessageContext and SynapseEnvironment
-      APIs, and the ease of use and dynamic nature of scripting languages allows
-      rapid development and prototyping of custom mediators. An additional
-      benefit of some scripting languages is that they have very simple and
-      elegant XML manipulation capabilities, for example JavaScript E4X or Ruby
-      REXML, so this makes them well suited for use in the Synapse mediation
-      environment. For both types of script mediator definition the
-      MessageContext passed into the script has additional methods over the
-      standard Synapse MessageContext to enable working with the XML in a way
-      natural to the scripting language. For example when using JavaScript
-      getPayloadXML and setPayloadXML, E4X XML objects, and when using Ruby,
-      REXML documents.
-      The complete list of available methods can be found in the 
-      <a href="apidocs/org/apache/synapse/mediators/bsf/ScriptMessageContext.html">ScriptMessageContext Javadoc</a>.
-    </p>
-    <h3>
-      Extensibility of Synapse
-    </h3>
-    <p>
-      The Synapse configuration language could be easily extended, with
-      configuration extensions as well as mediation extensions. The Spring
-      mediator is such an example.
-    </p>
-    <h4>
-      Spring Configuration
-    </h4>
-    <p>
-      A Spring configuration could be created as a localEntry or remote registry
-      entry providing a URL or a key reference to a Registry. The configuration
-      is then created on first use or as necessary (as per registry lookup
-      semantics) by the mediators which reference this configuration.
-    </p>
-<pre xml:space="preserve"> &lt;localEntry key="string"/&gt;
- &lt;localEntry key="string" src="url"/&gt;</pre>
-    <p>
-      The name attribute specifies a unique name for the configuration, and the
-      src, key or inlined XML references to the Spring configuration
-    </p>
-    <p/>
-    <h4>
-      <a name="spring" id="spring">Spring mediator</a>
-    </h4>
-<pre xml:space="preserve"> &lt;spring:spring bean="exampleBean1" key="string" xmlns:spring="http://ws.apache.org/ns/synapse/spring"/&gt;</pre>
-    <p>
-      The &lt;spring&gt; element creates an instance of a mediator, which is
-      managed by Spring. This Spring bean must implement the Mediator interface
-      for it to act as a Mediator. The key will reference the Spring
-      ApplicationContext/Configuration used for the bean
-    </p>
-
-    <h3>
-      Other Mediators
-    </h3>
-        <h4>
-      <a name="RMSequence" id="RMSequence">RMSequence</a>
-    </h4>
-<pre xml:space="preserve"> &lt;RMSequence (correlation="xpath" [last-message="xpath"]) | single="true" [version="1.0|1.1"]/&gt;</pre>
-    <p>
-      The &lt;RMSequence&gt; mediator can be used to create a sequence of
-      messages to communicate via WS-Reliable Messaging with an WS-RM enabled
-      endpoint (&lt;enableRM&gt;). The simple use case of this mediator is to
-      specify a single="true" property, because this means that only one message
-      is involved in the same sequence. However if multiple messages should be
-      sent in the same sequence, the correlation property should be used with a
-      XPath expression that selects an unique element value from the incoming
-      message. With the result of the XPath expression, Synapse can group
-      messages together that belong to the same sequence. To close the sequence
-      neatly, for the last message of the sequence also an XPath expression
-      should be specified. With the version attribute the WS-RM specification
-      version to be used can be specified, 1.0 or 1.1.
-    </p>
-    <h4>
-      <a name="eventPublisher" id="eventPublisher">eventPublisher</a>
-    </h4>
-<pre xml:space="preserve"> &lt;eventPublisher eventSourceName="string"/&gt;</pre>
-    <p>
-      The &lt;eventPublisher&gt; mediator use to send events to the subscribers that match
-      the given filter criteria. A pre defined event source need to be provided with the mediator.
-    </p>
-    <p>The eventPublisher mediator handover the event to the defined event source in the mediator
-        and event source picks the valid subscriptions from the subscription manager
-        by applying the define filter.
-        Any mediation required before dispatching the events can be done by adding
-        mediators using sequences before the eventPublisher mediator. Quality of service like security
-        can add to the events by applying QOS to the proxy service that holds the  eventPublisher mediator.
-    </p>
-
-        <h4>
-            <a name="transaction" id="transaction">Transaction</a>
-        </h4>
-      <pre xml:space="preserve">
-        &lt;transaction
-           action="new|use-existing-or-new|fault-if-no-tx|commit|rollback|suspend|resume"&gt;
-        &lt;/transaction&gt;
-      </pre>
-        <p>The action attribute has the following meanings.</p>
-        <ol>
-        <li>1. new - Create a new jta transaction. Generate a fault if a transaction already exist.
-        </li>
-        <li>2. use-existing-or-new - Create a new jta transaction. Do nothing if a transaction exist.
-        </li>
-        <li>3. fault-if-no-tx - Generate a fault if no transaction exist. Do nothing if a transaction
-            exist.
-        </li>
-        <li>4. commit - Commit transaction. Generate a fault if no transaction exist.</li>
-        <li>5. rollback - Rollback transaction. Generate a fault if no transaction exist.</li>
-        <li>6. suspend - Suspend transaction. Generate a fault if no transaction exist.</li>
-        <li>7. resume - Resume transaction. Generate a fault if no transaction exist.</li>
-        </ol>
-
-        <p>
-            The transaction mediator can use to define a distributed transaction. It has the
-            transaction markers which can be used to mark the start and end of
-            a transaction. Transaction mediator required a JTA provider in the system to work.
-        </p>
-
-        <p/>
-    <p/>
-  </body>
-</document>  
-
diff --git a/src/site/xdoc/Synapse_Extending.xml b/src/site/xdoc/Synapse_Extending.xml
deleted file mode 100644
index 56c75a9..0000000
--- a/src/site/xdoc/Synapse_Extending.xml
+++ /dev/null
@@ -1,842 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-
-<document>
-    <properties>
-        <title>Apache Synapse - Extending...</title>
-    </properties>
-    <head>
-        <style type="text/css" xml:space="preserve">
-            .command {
-            border: 1px dashed #3c78b5;
-            text-align: left;
-            background-color: #f0f0f0;
-            padding: 3px;
-            font-size: 11px;
-            font-family: Courier;
-            margin: 10px;
-            line-height: 13px;
-            }
-            .consoleOutput {
-            border: 1px dashed #3c78b5;
-            font-size: 11px;
-            font-family: Courier;
-            margin: 10px;
-            line-height: 13px;
-            background-color: #f0f0f0;
-            border-bottom: 1px dashed #3c78b5;
-            padding: 3px;
-            border-style: solid;
-            }
-            .info {
-            border-style: solid;
-            border-width: 1px;
-            border-color: #090;
-            background-color: #dfd;
-            text-align:left;
-            margin-top: 5px;
-            margin-bottom: 5px;
-            }
-            li {
-            font-family: Verdana, arial, sans-serif;
-            font-size: 11px;
-            line-height: 16px;
-            color: #000000;
-            font-weight: normal;
-            }
-            p {
-            font-family: Verdana, arial, sans-serif;
-            font-size: 11px;
-            line-height: 16px;
-            color: #000000;
-            font-weight: normal;
-            }
-            pre {
-            padding: 0px;
-            margin-top: 5px;
-            margin-left: 15px;
-            margin-bottom: 5px;
-            margin-right: 5px;
-            text-align: left;
-            background-color: #f0f0f0;
-            padding: 3px;
-            border: 1px dashed #3c78b5;
-            font-size: 11px;
-            font-family: Courier;
-            margin: 10px;
-            line-height: 13px;
-            }
-            h1 {
-            font-size: 24px;
-            line-height: normal;
-            font-weight: bold;
-            background-color: #f0f0f0;
-            color: #003366;
-            border-bottom: 1px solid #3c78b5;
-            padding: 2px;
-            margin: 36px 0px 4px 0px;
-            }
-            h2 {
-            font-size: 18px;
-            line-height: normal;
-            font-weight: bold;
-            background-color: #f0f0f0;
-            border-bottom: 1px solid #3c78b5;
-            padding: 2px;
-            margin: 27px 0px 4px 0px;
-            }
-            h3 {
-            font-size: 14px;
-            line-height: normal;
-            font-weight: bold;
-            background-color: #f0f0f0;
-            padding: 2px;
-            margin: 21px 0px 4px 0px;
-            }
-            h4 {
-            font-size: 12px;
-            line-height: normal;
-            font-weight: bold;
-            background-color: #f0f0f0;
-            padding: 2px;
-            margin: 18px 0px 4px 0px;
-            }
-        </style>
-    </head>
-    <body>
-        <div style="margin-top:-40px; float:right; _margin-top:0px;">
-            <img alt="Synapse logo"
-                 src="images/synapse-logo-web2.png" width="197"
-                 height="82"/>
-        </div>
-        <div>
-            <h1>
-                Apache Synapse ESB - Extending...
-            </h1>
-        </div>
-        <h2>
-            Writing custom Mediator implementations
-        </h2>
-        <p>
-            The primary interface of the Synapse API is the MessageContext interface
-            defined below. This essentially defines the per-message context passed
-            through the chain of mediators, for each and every message received and
-            processed by Synapse. Each message instance is wrapped within a
-            MessageContext instance, and the message context is set with the
-            references to the SynapseConfiguration and SynapseEnvironment objects. The
-            <a href="apidocs/org/apache/synapse/config/SynapseConfiguration.html">
-                SynapseConfiguration
-            </a>
-            object holds the global configuration model that defines
-            mediation rules, local registry entries and other and configuration, while
-            the
-            <a href="apidocs/org/apache/synapse/core/SynapseEnvironment.html">SynapseEnvironment</a>
-            object gives access to the underlying SOAP implementation used -
-            Axis2. A typical mediator would need to manipulate the MessageContext by
-            referring to the SynapseConfiguration. However it is strongly recommended
-            that the SynapseConfiguration is not updated by mediator instances as it
-            is shared by all messages, and may be updated by Synapse administration or
-            configuration modules. Mediator instances may store local message
-            properties into the MessageContext for later retrieval by successive
-            mediators.
-            <br/>
-        </p>
-        <h4>
-            <a
-                    href="http://svn.apache.org/viewvc/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/MessageContext.java?view=markup">
-                MessageContext
-                Interface
-            </a>
-        </h4>
-        <p/>
-        <pre xml:space="preserve">package org.apache.synapse;
-
-            import ...
-
-            public interface MessageContext {
-
-            /**
-            * Get a reference to the current SynapseConfiguration
-            *
-            * @return the current synapse configuration
-            */
-            public SynapseConfiguration getConfiguration();
-
-            /**
-            * Set or replace the Synapse Configuration instance to be used. May be used to
-            * programatically change the configuration at runtime etc.
-            *
-            * @param cfg The new synapse configuration instance
-            */
-            public void setConfiguration(SynapseConfiguration cfg);
-
-            /**
-            * Returns a reference to the host Synapse Environment
-            * @return the Synapse Environment
-            */
-            public SynapseEnvironment getEnvironment();
-
-            /**
-            * Sets the SynapseEnvironment reference to this context
-            * @param se the reference to the Synapse Environment
-            */
-            public void setEnvironment(SynapseEnvironment se);
-
-            /**
-            * Get the value of a custom (local) property set on the message instance
-            * @param key key to look up property
-            * @return value for the given key
-            */
-            public Object getProperty(String key);
-
-            /**
-            * Set a custom (local) property with the given name on the message instance
-            * @param key key to be used
-            * @param value value to be saved
-            */
-            public void setProperty(String key, Object value);
-
-            /**
-            * Returns the Set of keys over the properties on this message context
-            * @return a Set of keys over message properties
-            */
-            public Set getPropertyKeySet();
-
-            /**
-            * Get the SOAP envelope of this message
-            * @return the SOAP envelope of the message
-            */
-            public SOAPEnvelope getEnvelope();
-
-            /**
-            * Sets the given envelope as the current SOAPEnvelope for this message
-            * @param envelope the envelope to be set
-            * @throws org.apache.axis2.AxisFault on exception
-            */
-            public void setEnvelope(SOAPEnvelope envelope) throws AxisFault;
-
-            /**
-            * SOAP message related getters and setters
-            */
-            public ....get/set()...
-
-            }
-        </pre>
-        <p>
-            The MessageContext interface is based on the Axis2 MessageContext
-            interface, and uses the Axis2 EndpointReference and
-            SOAPEnvelope classes/interfaces. The purpose of this interface is to
-            capture a message as it flows through the system. As you will see the
-            message payload is represented using the SOAP infoset. Binary messages can
-            be embedded in the Envelope using MTOM or SwA attachments using the AXIOM
-            object model.
-        </p>
-        <h4>
-            <a
-                    href="http://svn.apache.org/viewvc/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/Mediator.java?view=markup">
-                Mediator
-                interface
-            </a>
-        </h4>
-        <p>
-            The second key interface for mediator writers is the Mediator interface:
-        </p>
-        <pre xml:space="preserve">package org.apache.synapse;
-
-            import org.apache.synapse.MessageContext;
-
-            /**
-            * All Synapse mediators must implement this Mediator interface. As a message passes
-            * through the synapse system, each mediator's mediate() method is invoked in the
-            * sequence/order defined in the SynapseConfiguration.
-            */
-            public interface<span style="font-weight: bold;">Mediator</span>{
-
-            /**
-            * Invokes the mediator passing the current message for mediation. Each
-            * mediator performs its mediation action, and returns true if mediation
-            * should continue, or false if further mediation should be aborted.
-            *
-            * @param synCtx the current message for mediation
-            * @return true if further mediation should continue
-            */
-            public boolean mediate(MessageContext synCtx);
-
-            /**
-            * This is used for debugging purposes and exposes the type of the current
-            * mediator for logging and debugging purposes
-            * @return a String representation of the mediator type
-            */
-            public String getType();
-            }
-        </pre>
-        <p>
-            A mediator can read and/or modify the message encapsulated in the MessageContext in
-            any suitable manner - adjusting the routing headers or changing the
-            message body. If the mediate() method returns false, it signals to the
-            Synapse processing model to stop further processing of the message. For
-            example, if the mediator is a security agent it may decide that this
-            message is dangerous and should not be processed further. This is
-            generally the exception as mediators are usually designed to co-operate to
-            process the message onwards.
-        </p>
-        <h3>
-            Leaf and Node Mediators, List mediators and Filter mediators
-        </h3>
-        <p>
-            Mediators may be Node mediators (i.e. these that can contain child
-            mediators) or Leaf mediators (mediators that does not hold any other child
-            mediators). A Node mediator must implement the
-            org.apache.synapse.mediators.ListMediator interface listed below, or extend from
-            the org.apache.synapse.mediators.AbstractListMediator.
-        </p>
-        <h4>
-            <a
-                    href="http://svn.apache.org/viewvc/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/mediators/ListMediator.java?view=markup">
-                The
-                ListMediator interface
-            </a>
-        </h4>
-        <pre xml:space="preserve">package org.apache.synapse.mediators;
-
-            import java.util.List;
-
-            /**
-            * The List mediator executes a given sequence/list of child mediators
-            */
-            public interface ListMediator extends Mediator {
-            /**
-            * Appends the specified mediator to the end of this mediator's (children) list
-            * @param m the mediator to be added
-            * @return true (as per the general contract of the Collection.add method)
-            */
-            public boolean addChild(Mediator m);
-
-            /**
-            * Appends all of the mediators in the specified collection to the end of this mediator's
-            (children)
-            * list, in the order that they are returned by the specified collection's iterator
-            * @param c the list of mediators to be added
-            * @return true if this list changed as a result of the call
-            */
-            public boolean addAll(List c);
-
-            /**
-            * Returns the mediator at the specified position
-            * @param pos index of mediator to return
-            * @return the mediator at the specified position in this list
-            */
-            public Mediator getChild(int pos);
-
-            /**
-            * Removes the first occurrence in this list of the specified mediator
-            * @param m mediator to be removed from this list, if present
-            * @return true if this list contained the specified mediator
-            */
-            public boolean removeChild(Mediator m);
-
-            /**
-            * Removes the mediator at the specified position in this list
-            * @param pos the index of the mediator to remove
-            * @return the mediator previously at the specified position
-            */
-            public Mediator removeChild(int pos);
-
-            /**
-            * Return the list of mediators of this List mediator instance
-            * @return the child/sub mediator list
-            */
-            public List getList();
-            }
-        </pre>
-        <p>
-            A ListMediator implementation should call super.mediate(synCtx) to process
-            its sub mediator sequence. A FilterMediator is a ListMediator which
-            executes its sequence of sub mediators on successful outcome of a test
-            condition. The Mediator instance which performs filtering should implement
-            the FilterMediator interface.
-        </p>
-        <h4>
-            <a
-                    href="http://svn.apache.org/viewvc/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/mediators/FilterMediator.java?view=markup">
-                FilterMediator
-                interface
-            </a>
-        </h4>
-        <pre xml:space="preserve">package org.apache.synapse.mediators;
-
-            import org.apache.synapse.MessageContext;
-
-            /**
-            * The filter mediator is a list mediator, which executes the given (sub) list of
-            mediators
-            * if the specified condition is satisfied
-            *
-            * @see FilterMediator#test(org.apache.synapse.MessageContext)
-            */
-            public interface<span style="font-weight: bold;">FilterMediator</span>extends
-            ListMediator {
-
-            /**
-            * Should return true if the sub/child mediators should execute. i.e. if the filter
-            * condition is satisfied
-            * @param synCtx
-            * @return true if the configured filter condition evaluates to true
-            */
-            public boolean test(MessageContext synCtx);
-            }
-        </pre>
-        <h2>
-            Writing custom Configuration implementations for mediators
-        </h2>
-        <p>
-            You may write your own custom configurator for the Mediator implementation
-            you write without relying on the Class mediator or Spring extension for
-            its initialization. You could thus write a MediatorFactory implementation
-            which defines how to digest a custom XML configuration element to be used
-            to create and configure the custom mediator instance. A MediatorSerializer
-            implementation defines how a configuration should be serialized back into
-            an XML configuration. The custom MediatorFactory &amp; MediatorSerializer
-            implementations and the mediator class/es must be bundled in a JAR file
-            conforming to the J2SE Service Provider model (See the description for
-            Extensions below for more details and examples) and placed into the
-            SYNAPSE_HOME/lib folder, so that the Synapse runtime could find and load
-            the definition. Essentially this means that a custom JAR file must bundle
-            your class implementing the Mediator interface, and the MediatorFactory
-            implementation class and contain two text files named
-            "org.apache.synapse.config.xml.MediatorFactory" and
-            "org.apache.synapse.config.xml.MediatorSerializer" which will contain the
-            fully qualified name(s) of your MediatorFactory and MediatorSerializer
-            implementation classes. You should also place any dependency JARs into the
-            same lib folder so that the correct classpath references could be made.
-            The MediatorFactory interface listing is given below, which you should
-            implement, and its getTagQName() method must define the fully qualified
-            element of interest for custom configuration. The Synapse initialization
-            will call back to this MediatorFactory instance through the
-            createMediator(OMElement elem) method passing in this XML element, so that
-            an instance of the mediator could be created utilizing the custom XML
-            specification and returned. See the ValidateMediator and the
-            ValidateMediatorFactory classes under modules/extensions in the Synapse
-            source distribution for examples.
-        </p>
-        <h4>
-            <a
-                    href="http://svn.apache.org/viewvc/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/MediatorFactory.java?view=markup">
-                The
-                MediatorFactory interface
-            </a>
-        </h4>
-        <pre xml:space="preserve">package org.apache.synapse.config.xml;
-
-            import ...
-
-            /**
-            * A mediator factory capable of creating an instance of a mediator through a given
-            * XML should implement this interface
-            */
-            public interface MediatorFactory {
-            /**
-            * Creates an instance of the mediator using the OMElement
-            * @param elem
-            * @return the created mediator
-            */
-            public Mediator createMediator(OMElement elem);
-
-            /**
-            * The QName of this mediator element in the XML config
-            * @return QName of the mediator element
-            */
-            public QName getTagQName();
-            }
-        </pre>
-        <p/>
-        <h4>
-            <a
-                    href="http://svn.apache.org/viewvc/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/MediatorSerializer.java?view=markup">
-                The
-                MediatorSerializer interface
-            </a>
-        </h4>
-        <pre xml:space="preserve">package org.apache.synapse.config.xml;
-
-            import ...
-
-            /**
-            * Interface which should be implemented by mediator serializers. Does the
-            * reverse of the MediatorFactory
-            */
-            public interface MediatorSerializer {
-
-            /**
-            * Return the XML representation of this mediator
-            * @param m mediator to be serialized
-            * @param parent the OMElement to which the serialization should be attached
-            * @return the serialized mediator XML
-            */
-            public OMElement serializeMediator(OMElement parent, Mediator m);
-
-            /**
-            * Return the class name of the mediator which can be serialized
-            * @return the class name
-            */
-            public String getMediatorClassName();
-            }
-        </pre>
-        <h2>
-            Configuring mediators
-        </h2>
-        <p>
-            Mediators could access the Synapse registry to load resources and
-            configure the local behaviour. Refer to the Spring mediator and Script
-            mediator implementations for examples on how this could be achieved.
-        </p>
-        <h4>
-            Loading of Extensions by the Synapse runtime
-        </h4>
-        <p>
-            Synapse loads available extensions from the runtime classpath using the<a
-                href="http://java.sun.com/j2se/1.3/docs/guide/jar/jar.html#Service%20Provider">J2SE
-            Service Provider model</a>. This essentially iterates over the
-            available JAR files, for a META-INF/services directory within each file,
-            and looks for a text file with the name
-            org.apache.synapse.config.xml.MediatorFactory which contains a list of
-            fully qualified classname that implement the above interface, listing each
-            class in a separate line. e.g. The built-in synapse-extensions.jar
-            contains the following structure
-        </p>
-        <pre xml:space="preserve">synapse-extensions.jar
-            /META-INF/services
-            org.apache.synapse.config.xml.MediatorFactory
-            org.apache.synapse.config.xml.MediatorSerializer
-            /... the implementation classes as usual...
-        </pre>
-        <h2 id="synObservers">
-            Writing Synapse Observers
-        </h2>
-        <p>
-            A Synapse observer is developed by either implementing the
-            org.apache.synapse.config.SynapseObserver interface or by extending the
-            org.apache.synapse.config.AbstractSynapseObserver class. A Synapse observer is notified
-            by the Synapse configuration when new elements are added to the configuration and
-            when existing elements are removed from the configuration. The following event
-            handlers are available to the Synapse observer implementations.
-        </p>
-        <pre xml:space="preserve">
-            public void sequenceAdded(Mediator sequence);
-            public void sequenceRemoved(Mediator sequence);
-            public void entryAdded(Entry entry);
-            public void entryRemoved(Entry entry);
-            public void endpointAdded(Endpoint endpoint);
-            public void endpointRemoved(Endpoint endpoint);
-            public void proxyServiceAdded(ProxyService proxy);
-            public void proxyServiceRemoved(ProxyService proxy);
-            public void startupAdded(Startup startup);
-            public void startupRemoved(Startup startup);
-            public void eventSourceAdded(SynapseEventSource eventSource);
-            public void eventSourceRemoved(SynapseEventSource eventSource);
-        </pre>
-        <p>
-            The AbstractSynapseObserver provides default implementations to all these
-            event handlers. It simply logs any received events.
-        </p>
-        <p>
-            In situations where the custom code has access to the SynapseConfiguration class
-            observers can be directly registered with the SynapseConfiguration by using the
-            registerObserver(SynapseObserver o) method. Otherwise SynapseObserver implementations
-            can be defined in the synapse.properties file which resides in the SYNAPSE_HOME/lib
-            directory. The following example shows how two observers are registered with the
-            Synapse configuration using the synapse.properties file.
-        </p>
-        <pre xml:space="preserve">synapse.observers=test.LoggingObserverImpl,
-            test.SimpleObserverImpl
-        </pre>
-
-        <h2 id="synXpathExtensions">
-            Synapse Xpath Extension Framework
-        </h2>
-        <p>
-            Synapse configuration language is a powerful and flexible tool to perform
-            authentication, validation, transformation, logging, routing based on the content etc.
-            It could be easily extended, with configuration extensions , mediation extensions and
-            even expression level extension. An expression is a lowest level particle in the
-            synapase configuration. To be precise , unlike static values ,expressions can be used to
-            define dynamically extracted values (using xpath) in a synapse configuration.
-            Mediators extensively uses expressions to extract properties from message context.
-            Expression is defined under attribute "expression" of a particular configuration. (see
-            property/header/iterator mediator ) .Although expressions can be purely xpath , synapse
-            allows extended to define extended expressions as well. These special xpath expressions
-            can be two fold , that is ,
-        </p>
-        <pre xml:space="preserve">
-            1.xpath variable expressions
-            2.xpath function expressions
-        </pre>
-        <p>
-            Synapse allows us to access xpath variables with "$" . Currently there are several
-            predefined synapse xpath variables avaiable.
-        </p>
-        <pre xml:space="preserve">
-            Ie:- $body - message SOAP body
-            $header ? message SOAP header
-            $ctxt:SOME_PROPERTY ? a property belonging to synapse meessage context scope
-            $axis2:SOME_PROPERTY ? a property belonging to axis2 meessage context scope
-            $trp:SOME_TRANSPORT_HEADER ? a transport header
-        </pre>
-        <p>
-            Synapse get-property() is an example xpath function expressions. The get-property()
-            function allows any XPath expression used in a configuration to lookup information from
-            the current message context. Similar to above , It is possible to retrieve properties
-            previously set with the property mediator, and/or information from the Synapse or Axis2
-            message contexts or transport header using get-property().
-        </p>
-        <p>
-            see synapse documentation for more details on usage of these expressions.
-            Synapse Xpath extension framework allows users to further extend xpath expressions to
-            suite user requirement. More specifically it allows users to define custom xpath
-            expressions and custom xpath functions that is required in a specific usecase
-            configuration scenario. Let's see how we can do this. We start by writng our HELLO_WORLD
-            custom xpath variable and hello-world() custom xpath function.
-        </p>
-        <h4>
-            Implementing HELLO_WORLD custom xpath variable
-        </h4>
-        <p>
-            Before going into implementation details , let me first define our final objective here.
-            What we need to do is to expose an HELLO_WORLD message in xml format to outside , so
-            that users would be able to access it using a xpath expression="$HELLOWORLD/...".
-            Following is the HELLO_WORLD mesasge we have.
-        </p>
-        <pre xml:space="preserve">
-            &lt;HELLO_WORLD&gt;
-            &lt;name&gt;Synapse&lt;/name&gt;
-            &lt;version&gt;2.0.0&lt;/version&gt;
-            &lt;release_date&gt;20/12/2010&lt;/release_date&gt;
-            &lt;/HELLO_WORLD&gt;
-        </pre>
-        <p>Every custom synapse xpath extension should implement
-            org.apache.synapse.util.xpath.ext.SynapseXpathVariableResolver interface to expose a
-            custom xpath variable. This interface consists of two methods , #getResolvingQName ,
-            #resolve . First interface method is used to indicate Synapse the fully qualified
-            variable name that this extesion support (in our case it is HELLO_WORLD). Later method
-            should contain what ever resolving logic required to give the desired output.(in our
-            case it should return HELLO_WORLD element) . Following is the implementation of our
-            custom xpath variable HELLO_WORLD,
-        </p>
-        <pre xml:space="preserve">
-            package org.sample;
-
-            import org.apache.axiom.om.OMAbstractFactory;
-            import org.apache.axiom.om.OMElement;
-            import org.apache.axiom.om.OMFactory;
-            import org.apache.synapse.MessageContext;
-            import org.apache.synapse.util.xpath.ext.SynapseXpathVariableResolver;
-
-            import javax.xml.namespace.QName;
-
-            public class HelloWorldXpathVariableResolver implements SynapseXpathVariableResolver {
-
-            public static final QName HELLO_WORLD = new QName("HELLO_WORLD");
-
-            public Object resolve(MessageContext messageContext) {
-                //create Hello world message
-                OMFactory factory = OMAbstractFactory.getOMFactory();
-                OMElement helloWorldElement = factory.createOMElement(HELLO_WORLD);
-
-                OMElement nameElement = factory.createOMElement(new QName("name"));
-                nameElement.setText("synapse");
-                OMElement versionElem = factory.createOMElement(new QName("version"));
-                versionElem.setText("3.1.0");
-                OMElement releaseDateElem = factory.createOMElement(new QName("release_date"));
-                releaseDateElem.setText("12/12/2010");
-
-                helloWorldElement.addChild(nameElement);
-                helloWorldElement.addChild(versionElem);
-                helloWorldElement.addChild(releaseDateElem);
-
-                return helloWorldElement;
-            }
-
-            public QName getResolvingQName() {
-                //to support xpath expression="$HELLO_WORLD"
-                return HELLO_WORLD;
-            }
-
-            }
-        </pre>
-        <p>
-            with implementation in place mediators can refer version , name , release date on
-            HELLO_WORLD message using expression="$HELLO_WORLD/version" , etc
-        </p>
-        <h4>
-            Implementing hello-world() custom xpath function
-        </h4>
-        <p>
-            Having an xpath function extension is easy as implementing an xpath variable extension.
-            In this case Extension class should implement
-            org.apache.synapse.util.xpath.ext.SynapseXpathFunctionContextProvider . This interface
-            also do have methods , #getResolvingQName and #getInitializedExtFunction . First method
-            serves the same purpose as in the previous example. However later method should be
-            implementated in such a way that this extension should return a custom jaxen function to
-            synapse , initialized with synapse message context. It is extension developers
-            responsibility to provide a properly initialized xpath function so that it can be
-            resolved at runtime. Our sample implementation is shown below
-        </p>
-        <pre xml:space="preserve">
-            package org.sample;
-
-            import org.apache.synapse.MessageContext;
-            import org.apache.synapse.util.xpath.ext.SynapseXpathFunctionContextProvider;
-            import org.jaxen.Function;
-            import javax.xml.namespace.QName;
-
-            public class HelloWorldXpathFunctionProvider implements SynapseXpathFunctionContextProvider {
-
-            public Function getInitializedExtFunction(MessageContext messageContext) {
-                CustomHelloWorldFunction helloWorldFunction = new CustomHelloWorldFunction(messageContext);
-                return helloWorldFunction;
-            }
-
-            public QName getResolvingQName() {
-                //letting know synapse new hello-world extension function
-                return new QName("hello-world");
-            }
-            }
-
-        </pre>
-        <p>
-            Shown bellow is the custom xpath function returned by our xpath function extension. Note
-            that this should implement org.jaxen.Function to resolve xpath .
-        </p>
-        <pre xml:space="preserve">
-            package org.sample;
-
-            import org.apache.axiom.om.OMAbstractFactory;
-            import org.apache.axiom.om.OMElement;
-            import org.apache.axiom.om.OMFactory;
-            import org.apache.commons.logging.Log;
-            import org.apache.commons.logging.LogFactory;
-            import org.apache.synapse.MessageContext;
-            import org.apache.synapse.SynapseConstants;
-            import org.jaxen.Context;
-            import org.jaxen.Function;
-            import org.jaxen.FunctionCallException;
-            import org.jaxen.function.StringFunction;
-
-            import javax.xml.namespace.QName;
-            import java.util.List;
-
-
-            public class CustomHelloWorldFunction implements Function {
-            private MessageContext synCtx;
-
-            private Log log = LogFactory.getLog(CustomHelloWorldFunction.class);
-            private static final Log trace = LogFactory.getLog(SynapseConstants.TRACE_LOGGER);
-
-            private String NULL_STRING = "";
-            public static final QName HELLO_WORLD = new QName("HELLO_WORLD");
-            private OMElement helloWorld;
-
-            public CustomHelloWorldFunction(MessageContext ctxt) {
-                this.synCtx = ctxt;
-                //create hello world message
-                OMFactory factory = OMAbstractFactory.getOMFactory();
-                OMElement helloWorldElement = factory.createOMElement(HELLO_WORLD);
-
-                OMElement nameElement = factory.createOMElement(new QName("name"));
-                nameElement.setText("synapse");
-                OMElement versionElem = factory.createOMElement(new QName("version"));
-                versionElem.setText("3.1.0");
-                OMElement releaseDateElem = factory.createOMElement(new QName("release_date"));
-                releaseDateElem.setText("12/12/2010");
-
-                helloWorldElement.addChild(nameElement);
-                helloWorldElement.addChild(versionElem);
-                helloWorldElement.addChild(releaseDateElem);
-                this.helloWorld = helloWorldElement;
-            }
-
-            /**
-            * Returns the string value of the hello world message for the corresponding child
-            proeprty
-            * arguments are hello-world(name | version | release_date)
-            *
-            * @param context the context at the point in the expression when the function is called
-            * @param args arguments of the functions
-            * @return The string value of the property
-            * @throws org.jaxen.FunctionCallException
-            *
-            */
-            public Object call(Context context, List args) throws FunctionCallException {
-
-                if (synCtx == null) {
-                    if (log.isDebugEnabled()) {
-                    log.debug("Synapse message context has not been set for the " +
-                    "XPath extension function 'synapse:hello-world(arg_name)'");
-                    }
-                    return null;
-                }
-
-                boolean traceOn = synCtx.getTracingState() == SynapseConstants.TRACING_ON;
-                boolean traceOrDebugOn = traceOn || log.isDebugEnabled();
-
-                if (args == null || args.size() == 0) {
-                    if (traceOrDebugOn) {
-                        traceOrDebug(traceOn, "argument key value for lookup is not specified");
-                    }
-                    return NULL_STRING;
-                } else
-                {
-                    int size = args.size();
-                    if (size == 1) {
-                        String argument = StringFunction.evaluate(args.get(0), context.getNavigator());
-                    if ("name".equals(argument) || "version".equals(argument) ||
-                        "release_date".equals(argument)) {
-                         return helloWorld.getFirstChildWithName(new QName(argument));
-                    }else{
-                        return helloWorld;
-                    }
-                }
-                }
-                return NULL_STRING;
-            }
-
-            private void traceOrDebug(boolean traceOn, String msg) {
-                if (traceOn) {
-                    trace.info(msg);
-                }
-                if (log.isDebugEnabled()) {
-                    log.debug(msg);
-                }
-            }
-
-            }
-        </pre>
-        <p>
-            Here we basically select an child element or the whole Hello World message based on the
-            aguments. Please refer to org.jaxen.Function for further details on the implementation.
-            With this extension in place synapse configuration can refer to a particular element of
-            our Hello World message with expression = "hello-world('name')" ,expression =
-            "hello-world('version')" , etc
-        </p>
-        <h4>
-            Registering Extensions
-        </h4>
-        <p>
-            We need one additional step to make all these extensions integrate into Synapse.
-            Registering extensions is done by declaring them in synapse.properties file.
-            synapse.properties can be found $SYNAPSE_HOME/repository/conf . Functions should be
-            declared under property synapse.xpath.func.extensions while Variables should be under
-            synapse.xpath.var.extensions .
-        </p>
-        <pre xml:space="preserve">
-            synapse.xpath.var.extensions=org.sample.HelloWorldXpathVariableResolver
-            synapse.xpath.func.extensions=org.sample. HelloWorldXpathFunctionProvider
-        </pre>
-        <p>
-            If multiple function / variable extesnions are needed comma delimited list can be
-            declared. Synapse at startup will register all these declared extensions (defined under
-            its CLASSPATH) and our HELLO-WORLD xpath extensions will be ready to roll.
-        </p>
-
-
-    </body>
-</document>
\ No newline at end of file
diff --git a/src/site/xdoc/Synapse_QuickStart.xml b/src/site/xdoc/Synapse_QuickStart.xml
deleted file mode 100644
index b92e9ab..0000000
--- a/src/site/xdoc/Synapse_QuickStart.xml
+++ /dev/null
@@ -1,559 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<document>
-    <properties>
-        <title>Apache Synapse - Quick Start Guide</title>
-    </properties>
-    <head>
-        <style type="text/css" xml:space="preserve">
-    .command {
-        border: 1px dashed #3c78b5;
-        text-align: left;
-        background-color: #f0f0f0;
-        padding: 3px;
-        font-size: 11px;
-        font-family: Courier;
-        margin: 10px;
-        line-height: 13px;
-    }
-    .consoleOutput {
-        border: 1px dashed #3c78b5;
-        font-size: 11px;
-        font-family: Courier;
-        margin: 10px;
-        line-height: 13px;
-        background-color: #f0f0f0;
-        border-bottom: 1px dashed #3c78b5;
-        padding: 3px;
-        border-style: solid;
-    }
-    .info {
-        border-style: solid;
-        border-width: 1px;
-        border-color: #090;
-        background-color: #dfd;
-        text-align:left;
-        margin-top: 5px;
-        margin-bottom: 5px;
-    }
-    li {
-        font-family: Verdana, arial, sans-serif;
-        font-size: 11px;
-        line-height: 16px;
-        color: #000000;
-        font-weight: normal;
-    }
-    p {
-        font-family: Verdana, arial, sans-serif;
-        font-size: 11px;
-        line-height: 16px;
-        color: #000000;
-        font-weight: normal;
-    }
-    pre {
-        padding: 0px;
-        margin-top: 5px;
-        margin-left: 15px;
-        margin-bottom: 5px;
-        margin-right: 5px;
-        text-align: left;
-        background-color: #f0f0f0;
-        padding: 3px;
-        border: 1px dashed #3c78b5;
-        font-size: 11px;
-        font-family: Courier;
-        margin: 10px;
-        line-height: 13px;
-    }
-    h1 {
-        font-size: 24px;
-        line-height: normal;
-        font-weight: bold;
-        background-color: #f0f0f0;
-        color: #003366;
-        border-bottom: 1px solid #3c78b5;
-        padding: 2px;
-        margin: 36px 0px 4px 0px;
-    }
-    h2 {
-        font-size: 18px;
-        line-height: normal;
-        font-weight: bold;
-        background-color: #f0f0f0;
-        border-bottom: 1px solid #3c78b5;
-        padding: 2px;
-        margin: 27px 0px 4px 0px;
-    }
-    h3 {
-        font-size: 14px;
-        line-height: normal;
-        font-weight: bold;
-        background-color: #f0f0f0;
-        padding: 2px;
-        margin: 21px 0px 4px 0px;
-    }
-    h4 {
-        font-size: 12px;
-        line-height: normal;
-        font-weight: bold;
-        background-color: #f0f0f0;
-        padding: 2px;
-        margin: 18px 0px 4px 0px;
-    }</style>
-    </head>
-  <body>
-    <div style="margin-top:-40px; float:right; _margin-top:0px;">
-      <img alt="Synapse logo"
-           src="images/synapse-logo-web2.png" width="197"
-           height="82"/>
-    </div>
-    <div>
-      <h1>
-        Apache Synapse ESB - Quick Start Guide
-      </h1>
-    </div>
-    <p>
-      This guide will demonstrate two sample applications covering the basic and
-      the most common usage scenarios of Synapse; which is Message mediation and
-      Service mediation (i.e. using Proxy services). You will be guided through
-      a step by step approach to get a feeling about Synapse from the absolute
-      beginning.
-    </p>
-    <h3>
-      Pre-requisites
-    </h3>
-    <p>
-      You should have following pre-requisites installed on your system to
-      follow through this guide
-    </p>
-    <ul>
-      <li>
-        A Java 2 SE - JDK or JRE of version 1.5.x or higher
-      </li>
-      <li>
-        Apache Ant <a href="http://ant.apache.org">http://ant.apache.org</a>
-      </li>
-    </ul>
-    <h2>
-      Message Mediation
-    </h2>
-    <p>
-      In this example Synapse will be used to simply log all the messages
-      passing through it. Although this simple scenario only performs logging,
-      it demonstrates the basics of message mediation, where the logging
-      functionality could be replaced with any combination of advanced
-      mediations such as transformations, content based routing as well as
-      bridging between different communication protocols etc. So, let's start
-      with the basics.
-    </p>
-    <h3>
-      Download
-    </h3>
-    <p>
-      Our first task is to download Synapse. Open a web browser and access the
-      following URL:
-      <a href="http://synapse.apache.org/download.html">http://synapse.apache.org/download.html</a>.
-      You will then see the list of available releases. Click on the latest version, and you
-      will be directed to the Synapse release download page. Now download the
-      'Standard binary distribution' ZIP or tar.gz archive compatible with your
-      operating system.
-    </p>
-    <h3>
-      Installation
-    </h3>
-    <p>
-      Synapse can be installed just by extracting the downloaded binary
-      archive.. A directory named synapse with the release number will be
-      created in the selected parent directory, containing all the files
-      required for Synapse. We will refer to this directory as &lt;synapse-home&gt;
-      from now on.
-    </p>
-    <h3>
-      Running the sample
-    </h3>
-    <p>
-      Synapse ships with a set of sample clients and services to demonstrate
-      some of its core capabilities. Hence, you will need to run three programs
-      to get an idea of message mediation. The destination server that hosts the
-      ultimate service to be invoked to service the client, the client itself,
-      and Synapse, which acts as the intermediary to bridge between the client
-      and the server.
-    </p>
-    <p/>
-    <h4>
-      Starting the sample Axis2 server
-    </h4>
-    <p>
-      In this case we are using a standalone Axis2 web services engine as the
-      server. You don't have to get it now, it is already bundled with your
-      Synapse distribution. But we have to deploy a sample service for which
-      client can send requests. Go to &lt;synapse-home&gt;/samples/axis2Server/src/SimpleStockQuoteService
-      directory. Run "ant" to build and deploy this service to the sample Axis2
-      server.
-    </p>
-    <p/>
-<pre xml:space="preserve">user@host:/opt/synapse-1.1.1/samples/axis2Server$ cd src/SimpleStockQuoteService/
-user@host:/opt/synapse-1.1.1/samples/axis2Server/src/SimpleStockQuoteService$ ant
-Buildfile: build.xml
-
-clean:
-
-init:
-    [mkdir] Created dir: /opt/synapse-1.1.1/samples/axis2Server/src/SimpleStockQuoteService/temp
-    [mkdir] Created dir: /opt/synapse-1.1.1/samples/axis2Server/src/SimpleStockQuoteService/temp/classes
-    [mkdir] Created dir: /opt/synapse-1.1.1/samples/axis2Server/repository/services
-
-compile-all:
-    [javac] Compiling 9 source files to /opt/synapse-1.1.1/samples/axis2Server/src/SimpleStockQuoteService/temp/classes
-
-build-service:
-    [mkdir] Created dir: /opt/synapse-1.1.1/samples/axis2Server/src/SimpleStockQuoteService/temp/SimpleStockQuote
-    [mkdir] Created dir: /opt/synapse-1.1.1/samples/axis2Server/src/SimpleStockQuoteService/temp/SimpleStockQuote/META-INF
-     [copy] Copying 1 file to /opt/synapse-1.1.1/samples/axis2Server/src/SimpleStockQuoteService/temp/SimpleStockQuote/META-INF
-     [copy] Copying 1 file to /opt/synapse-1.1.1/samples/axis2Server/src/SimpleStockQuoteService/temp/SimpleStockQuote/META-INF
-     [copy] Copying 9 files to /opt/synapse-1.1.1/samples/axis2Server/src/SimpleStockQuoteService/temp/SimpleStockQuote
-      [jar] Building jar: /opt/synapse-1.1.1/samples/axis2Server/repository/services/SimpleStockQuoteService.aar
-
-BUILD SUCCESSFUL
-Total time: 2 seconds
-user@host:/opt/synapse-1.1.1/samples/axis2Server/src/SimpleStockQuoteService$</pre>
-    <p>
-      Now go to &lt;synapse-home&gt;/samples/axis2Server directory and start the
-      server using the following command. This will start Axis2 server on port
-      9000 (http).
-    </p>
-    <div class="command">
-      <p>
-        Linux / Unix: . axis2server.sh
-      </p>
-      <p>
-        Windows: axis2server.bat
-      </p>
-    </div>
-    <p>
-      You will see the following messages on the console.
-    </p>
-<pre xml:space="preserve">user@host:/opt/synapse-1.1.1/samples/axis2Server$ ./axis2server.sh
- Using Bouncy castle JAR for Java 1.5
- Using JAVA_HOME:   /opt/jdk1.5_06
- Using AXIS2 Repository :   /opt/synapse-1.1.1/samples/axis2Server/repository
- Using AXIS2 Configuration :   /opt/synapse-1.1.1/samples/axis2Server/repository/conf/axis2.xml
-2007-11-05 14:36:41,462 [-] [main]  INFO SimpleHTTPServer [SimpleAxisServer] Starting
-[SimpleAxisServer] Using the Axis2 Repository : /opt/synapse-1.1.1/samples/axis2Server/repository
-[SimpleAxisServer] Using the Axis2 Configuration File : /opt/synapse-1.1.1/samples/axis2Server/repository/conf/axis2.xml
-2007-11-05 14:36:43,864 [-] [main]  INFO HttpCoreNIOSender HTTPS Sender starting
-2007-11-05 14:36:43,891 [-] [main]  INFO HttpCoreNIOSender HTTP Sender starting
-2007-11-05 14:36:44,288 [-] [main]  INFO HttpCoreNIOListener HTTPS Listener starting on port : 9002
-2007-11-05 14:36:44,298 [-] [main]  INFO HttpCoreNIOListener HTTP Listener starting on port : 9000
-2007-11-05 14:36:44,350 [-] [main]  INFO SimpleHTTPServer [SimpleAxisServer] Started</pre>
-    <p/>
-    <h4>
-      Starting Synapse
-    </h4>
-    <p>
-      Now it's time to start Synapse. In this scenario we are starting Synapse
-      using the sample configuration found in synapse_sample_0.xml (i.e. in
-      repository/conf/sample) and listed below. It is configured to log and pass
-      through, all the messages.
-    </p>
-<pre xml:space="preserve">&lt;definitions xmlns="http://ws.apache.org/ns/synapse"&gt;<br/>    &lt;log level="full"/&gt; <br/>    &lt;send/&gt;
-&lt;/definitions&gt; </pre>
-    <p/>
-    <p>
-      Go to &lt;synapse-home&gt;/bin directory and type the command given below.
-      Synapse will be started on port 8280 (http) and 8243 (https - under JDK
-      1.5)
-    </p>
-    <div class="command">
-      <p>
-        Linux / Unix: . synapse.sh -sample 0
-      </p>
-      <p>
-        Windows: synapse.bat -sample 0
-      </p>
-    </div>
-    <p/>
-    <p>
-      Following messages will be displayed on the console to indicate the
-      successfull startup of Synapse.
-    </p>
-<pre xml:space="preserve">user@host:/opt/synapse-1.1.1/bin$ ./synapse.sh -sample 0
- Using Bouncy castle JAR for Java 1.5
-Starting Synapse/Java ...
-Using SYNAPSE_HOME:    /opt/synapse-1.1.1
-Using JAVA_HOME:       /opt/jdk1.5_06
-Using SYNAPSE_XML:     -Dsynapse.xml=/opt/synapse-1.1.1/repository/conf/sample/synapse_sample_0.xml
-2007-11-05 14:58:55,029 [-] [main]  INFO ServerManager Using the Axis2 Repository /opt/synapse-1.1.1/repository
-2007-11-05 14:58:56,617 [-] [main]  INFO SynapseInitializationModule Initializing Synapse at : Mon Nov 05 14:58:56 LKT 2007
-2007-11-05 14:58:56,618 [127.0.1.1-asankha] [main]  INFO SynapseInitializationModule Loading mediator extensions...
-2007-11-05 14:58:56,619 [127.0.1.1-asankha] [main]  INFO SynapseInitializationModule Initializing the Synapse configuration ...
-2007-11-05 14:58:56,624 [127.0.1.1-asankha] [main]  INFO XMLConfigurationBuilder Generating the Synapse configuration model by parsing the XML configuration
-2007-11-05 14:58:56,717 [127.0.1.1-asankha] [main]  INFO SynapseConfigurationBuilder Loaded Synapse configuration from : /opt/synapse-1.1/repository/conf/sample/synapse_sample_0.xml
-2007-11-05 14:58:56,724 [127.0.1.1-asankha] [main]  INFO SynapseInitializationModule Deploying the Synapse service..
-2007-11-05 14:58:56,740 [127.0.1.1-asankha] [main]  INFO SynapseInitializationModule Initializing Sandesha 2...
-2007-11-05 14:58:56,801 [127.0.1.1-asankha] [main]  INFO SynapseInitializationModule Deploying Proxy services...
-2007-11-05 14:58:56,801 [127.0.1.1-asankha] [main]  INFO SynapseInitializationModule Synapse initialized successfully...!
-2007-11-05 14:58:56,886 [127.0.1.1-asankha] [main]  INFO HttpCoreNIOSender HTTPS Sender starting
-2007-11-05 14:58:56,887 [127.0.1.1-asankha] [main]  INFO HttpCoreNIOSender HTTP Sender starting
-2007-11-05 14:58:57,039 [127.0.1.1-asankha] [main]  INFO HttpCoreNIOListener HTTPS Listener starting on port : 8243
-2007-11-05 14:58:57,040 [127.0.1.1-asankha] [main]  INFO ServerManager Starting transport https on port 8243
-2007-11-05 14:58:57,041 [127.0.1.1-asankha] [main]  INFO HttpCoreNIOListener HTTP Listener starting on port : 8280
-2007-11-05 14:58:57,041 [127.0.1.1-asankha] [main]  INFO ServerManager Starting transport http on port 8280
-2007-11-05 14:58:57,085 [127.0.1.1-asankha] [main]  INFO ServerManager Starting transport vfs
-2007-11-05 14:58:57,086 [127.0.1.1-asankha] [main]  INFO ServerManager Ready for processing</pre>
-    <p/>
-    <h4>
-      Run the client
-    </h4>
-    <p>
-      Now the final step, running the client. Go to &lt;synapse-home&gt;/samples/axis2Client
-      directory and type the following command
-    </p>
-<pre xml:space="preserve">user@host:/opt/synapse-1.1.1/samples/axis2Client$ ant stockquote -Daddurl=http://localhost:9000/services/SimpleStockQuoteService -Dtrpurl=http://localhost:8280 -Dmode=quote -Dsymbol=IBM
-Buildfile: build.xml
-
-init:
-    [mkdir] Created dir: /opt/synapse-1.1.1/samples/axis2Client/target/classes
-
-compile:
-    [javac] Compiling 10 source files to /opt/synapse-1.1.1/samples/axis2Client/target/classes
-
-stockquote:
-     [java] Standard :: Stock price = $91.09641757880443
-
-BUILD SUCCESSFUL</pre>
-    <p/>
-    <p>
-      This sends a request for a stock quote for the symbol IBM and sets the
-      transport URL to Synapse (http://localhost:8280) and the WS-Addressing EPR
-      set that of the actual server
-      (http://localhost:9000/services/SimpleStockQuoteService). The actual wire
-      level http message sent by the client is as follows, and is sent over port
-      8280 to the Synapse instance on localhost.
-    </p>
-<pre xml:space="preserve">POST / HTTP/1.1
-Content-Type: text/xml; charset=UTF-8
-SOAPAction: "urn:getQuote"
-User-Agent: Axis2
-Host: 127.0.0.1
-Transfer-Encoding: chunked
-
-218
-&lt;?xml version='1.0' encoding='UTF-8'?&gt;
-   &lt;soapenv:Envelope xmlns:wsa="http://www.w3.org/2005/08/addressing" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"&gt;
-      &lt;soapenv:Header&gt;
-         &lt;wsa:To&gt;http://localhost:9000/services/SimpleStockQuoteService&lt;/wsa:To&gt;
-         &lt;wsa:MessageID&gt;urn:uuid:D538B21E30B32BB8291177589283717&lt;/wsa:MessageID&gt;
-         &lt;wsa:Action&gt;urn:getQuote&lt;/wsa:Action&gt;
-      &lt;/soapenv:Header&gt;
-      &lt;soapenv:Body&gt;
-         &lt;m0:getQuote xmlns:m0="http://services.samples/xsd"&gt;
-            &lt;m0:request&gt;
-               &lt;m0:symbol&gt;IBM&lt;/m0:symbol&gt;
-            &lt;/m0:request&gt;
-         &lt;/m0:getQuote&gt;
-      &lt;/soapenv:Body&gt;
-   &lt;/soapenv:Envelope&gt;0</pre>
-    <p/>
-    <p>
-      Now take a look at the console running Synapse. You will see that all the
-      details of the mediation are logged along with all the SOAP messages
-      passed through Synapse. If you execute Synapse in debug mode by editing
-      the lib/log4j.properties "log4j.category.org.apache.synapse" as "DEBUG"
-      instead of INFO, you will see more information as follows after a restart
-      and replay of the above scenario again.
-    </p>
-<pre xml:space="preserve">2007-11-05 15:03:51,082 [127.0.1.1-asankha] [I/O dispatcher 3]  INFO PipeImpl Using native OS Pipes for event-driven to stream IO bridging
-2007-11-05 15:03:51,206 [127.0.1.1-asankha] [HttpServerWorker-1] DEBUG SynapseMessageReceiver Synapse received a new message for message mediation...
-2007-11-05 15:03:51,206 [127.0.1.1-asankha] [HttpServerWorker-1] DEBUG SynapseMessageReceiver Received To: http://localhost:9000/services/SimpleStockQuoteService
-2007-11-05 15:03:51,206 [127.0.1.1-asankha] [HttpServerWorker-1] DEBUG SynapseMessageReceiver SOAPAction: urn:getQuote
-2007-11-05 15:03:51,206 [127.0.1.1-asankha] [HttpServerWorker-1] DEBUG SynapseMessageReceiver WSA-Action: urn:getQuote
-2007-11-05 15:03:51,206 [127.0.1.1-asankha] [HttpServerWorker-1] DEBUG Axis2SynapseEnvironment Injecting MessageContext
-2007-11-05 15:03:51,207 [127.0.1.1-asankha] [HttpServerWorker-1] DEBUG Axis2SynapseEnvironment Using Main Sequence for injected message
-2007-11-05 15:03:51,207 [127.0.1.1-asankha] [HttpServerWorker-1] DEBUG SequenceMediator Start : Sequence &lt;main&gt;
-2007-11-05 15:03:51,207 [127.0.1.1-asankha] [HttpServerWorker-1] DEBUG SequenceMediator Sequence &lt;SequenceMediator&gt; :: mediate()
-2007-11-05 15:03:51,207 [127.0.1.1-asankha] [HttpServerWorker-1] DEBUG LogMediator Start : Log mediator
-2007-11-05 15:03:51,231 [127.0.1.1-asankha] [HttpServerWorker-1]  INFO LogMediator To: http://localhost:9000/services/SimpleStockQuoteService, WSAction: urn:getQuote, SOAPAction: urn:getQuote, ReplyTo: http://www.w3.org/2005/08/addressing/anonymous, MessageID: urn:uuid:DB76240DF26CE9AF1D1194253430879, Direction: request, Envelope: &lt;?xml version='1.0' encoding='utf-8'?&gt;&lt;soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsa="http://www.w3.org/2005/08/addressing"&gt;&lt;soapenv:Header&gt;&lt;wsa:To&gt;http://localhost:9000/soap/SimpleStockQuoteService&lt;/wsa:To&gt;&lt;wsa:MessageID&gt;urn:uuid:DB76240DF26CE9AF1D1194253430879&lt;/wsa:MessageID&gt;&lt;wsa:Action&gt;urn:getQuote&lt;/wsa:Action&gt;&lt;/soapenv:Header&gt;&lt;soapenv:Body&gt;&lt;m0:getQuote xmlns:m0="http://services.samples/xsd"&gt;&lt;m0:request&gt;&lt;m0:symbol&gt;IBM&lt;/m0:symbol&gt;&lt;/m0:request&gt;&lt;/m0:getQuote&gt;&lt;/soapenv:Body&gt;&lt;/soapenv:Envelope&gt;
-2007-11-05 15:03:51,250 [127.0.1.1-asankha] [HttpServerWorker-1] DEBUG LogMediator End : Log mediator
-2007-11-05 15:03:51,250 [127.0.1.1-asankha] [HttpServerWorker-1] DEBUG SendMediator Start : Send mediator
-2007-11-05 15:03:51,250 [127.0.1.1-asankha] [HttpServerWorker-1] DEBUG SendMediator Sending request message using implicit message properties..
-Sending To: http://localhost:9000/services/SimpleStockQuoteService
-SOAPAction: urn:getQuote
-2007-11-05 15:03:51,254 [127.0.1.1-asankha] [HttpServerWorker-1] DEBUG Axis2FlexibleMEPClient Sending [add = false] [sec = false] [rm = false] [ to Address: http://localhost:9000/services/SimpleStockQuoteService]
-2007-11-05 15:03:51,302 [127.0.1.1-asankha] [HttpServerWorker-1]  INFO TimeoutHandler This engine will expire all callbacks after : 86400 seconds, irrespective of the timeout action, after the specified or optional timeout
-2007-11-05 15:03:51,356 [127.0.1.1-asankha] [HttpServerWorker-1] DEBUG SendMediator End : Send mediator
-2007-11-05 15:03:51,356 [127.0.1.1-asankha] [HttpServerWorker-1] DEBUG SequenceMediator End : Sequence &lt;main&gt;
-2007-11-05 15:03:51,398 [127.0.1.1-asankha] [HttpClientWorker-1] DEBUG SynapseCallbackReceiver Synapse received an asynchronous response message
-2007-11-05 15:03:51,400 [127.0.1.1-asankha] [HttpClientWorker-1] DEBUG SynapseCallbackReceiver Received To: null
-2007-11-05 15:03:51,400 [127.0.1.1-asankha] [HttpClientWorker-1] DEBUG SynapseCallbackReceiver SOAPAction: null
-2007-11-05 15:03:51,400 [127.0.1.1-asankha] [HttpClientWorker-1] DEBUG SynapseCallbackReceiver WSA-Action: null
-2007-11-05 15:03:51,402 [127.0.1.1-asankha] [HttpClientWorker-1] DEBUG SynapseCallbackReceiver Body :
-&lt;?xml version='1.0' encoding='utf-8'?&gt;&lt;soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"&gt;&lt;soapenv:Body&gt;&lt;ns:getQuoteResponse xmlns:ns="http://services.samples/xsd"&gt;&lt;ns:return type="samples.services.GetQuoteResponse"&gt;&lt;ns:change&gt;4.03627430702446&lt;/ns:change&gt;&lt;ns:earnings&gt;-9.467701672785129&lt;/ns:earnings&gt;&lt;ns:high&gt;191.83014686803938&lt;/ns:high&gt;&lt;ns:last&gt;185.42637586281398&lt;/ns:last&gt;&lt;ns:lastTradeTimestamp&gt;Mon Nov 05 15:03:51 LKT 2007&lt;/ns:lastTradeTimestamp&gt;&lt;ns:low&gt;193.2690208751758&lt;/ns:low&gt;&lt;ns:marketCap&gt;-1737393.107878862&lt;/ns:marketCap&gt;&lt;ns:name&gt;IBM Company&lt;/ns:name&gt;&lt;ns:open&gt;-183.2632780777984&lt;/ns:open&gt;&lt;ns:peRatio&gt;-17.430497030284027&lt;/ns:peRatio&gt;&lt;ns:percentageChange&gt;1.9749680728382655&lt;/ns:percentageChange&gt;&lt;ns:prevClose&gt;204.37162314344914&lt;/ns:prevClose&gt;&lt;ns:symbol&gt;IBM&lt;/ns:symbol&gt;&lt;ns:volume&gt;6695&lt;/ns:volume&gt;&lt;/ns:return&gt;&lt;/ns:getQuoteResponse&gt;&lt;/soapenv:Body&gt;&lt;/soapenv:Envelope&gt;
-2007-11-05 15:03:51,404 [127.0.1.1-asankha] [HttpClientWorker-1] DEBUG Axis2SynapseEnvironment Injecting MessageContext
-2007-11-05 15:03:51,404 [127.0.1.1-asankha] [HttpClientWorker-1] DEBUG Axis2SynapseEnvironment Using Main Sequence for injected message
-2007-11-05 15:03:51,404 [127.0.1.1-asankha] [HttpClientWorker-1] DEBUG SequenceMediator Start : Sequence &lt;main&gt;
-2007-11-05 15:03:51,404 [127.0.1.1-asankha] [HttpClientWorker-1] DEBUG SequenceMediator Sequence &lt;SequenceMediator&gt; :: mediate()
-2007-11-05 15:03:51,404 [127.0.1.1-asankha] [HttpClientWorker-1] DEBUG LogMediator Start : Log mediator
-2007-11-05 15:03:51,405 [127.0.1.1-asankha] [HttpClientWorker-1]  INFO LogMediator To: http://www.w3.org/2005/08/addressing/anonymous, MessageID: urn:uuid:A6510AF6BD288D8DFB1194253431259544001-942151716, Direction: response, Envelope: &lt;?xml version='1.0' encoding='utf-8'?&gt;&lt;soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"&gt;&lt;soapenv:Body&gt;&lt;ns:getQuoteResponse xmlns:ns="http://services.samples/xsd"&gt;&lt;ns:return type="samples.services.GetQuoteResponse"&gt;&lt;ns:change&gt;4.03627430702446&lt;/ns:change&gt;&lt;ns:earnings&gt;-9.467701672785129&lt;/ns:earnings&gt;&lt;ns:high&gt;191.83014686803938&lt;/ns:high&gt;&lt;ns:last&gt;185.42637586281398&lt;/ns:last&gt;&lt;ns:lastTradeTimestamp&gt;Mon Nov 05 15:03:51 LKT 2007&lt;/ns:lastTradeTimestamp&gt;&lt;ns:low&gt;193.2690208751758&lt;/ns:low&gt;&lt;ns:marketCap&gt;-1737393.107878862&lt;/ns:marketCap&gt;&lt;ns:name&gt;IBM Company&lt;/ns:name&gt;&lt;ns:open&gt;-183.2632780777984&lt;/ns:open&gt;&lt;ns:peRatio&gt;-17.430497030284027&lt;/ns:peRatio&gt;&lt;ns:percentageChange&gt;1.9749680728382655&lt;/ns:percentageChange&gt;&lt;ns:prevClose&gt;204.37162314344914&lt;/ns:prevClose&gt;&lt;ns:symbol&gt;IBM&lt;/ns:symbol&gt;&lt;ns:volume&gt;6695&lt;/ns:volume&gt;&lt;/ns:return&gt;&lt;/ns:getQuoteResponse&gt;&lt;/soapenv:Body&gt;&lt;/soapenv:Envelope&gt;
-2007-11-05 15:03:51,405 [127.0.1.1-asankha] [HttpClientWorker-1] DEBUG LogMediator End : Log mediator
-2007-11-05 15:03:51,405 [127.0.1.1-asankha] [HttpClientWorker-1] DEBUG SendMediator Start : Send mediator
-2007-11-05 15:03:51,405 [127.0.1.1-asankha] [HttpClientWorker-1] DEBUG SendMediator Sending response message using implicit message properties..
-Sending To: http://www.w3.org/2005/08/addressing/anonymous
-SOAPAction: null
-2007-11-05 15:03:51,408 [127.0.1.1-asankha] [HttpClientWorker-1] DEBUG SendMediator End : Send mediator
-2007-11-05 15:03:51,408 [127.0.1.1-asankha] [HttpClientWorker-1] DEBUG SequenceMediator End : Sequence &lt;main&gt;</pre>
-    <p>
-      You have successfully completed the first part of this guide. Now let's
-      look at the next scenario, proxy services.
-    </p>
-    <p/>
-    <h2>
-      Proxy Services
-    </h2>
-    <p>
-      As the name implies, a proxy service acts as a service hosted in Synapse,
-      and typically fronts an existing service endpoint. A proxy service can be
-      created and exposed on a different transport, schema, WSDL, or QoS (such
-      as WS-Security, WS-Reliable Messaging) aspect than the real service and
-      could mediate the messages before being delivered to the actual endpoint,
-      and the responses before they reach the client.
-    </p>
-    <p>
-      Clients can send requests for proxy services directly to Synapse, as the
-      client sees as if they are hosted on it, and for example can perform ?wsdl
-      and view the WSDL of the virtual proxy service. But in the Synapse
-      configuration, such requests can be handled in anyway you like. Most
-      obvious thing would be to do some processing to the message and send it to
-      the actual service, probably running on a different computer. But it is
-      not necessary to always send the message to the actual service. You may
-      list any combination of tasks to be performed on the messages received for
-      the proxy service and terminate the flow or send some java back to the
-      client even without sending it to an actual service. Let's explore a
-      simple proxy services scenario step by step to get a better feeling. As
-      you have downloaded and installed Synapse in the previous section, now you
-      can start directly on the sample.
-    </p>
-    <p/>
-    <h3>
-      Running the sample
-    </h3>
-    <p>
-      As in the previous section, there should be three entities running to
-      demonstrate proxy services, the server, client and Synapse. Let's start
-      with the server.
-    </p>
-    <p/>
-    <h4>
-      Starting the sample Axis2 server
-    </h4>
-    <p>
-      As you have built and deployed the SimpleStockQuote service in the
-      previous section, you can simply start the server by switching to the &lt;synapse-home&gt;/samples/axis2Server
-      directory and running the following command.
-    </p>
-    <div class="command">
-      <p>
-        Linux / Unix: . axis2server.sh
-      </p>
-      <p>
-        Windows: axis2server.bat
-      </p>
-    </div>
-    <p>
-      You can see the console messages as in the previous section.
-    </p>
-    <h4>
-      Starting Synapse
-    </h4>
-    <p>
-      We have to start Synapse with a configuration containing a proxy service
-      definition. In this case we are using the synapse_sample_150.xml, so that
-      you don't have to write the configuration your self.
-    </p>
-<pre xml:space="preserve">&lt;definitions xmlns="http://ws.apache.org/ns/synapse"&gt;
-    &lt;proxy name="StockQuoteProxy"&gt;
-        &lt;target&gt;
-            &lt;endpoint&gt;
-                &lt;address uri="http://localhost:9000/services/SimpleStockQuoteService"/&gt;
-            &lt;/endpoint&gt;
-            &lt;outSequence&gt;
-                &lt;send/&gt;
-            &lt;/outSequence&gt;
-        &lt;/target&gt;
-        &lt;publishWSDL uri="file:repository/conf/sample/resources/proxy/sample_proxy_1.wsdl"/&gt;
-    &lt;/proxy&gt;
-&lt;/definitions&gt;</pre>
-    <p/>
-    <p>
-      The above configuration will expose a proxy service named StockQuoteProxy
-      and specifies an endpoint
-      (http://localhost:9000/services/SimpleStockQuoteService) as the target for the
-      proxy service. Therefore, messages coming to the proxy service will be
-      directed to the address http://localhost:9000/services/SimpleStockQuoteService
-      specified in the endpoint. There is also an out sequence for the proxy
-      service, which is applicable for response messages. In the out sequence,
-      we just send the messages back to the client. The publishWSDL tag
-      specifies an WSDL to be published for this proxy service. Let's start
-      Synapse with this sample configuration by running the below command from
-      the &lt;synapse-home&gt;/bin directory. It is possible to specify a
-      sequence of mediation for incoming messages instead of a target endpoint,
-      and many other possibilities and options are available to configure proxy
-      services. These are explained in the samples and configuration guides.
-    </p>
-    <p/>
-    <div class="command">
-      <p>
-        Linux / Unix: . synapse.sh -sample 150
-      </p>
-      <p>
-        Windows: synapse.bat -sample 150
-      </p>
-    </div>
-    <p/>
-    <p>
-      Synapse will display a set of messages as in the previous section
-      describing the steps of starting procedure. Before running the client, it
-      is time to observe another feature of proxy services. That is displaying
-      the published WSDL. Just open a web browser and point it to the address
-      http://localhost:8280/services/StockQuoteProxy?wsdl. You will see the
-      sample_proxy_1.wsdl specified in the configuration but containing the
-      correct EPR for the service over http/s.
-    </p>
-    <p/>
-    <h4>
-      Run the client
-    </h4>
-    <p>
-      Now it is time to see it in action. Go to the &lt;synapse-home&gt;/samples/axis2Clients
-      directory and type the following command:
-    </p>
-    <div class="command">
-      ant stockquote -Dtrpurl=http://localhost:8280/services/StockQuoteProxy
-      -Dmode=quote -Dsymbol=IBM
-    </div>
-    <p>
-      The above command sends a stockquote request directly to the provided
-      transport endpoint at: http://localhost:8280/services/StockQuoteProxy. You
-      will see the response from the server displayed on the console as follows:
-    </p>
-    <div class="consoleOutput">
-      Standard :: Stock price = $165.32687331383468
-    </div>
-    <p/>
-    <p>
-      This quick guide illustrates the simple use case of proxy services. Please
-      refer to samples #150 and above in the Samples guide, for in depth
-      coverage of more advanced use cases.
-    </p>
-    <p/>
-    <p>
-      Yes, you are done with a quick look at Synapse. Now it is time to go
-      deeper and reveal the advanced features of Synapse. You can browse through
-      the samples for your interested areas. If you have any issue regarding
-      Synapse as a user, feel free ask it in the Synapse user mailing list
-      (<a href="http://synapse.apache.org/mail-lists.html">http://synapse.apache.org/mail-lists.html</a>).
-    </p>
-    <p/>
-    <p/>
-    <p/>
-  </body>
-</document>
\ No newline at end of file
diff --git a/src/site/xdoc/Synapse_Samples.xml b/src/site/xdoc/Synapse_Samples.xml
deleted file mode 100644
index c7641fb..0000000
--- a/src/site/xdoc/Synapse_Samples.xml
+++ /dev/null
@@ -1,6422 +0,0 @@
-<?xml version="1.0"?>
-<document>
-<properties>
-<title>Apache Synapse - Samples Guide</title></properties>
-<head>
-<style type="text/css" xml:space="preserve">    .command {
-        border: 1px dashed #3c78b5;
-        text-align: left;
-        background-color: #f0f0f0;
-        padding: 3px;
-        font-size: 11px;
-        font-family: Courier;
-        margin: 10px;
-        line-height: 13px;
-    }
-    .consoleOutput {
-        border: 1px dashed #3c78b5;
-        font-size: 11px;
-        font-family: Courier;
-        margin: 10px;
-        line-height: 13px;
-        background-color: #f0f0f0;
-        border-bottom: 1px dashed #3c78b5;
-        padding: 3px;
-        border-style: solid;
-    }
-    .info {
-        border-style: solid;
-        border-width: 1px;
-        border-color: #090;
-        background-color: #dfd;
-        text-align:left;
-        margin-top: 5px;
-        margin-bottom: 5px;
-    }
-    li {
-        font-family: Verdana, arial, sans-serif;
-        font-size: 11px;
-        line-height: 16px;
-        color: #000000;
-        font-weight: normal;
-    }
-    p {
-        font-family: Verdana, arial, sans-serif;
-        font-size: 11px;
-        line-height: 16px;
-        color: #000000;
-        font-weight: normal;
-    }
-    pre {
-        padding: 0px;
-        margin-top: 5px;
-        margin-left: 15px;
-        margin-bottom: 5px;
-        margin-right: 5px;
-        text-align: left;
-        background-color: #f0f0f0;
-        padding: 3px;
-        border: 1px dashed #3c78b5;
-        font-size: 11px;
-        font-family: Courier;
-        margin: 10px;
-        line-height: 13px;
-    }
-    h1 {
-        font-size: 24px;
-        line-height: normal;
-        font-weight: bold;
-        background-color: #f0f0f0;
-        color: #003366;
-        border-bottom: 1px solid #3c78b5;
-        padding: 2px;
-        margin: 36px 0px 4px 0px;
-    }
-    h2 {
-        font-size: 18px;
-        line-height: normal;
-        font-weight: bold;
-        background-color: #f0f0f0;
-        border-bottom: 1px solid #3c78b5;
-        padding: 2px;
-        margin: 27px 0px 4px 0px;
-    }
-    h3 {
-        font-size: 14px;
-        line-height: normal;
-        font-weight: bold;
-        background-color: #f0f0f0;
-        padding: 2px;
-        margin: 21px 0px 4px 0px;
-    }
-    h4 {
-        font-size: 12px;
-        line-height: normal;
-        font-weight: bold;
-        background-color: #f0f0f0;
-        padding: 2px;
-        margin: 18px 0px 4px 0px;
-    }</style></head>
-<body>
-<div style="margin-top:-40px; float:right; _margin-top:0px;"></div>
-<div>
-<h1>Apache Synapse ESB - Running the Samples </h1></div>
-<p>This guide will walk you through the built-in samples shipped with the product, which will cover most of the basic functional sceanrios and capabilities of Apache Synapse as an ESB. If you are unable to solve your problem by reading through and running these samples, feel free to raise your problem on the 
-<a href="http://synapse.apache.org/mail-lists.html">mailing lists</a>.</p>
-<h2>
-<a name="TOC" id="TOC">Contents</a></h2>
-<div class="section-content">
-<ul>
-<li>
-<a href="Synapse_Samples_Setup.html#Overview">Overview</a></li>
-<li>
-<a href="#MediationSamples">Message mediation samples</a>
-<ul>
-<li>
-<a href="#Sample0">Sample 0: Introduction to Synapse</a></li>
-<li>
-<a href="#Sample1">Sample 1: Simple content based routing (CBR) of messages</a></li>
-<li>
-<a href="#Sample2">Sample 2: CBR with the Switch-case mediator, using message properties</a></li>
-<li>
-<a href="#Sample3">Sample 3: Local Registry entry definitions, reusable endpoints and sequences</a></li>
-<li>
-<a href="#Sample4">Sample 4: Introduction to error handling</a></li>
-<li>
-<a href="#Sample5">Sample 5: Creating SOAP fault messages and changing the direction of a message</a></li>
-<li>
-<a href="#Sample6">Sample 6: Manipulating SOAP headers, and filtering incoming and outgoing messages</a></li>
-<li>
-<a href="#Sample7">Sample 7: Introduction to local Registry entries and using Schema validation</a></li>
-<li>
-<a href="#Sample8">Sample 8: Introduction to static and dynamic registry resources, and using XSLT transformations</a></li>
-<li>
-<a href="#Sample9">Sample 9: Introduction to dynamic sequences with the Registry</a></li>
-<li>
-<a href="#Sample10">Sample 10: Introduction to dynamic endpoints with the Registry</a></li>
-<li>
-<a href="#Sample11">Sample 11: A full registry based configuration, and sharing a configuration between multiple instances</a></li>
-<li>
-<a href="#Sample12">Sample 12: One way messaging / fireAndForget through Synapse</a></li>
-<li>
-<a href="#Sample13">Sample 13: Dual channel invocation through Synapse</a></li>
-<li>
-<a href="#Sample13">Sample 15: Message Enrichment through Synapse</a></li>
-<li>
-<a href="#Sample16">Sample 16: Introduction to dynamic and static keys</a></li>
-<li>
-<a href="#Sample17">Sample 17: Transforming / replacing message content with Payload-factory mediator</a></li>
-</ul></li>
-
-<li>
-<a href="#Endpoints">Advanced mediations with endpoints</a>
-<ul>
-<li>
-<a href="#Sample50">Sample 50: POX to SOAP conversion</a></li>
-<li>
-<a href="#Sample51">Sample 51: MTOM and SwA optimizations and request/response correlation</a></li>
-<li>
-<a href="#Sample52">Sample 52: Session less load balancing between 3 endpoints</a></li>
-<li>
-<a href="#Sample53">Sample 53: Failover sending among 3 endpoints</a></li>
-<li>
-<a href="#Sample54">Sample 54: Session affinity load balancing between 3 endpoints</a></li>
-<li>
-<a href="#Sample55">Sample 55: Session affinity load balancing between fail over endpoints</a></li>
-<li>
-<a href="#Sample56">Sample 56: WSDL endpoint</a></li>
-<li>
-<a href="#Sample57">Sample 57: Dynamic load balancing between 3 nodes</a></li>
-<li>
-<a href="#Sample58">Sample 58: Static load balancing between 3 nodes</a></li>
-<li>
-<a href="#Sample59">Sample 59: Weighted load balancing between 3 endpoints</a></li>
-<li>
-<a href="#Sample60">Sample 60: Service dynamic load balancing between 2 Service nodes</a></li>
-<li>
-<a href="#Sample60">Sample 61: Routing a message to a static list of recipients</a></li>
-<li>
-<a href="#Sample61">Sample 62: Routing a message to a dynamic list of recipients</a></li>
-<li>
-<a href="#Sample62">Sample 63: Routing a message to a dynamic list of recipients and aggregating the responses</a></li></ul></li>
-<li>
-<a href="#MessageMediationQoS">Quality of Service addition or deduction samples in message mediation</a>
-<ul>
-<li>
-<a href="#Sample100">Sample 100: Using WS-Security for outgoing messages</a></li>
-<li>
-<a href="#Sample101">Sample 101: Reliable message exchange between Synapse and the back-end server using WS-ReliableMessaging</a></li></ul></li>
-<li>
-<a href="#ProxyServices">Synapse Proxy service samples</a>
-<ul>
-<li>
-<a href="#Sample150">Sample 150: Introduction to proxy services</a></li>
-<li>
-<a href="#Sample151">Sample 151: Custom sequences and endpoints with proxy services</a></li>
-<li>
-<a href="#Sample152">Sample 152: Switching transports and message format from SOAP to REST/POX</a></li>
-<li>
-<a href="#Sample153">Sample 153: Routing the messages arrived to a proxy service without processing the security headers</a></li>
-<li>
-<a href="#Sample154">Sample 154: Load Balancing with Proxy Service </a></li>
-<li>
-<a href="#Sample155">Sample 155: Dual channel invocation on both client side and server side of Synapse with Proxy Services</a></li>
-<li>
-<a href="#Sample156">Sample 156: Service Integration with specifying the receiving sequence</a></li>
-<li>
-<a href="#Sample157">Sample 157:  Conditional Router for Routing Messages based on HTTP URL, HTTP Headers and Query Parameters</a></li>
-</ul></li>
-<li>
-<a href="#ProxyServiceQoS">QoS addition and deduction for service mediation (proxy) samples</a>
-<ul>
-<li>
-<a href="#Sample200">Sample 200: Using WS-Security with policy attachments for proxy services</a></li>
-<li>
-<a href="#Sample201">Sample 201: Reliable message exchange between the client and proxy services using WS-ReliableMessaging</a></li></ul></li>
-<li>
-<a href="#Transport">Transport samples and switching transports</a>
-<ul>
-<li>
-<a href="#Sample250">Sample 250: Introduction to switching transports - JMS to http/s</a></li>
-<li>
-<a href="#Sample251">Sample 251: Switching from http/s to JMS</a></li>
-<li>
-<a href="#Sample252">Sample 252: Pure text/binary and POX message support with JMS</a></li>
-<li>
-<a href="#Sample253">Sample 253: One way bridging from JMS to http and replying with a 202 Accepted response</a></li>
-<li>
-<a href="#Sample254">Sample 254: Using the file system as transport medium using VFS transport listener and sender</a></li>
-<li>
-<a href="#Sample255">Sample 255: Switching from ftp transport listener to mail transport sender</a></li>
-<li>
-<a href="#Sample256">Sample 256: Proxy services with the mail transport</a></li>
-<li>
-<a href="#Sample257">Sample 257: Proxy services with the FIX transport</a></li>
-<li>
-<a href="#Sample258">Sample 258: Switching from HTTP to FIX </a></li>
-<li>
-<a href="#Sample259">Sample 259: Switching from FIX to HTTP </a></li>
-<li>
-<a href="#Sample260">Sample 260: Switching from FIX to AMQP </a></li>
-<li>
-<a href="#Sample261">Sample 261: Switch between FIX versions </a></li>
-<li>
-<a href="#Sample262">Sample 262: CBR of FIX messages </a></li>
-<li>
-<a href="#Sample263">Sample 263: Transport switching - JMS to http/s using JBoss Messaging(JBM) </a></li>
-<li>
-<a href="#Sample264">Sample 264: Transport switching - HTTP/S to JMS two way messages</a></li>
-<li>
-<a href="#Sample265">Sample 265: Switching from TCP to HTTP/S</a></li>
-<li>
-<a href="#Sample266">Sample 266: Switching from UDP to HTTP/S</a></li>
-<li>
-<a href="#Sample268">Sample 268: Proxy services with the Local transport</a></li>
-</ul></li>
-<li>
-<a href="#Task">Introduction to Synapse tasks</a>
-<ul>
-<li>
-<a href="#Sample300">Sample 300: Introduction to tasks with simple trigger</a></li></ul></li>
-<li>
-<a href="#AdvancedMediation">Advanced mediations with advanced mediators</a>
-<ul>
-<li>
-<a href="#ScriptMediator">Using scripts in mediation (Script Mediator)</a>
-<ul>
-<li>
-<a href="#Sample350">Sample 350: Introduction to the script mediator using js scripts</a></li>
-<li>
-<a href="#Sample351">Sample 351: In-line script mediation with JavaScript</a></li>
-<li>
-<a href="#Sample352">Sample 352: Accessing Synapse message context API methods using scripting language</a></li>
-<li>
-<a href="#Sample353">Sample 353: Using Ruby scripts for mediation</a></li>
-<li>
-<a href="#Sample354">Sample 354: Using In-lined Ruby scripts for mediation</a></li></ul></li>
-<li>
-<a href="#DBMediators">Database interactions in mediation (DBLookup / DBReport)</a>
-<ul>
-<li>
-<a href="#Sample360">Sample 360: Introduction to dblookup mediator</a></li>
-<li>
-<a href="#Sample361">Sample 361: Introduction to dbreport mediator</a></li>
-<li>
-<a href="#Sample362">Sample 362: Action of dbreport and dblookup mediators together</a></li>
-<li>
-<a href="#Sample363">Sample 363: Reusable database connection pools</a></li>
-<li>
-<a href="#Sample364">Sample 364: Executing database Stored Procedures</a></li></ul></li>
-<li>
-<a href="#Throttle">Throttling messages (Throttle Mediator)</a>
-<ul>
-<li>
-<a href="#Sample370">Sample 370: Introduction to throttle mediator and concurrency throttling</a></li>
-<li>
-<a href="#Sample371">Sample 371: Restricting requests based on policies</a></li>
-<li>
-<a href="#Sample372">Sample 372: Use of both concurrency throttling and request rate based throttling </a></li></ul></li>
-<li>
-<a href="#Class">Extending the mediation in java (Class Mediator)</a>
-<ul>
-<li>
-<a href="#Sample380">Sample 380: Writing your own custom mediation in Java</a></li>
-<li>
-<a href="#Sample381">Sample 381: Class mediator to CBR binary messages</a></li></ul></li>
-<li>
-<a href="#XQuery">Evaluating XQuery for mediation (XQuery Mediator)</a>
-<ul>
-<li>
-<a href="#Sample390">Sample 390: Introduction to the XQuery mediator</a></li>
-<li>
-<a href="#Sample391">Sample 391: How to use the data from an external XML document with in XQuery </a></li></ul></li>
-<li>
-<a href="#Splitter">Splitting messages in to parts and process in parallel (Iterate / Clone)</a>
-<ul>
-<li>
-<a href="#Sample400">Sample 400: Message splitting and aggregating the responses</a></li></ul></li>
-<li>
-<a href="#Cache">Caching the responses over the requests</a>
-<ul>
-<li>
-<a href="#Sample420">Sample 420: Simple cache implemented on Synapse for the actual service</a></li></ul></li>
-<li>
-<a href="#Callout">Synchronized Web Service invocations with Callout mediator</a>
-<ul>
-<li>
-<a href="#Sample430">Sample 430: Simple Callout Mediator for synchronize web service invocation</a></li>
-<li>
-<a href="#Sample440">Sample 440: Exposing a SOAP service over JSON</a></li>
-<li>
-<a href="#Sample450">Sample 450: Introduction to the URL Rewrite mediator</a></li>
-<li>
-<a href="#Sample451">Sample 451: Conditional URL rewriting</a></li>
-<li>
-<a href="#Sample452">Sample 452: Conditional URL rewriting with multiple rules</a></li>
-<li>
-<a href="#Sample460">Sample 460: How to initialize and use a Spring Bean as a Mediator</a></li>
-</ul></li></ul></li>
-        <li>
-          <a href="#Task">Introduction to Eventing</a>
-          <ul>
-            <li>
-              <a href="#Sample500">Sample 500: Introduction to Eventing</a>
-            </li>
-            <li>
-              <a href="#Sample501">Sample 501: EventSource with static subscriptions</a>
-            </li>
-            <li>
-              <a href="#Sample502">Sample 502: Transform events before publish</a>
-            </li>
-          </ul>
-        </li>
-        <li>
-            <a href="#Misc">Miscellaneous Samples</a>
-            <ul>
-                <li>
-                    <a href="#Sample600">Sample 600: File hierarchy based configuration builder</a>
-                </li>
-                <li>
-                    <a href="#Sample601">Sample 601: Using Synapse Observers</a>
-                </li>
-                <li>
-                    <a href="#Sample650">Sample 650: Priority based Mediation</a>
-                </li>
-                <li>
-                    <a href="#Sample651">Sample 651: NHTTP Transport Priority based dispatching</a>
-                </li>
-                <li>
-                    <a href="#Sample652">Sample 652: Distributed transaction management</a>
-                </li>
-            </ul>
-        </li>
-         <li>
-            <a href="#StoreNFwd">Store and Forward Messaging patterns with Message Stores and Message Processors</a>
-            <ul>
-                <li>
-                    <a href="#Sample700">Sample 700: Introduction to Synapse Message Store </a>
-                </li>
-                <li>
-                    <a href="#Sample701">Sample 701: Introduction to Synapse Message Sampling Processor</a>
-                </li>
-                <li>
-                    <a href="#Sample702">Sample 702: Introduction to Synapse Message Forwarding Processor </a>
-                </li>
-            </ul>
-        </li>
-</ul></div>
-<h1>
-<a name="MediationSamples" id="MediationSamples">Message Mediation Samples</a> </h1>
-<h2>
-<a name="Sample0" id="Sample0">Sample 0: Introduction to Synapse</a></h2>
-<pre xml:space="preserve">&lt;definitions xmlns=&quot;http://ws.apache.org/ns/synapse&quot;&gt;
-    &lt;!-- log all attributes of messages passing through --&gt;
-    &lt;log level=&quot;full&quot;/&gt;
-
-    &lt;!-- Send the messageto implicit destination --&gt;
-    &lt;send/&gt;
-&lt;/definitions&gt;</pre>
-<p>
-<strong>Objective: Introduction to Synapse. Shows how a message could be made to pass through Synapse </strong>
-<strong>and logged before it is delivered to its ultimate receiver.</strong> </p>
-<p>The Stock quote client can operate in the following modes for this example. </p>
-<ol>
-<li>Smart Client mode </li>
-<pre xml:space="preserve">ant stockquote -Daddurl=http://localhost:9000/services/SimpleStockQuoteService -Dtrpurl=http://localhost:8280/ </pre>
-<li>Using Synapse as a HTTP Proxy </li>
-<pre xml:space="preserve">ant stockquote -Daddurl=http://localhost:9000/services/SimpleStockQuoteService -Dprxurl=http://localhost:8280/</pre>
-<li>Gateway Mode / Dumb Client </li>
-<p>See sample # 1 </p></ol>
-<p>
-<strong>Prerequisites:
-<br/> </strong>Start the Synapse configuration numbered 0: e.g. synapse -sample 0
-<br/> Start the Axis2 server and deploy the SimpleStockQuoteService if not already deployed </p>
-<p>
-<strong>Execute the Smart Client </strong> </p>
-<p>By tracing the execution of Synapse with the log output level set to DEBUG, you will see the client request arriving at Synapse with a WS-Addressing 'To' set to EPR http://localhost:9000/services/SimpleStockQuoteService. The Synapse engine logs the message at the &quot;full&quot; log level (i.e. all the message headers and the body) then sends the message to its implicit 'To' address which is http://localhost:9000/services/SimpleStockQuoteService. You will see a message in the Axis2 server console confirming that the message got routed to the sample server and the sample service hosted at the sample server generating a stock quote for the requested symbol. </p>
-<pre xml:space="preserve">Sat Nov 18 21:01:23 IST 2006 SimpleStockQuoteService :: Generating quote for : IBM</pre>
-<p>The response message generated by the service is again received by Synapse, and flows through the same mediation rules, which logs the response message and then sends it back. This time to the client. On the client console you should see an output similar to the following based on the message received by the client. </p>
-<pre xml:space="preserve">Standard :: Stock price = $95.26454380258552</pre>
-<p>
-<strong>Execute the Proxy Client </strong> </p>
-<p>You will see the exact same behaviour as per the previous example when you run this scenario. However this time the difference is at the client, as it sends the message to the WS-Addressing 'To' address http://localhost:9000/services/SimpleStockQuoteService, but the transport specifies Synapse as the HTTP proxy. </p>
-<h2>
-<a name="Sample1" id="Sample1">Sample 1: Simple content based routing (CBR) of messages</a></h2>
-<pre xml:space="preserve">&lt;definitions xmlns=&quot;http://ws.apache.org/ns/synapse&quot;&gt;
-    &lt;!-- filtering of messages with XPath and regex matches --&gt;
-    &lt;filter source=&quot;get-property('To')&quot; regex=&quot;.*/StockQuote.*&quot;&gt;
-        &lt;send&gt;
-            &lt;endpoint&gt;
-                &lt;address uri=&quot;http://localhost:9000/services/SimpleStockQuoteService&quot;/&gt;
-            &lt;/endpoint&gt;
-        &lt;/send&gt;
-        &lt;drop/&gt;
-    &lt;/filter&gt;
-    &lt;send/&gt;
-&lt;/definitions&gt; </pre>
-<p>
-<strong>Objective: Introduction to simple content based routing. Shows how a message could be made to pass through Synapse using the Dumb Client mode, where Synapse acts as a gateway to accept all messages and then perform mediation and routing based on message properties or content.</strong> </p>
-<p>
-<strong>Prerequisites:</strong>
-<br/>Start the Synapse configuration numbered 1: i.e. synapse -sample 1
-<br/>Start the Axis2 server and deploy the SimpleStockQuoteService if not already deployed</p>
-<p>Execute the Dumb Client as: </p>
-<pre xml:space="preserve">ant stockquote -Dtrpurl=http://localhost:8280/services/StockQuote</pre>
-
-<p>This time you will see Synapse receiving a message for which Synapse was set as the ultimate receiver
-of the message. Based on the 'To' EPR of http://localhost:8280/services/StockQuote, Synapse performs a
-match to the path '/StockQuote' and as the request matches the XPath expression of the filter mediator,
-the filter mediator's child mediators execute. This sends the message to a different endpoint as
-specified by the endpoint definition. The 'drop' mediator terminates further processing of the current
-message in a configuration. During response processing, the filter condition fails, and thus the 'send'
-mediator forwards the response back to the client using the implicit 'To' address. </p>
-    
-<h2>
-<a name="Sample2" id="Sample2">Sample 2: CBR with the Switch-case mediator, using message properties</a></h2>
-<pre xml:space="preserve">&lt;definitions xmlns=&quot;http://ws.apache.org/ns/synapse&quot;&gt;
-    &lt;switch source=&quot;//m0:getQuote/m0:request/m0:symbol&quot; xmlns:m0=&quot;http://services.samples&quot;&gt;
-        &lt;case regex=&quot;IBM&quot;&gt;
-            &lt;!-- the property mediator sets a local property on the *current* message --&gt;
-            &lt;property name=&quot;symbol&quot; value=&quot;Great stock - IBM&quot;/&gt;
-        &lt;/case&gt;
-        &lt;case regex=&quot;MSFT&quot;&gt;
-            &lt;property name=&quot;symbol&quot; value=&quot;Are you sure? - MSFT&quot;/&gt;
-        &lt;/case&gt;
-        &lt;default&gt;
-            &lt;!-- it is possible to assign the result of an XPath expression as well --&gt;
-            &lt;property name=&quot;symbol&quot;
-                  expression=&quot;fn:concat('Normal Stock - ', //m0:getQuote/m0:request/m0:symbol)&quot;
-                  xmlns:m0=&quot;http://services.samples&quot;/&gt;
-        &lt;/default&gt;
-    &lt;/switch&gt;
-
-    &lt;log level=&quot;custom&quot;&gt;
-        &lt;!-- the get-property() XPath extension function allows the lookup of local message properties
-            as well as properties from the Axis2 or Transport contexts (i.e. transport headers) --&gt;
-        &lt;property name=&quot;symbol&quot; expression=&quot;get-property('symbol')&quot;/&gt;
-        &lt;!-- the get-property() function supports the implicit message headers To/From/Action/FaultTo/ReplyTo --&gt;
-        &lt;property name=&quot;epr&quot; expression=&quot;get-property('To')&quot;/&gt;
-    &lt;/log&gt;
-
-    &lt;!-- Send the messages where they are destined to (i.e. the 'To' EPR of the message) --&gt;
-    &lt;send/&gt;
-&lt;/definitions&gt;</pre>
-<p>
-<strong>Objective: Introduce switch-case mediator and writing and reading of local properties set on a message instance</strong> </p>
-<p>
-<strong>Prerequisites:</strong>
-<br/> Start the Synapse configuration numbered 2: i.e. synapse -sample 2
-<br/> Start the Axis2 server and deploy the SimpleStockQuoteService if not already done. </p>
-<p>Execute the 'ant stockquote ..' request again in the smart client mode, specifying 'IBM', 'MSFT' and 'SUN' as the stock symbols. When the symbol IBM is requested, viewing the mediation logs you will see that the case statements' first case for 'IBM' is executed and a local property named 'symbol' was set to 'Great stock - IBM'. Subsequently this local property value is looked up by the log mediator and logged using the 'get-property()' XPath extension function. </p>
-<pre xml:space="preserve">ant stockquote -Daddurl=http://localhost:9000/services/SimpleStockQuoteService -Dtrpurl=http://localhost:8280/ -Dsymbol=IBM</pre>
-<pre xml:space="preserve">      INFO LogMediator - symbol = Great stock - IBM, epr = http://localhost:9000/axis2/services/SimpleStockQuoteService </pre>
-<pre>ant stockquote -Daddurl=http://localhost:9000/services/SimpleStockQuoteService -Dtrpurl=http://localhost:8280/ -Dsymbol=MSFT</pre>
-<pre xml:space="preserve">      INFO LogMediator - symbol = Are you sure? - MSFT, epr = http://localhost:9000/axis2/services/SimpleStockQuoteService</pre>
-<h2>
-<a name="Sample3" id="Sample3">Sample 3: Local Registry entry definitions, reusable endpoints and sequences</a></h2>
-<pre xml:space="preserve">&lt;definitions xmlns=&quot;http://ws.apache.org/ns/synapse&quot;&gt;
-    &lt;!-- define a string resource entry to the local registry --&gt;
-    &lt;localEntry key=&quot;version&quot;&gt;0.1&lt;/localEntry&gt;
-    &lt;!-- define a reuseable endpoint definition --&gt;
-    &lt;endpoint name=&quot;simple&quot;&gt;
-        &lt;address uri=&quot;http://localhost:9000/services/SimpleStockQuoteService&quot;/&gt;
-    &lt;/endpoint&gt;
-
-    &lt;!-- define a reusable sequence --&gt;
-    &lt;sequence name=&quot;stockquote&quot;&gt;
-        &lt;!-- log the message using the custom log level. illustrates custom properties for log --&gt;
-        &lt;log level=&quot;custom&quot;&gt;
-            &lt;property name=&quot;Text&quot; value=&quot;Sending quote request&quot;/&gt;
-            &lt;property name=&quot;version&quot; expression=&quot;get-property('version')&quot;/&gt;
-            &lt;property name=&quot;direction&quot; expression=&quot;get-property('direction')&quot;/&gt;
-        &lt;/log&gt;
-        &lt;!-- send message to real endpoint referenced by key &quot;simple&quot; endpoint definition --&gt;
-        &lt;send&gt;
-            &lt;endpoint key=&quot;simple&quot;/&gt;
-        &lt;/send&gt;
-    &lt;/sequence&gt;
-
-    &lt;sequence name=&quot;main&quot;&gt;
-        &lt;in&gt;
-            &lt;property name=&quot;direction&quot; value=&quot;incoming&quot;/&gt;
-            &lt;sequence key=&quot;stockquote&quot;/&gt;
-        &lt;/in&gt;
-        &lt;out&gt;
-            &lt;send/&gt;
-        &lt;/out&gt;
-    &lt;/sequence&gt;
-&lt;/definitions&gt;</pre>
-<p>
-<strong>Objective: Illustrates local registry entry definitions, reusable endpoints and sequences</strong> </p>
-<p>
-<strong>Prerequisites:</strong>
-<br/> Start the Synapse configuration numbered 3: i.e. synapse -sample 3
-<br/> Start the Axis2 server and deploy the SimpleStockQuoteService if not already done </p>
-<p>This example uses a sequence named as &quot;main&quot; that specifies the main mediation rules to be executed. This is equivalent to directly specifying the mediators of the main sequence within the &lt;definitions&gt; tags. This is the recommended and also a better approach for non-trivial configurations. Execute the 'ant stockquote ..' request again, and following through the mediation logs you will now notice that the sequence named &quot;main&quot; is executed. Then for the incoming message flow the &lt;in&gt; mediator executes, and it calls the sequence named &quot;stockquote&quot;. </p>
-<pre xml:space="preserve">ant stockquote -Daddurl=http://localhost:9000/services/SimpleStockQuoteService -Dtrpurl=http://localhost:8280/</pre>
-<pre xml:space="preserve">DEBUG SequenceMediator - Sequence mediator &lt;main&gt; :: mediate()
-<br/>DEBUG InMediator - In mediator mediate()
-<br/>DEBUG SequenceMediator - Sequence mediator &lt;stockquote&gt; :: mediate()</pre>
-<p>As the &quot;stockquote&quot; sequence executes, the log mediator dumps a simple text/string property, result of an XPath evaluation, that picks up the key named &quot;version&quot;, and a second result of an XPath evaluation that picks up a local message property set previously by the &lt;property&gt; mediator. The get-property() XPath extension function is able to read message properties local to the current message, local or remote registry entries, Axis2 message context properties as well as transport headers. The local entry definition for &quot;version&quot; defines a simple text/string registry entry for that which is visible to all messages that pass through Synapse. </p>
-<pre xml:space="preserve">[HttpServerWorker-1] INFO  LogMediator - Text = Sending quote request, version = 0.1, direction = incoming
-[HttpServerWorker-1] DEBUG SendMediator - Send mediator :: mediate()
-[HttpServerWorker-1] DEBUG AddressEndpoint - Sending To: http://localhost:9000/services/SimpleStockQuoteService </pre>
-<h2>
-<a name="Sample4" id="Sample4">Sample 4: Introduction to error handling</a></h2>
-<pre xml:space="preserve">&lt;definitions xmlns=&quot;http://ws.apache.org/ns/synapse&quot;&gt;
-
-    &lt;!-- the default fault handling sequence used by Synapse - named 'fault' --&gt;
-    &lt;sequence name=&quot;fault&quot;&gt;
-        &lt;log level=&quot;custom&quot;&gt;
-            &lt;property name=&quot;text&quot; value=&quot;An unexpected error occured&quot;/&gt;
-            &lt;property name=&quot;message&quot; expression=&quot;get-property('ERROR_MESSAGE')&quot;/&gt;
-        &lt;/log&gt;
-        &lt;drop/&gt;
-    &lt;/sequence&gt;
-
-    &lt;sequence name=&quot;sunErrorHandler&quot;&gt;
-        &lt;log level=&quot;custom&quot;&gt;
-            &lt;property name=&quot;text&quot; value=&quot;An unexpected error occured for stock SUN&quot;/&gt;
-            &lt;property name=&quot;message&quot; expression=&quot;get-property('ERROR_MESSAGE')&quot;/&gt;
-        &lt;/log&gt;
-        &lt;drop/&gt;
-    &lt;/sequence&gt;
-
-    &lt;!-- default message handling sequence used by Synapse - named 'main' --&gt;
-    &lt;sequence name=&quot;main&quot;&gt;
-        &lt;in&gt;
-            &lt;switch source=&quot;//m0:getQuote/m0:request/m0:symbol&quot; xmlns:m0=&quot;http://services.samples&quot;&gt;
-                &lt;case regex=&quot;IBM&quot;&gt;
-                    &lt;send&gt;
-                        &lt;endpoint&gt;
-                            &lt;address uri=&quot;http://localhost:9000/services/SimpleStockQuoteService&quot;/&gt;
-                        &lt;/endpoint&gt;
-                    &lt;/send&gt;
-                &lt;/case&gt;
-                &lt;case regex=&quot;MSFT&quot;&gt;
-                    &lt;send&gt;
-                        &lt;endpoint key=&quot;bogus&quot;/&gt;
-                    &lt;/send&gt;
-                &lt;/case&gt;
-                &lt;case regex=&quot;SUN&quot;&gt;
-                    &lt;sequence key=&quot;sunSequence&quot;/&gt;
-                &lt;/case&gt;
-            &lt;/switch&gt;
-            &lt;drop/&gt;
-        &lt;/in&gt;
-
-        &lt;out&gt;
-            &lt;send/&gt;
-        &lt;/out&gt;
-    &lt;/sequence&gt;
-
-    &lt;sequence name=&quot;sunSequence&quot; onError=&quot;sunErrorHandler&quot;&gt;
-        &lt;send&gt;
-            &lt;endpoint key=&quot;sunPort&quot;/&gt;
-        &lt;/send&gt;
-    &lt;/sequence&gt;
-
-&lt;/definitions&gt; </pre>
-<p>
-<strong>Objective: Introduction to error handling with the 'fault' sequence</strong> </p>
-<p>
-<strong>Prerequisites:</strong>
-<br/> Start the Synapse configuration numbered 4: i.e. synapse -sample 4
-<br/> Start the Axis2 server and deploy the SimpleStockQuoteService if not already done </p>
-<p>When the IBM stock quote is requested, the configuration routes it to the defined in-line endpoint, which routes the message to the SimpleStockQuoteService on the local Axis2 instance. Hence a valid response message is shown at the client. </p>
-<p>If you lookup a stock quote for 'MSFT', Synapse is instructed to route the message to the endpoint defined as the 'bogus' endpoint, which does not exist. Synapse executes the specified error handler sequence closest to the point where the error was encountered. In this case, the currently executing sequence is 'main' and it does not specify an 'onError' attribute. Whenever Synapse cannot find an error handler, it looks for a sequence named 'fault'. Thus the 'fault' sequence can be seen executing, and writing the generic error message to the logs. </p>
-<pre xml:space="preserve">ant stockquote -Daddurl=http://localhost:9000/services/SimpleStockQuoteService -Dtrpurl=http://localhost:8280/ -Dsymbol=MSFT</pre>
-<pre xml:space="preserve">[HttpServerWorker-1] DEBUG SendMediator - Send mediator :: mediate()
-[HttpServerWorker-1] ERROR IndirectEndpoint - Reference to non-existent endpoint for key : bogus
-[HttpServerWorker-1] DEBUG MediatorFaultHandler - MediatorFaultHandler :: handleFault
-[HttpServerWorker-1] DEBUG SequenceMediator - Sequence mediator &lt;fault&gt; :: mediate()
-[HttpServerWorker-1] DEBUG LogMediator - Log mediator :: mediate()
-[HttpServerWorker-1] INFO LogMediator text = An unexpected error occured, message = Couldn't find the endpoint with the key : bogus</pre>
-<p>When the 'SUN' quote is requested, a custom sequence 'sunSequence' is invoked, and it specifies 'sunErrorHandler' as its error handler. Hence when the send fails, you could see the proper error handler invocation and the custom error message printed as follows. </p>
-<pre xml:space="preserve">ant stockquote -Daddurl=http://localhost:9000/services/SimpleStockQuoteService -Dtrpurl=http://localhost:8280/ -Dsymbol=SUN</pre>
-<pre xml:space="preserve">[HttpServerWorker-1] DEBUG SequenceMediator - Sequence mediator &lt;sunSequence&gt; :: mediate()
-[HttpServerWorker-1] DEBUG SequenceMediator - Setting the onError handler for the sequence
-[HttpServerWorker-1] DEBUG AbstractListMediator - Implicit Sequence &lt;SequenceMediator&gt; :: mediate()
-[HttpServerWorker-1] DEBUG SendMediator - Send mediator :: mediate()
-[HttpServerWorker-1] ERROR IndirectEndpoint - Reference to non-existent endpoint for key : sunPort
-[HttpServerWorker-1] DEBUG MediatorFaultHandler - MediatorFaultHandler :: handleFault
-[HttpServerWorker-1] DEBUG SequenceMediator - Sequence mediator &lt;sunErrorHandler&gt; :: mediate()
-[HttpServerWorker-1] DEBUG AbstractListMediator - Implicit Sequence &lt;SequenceMediator&gt; :: mediate()
-[HttpServerWorker-1] DEBUG LogMediator - Log mediator :: mediate()
-[HttpServerWorker-1] INFO LogMediator text = An unexpected error occured for stock SUN, message = Couldn't find the endpoint with the key : sunPort</pre>
-<h2>
-<a name="Sample5" id="Sample5">Sample 5: Creating SOAP fault messages and changing the direction of a message</a></h2>
-<pre xml:space="preserve">&lt;definitions xmlns=&quot;http://ws.apache.org/ns/synapse&quot;&gt;
-
-    &lt;sequence name=&quot;myFaultHandler&quot;&gt;
-        &lt;makefault response=&quot;true&quot;&gt;
-            &lt;code value=&quot;tns:Receiver&quot; xmlns:tns=&quot;http://www.w3.org/2003/05/soap-envelope&quot;/&gt;
-            &lt;reason expression=&quot;get-property('ERROR_MESSAGE')&quot;/&gt;
-        &lt;/makefault&gt;
-        &lt;send/&gt;
-    &lt;/sequence&gt;
-
-    &lt;sequence name=&quot;main&quot; onError=&quot;myFaultHandler&quot;&gt;
-        &lt;in&gt;
-            &lt;switch source=&quot;//m0:getQuote/m0:request/m0:symbol&quot;
-                    xmlns:m0=&quot;http://services.samples/xsd&quot;&gt;
-                &lt;case regex=&quot;MSFT&quot;&gt;
-                    &lt;send&gt;
-                        &lt;endpoint&gt;&lt;address uri=&quot;http://bogus:9000/services/NonExistentStockQuoteService&quot;/&gt;&lt;/endpoint&gt;
-                    &lt;/send&gt;
-                &lt;/case&gt;
-                &lt;case regex=&quot;SUN&quot;&gt;
-                    &lt;send&gt;
-                        &lt;endpoint&gt;&lt;address uri=&quot;http://localhost:9009/services/NonExistentStockQuoteService&quot;/&gt;&lt;/endpoint&gt;
-                    &lt;/send&gt;
-                &lt;/case&gt;
-            &lt;/switch&gt;
-            &lt;drop/&gt;
-        &lt;/in&gt;
-
-        &lt;out&gt;
-            &lt;send/&gt;
-        &lt;/out&gt;
-    &lt;/sequence&gt;
-
-&lt;/definitions&gt;</pre>
-<p>
-<strong>Objective: Makefault mediator and sending back error responses </strong> </p>
-<p>
-<strong>Prerequisites:</strong>
-<br/> Start the Synapse configuration numbered 5: i.e. synapse -sample 5
-<br/> Start the Axis2 server and deploy the SimpleStockQuoteService if not already done </p>
-<p>When the MSFT stock quote is requested, an unknown host exception would be generated. A connection refused exception would be generated for the SUN stock request. This error message is captured and returned to the original client as a SOAP fault in this example. </p>
-<pre xml:space="preserve">ant stockquote -Daddurl=http://localhost:9000/services/SimpleStockQuoteService -Dtrpurl=http://localhost:8280/ -Dsymbol=MSFT</pre>
-<p>returns, </p>
-<pre xml:space="preserve">&lt;soapenv:Fault xmlns:soapenv=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot;&gt;&lt;faultcode&gt;soapenv:Client&lt;/faultcode&gt;
-    &lt;faultstring&gt;java.net.UnknownHostException: bogus&lt;/faultstring&gt;&lt;detail /&gt;&lt;/soapenv:Fault&gt;</pre>
-<p>And </p>
-<pre xml:space="preserve">ant stockquote -Daddurl=http://localhost:9000/services/SimpleStockQuoteService -Dtrpurl=http://localhost:8280/ -Dsymbol=SUN</pre>
-<p>returns, </p>
-<pre xml:space="preserve">&lt;soapenv:Fault xmlns:soapenv=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot;&gt;&lt;faultcode&gt;soapenv:Client&lt;/faultcode&gt;
-    &lt;faultstring&gt;java.net.ConnectException: Connection refused&lt;/faultstring&gt;&lt;detail /&gt;&lt;/soapenv:Fault&gt;</pre>
-<h2>
-<a name="Sample6" id="Sample6">Sample 6: Manipulating SOAP headers, and filtering incoming and outgoing messages</a></h2>
-<pre xml:space="preserve">&lt;definitions xmlns=&quot;http://ws.apache.org/ns/synapse&quot;&gt;
-    &lt;in&gt;
-        &lt;header name=&quot;To&quot; value=&quot;http://localhost:9000/services/SimpleStockQuoteService&quot;/&gt;
-    &lt;/in&gt;
-    &lt;send/&gt;
-&lt;/definitions&gt;</pre>
-<p>
-<strong>Objective: Introduction to header, in (out) mediators</strong> </p>
-<p>
-<strong>Prerequisites:</strong>
-<br/> Start the Synapse configuration numbered 6: i.e. synapse -sample 6
-<br/> Start the Axis2 server and deploy the SimpleStockQuoteService if not already done </p>
-<p>In this example we use the stockquote client in the dumb client mode, setting the 'To' EPR of the message to Synapse. Then the 'in' mediator processes the incoming messages, and manipulates the 'To' header to refer to the stock quote service on the sample Axis2 server. Thus it is now possible to request for a stock quote as follows. </p>
-<pre xml:space="preserve">ant stockquote -Dtrpurl=http://localhost:8280/</pre>
-<h2>
-<a name="Sample7" id="Sample7">Sample 7: Introduction to local Registry entries and using Schema validation</a></h2>
-<pre xml:space="preserve">&lt;definitions xmlns=&quot;http://ws.apache.org/ns/synapse&quot;&gt;
-
-    &lt;localEntry key=&quot;validate_schema&quot;&gt;
-        &lt;xs:schema xmlns:xs=&quot;http://www.w3.org/2001/XMLSchema&quot;
-                    xmlns=&quot;http://services.samples&quot; elementFormDefault=&quot;qualified&quot;
-                    attributeFormDefault=&quot;unqualified&quot;
-                    targetNamespace=&quot;http://services.samples&quot;&gt;
-            &lt;xs:element name=&quot;getQuote&quot;&gt;
-                &lt;xs:complexType&gt;
-                    &lt;xs:sequence&gt;
-                        &lt;xs:element name=&quot;request&quot;&gt;
-                            &lt;xs:complexType&gt;
-                                &lt;xs:sequence&gt;
-                                    &lt;xs:element name=&quot;stocksymbol&quot; type=&quot;xs:string&quot;/&gt;
-                                &lt;/xs:sequence&gt;
-                            &lt;/xs:complexType&gt;
-                        &lt;/xs:element&gt;
-                    &lt;/xs:sequence&gt;
-                &lt;/xs:complexType&gt;
-            &lt;/xs:element&gt;
-        &lt;/xs:schema&gt;
-    &lt;/localEntry&gt;
-
-    &lt;in&gt;
-        &lt;validate&gt;
-            &lt;schema key=&quot;validate_schema&quot;/&gt;
-            &lt;on-fail&gt;
-                &lt;!-- if the request does not validate againt schema throw a fault --&gt;
-                &lt;makefault response=&quot;true&quot;&gt;
-                    &lt;code value=&quot;tns:Receiver&quot;
-                            xmlns:tns=&quot;http://www.w3.org/2003/05/soap-envelope&quot;/&gt;
-                    &lt;reason value=&quot;Invalid custom quote request&quot;/&gt;
-                &lt;/makefault&gt;
-            &lt;/on-fail&gt;
-        &lt;/validate&gt;
-    &lt;/in&gt;
-    &lt;send/&gt;
-&lt;/definitions&gt; </pre>
-<p>
-<strong>Objective: Introduction to local (static) registry entries and the validate mediator</strong> </p>
-<p>
-<strong>Prerequisites:</strong>
-<br/> Start the Synapse configuration numbered 7: i.e. synapse -sample 7
-<br/> Start the Axis2 server and deploy the SimpleStockQuoteService if not already done </p>
-<p>This example shows how a static XML fragment could be made available to the Synapse local registry. Resources defined in the local registry are static (i.e. never changes over the lifetime of the configuration) and may be specified as a source URL, in-line text or in-line xml. In this example the schema is made available under the key 'validate_schema'. </p>
-<p>The validate mediator by default operates on the first child element of the SOAP body. You may specify an XPath expression using the 'source' attribute to override this behaviour. The validate mediator now uses the 'validate_schema' resource to validate the incoming message, and if the message validation fails it invokes the 'on-fail' sequence of mediators. </p>
-<p>If you send a stockquote request using 'ant stockquote ...' you will get a fault back with the message 'Invalid custom quote request' as the schema validation failed. This is because the schema used in the example expects a slightly different message than what is created by the stock quote client. (i.e. expects a 'stocksymbol' element instead of 'symbol' to specify the stock symbol) </p>
-<pre xml:space="preserve">ant stockquote -Daddurl=http://localhost:9000/services/SimpleStockQuoteService -Dtrpurl=http://localhost:8280/</pre>
-<h2>
-<a name="Sample8" id="Sample8">Sample 8: Introduction to static and dynamic registry resources, and using XSLT transformations</a></h2>
-<pre xml:space="preserve">&lt;definitions xmlns=&quot;http://ws.apache.org/ns/synapse&quot;&gt;
-
-    &lt;!-- the SimpleURLRegistry allows access to a URL based registry (e.g. file:/// or http://) --&gt;
-    &lt;registry provider=&quot;org.apache.synapse.registry.url.SimpleURLRegistry&quot;&gt;
-        &lt;!-- the root property of the simple URL registry helps resolve a resource URL as root + key --&gt;
-        &lt;parameter name=&quot;root&quot;&gt;file:./repository/conf/sample/resources/&lt;/parameter&gt;
-        &lt;!-- all resources loaded from the URL registry would be cached for this number of milli seconds --&gt;
-        &lt;parameter name=&quot;cachableDuration&quot;&gt;15000&lt;/parameter&gt;
-    &lt;/registry&gt;
-
-    &lt;!-- define the request processing XSLT resource as a static URL source --&gt;
-    &lt;localEntry key=&quot;xslt-key-req&quot; src=&quot;file:repository/conf/sample/resources/transform/transform.xslt&quot;/&gt;
-
-    &lt;in&gt;
-        &lt;!-- transform the custom quote request into a standard quote requst expected by the service --&gt;
-        &lt;xslt key=&quot;xslt-key-req&quot;/&gt;
-    &lt;/in&gt;
-    &lt;out&gt;
-        &lt;!-- transform the standard response back into the custom format the client expects --&gt;
-        &lt;!-- the key is looked up in the remote registry and loaded as a 'dynamic' registry resource --&gt;
-        &lt;xslt key=&quot;transform/transform_back.xslt&quot;/&gt;
-    &lt;/out&gt;
-    &lt;send/&gt;
-&lt;/definitions&gt;</pre>
-<p>
-<strong>Objective: Introduction to static and dynamic registry resources and the XSLT mediator</strong> </p>
-<p>
-<strong>Prerequisites:</strong>
-<br/> Start the Synapse configuration numbered 8: i.e. synapse -sample 8
-<br/> Start the Axis2 server and deploy the SimpleStockQuoteService if not already done </p>
-<p>This example uses the XSLT mediator to perform transformations, and the xslt transformations are specified as registry resources. The first resource 'xslt-key-req' is specified as a 'local' registry entry. Local entries do not place the resource on the registry, but simply make it available to the local configuration. If a local entry is defined with a key that already exists in the remote registry, the local entry will get higher preference and override the remote resource. </p>
-<p>In this example you will notice the new 'registry' definition. Synapse comes with a simple URL based registry implementation SimpleURLRegistry. During initialization of the registry, the SimpleURLRegistry expects to find a property named 'root', which specifies a prefix for the registry keys used later. When the SimpleURLRegistry is used, this root is prefixed to the entry keys to form the complete URL for the resource being looked up. The registry caches a resource once requested, and caches it internally for a specified duration. Once this period expires, it will reload the meta information about the resource and reload its cached copy if necessary, the next time the resource is requested. </p>
-<p>Hence the second XSLT resource key 'transform/transform_back.xslt' concatenated with the 'root' of the SimpleURLRegistry 'file:repository/conf/sample/resources/' forms the complete URL of the resource as 'file:repository/conf/sample/resources/transform/transform_back.xslt' and caches its value for a period of 15000 ms. </p>
-<p>Execute the custom quote client as 'ant stockquote -Dmode=customquote ...' and analyze the the Synapse debug log output </p>
-<pre xml:space="preserve">ant stockquote -Daddurl=http://localhost:9000/services/SimpleStockQuoteService -Dtrpurl=http://localhost:8280/ -Dmode=customquote</pre>
-<p>The incoming message is now transformed into a standard stock quote request as expected by the SimpleStockQuoteService deployed on the local Axis2 instance, by the XSLT mediator. The XSLT mediator uses Xalan-J to perform the transformations. It is possible to configure the underlying transformation engine using properties where necessary. The response from the SimpleStockQuoteService is converted back into the custom format as expected by the client during the out message processing. </p>
-<p>During the response processing you could see the SimpleURLRegistry fetching the resource as shown by the log message below </p>
-<pre xml:space="preserve">[HttpClientWorker-1] DEBUG SimpleURLRegistry ==&gt; Repository fetch of resource with key : transform/transform_back.xslt</pre>
-<p>If you run the client again immediately (i.e within 15 seconds of the first request) you will not see the resource being reloaded by the registry as the cached value would be still valid. </p>
-<p>However if you leave the system idle for 15 seconds or more and then retry the same request, you will now notice that the registry noticed the cached resource has expired and will check the meta information about the resource to check if the resource itself has changed and will require a fresh fetch from the source URL. If the meta data / version number indicates that a reload of the cached resource is not necessary (i.e. unless the resource itself actually changed) the updated meta information is used and the cache lease extended as appropriate. </p>
-<pre xml:space="preserve">[HttpClientWorker-1] DEBUG AbstractRegistry - Cached object has expired for key : transform/transform_back.xslt
-[HttpClientWorker-1] DEBUG SimpleURLRegistry - Perform RegistryEntry lookup for key : transform/transform_back.xslt
-[HttpClientWorker-1] DEBUG AbstractRegistry - Expired version number is same as current version in registry
-[HttpClientWorker-1] DEBUG AbstractRegistry - Renew cache lease for another 15s </pre>
-<p>Now edit the repository/conf/sample/resources/transform/transform_back.xslt file and add a blank line at the end. Now when you run the client again, and if the cache is expired, the resource would be re-fetched from its URL by the registry and this can be seen by the following debug log messages </p>
-<pre xml:space="preserve">[HttpClientWorker-1] DEBUG AbstractRegistry - Cached object has expired for key : transform/transform_back.xslt
-[HttpClientWorker-1] DEBUG SimpleURLRegistry - Perform RegistryEntry lookup for key : transform/transform_back.xslt
-[HttpClientWorker-1] INFO  SimpleURLRegistry - ==&gt; Repository fetch of resource with key : transform/transform_back.xslt </pre>
-<p>Thus the SimpleURLRegistry allows resource to be cached, and updates detected so that the changes could be reloaded without restarting the Synapse instance. </p>
-<h2>
-<a name="Sample9" id="Sample9">Sample 9: Introduction to dynamic sequences with the Registry</a></h2>
-<pre xml:space="preserve">&lt;definitions xmlns=&quot;http://ws.apache.org/ns/synapse&quot;&gt;
-    &lt;registry provider=&quot;org.apache.synapse.registry.url.SimpleURLRegistry&quot;&gt;
-        &lt;parameter name=&quot;root&quot;&gt;file:./repository/conf/sample/resources/&lt;/parameter&gt;
-        &lt;parameter name=&quot;cachableDuration&quot;&gt;15000&lt;/parameter&gt;
-    &lt;/registry&gt;
-
-    &lt;sequence name="main"&gt;
-        &lt;sequence key=&quot;sequence/dynamic_seq_1.xml&quot;/&gt;
-    &lt;/sequence&gt;
-&lt;/definitions&gt; </pre>
-<p>
-<strong>Objective: Introduction to dynamic sequences with a registry</strong> </p>
-<p>
-<strong>Prerequisites:</strong>
-<br/> Start the Synapse configuration numbered 9: i.e. synapse -sample 9
-<br/> Start the Axis2 server and deploy the SimpleStockQuoteService if not already done </p>
-<p>This example introduces the dynamic behaviour of Synapse through the use of a registry. Synapse supports dynamic definitions for sequences and endpoints, and as seen before, for resources. In this example we define a Synapse configuration which references a sequence definition specified as a registry key. The registry key resolves to the actual content of the sequence which would be loaded dynamically by Synapse at runtime, and cached appropriately as per its definition in the registry. Once the cache expires, Synapse would re-check the meta information for the definition and re-load the sequence definition if necessary and re-cache it again. </p>
-<p>Once Synapse is started, execute the stock quote client as 'ant stockquote..'. You will notice that that Synapse fetches the definition of the sequence from the registry and executes its rules as follows: </p>
-<pre xml:space="preserve">ant stockquote -Daddurl=http://localhost:9000/services/SimpleStockQuoteService -Dtrpurl=http://localhost:8280/</pre>
-<pre xml:space="preserve">[HttpServerWorker-1] DEBUG  SimpleURLRegistry - ==&gt; Repository fetch of resource with key : sequence/dynamic_seq_1.xml
-...
-[HttpServerWorker-1] DEBUG SequenceMediator - Sequence mediator &lt;dynamic_sequence&gt; :: mediate()
-...
-[HttpServerWorker-1] INFO  LogMediator - message = *** Test Message 1 ***</pre>
-<p>Now if you execute the client immediately (i.e. within 15 seconds of the last execution) you will notice that the sequence was not reloaded. If you edit the sequence definition in repository/conf/sample/resources/sequence/dynamic_seq_1.xml (i.e. edit the log message to read as &quot;*** Test Message 2 ***&quot;) and execute the client again, you will notice that the new message is not yet visible (i.e. if you execute this within 15 seconds of loading the resource for the first time) However, after 15 seconds elapsed since the original caching of the sequence, you will notice that the new sequence is loaded and executed by Synapse from the following log messages. </p>
-<pre xml:space="preserve">[HttpServerWorker-1] DEBUG  SimpleURLRegistry - ==&gt; Repository fetch of resource with key : sequence/dynamic_seq_1.xml
-...
-[HttpServerWorker-1] DEBUG SequenceMediator - Sequence mediator &lt;dynamic_sequence&gt; :: mediate()
-...
-[HttpServerWorker-1] INFO  LogMediator - message = *** Test Message 2 ***</pre>
-<p>The cache timeout could be tuned appropriately by configuring the URL registry to suit the environment and the needs. </p>
-<h2>
-<a name="Sample10" id="Sample10">Sample 10: Introduction to dynamic endpoints with the Registry</a></h2>
-<pre xml:space="preserve">&lt;definitions xmlns=&quot;http://ws.apache.org/ns/synapse&quot;&gt;
-
-    &lt;registry provider=&quot;org.apache.synapse.registry.url.SimpleURLRegistry&quot;&gt;
-        &lt;parameter name=&quot;root&quot;&gt;file:repository/conf/sample/resources/&lt;/parameter&gt;
-        &lt;parameter name=&quot;cachableDuration&quot;&gt;15000&lt;/parameter&gt;
-    &lt;/registry&gt;
-
-    &lt;in&gt;
-        &lt;send&gt;
-            &lt;endpoint key=&quot;endpoint/dynamic_endpt_1.xml&quot;/&gt;
-        &lt;/send&gt;
-    &lt;/in&gt;
-    &lt;out&gt;
-        &lt;send/&gt;
-    &lt;/out&gt;
-&lt;/definitions&gt; </pre>
-<p>
-<strong>Objective: Introduction to dynamic endpoints with the Registry</strong> </p>
-<p>
-<strong>Prerequisites:</strong>
-<br/> Start the Synapse configuration numbered 10: i.e. synapse -sample 10
-<br/> Start the Axis2 server and deploy the SimpleStockQuoteService if not already done
-<br/> Start a second Axis2 server on HTTP port 9001 and HTTPS port 9003 as follows: </p>
-<pre xml:space="preserve">./axis2server.sh -http 9001 -https 9003</pre>
-<p>This example introduces dynamic endpoints, where the definition of an endpoint is stored in the registry. To follow this example execute the stock quote client as 'ant stockquote..' and see that the message is routed to the SimpleStockQuoteService on the default Axis2 instance on HTTP port 9000. Repeat the above example immediately again, and notice that the endpoint is cached and reused by Synapse - similarly to example # 8. </p>
-<pre xml:space="preserve">ant stockquote -Dtrpurl=http://localhost:8280/</pre>
-<p>Now edit the repository/conf/sample/resources/endpoint/dynamic_endpt_1.xml definition and update the address to &quot;http://localhost:9001/services/SimpleStockQuoteService&quot;. After the cached value expires, the Registry loads the new definition of the endpoint, and then the messages can be seen being routed to the second sample Axis2 server on HTTP port 9001. </p>
-<h2>
-<a name="Sample11" id="Sample11">Sample 11: A full registry based configuration, and sharing a configuration between multiple instances</a></h2>
-<pre xml:space="preserve">&lt;definitions xmlns=&quot;http://ws.apache.org/ns/synapse&quot;&gt;
-    &lt;registry provider=&quot;org.apache.synapse.registry.url.SimpleURLRegistry&quot;&gt;
-        &lt;parameter name=&quot;root&quot;&gt;file:./repository/conf/sample/resources/&lt;/parameter&gt;
-        &lt;parameter name=&quot;cachableDuration&quot;&gt;15000&lt;/parameter&gt;
-    &lt;/registry&gt;
-&lt;/definitions&gt; </pre>
-<p>
-<strong>Objective: A full registry based configuration</strong> </p>
-<p>
-<strong>Prerequisites:</strong>
-<br/> Start the Synapse configuration numbered 11: i.e. synapse -sample 11
-<br/> Start the Axis2 server and deploy the SimpleStockQuoteService if not already done </p>
-<p>This example shows a full registry based Synapse configuration. Thus it is possible to start a remote configuration from multiple instances of Synapse in a clustered environment easily. The Synapse configuration held on a node hosting Synapse simply points to the registry and looks up the actual configuration by requesting the key 'synapse.xml'. </p>
-<p>(Note: Full registry based configuration is not dynamic atleast for the moment. i.e. it is not reloading itself) </p>
-<pre xml:space="preserve">ant stockquote -Daddurl=http://localhost:9000/services/SimpleStockQuoteService -Dtrpurl=http://localhost:8280/</pre>
-<pre xml:space="preserve">[HttpServerWorker-1] INFO LogMediator - message = This is a dynamic Synapse configuration</pre>
-<p>The actual synapse.xml loaded is: </p>
-<pre xml:space="preserve">&lt;!-- a registry based Synapse configuration --&gt;
-&lt;definitions xmlns=&quot;http://ws.apache.org/ns/synapse&quot;&gt;
-    &lt;log level=&quot;custom&quot;&gt;
-        &lt;property name=&quot;message&quot; value=&quot;This is a dynamic Synapse configuration $$$&quot;/&gt;
-    &lt;/log&gt;
-    &lt;send/&gt;
-&lt;/definitions&gt;</pre>
-<h2>
-<a name="Sample12" id="Sample12">Sample 12: One way messaging / fireAndForget through Synapse</a></h2>
-<p>
-<strong>Objective: Demonstrate one-way messaging / fireAndForget through Synapse</strong> </p>
-<p>
-<strong>Prerequisites:</strong>
-<br/> Start the Axis2 server and deploy the SimpleStockQuoteService (Refer steps above)
-<br/> Start the Synapse configuration numbered 1: i.e. synapse -sample 1 </p>
-<p>This example invokes the one-way 'placeOrder' operation on the SimpleStockQuoteService using the custom client which uses the Axis2 ServiceClient.fireAndForget() API. To test this, use 'ant -Dmode=placeorder...' and you will notice the one-way message flowing through Synapse into the sample Axis2 server instance, which reports the acceptance of the order as follows: </p>
-<pre xml:space="preserve">ant stockquote -Daddurl=http://localhost:9000/services/SimpleStockQuoteService -Dtrpurl=http://localhost:8280/ -Dmode=placeorder</pre>
-<pre xml:space="preserve">SimpleStockQuoteService :: Accepted order for : 7482 stocks of IBM at $ 169.27205579038733</pre>
-<p>If you send your client request through TCPmon, you will notice that the SimpleStockQuoteService replies to Synapse with a HTTP 202 reply, and that Synapse in turns replies to the client with a HTTP 202 acknowledgment </p>
-
-<h2>
-<a name="Sample13" id="Sample13">Sample 13: Dual channel invocation through Synapse</a></h2>
-<p>
-<strong>Objective: Demonstrate dual channel messaging through Synapse</strong> </p>
-<p>
-<strong>Prerequisites:</strong>
-<br/> Start the Axis2 server and deploy the SimpleStockQuoteService (Refer steps above)
-<br/> Start the Synapse configuration numbered 0: i.e. synapse -sample 0 </p>
-<p>This example invokes the same 'getQuote' operation on the SimpleStockQuoteService using the custom client which uses the Axis2 ServiceClient API with useSeparateListener set to true so that the response is coming through a different channel than the one which is used to send the request to a callback defined in the client. To test this, use 'ant -Dmode=dualquote...' and you will notice the dual channel invocation through Synapse into the sample Axis2 server instance, which reports the response back to the client over a different channel: </p>
-<pre xml:space="preserve">ant stockquote -Daddurl=http://localhost:9000/services/SimpleStockQuoteService -Dtrpurl=http://localhost:8280/ -Dmode=dualquote</pre>
-<pre xml:space="preserve">Response received to the callback
-Standard dual channel :: Stock price = $57.16686934968289</pre>
-<p>If you send your client request through TCPmon, you will notice that Synapse replies to the client with a HTTP 202 acknowledgment when you send the request and the communication between Synapse and the server happens on a single channel and then you get the response back from Synapse to the clients callback in a different channel (which cannot be observed through TCPmon) </p>
-<p>Also you could see the wsa:Reply-To header being something like http://localhost:8200/axis2/services/anonService2 which implies that the reply is being on a different channel listening on the port 8200. Please note that it is required to engage addressing when using the dual channel invocation because it requires the wsa:Reply-To header. </p>
-
-<h2>
-<a name="Sample10" id="Sample15">Sample 15: Message Enrichment through Synapse</a></h2>
-<pre xml:space="preserve">
-    &lt;definitions xmlns=&quot;http://ws.apache.org/ns/synapse&quot;&gt;
-    &lt;sequence name=&quot;main&quot;&gt;
-        &lt;in&gt;
-            &lt;enrich&gt;
-                &lt;source type=&quot;custom&quot;
-                        xpath=&quot;//m0:getQuote/m0:request/m0:symbol/text()&quot;
-                        xmlns:m0=&quot;http://services.samples&quot;/&gt;
-                &lt;target type=&quot;property&quot; property=&quot;ORIGINAL_REQ&quot;/&gt;
-            &lt;/enrich&gt;
-            &lt;enrich&gt;
-                &lt;source type=&quot;body&quot;/&gt;
-                &lt;target type=&quot;property&quot; property=&quot;REQUEST_PAYLOAD&quot;/&gt;
-            &lt;/enrich&gt;
-
-            &lt;enrich&gt;
-                &lt;source type=&quot;inline&quot; key=&quot;init_req&quot;/&gt;
-                &lt;target xmlns:m0=&quot;http://services.samples&quot;
-                        xpath=&quot;//m0:getQuote/m0:request/m0:symbol/text()&quot;/&gt;
-            &lt;/enrich&gt;
-
-            &lt;send&gt;
-                &lt;endpoint&gt;
-                    &lt;address uri=&quot;http://localhost:9000/services/SimpleStockQuoteService&quot;/&gt;
-                &lt;/endpoint&gt;
-            &lt;/send&gt;
-            &lt;drop/&gt;
-        &lt;/in&gt;
-        &lt;out&gt;
-            &lt;header xmlns:urn=&quot;http://synapse.apache.org&quot; name=&quot;urn:lastTradeTimestamp&quot; value=&quot;foo&quot;/&gt;
-            &lt;enrich&gt;
-                &lt;source type=&quot;custom&quot;
-                        xpath=&quot;//ns:getQuoteResponse/ns:return/ax21:lastTradeTimestamp&quot;
-                        xmlns:ns=&quot;http://services.samples&quot;
-                        xmlns:ax21=&quot;http://services.samples/xsd&quot;/&gt;
-                &lt;target xmlns:soapenv=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot;
-                        xmlns:urn=&quot;http://synapse.apache.org&quot;
-                        xpath=&quot;/soapenv:Envelope/soapenv:Header/urn:lastTradeTimestamp&quot;/&gt;
-            &lt;/enrich&gt;
-             &lt;log level=&quot;full&quot;/&gt;
-            &lt;log&gt;
-                &lt;property name=&quot;Original Request Symbol&quot; expression=&quot;get-property(&#39;ORIGINAL_REQ&#39;)&quot;/&gt;
-                &lt;property name=&quot;Request Payload&quot; expression=&quot;get-property(&#39;REQUEST_PAYLOAD&#39;)&quot;/&gt;
-            &lt;/log&gt;
-            &lt;send/&gt;
-        &lt;/out&gt;
-
-    &lt;/sequence&gt;
-    &lt;localEntry key=&quot;init_req&quot;&gt;MSFT&lt;/localEntry&gt;
-    &lt;localEntry key=&quot;price_req&quot;&gt;
-        &lt;m0:symbol xmlns:m0=&quot;http://services.samples&quot;&gt;MSFT&lt;/m0:symbol&gt;
-    &lt;/localEntry&gt;
-
-&lt;/definitions&gt;
-</pre>
-<p>
-<strong>Objective: Introduction to Message Copying and Content Enriching with Enrich Mediator</strong> </p>
-<p>
-<strong>Prerequisites:</strong>
-<br/> Start the Synapse configuration numbered 15: i.e. synapse -sample 15
-<br/> Start the Axis2 server and deploy the SimpleStockQuoteService if not already done
-</p>
-<pre xml:space="preserve">./axis2server.sh</pre>
-<p>This sample demonstrate the various capabilities of Enrich Mediator. Inside the in-sequence we store/copy different
-    parts of the message to properties and just before sending the message to the StockQuoteService, we modify the
-    request value based on the local entry value-init_req. Then in the out-sequence, the enrich mediator is used
-    to enrich a soap header based on the 'lastTradeTimestamp' value of the response.
-</p>
-<pre xml:space="preserve">ant stockquote -Dtrpurl=http://localhost:8280/services/StockQuote</pre>
-<p>You can try with different local entries as the source with the correct target xpath values. </p>
-
-<h2>
-<a name="Sample16" id="Sample16">Sample 16: Introduction to dynamic and static keys</a></h2>
-<pre xml:space="preserve">&lt;definitions xmlns=&quot;http://ws.apache.org/ns/synapse&quot;&gt;
-    &lt;!-- the SimpleURLRegistry allows access to a URL based registry (e.g. file:/// or http://) --&gt;
-    &lt;registry provider=&quot;org.apache.synapse.registry.url.SimpleURLRegistry&quot;&gt;
-        &lt;!-- the root property of the simple URL registry helps resolve a resource URL as root + key --&gt;
-        &lt;parameter name=&quot;root&quot;&gt;file:repository/conf/sample/resources/&lt;/parameter&gt;
-        &lt;!-- all resources loaded from the URL registry would be cached for this number of milli seconds --&gt;
-        &lt;parameter name=&quot;cachableDuration&quot;&gt;15000&lt;/parameter&gt;
-    &lt;/registry&gt;
-    &lt;sequence name=&quot;main&quot;&gt;
-        &lt;in&gt;
-            &lt;!-- define the request processing XSLT resource as a property value --&gt;
-            &lt;property name=&quot;symbol&quot; value=&quot;transform/transform.xslt&quot; xmlns:m0=&quot;http://services.samples&quot;/&gt;
-            &lt;!-- { } denotes that this key is a 'dynamic' one and it is not a 'static' key --&gt;
-            &lt;!-- use Xpath expression "get-property()" to evaluate real key from property --&gt;
-            &lt;xslt key=&quot;{get-property('symbol')}&quot; /&gt;
-        &lt;/in&gt;
-        &lt;out&gt;
-            &lt;!-- transform the standard response back into the custom format the client expects --&gt;
-            &lt;!-- the key is looked up in the remote registry using a 'static' key --&gt;
-            &lt;xslt key=&quot;transform/transform_back.xslt&quot;/&gt;
-        &lt;/out&gt;
-        &lt;send/&gt;
-    &lt;/sequence&gt;
-&lt;/definitions&gt;</pre>
-    
-<p>
-<strong>Objective: Introduction to dynamic and static registry keys</strong> </p>
-<p>
-<strong>Prerequisites:</strong>
-<br/> Start the Synapse configuration numbered 16: i.e. synapse -sample 16
-<br/> Start the Axis2 server and deploy the SimpleStockQuoteService if not already done </p>
-<p>This Sample demonstrates the use of dynamic keys with mediators. XSLT mediator is used as an example for that and deference between static and dynamic usage of keys are shown with that. </p>
-<p>The first registry resource &quot;transform/transform.xslt&quot; is set as a property value. Inside the XSLT mediator the local property value is lookup using the Xpath expression &quot;get-property()&quot;. Likewise any Xpath expression can be enclosed inside &quot;{ }&quot; to denote that it is a dynamic key. Then the mediator will evaluate the real value for that expression. </p>
-<p>The second XSLT resource &quot;transform/transform_back.xslt&quot; is used simply as a static key as usual. It is not included inside &quot;{ }&quot; and because of the mediator directly use the static value as the key. </p>
-<p>Execute the custom quote client as 'ant stockquote -Dmode=customquote …' and analys the output which is similar to the Sample 8. </p>
-<pre xml:space="preserve">ant stockquote -Daddurl=http://localhost:9000/services/SimpleStockQuoteService -Dtrpurl=http://localhost:8280/ -Dmode=customquote</pre>
-
-<h2>
-<a name="Sample17" id="Sample17">Sample 17: Transforming / replacing message content with Payload-factory mediator</a></h2>
-<pre xml:space="preserve">
-&lt;definitions xmlns=&quot;http://ws.apache.org/ns/synapse&quot;&gt;
-
-    &lt;sequence name=&quot;main&quot;&gt;
-        &lt;in&gt;
-            &lt;!-- using payloadFactory mediator to transform the request message --&gt;
-            &lt;payloadFactory&gt;
-                &lt;format&gt;
-                    &lt;m:getQuote xmlns:m=&quot;http://services.samples&quot;&gt;
-                        &lt;m:request&gt;
-                            &lt;m:symbol&gt;$1&lt;/m:symbol&gt;
-                        &lt;/m:request&gt;
-                    &lt;/m:getQuote&gt;
-                &lt;/format&gt;
-                &lt;args&gt;
-                    &lt;arg xmlns:m0=&quot;http://services.samples&quot; expression=&quot;//m0:Code&quot;/&gt;
-                &lt;/args&gt;
-            &lt;/payloadFactory&gt;
-        &lt;/in&gt;
-        &lt;out&gt;
-            &lt;!-- using payloadFactory mediator to transform the response message --&gt;
-            &lt;payloadFactory&gt;
-                &lt;format&gt;
-                    &lt;m:CheckPriceResponse xmlns:m=&quot;http://services.samples/xsd&quot;&gt;
-                        &lt;m:Code&gt;$1&lt;/m:Code&gt;
-                        &lt;m:Price&gt;$2&lt;/m:Price&gt;
-                    &lt;/m:CheckPriceResponse&gt;
-                &lt;/format&gt;
-                &lt;args&gt;
-                    &lt;arg xmlns:m0=&quot;http://services.samples/xsd&quot; expression=&quot;//m0:symbol&quot;/&gt;
-                    &lt;arg xmlns:m0=&quot;http://services.samples/xsd&quot; expression=&quot;//m0:last&quot;/&gt;
-                &lt;/args&gt;
-            &lt;/payloadFactory&gt;
-        &lt;/out&gt;
-        &lt;send/&gt;
-    &lt;/sequence&gt;
-
-&lt;/definitions&gt;
-</pre>
-
-<p>
-<strong>Objective: Introducing Payload-factory mediator</strong> </p>
-<p>
-<strong>Prerequisites:</strong>
-<br/> Start the Axis2 server and deploy the SimpleStockQuoteService (Refer steps above)
-<br/> Start the Synapse configuration numbered 17: i.e. synapse -sample 17</p>
-
-
-<p>
-This sample uses Payload-factory mediator to perform transformations as an alternative
-to XSLT mediator (Sample 8). In this sample, Synapse implements Message Translator EIP and acts
-an a translator between the client and the backend server.
-</p>
-
-<p>Execute the custom quote client as 'ant stockquote -Dmode=customquote ...'
-and analyze Synapse debug log output </p>
-<pre xml:space="preserve">ant stockquote -Daddurl=http://localhost:9000/services/SimpleStockQuoteService -Dtrpurl=http://localhost:8280/ -Dmode=customquote</pre>
-
-<p>Incoming message is transformed by the Payload-factory mediator into a standard stock quote 
-request as expected by the SimpleStockQuoteService deployed on the Axis2 server. 
-<code>printf()</code> style formatting is used to configure the transformation performed by 
-the mediator. Each argument in the mediator configuration could be a static value or an
-XPath expression. When an expression is used, argument value is fetched at runtime by evaluating 
-the provided XPath expression against the existing SOAP message. </p>
-
-<p>The response from the SimpleStockQuoteService is converted back into the custom format as 
-expected by the client during the out message processing, once again using Payload-factory 
-mediator.</p>
-
-<h1>
-<a name="Endpoints" id="Endpoints">Advanced mediations with endpoints</a> </h1>
-<h2>
-<a name="Sample50" id="Sample50">Sample 50: POX to SOAP conversion</a></h2>
-<pre xml:space="preserve">&lt;definitions xmlns=&quot;http://ws.apache.org/ns/synapse&quot;&gt;
-    &lt;!-- filtering of messages with XPath and regex matches --&gt;
-    &lt;filter source=&quot;get-property('To')&quot; regex=&quot;.*/StockQuote.*&quot;&gt;
-        &lt;send&gt;
-            &lt;endpoint&gt;
-                &lt;address uri=&quot;http://localhost:9000/services/SimpleStockQuoteService&quot; format=&quot;soap11&quot;/&gt;
-            &lt;/endpoint&gt;
-        &lt;/send&gt;
-        &lt;drop/&gt;
-    &lt;/filter&gt;
-    &lt;send/&gt;
-&lt;/definitions&gt; </pre>
-<p>
-<strong>Objective: POX to SOAP conversion</strong> </p>
-<p>
-<strong>Prerequisites:</strong>
-<br/> Start the Synapse configuration numbered 50: i.e. synapse -sample 50 </p>
-<p>Start the Axis2 server and deploy the SimpleStockQuoteService if not already done </p>
-<p>Execute the 'ant stockquote' specifying that the request should be a REST request as follows: </p>
-<pre xml:space="preserve">ant stockquote -Dtrpurl=http://localhost:8280/services/StockQuote -Drest=true</pre>
-<p>This example shows a HTTP REST request (as shown below) being transformed into a SOAP request and forwarded to the stock quote service. </p>
-<pre xml:space="preserve">POST /soap/StockQuote HTTP/1.1
-Content-Type: application/xml; charset=UTF-8;action=&quot;urn:getQuote&quot;;
-SOAPAction: urn:getQuote
-User-Agent: Axis2
-Host: 127.0.0.1
-Transfer-Encoding: chunked
-
-75
-&lt;m0:getQuote xmlns:m0=&quot;http://services.samples/xsd&quot;&gt;
-   &lt;m0:request&gt;
-      &lt;m0:symbol&gt;IBM&lt;/m0:symbol&gt;
-   &lt;/m0:request&gt;
-&lt;/m0:getQuote&gt;0</pre>
-
-
-
-<h2>
-<a name="Sample51" id="Sample51">Sample 51: MTOM and SwA optimizations and request/response correlation</a></h2>
-<pre xml:space="preserve">&lt;definitions xmlns=&quot;http://ws.apache.org/ns/synapse&quot;&gt;
-    &lt;in&gt;
-        &lt;filter source=&quot;get-property('Action')&quot; regex=&quot;urn:uploadFileUsingMTOM&quot;&gt;
-            &lt;property name=&quot;example&quot; value=&quot;mtom&quot;/&gt;
-            &lt;send&gt;
-                &lt;endpoint&gt;
-                    &lt;address uri=&quot;http://localhost:9000/services/MTOMSwASampleService&quot; optimize=&quot;mtom&quot;/&gt;
-                &lt;/endpoint&gt;
-            &lt;/send&gt;
-        &lt;/filter&gt;
-        &lt;filter source=&quot;get-property('Action')&quot; regex=&quot;urn:uploadFileUsingSwA&quot;&gt;
-            &lt;property name=&quot;example&quot; value=&quot;swa&quot;/&gt;
-            &lt;send&gt;
-                &lt;endpoint&gt;
-                    &lt;address uri=&quot;http://localhost:9000/services/MTOMSwASampleService&quot; optimize=&quot;swa&quot;/&gt;
-                &lt;/endpoint&gt;
-            &lt;/send&gt;
-        &lt;/filter&gt;
-    &lt;/in&gt;
-    &lt;out&gt;
-        &lt;filter source=&quot;get-property('example')&quot; regex=&quot;mtom&quot;&gt;
-            &lt;property name=&quot;enableMTOM&quot; value=&quot;true&quot; scope=&quot;axis2&quot;/&gt;
-        &lt;/filter&gt;
-        &lt;filter source=&quot;get-property('example')&quot; regex=&quot;swa&quot;&gt;
-            &lt;property name=&quot;enableSwA&quot; value=&quot;true&quot; scope=&quot;axis2&quot;/&gt;
-        &lt;/filter&gt;
-        &lt;send/&gt;
-    &lt;/out&gt;
-&lt;/definitions&gt;</pre>
-<p>
-<strong>Objective: MTOM and SwA optimizations and request/response correlation</strong> </p>
-<p>
-<strong>Prerequisites:</strong>
-<br/> Start the Synapse configuration numbered 51: i.e. synapse -sample 51
-<br/> Start the Axis2 server and deploy the MTOMSwASampleService if not already done </p>
-<p>Execute the 'ant optimizeclient' specifying MTOM optimization as follows: </p>
-<pre xml:space="preserve">ant optimizeclient -Dopt_mode=mtom</pre>
-<p>The configuration now sets a local message context property, and forwards the message to 'http://localhost:9000/services/MTOMSwASampleService' optimizing binary content as MTOM. By sending this message through TCPMon you would be able to see the actual message sent over the HTTP transport if required. Thus during response processing, by checking the local message property Synapse could identify the past information about the current message context, and uses this knowledge to transform the response back to the client in the same format as the original request. </p>
-<p>When the client executes successfully, it will upload a file containing the ASF logo and receive its response back again and saves it into a temporary file. </p>
-<pre xml:space="preserve">[java] Sending file : ./../../repository/conf/sample/resources/mtom/asf-logo.gif as MTOM
-[java] Saved response to file : ./../../work/temp/sampleClient/mtom-4417.gif</pre>
-<p>Next try SwA as: </p>
-<pre xml:space="preserve">ant optimizeclient -Dopt_mode=swa</pre>
-<pre xml:space="preserve">[java] Sending file : ./../../repository/conf/sample/resources/mtom/asf-logo.gif as SwA
-[java] Saved response to file : ./../../work/temp/sampleClient/swa-30391.gif</pre>
-<p>By using TCPMon and sending the message through it, one can inspect that the requests and responses sent are indeed MTOM optimized or sent as HTTP attachments as follows: </p>
-<pre xml:space="preserve">POST http://localhost:9000/services/MTOMSwASampleService HTTP/1.1
-Host: 127.0.0.1
-SOAPAction: urn:uploadFileUsingMTOM
-Content-Type: multipart/related; boundary=MIMEBoundaryurn_uuid_B94996494E1DD5F9B51177413845353; type=&quot;application/xop+xml&quot;;
-start=&quot;&lt;0.urn:uuid:B94996494E1DD5F9B51177413845354@apache.org&gt;&quot;; start-info=&quot;text/xml&quot;; charset=UTF-8
-Transfer-Encoding: chunked
-Connection: Keep-Alive
-User-Agent: Synapse-HttpComponents-NIO
-
---MIMEBoundaryurn_uuid_B94996494E1DD5F9B51177413845353241
-Content-Type: application/xop+xml; charset=UTF-8; type=&quot;text/xml&quot;
-Content-Transfer-Encoding: binary
-Content-ID:
-   &lt;0.urn:uuid:B94996494E1DD5F9B51177413845354@apache.org&gt;221b1
-      &lt;?xml version='1.0' encoding='UTF-8'?&gt;
-         &lt;soapenv:Envelope xmlns:soapenv=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot;&gt;
-            &lt;soapenv:Body&gt;
-               &lt;m0:uploadFileUsingMTOM xmlns:m0=&quot;http://www.apache-synapse.org/test&quot;&gt;
-                  &lt;m0:request&gt;
-                     &lt;m0:image&gt;
-                        &lt;xop:Include href=&quot;cid:1.urn:uuid:78F94BC50B68D76FB41177413845003@apache.org&quot; xmlns:xop=&quot;http://www.w3.org/2004/08/xop/include&quot; /&gt;
-                     &lt;/m0:image&gt;
-                  &lt;/m0:request&gt;
-               &lt;/m0:uploadFileUsingMTOM&gt;
-            &lt;/soapenv:Body&gt;
-         &lt;/soapenv:Envelope&gt;
---MIMEBoundaryurn_uuid_B94996494E1DD5F9B51177413845353217
-Content-Type: image/gif
-Content-Transfer-Encoding: binary
-Content-ID:
-         &lt;1.urn:uuid:78F94BC50B68D76FB41177413845003@apache.org&gt;22800GIF89a... &lt;&lt; binary content &gt;&gt;</pre>
-<pre xml:space="preserve">POST http://localhost:9000/services/MTOMSwASampleService HTTP/1.1
-Host: 127.0.0.1
-SOAPAction: urn:uploadFileUsingSwA
-Content-Type: multipart/related; boundary=MIMEBoundaryurn_uuid_B94996494E1DD5F9B51177414170491; type=&quot;text/xml&quot;;
-start=&quot;&lt;0.urn:uuid:B94996494E1DD5F9B51177414170492@apache.org&gt;&quot;; charset=UTF-8
-Transfer-Encoding: chunked
-Connection: Keep-Alive
-User-Agent: Synapse-HttpComponents-NIO
-
---MIMEBoundaryurn_uuid_B94996494E1DD5F9B51177414170491225
-Content-Type: text/xml; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-Content-ID:
-   &lt;0.urn:uuid:B94996494E1DD5F9B51177414170492@apache.org&gt;22159
-      &lt;?xml version='1.0' encoding='UTF-8'?&gt;
-         &lt;soapenv:Envelope xmlns:soapenv=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot;&gt;
-            &lt;soapenv:Body&gt;
-               &lt;m0:uploadFileUsingSwA xmlns:m0=&quot;http://www.apache-synapse.org/test&quot;&gt;
-                  &lt;m0:request&gt;
-                     &lt;m0:imageId&gt;urn:uuid:15FD2DA2584A32BF7C1177414169826&lt;/m0:imageId&gt;
-                  &lt;/m0:request&gt;
-               &lt;/m0:uploadFileUsingSwA&gt;
-            &lt;/soapenv:Body&gt;
-         &lt;/soapenv:Envelope&gt;22--34MIMEBoundaryurn_uuid_B94996494E1DD5F9B511774141704912
-17
-Content-Type: image/gif
-Content-Transfer-Encoding: binary
-Content-ID:
-         &lt;urn:uuid:15FD2DA2584A32BF7C1177414169826&gt;22800GIF89a... &lt;&lt; binary content &gt;&gt;</pre>
-<h2>
-<a name="Sample52" id="Sample52">Sample 52: Session less load balancing between 3 endpoints</a></h2>
-<pre xml:space="preserve">&lt;definitions xmlns=&quot;http://ws.apache.org/ns/synapse&quot;&gt;
-
-    &lt;sequence name=&quot;main&quot; onError=&quot;errorHandler&quot;&gt;
-        &lt;in&gt;
-            &lt;send&gt;
-                &lt;endpoint&gt;
-                    &lt;loadbalance&gt;
-                        &lt;endpoint&gt;
-                            &lt;address uri=&quot;http://localhost:9001/services/LBService1&quot;&gt;
-                                &lt;enableAddressing/&gt;
-                                &lt;suspendDurationOnFailure&gt;60&lt;/suspendDurationOnFailure&gt;
-                            &lt;/address&gt;
-                        &lt;/endpoint&gt;
-                        &lt;endpoint&gt;
-                            &lt;address uri=&quot;http://localhost:9002/services/LBService1&quot;&gt;
-                                &lt;enableAddressing/&gt;
-                                &lt;suspendDurationOnFailure&gt;60&lt;/suspendDurationOnFailure&gt;
-                            &lt;/address&gt;
-                        &lt;/endpoint&gt;
-                        &lt;endpoint&gt;
-                            &lt;address uri=&quot;http://localhost:9003/services/LBService1&quot;&gt;
-                                &lt;enableAddressing/&gt;
-                                &lt;suspendDurationOnFailure&gt;60&lt;/suspendDurationOnFailure&gt;
-                            &lt;/address&gt;
-                        &lt;/endpoint&gt;
-                    &lt;/loadbalance&gt;
-                &lt;/endpoint&gt;
-            &lt;/send&gt;
-            &lt;drop/&gt;
-        &lt;/in&gt;
-
-        &lt;out&gt;
-            &lt;!-- Send the messages where they have been sent (i.e. implicit To EPR) --&gt;
-            &lt;send/&gt;
-        &lt;/out&gt;
-    &lt;/sequence&gt;
-
-    &lt;sequence name=&quot;errorHandler&quot;&gt;
-        &lt;makefault response=&quot;true&quot;&gt;
-            &lt;code value=&quot;tns:Receiver&quot; xmlns:tns=&quot;http://www.w3.org/2003/05/soap-envelope&quot;/&gt;
-            &lt;reason value=&quot;COULDN'T SEND THE MESSAGE TO THE SERVER.&quot;/&gt;
-        &lt;/makefault&gt;
-        &lt;send/&gt;
-    &lt;/sequence&gt;
-
-&lt;/definitions&gt;</pre>
-<p>
-<strong>Objective: Demonstrate the simple load balancing among a set of endpoints</strong> </p>
-<p>
-<strong>Prerequisites:</strong>
-<br/>Start Synapse with sample configuration 52. (i.e. synapse -sample 52)
-<br/>Deploy the LoadbalanceFailoverService by switching to &lt;Synapse installation directory&gt;/samples/axis2Server/src/LoadbalanceFailoverService directory and running ant.
-<br/>Start three instances of sample Axis2 server on HTTP ports 9001, 9002 and 9003 and give some unique names to each server.</p>
-<p>Example commands to run sample Axis2 servers from the &lt;Synapse installation directory&gt;/samples/axis2Server directory in Linux are listed below: </p>
-<pre xml:space="preserve">./axis2server.sh -http 9001 -https 9005 -name MyServer1
-./axis2server.sh -http 9002 -https 9006 -name MyServer2
-./axis2server.sh -http 9003 -https 9007 -name MyServer3</pre>
-<p>Now we are done with setting up the environment for load balance sample. Start the load balance and failover client using the following command: </p>
-<pre xml:space="preserve">ant loadbalancefailover -Di=100</pre>
-<p>This client sends 100 requests to the LoadbalanceFailoverService through Synapse. Synapse will distribute the load among the three endpoints mentioned in the configuration in round-robin manner. LoadbalanceFailoverService appends the name of the server to the response, so that client can determine which server has processed the message. If you examine the console output of the client, you can see that requests are processed by three servers as follows: </p>
-<pre xml:space="preserve">[java] Request: 1 ==&gt; Response from server: MyServer1
-[java] Request: 2 ==&gt; Response from server: MyServer2
-[java] Request: 3 ==&gt; Response from server: MyServer3
-[java] Request: 4 ==&gt; Response from server: MyServer1
-[java] Request: 5 ==&gt; Response from server: MyServer2
-[java] Request: 6 ==&gt; Response from server: MyServer3
-[java] Request: 7 ==&gt; Response from server: MyServer1
-...</pre>
-<p>Now run the client without the -Di=100 parameter to send infinite requests. While running the client shutdown the server named MyServer1. You can observe that requests are only distributed among MyServer2 and MyServer3 after shutting down MyServer1. Console output before and after shutting down MyServer1 is listed below (MyServer1 was shutdown after request 63): </p>
-<pre xml:space="preserve">...
-[java] Request: 61 ==&gt; Response from server: MyServer1
-[java] Request: 62 ==&gt; Response from server: MyServer2
-[java] Request: 63 ==&gt; Response from server: MyServer3
-[java] Request: 64 ==&gt; Response from server: MyServer2
-[java] Request: 65 ==&gt; Response from server: MyServer3
-[java] Request: 66 ==&gt; Response from server: MyServer2
-[java] Request: 67 ==&gt; Response from server: MyServer3
-...</pre>
-<p>Now restart MyServer1. You can observe that requests will be again sent to all three servers roughly after 60 seconds. This is because we have specified &lt;suspendDurationOnFailure&gt; as 60 seconds in the configuration. Therefore, load balance endpoint will suspend any failed child endpoint only for 60 seconds after detecting the failure. </p>
-<h2>
-<a name="Sample53" id="Sample53">Sample 53: Failover sending among 3 endpoints</a></h2>
-<pre xml:space="preserve">&lt;definitions xmlns=&quot;http://ws.apache.org/ns/synapse&quot;&gt;
-
-    &lt;sequence name=&quot;main&quot; onError=&quot;errorHandler&quot;&gt;
-        &lt;in&gt;
-            &lt;send&gt;
-                &lt;endpoint&gt;
-                    &lt;failover&gt;
-                        &lt;endpoint&gt;
-                            &lt;address uri=&quot;http://localhost:9001/services/LBService1&quot;&gt;
-                                &lt;enableAddressing/&gt;
-                                &lt;suspendDurationOnFailure&gt;60&lt;/suspendDurationOnFailure&gt;
-                            &lt;/address&gt;
-                        &lt;/endpoint&gt;
-                        &lt;endpoint&gt;
-                            &lt;address uri=&quot;http://localhost:9002/services/LBService1&quot;&gt;
-                                &lt;enableAddressing/&gt;
-                                &lt;suspendDurationOnFailure&gt;60&lt;/suspendDurationOnFailure&gt;
-                            &lt;/address&gt;
-                        &lt;/endpoint&gt;
-                        &lt;endpoint&gt;
-                            &lt;address uri=&quot;http://localhost:9003/services/LBService1&quot;&gt;
-                                &lt;enableAddressing/&gt;
-                                &lt;suspendDurationOnFailure&gt;60&lt;/suspendDurationOnFailure&gt;
-                            &lt;/address&gt;
-                        &lt;/endpoint&gt;
-                    &lt;/failover&gt;
-                &lt;/endpoint&gt;
-            &lt;/send&gt;
-            &lt;drop/&gt;
-        &lt;/in&gt;
-
-        &lt;out&gt;
-            &lt;!-- Send the messages where they have been sent (i.e. implicit To EPR) --&gt;
-            &lt;send/&gt;
-        &lt;/out&gt;
-    &lt;/sequence&gt;
-
-    &lt;sequence name=&quot;errorHandler&quot;&gt;
-        &lt;makefault response=&quot;true&quot;&gt;
-            &lt;code value=&quot;tns:Receiver&quot; xmlns:tns=&quot;http://www.w3.org/2003/05/soap-envelope&quot;/&gt;
-            &lt;reason value=&quot;COULDN'T SEND THE MESSAGE TO THE SERVER.&quot;/&gt;
-        &lt;/makefault&gt;
-        &lt;send/&gt;
-    &lt;/sequence&gt;
-
-&lt;/definitions&gt;</pre>
-<p>
-<strong>Objective: Demonstrate the failover sending</strong> </p>
-<p>
-<strong>Prerequisites:</strong>
-<br/>Start Synapse with sample configuration 53 (i.e. synapse -sample 53)
-<br/>Deploy the LoadbalanceFailoverService and start three instances of sample Axis2 server as mentioned in sample 52.</p>
-<p>Above configuration sends messages with the failover behavior. Initially the server at port 9001 is treated as primary and other two are treated as backups. Messages are always directed only to the primary server. If the primary server has failed, next listed server is selected as the primary. Thus, messages are sent successfully as long as there is at least one active server. To test this, run the loadbalancefailover client to send infinite requests as follows: </p>
-<pre xml:space="preserve">ant loadbalancefailover</pre>
-<p>You can see that all requests are processed by MyServer1. Now shutdown MyServer1 and inspect the console output of the client. You will observe that all subsequent requests are processed by MyServer2. </p>
-<p>The console output with MyServer1 shutdown after request 127 is listed below: </p>
-<pre xml:space="preserve">...
-[java] Request: 125 ==&gt; Response from server: MyServer1
-[java] Request: 126 ==&gt; Response from server: MyServer1
-[java] Request: 127 ==&gt; Response from server: MyServer1
-[java] Request: 128 ==&gt; Response from server: MyServer2
-[java] Request: 129 ==&gt; Response from server: MyServer2
-[java] Request: 130 ==&gt; Response from server: MyServer2
-...</pre>
-<p>You can keep on shutting down servers like this. Client will get a response till you shutdown all listed servers. Once all servers are shutdown, the error sequence is activated and a fault message is sent to the client as follows. </p>
-<pre xml:space="preserve">[java] COULDN'T SEND THE MESSAGE TO THE SERVER.</pre>
-<p>Once a server is detected as failed, it will be added to the active servers list again after 60 seconds (specified in &lt;suspendDurationOnFailure&gt; in the configuration). Therefore, if you have restarted any of the stopped servers and have shutdown all other servers, messages will be directed to the newly started server. </p>
-<h2>
-<a name="Sample54" id="Sample54">Sample 54: Session affinity load balancing between 3 endpoints</a></h2>
-<pre xml:space="preserve">&lt;definitions xmlns=&quot;http://ws.apache.org/ns/synapse&quot;&gt;
-
-    &lt;sequence name=&quot;main&quot; onError=&quot;errorHandler&quot;&gt;
-        &lt;in&gt;
-            &lt;send&gt;
-                &lt;endpoint&gt;
-                    &lt;!-- specify the session as the simple client session provided by Synapse for
-                    testing purpose --&gt;
-                    
-                    <strong>&lt;session type=&quot;simpleClientSession&quot;/&gt;</strong>
-
-                    &lt;loadbalance&gt;
-                        &lt;endpoint&gt;
-                            &lt;address uri=&quot;http://localhost:9001/services/LBService1&quot;&gt;
-                                &lt;enableAddressing/&gt;
-                            &lt;/address&gt;
-                        &lt;/endpoint&gt;
-                        &lt;endpoint&gt;
-                            &lt;address uri=&quot;http://localhost:9002/services/LBService1&quot;&gt;
-                                &lt;enableAddressing/&gt;
-                            &lt;/address&gt;
-                        &lt;/endpoint&gt;
-                        &lt;endpoint&gt;
-                            &lt;address uri=&quot;http://localhost:9003/services/LBService1&quot;&gt;
-                                &lt;enableAddressing/&gt;
-                            &lt;/address&gt;
-                        &lt;/endpoint&gt;
-                    &lt;/loadbalance&gt;
-                &lt;/endpoint&gt;
-            &lt;/send&gt;
-            &lt;drop/&gt;
-        &lt;/in&gt;
-
-        &lt;out&gt;
-            &lt;!-- Send the messages where they have been sent (i.e. implicit To EPR) --&gt;
-            &lt;send/&gt;
-        &lt;/out&gt;
-    &lt;/sequence&gt;
-
-    &lt;sequence name=&quot;errorHandler&quot;&gt;
-        &lt;makefault response=&quot;true&quot;&gt;
-            &lt;code value=&quot;tns:Receiver&quot; xmlns:tns=&quot;http://www.w3.org/2003/05/soap-envelope&quot;/&gt;
-            &lt;reason value=&quot;COULDN'T SEND THE MESSAGE TO THE SERVER.&quot;/&gt;
-        &lt;/makefault&gt;
-        &lt;send/&gt;
-    &lt;/sequence&gt;
-
-&lt;/definitions&gt;</pre>
-<p>
-<strong>Objective: Demonstrate the loadbalancing with session affinity using client initiated sessions</strong> </p>
-<p>
-<strong>Prerequisites:</strong>
-<br/>Start Synapse with sample configuration 54 (i.e. synapse -sample 54).
-<br/>Deploy the LoadbalanceFailoverService and start three instances of the sample Axis2 server as in sample 52. </p>
-
-<p>Above configuration is same as the load balancing configuration in sample 52, except that the session type is specified as &quot;simpleClientSession&quot;. This is a client initiated session, which means that the client generates the session identifier and sends it with each request. In this sample session type, client adds a SOAP header named ClientID containing the identifier of the client. Synapse binds this ID with a server on the first request and sends all successive requests containing that ID to the same server. Now switch to samples/axis2Client directory and run the client using the following command to check this in action. </p>
-<pre xml:space="preserve">ant loadbalancefailover -Dmode=session</pre>
-<p>In the session mode, client continuously sends requests with three different client (session) IDs. One ID is selected among these three IDs for each request randomly. Then client prints the session ID with the responded server for each request. Client output for the first 10 requests are shown below. </p>
-<pre xml:space="preserve">[java] Request: 1 Session number: 1 Response from server: MyServer3
-[java] Request: 2 Session number: 2 Response from server: MyServer2
-[java] Request: 3 Session number: 0 Response from server: MyServer1
-[java] Request: 4 Session number: 2 Response from server: MyServer2
-[java] Request: 5 Session number: 1 Response from server: MyServer3
-[java] Request: 6 Session number: 2 Response from server: MyServer2
-[java] Request: 7 Session number: 2 Response from server: MyServer2
-[java] Request: 8 Session number: 1 Response from server: MyServer3
-[java] Request: 9 Session number: 0 Response from server: MyServer1
-[java] Request: 10 Session number: 0 Response from server: MyServer1
-... </pre>
-<p>You can see that session number 0 is always directed to the server named MyServer1. That means session number 0 is bound to MyServer1. Similarly session 1 and 2 are bound to MyServer3 and MyServer2 respectively. </p>
-<h2>
-<a name="Sample55" id="Sample55">Sample 55: Session affinity load balancing between fail over endpoints</a></h2>
-<pre xml:space="preserve">&lt;definitions xmlns=&quot;http://ws.apache.org/ns/synapse&quot;&gt;
-
-    &lt;sequence name=&quot;main&quot; onError=&quot;errorHandler&quot;&gt;
-        &lt;in&gt;
-            &lt;send&gt;
-                &lt;endpoint&gt;
-                    &lt;!-- specify the session as the simple client session provided by Synapse for
-                    testing purpose --&gt;
-                    
-                    <strong>&lt;session type=&quot;simpleClientSession&quot;/&gt;</strong>
-
-                    &lt;loadbalance&gt;
-                        &lt;endpoint&gt;
-                            &lt;failover&gt;
-                                &lt;endpoint&gt;
-                                    &lt;address uri=&quot;http://localhost:9001/services/LBService1&quot;&gt;
-                                        &lt;enableAddressing/&gt;
-                                    &lt;/address&gt;
-                                &lt;/endpoint&gt;
-                                &lt;endpoint&gt;
-                                    &lt;address uri=&quot;http://localhost:9002/services/LBService1&quot;&gt;
-                                        &lt;enableAddressing/&gt;
-                                    &lt;/address&gt;
-                                &lt;/endpoint&gt;
-                            &lt;/failover&gt;
-                        &lt;/endpoint&gt;
-                        &lt;endpoint&gt;
-                            &lt;failover&gt;
-                                &lt;endpoint&gt;
-                                    &lt;address uri=&quot;http://localhost:9003/services/LBService1&quot;&gt;
-                                        &lt;enableAddressing/&gt;
-                                    &lt;/address&gt;
-                                &lt;/endpoint&gt;
-                                &lt;endpoint&gt;
-                                    &lt;address uri=&quot;http://localhost:9004/services/LBService1&quot;&gt;
-                                        &lt;enableAddressing/&gt;
-                                    &lt;/address&gt;
-                                &lt;/endpoint&gt;
-                            &lt;/failover&gt;
-                        &lt;/endpoint&gt;
-                    &lt;/loadbalance&gt;
-                &lt;/endpoint&gt;
-            &lt;/send&gt;
-            &lt;drop/&gt;
-        &lt;/in&gt;
-
-        &lt;out&gt;
-            &lt;!-- Send the messages where they have been sent (i.e. implicit To EPR) --&gt;
-            &lt;send/&gt;
-        &lt;/out&gt;
-    &lt;/sequence&gt;
-
-    &lt;sequence name=&quot;errorHandler&quot;&gt;
-        &lt;makefault response=&quot;true&quot;&gt;
-            &lt;code value=&quot;tns:Receiver&quot; xmlns:tns=&quot;http://www.w3.org/2003/05/soap-envelope&quot;/&gt;
-            &lt;reason value=&quot;COULDN'T SEND THE MESSAGE TO THE SERVER.&quot;/&gt;
-        &lt;/makefault&gt;
-        &lt;send/&gt;
-    &lt;/sequence&gt;
-
-&lt;/definitions&gt;</pre>
-<p>
-<strong>Objective: Demonstrate the session affinity based load balancing with failover capability</strong> </p>
-<p>
-<strong>Prerequisites:</strong>
-<br/>Start Synapse with sample configuration 55 (i.e. synapse -sample 55).
-<br/>Deploy the LoadbalanceFailoverService and start four sample Axis2 servers on HTTP ports 9001, 9002, 9003 and 9004 respectively (make sure to specify non-conflicting HTTPS ports). </p>
-<p>This configuration also uses &quot;simpleClientSession&quot; to bind sessions as in the previous sample. But failover endpoints are specified as the child endpoints of the load balance endpoint. Therefore sessions are bound to the failover endpoints. Session information has to be replicated among the servers listed under each failover endpoint using some clustering mechanism. Therefore, if one endpoint bound to a session failed, successive requets for that session will be directed to the next endpoint in that failover group. Run the client using the following command to observe this behaviour. </p>
-<pre xml:space="preserve">ant loadbalancefailover -Dmode=session</pre>
-<p>You can see a client output as shown below. </p>
-<pre xml:space="preserve">...
-[java] Request: 222 Session number: 0 Response from server: MyServer1
-[java] Request: 223 Session number: 0 Response from server: MyServer1
-[java] Request: 224 Session number: 1 Response from server: MyServer1
-[java] Request: 225 Session number: 2 Response from server: MyServer3
-[java] Request: 226 Session number: 0 Response from server: MyServer1
-[java] Request: 227 Session number: 1 Response from server: MyServer1
-[java] Request: 228 Session number: 2 Response from server: MyServer3
-[java] Request: 229 Session number: 1 Response from server: MyServer1
-[java] Request: 230 Session number: 1 Response from server: MyServer1
-[java] Request: 231 Session number: 2 Response from server: MyServer3
-...</pre>
-<p>Note that session 0 is always directed to MyServer1 and session 1 is directed to MyServer3. No requests are directed to MyServer2 and MyServer4 as they are kept as backups by failover endpoints. Now shutdown the server named MyServer1 while running the sample. You will observe that all successive requests for session 0 is now directed to MyServer2, which is the backup server for MyServer1's group. This is shown below, where MyServer1 was shutdown after the request 534. </p>
-<pre xml:space="preserve">...
-[java] Request: 529 Session number: 2 Response from server: MyServer3
-[java] Request: 530 Session number: 1 Response from server: MyServer1
-[java] Request: 531 Session number: 0 Response from server: MyServer1
-[java] Request: 532 Session number: 1 Response from server: MyServer1
-[java] Request: 533 Session number: 1 Response from server: MyServer1
-[java] Request: 534 Session number: 1 Response from server: MyServer1
-[java] Request: 535 Session number: 0 Response from server: MyServer2
-[java] Request: 536 Session number: 0 Response from server: MyServer2
-[java] Request: 537 Session number: 0 Response from server: MyServer2
-[java] Request: 538 Session number: 2 Response from server: MyServer3
-[java] Request: 539 Session number: 0 Response from server: MyServer2
-...</pre>
-<h2>
-<a name="Sample56" id="Sample56">Sample 56: WSDL endpoint</a></h2>
-<pre xml:space="preserve">&lt;definitions xmlns="http://ws.apache.org/ns/synapse"&gt;
-
-    &lt;sequence name="main"&gt;
-        &lt;in&gt;
-            &lt;send&gt;
-                &lt;!-- get epr from the given wsdl --&gt;
-                &lt;endpoint&gt;
-                    &lt;wsdl uri="file:repository/conf/sample/resources/proxy/sample_proxy_1.wsdl"
-                          service="SimpleStockQuoteService"
-                          port="SimpleStockQuoteServiceHttpSoap11Endpoint"/&gt;
-                &lt;/endpoint&gt;
-            &lt;/send&gt;
-        &lt;/in&gt;
-
-        &lt;out&gt;
-            &lt;send/&gt;
-        &lt;/out&gt;
-    &lt;/sequence&gt;
-
-&lt;/definitions&gt;</pre>
-<p>
-<strong>Objective: Demonstrate the use of WSDL endpoints</strong> </p>
-<p>
-<strong>Prerequisites:</strong>
-<br/>Start the Synapse configuration numbered 56 (i.e. synapse -sample 56).
-<br/>Deploy the SimpleStockQuoteService and start the sample Axis2 server. </p>
-
-<p>This sample uses a WSDL endpoint inside the send mediator. WSDL endpoints can extract endpoint's address from the given WSDL. As WSDL documents can have many services and many ports inside each service, the service and port of the required endpoint has to be specified. As with address endpoints, QoS parameters for the endpoint can be specified in-line in the configuration. An excerpt taken from the sample_proxy_1.wsdl containing the specified service and port is listed below. </p>
-<pre xml:space="preserve">&lt;wsdl:service name="SimpleStockQuoteService"&gt;
-    &lt;wsdl:port name="SimpleStockQuoteServiceHttpSoap11Endpoint" binding="ns:SimpleStockQuoteServiceSoap11Binding"&gt;
-        &lt;soap:address location="http://localhost:9000/services/SimpleStockQuoteService.SimpleStockQuoteServiceHttpSoap11Endpoint"/&gt;
-    &lt;/wsdl:port&gt;
-    &lt;wsdl:port name="SimpleStockQuoteServiceHttpSoap12Endpoint" binding="ns:SimpleStockQuoteServiceSoap12Binding"&gt;
-        &lt;soap12:address location="http://localhost:9000/services/SimpleStockQuoteService.SimpleStockQuoteServiceHttpSoap12Endpoint"/&gt;
-    &lt;/wsdl:port&gt;
-&lt;/wsdl:service&gt;</pre>
-<p>Specified service and port refers to the endpoint address &quot;http://localhost:9000/services/SimpleStockQuoteService.SimpleStockQuoteServiceHttpSoap11Endpoint&quot; according to the above WSDL. Now run the client using the following command. </p>
-<pre xml:space="preserve">ant stockquote -Dsymbol=IBM -Dmode=quote -Daddurl=http://localhost:8280</pre>
-<p>Client will print the quote price for IBM received from the server running on port 9000. Observe the Axis2 console and the Synapse console to verify this behavior. </p>
-<h2>
-<a name="Sample57" id="Sample57">Sample 57: Dynamic load balancing between 3 nodes</a></h2>
-<pre xml:space="preserve">
-&lt;definitions xmlns=&quot;http://ws.apache.org/ns/synapse&quot;&gt;
-
-    &lt;sequence name=&quot;main&quot; onError=&quot;errorHandler&quot;&gt;
-        &lt;in&gt;
-            &lt;send&gt;
-                &lt;endpoint name=&quot;dynamicLB&quot;&gt;
-                    &lt;dynamicLoadbalance failover=&quot;true&quot;
-                                           algorithm=&quot;org.apache.synapse.endpoints.algorithms.RoundRobin&quot;&gt;
-                        &lt;membershipHandler
-                                class=&quot;org.apache.synapse.core.axis2.Axis2LoadBalanceMembershipHandler&quot;&gt;
-                            &lt;property name=&quot;applicationDomain&quot; value=&quot;apache.axis2.app.domain&quot;/&gt;
-                        &lt;/membershipHandler&gt;
-                    &lt;/dynamicLoadbalance&gt;
-                &lt;/endpoint&gt;
-            &lt;/send&gt;
-            &lt;drop/&gt;
-        &lt;/in&gt;
-
-        &lt;out&gt;
-            &lt;send/&gt;
-        &lt;/out&gt;
-    &lt;/sequence&gt;
-
-    &lt;sequence name=&quot;errorHandler&quot;&gt;
-        &lt;makefault response=&quot;true&quot;&gt;
-            &lt;code value=&quot;tns:Receiver&quot; xmlns:tns=&quot;http://www.w3.org/2003/05/soap-envelope&quot;/&gt;
-            &lt;eason value=&quot;COULDN'T SEND THE MESSAGE TO THE SERVER.&quot;/&gt;
-        &lt;/makefault&gt;
-        &lt;send/&gt;
-    &lt;/sequence&gt;
-
-&lt;/definitions&gt;
-</pre>
-<p>
-<strong>Objective: Demonstrate the simple dynamic load balancing among a set of nodes</strong> </p>
-<p>
-<strong>Prerequisites:</strong>
-<br/>Enable clustering and load balancing in the &lt;Synapse installation directory&gt;/ repository/conf/axis2.xml file. This can be done by setting the &quot;enable&quot; attribute of the &quot;cluster&quot; and &quot;loadBalancer&quot; elements. Also provide the IP address of you machine as the values of the &quot;mcastBindAddress&quot; and &quot;localMemberHost&quot; parameters.
-<br/>Start Synapse with sample configuration 57. (i.e. synapse -sample 57)
-<br/>Deploy the LoadbalanceFailoverService by switching to &lt;Synapse installation directory&gt;/samples/axis2Server/src/LoadbalanceFailoverService directory and running ant.
-<br/>Enable clustering in the &lt;Synapse installation directory&gt;/samples/axis2Server/ repository/conf/axis2.xml file. This can be done by setting the &quot;enable&quot; attribute of the &quot;cluster&quot; element. Also provide the IP address of you machine as the values of the &quot;mcastBindAddress&quot; and &quot;localMemberHost&quot; parameters. Make sure that the "applicationDomain" of the membershipHandler is the same as the domain name specified in the axis2.xml files of the Axis2 servers. Then Start three instances of sample Axis2 server on HTTP ports 9001, 9002 and 9003 and give some unique names to each server.</p>
-<p>Example commands to run sample Axis2 servers from the &lt;Synapse installation directory&gt;/samples/axis2Server directory in Linux are listed below: </p>
-<pre xml:space="preserve">./axis2server.sh -http 9001 -https 9005 -name MyServer1
-./axis2server.sh -http 9002 -https 9006 -name MyServer2
-./axis2server.sh -http 9003 -https 9007 -name MyServer3</pre>
-<p>Now we are done with setting up the environment for load balance sample. Start the load balance and failover client using the following command: </p>
-<pre xml:space="preserve">ant loadbalancefailover -Di=100</pre>
-<p>This client sends 100 requests to the LoadbalanceFailoverService through Synapse. Synapse will distribute the load among the three nodes mentioned in the configuration in a round-robin manner. LoadbalanceFailoverService appends the name of the server to the response, so that client can determine which server has processed the message. If you examine the console output of the client, you can see that requests are processed by three servers as follows: </p>
-<pre xml:space="preserve">[java] Request: 1 ==&gt; Response from server: MyServer1
-[java] Request: 2 ==&gt; Response from server: MyServer2
-[java] Request: 3 ==&gt; Response from server: MyServer3
-[java] Request: 4 ==&gt; Response from server: MyServer1
-[java] Request: 5 ==&gt; Response from server: MyServer2
-[java] Request: 6 ==&gt; Response from server: MyServer3
-[java] Request: 7 ==&gt; Response from server: MyServer1
-...</pre>
-<p>Now run the client without the -Di=100 parameter, i.e. ant loadbalancefailover, to send infinite requests. While running the client shutdown the server named MyServer1. You can observe that requests are only distributed among MyServer2 and MyServer3 after shutting down MyServer1. Console output before and after shutting down MyServer1 is listed below (MyServer1 was shutdown after request 63): </p>
-<pre xml:space="preserve">...
-[java] Request: 61 ==&gt; Response from server: MyServer1
-[java] Request: 62 ==&gt; Response from server: MyServer2
-[java] Request: 63 ==&gt; Response from server: MyServer3
-[java] Request: 64 ==&gt; Response from server: MyServer2
-[java] Request: 65 ==&gt; Response from server: MyServer3
-[java] Request: 66 ==&gt; Response from server: MyServer2
-[java] Request: 67 ==&gt; Response from server: MyServer3
-...</pre>
-<p>Now restart MyServer1. You can observe that requests will be again sent to all three servers. </p>
-<h2>
-<a name="Sample58" id="Sample58">Sample 58: Static load balancing between 3 nodes</a></h2>
-<pre xml:space="preserve">
-&lt;definitions xmlns=&quot;http://ws.apache.org/ns/synapse&quot;&gt;
-
-    &lt;sequence name=&quot;main&quot; onError=&quot;errorHandler&quot;&gt;
-        &lt;in&gt;
-            &lt;send&gt;
-                &lt;endpoint&gt;
-                    &lt;loadbalance failover=&quot;true&quot;&gt;
-                        &lt;member hostName=&quot;127.0.0.1&quot; httpPort=&quot;9001&quot; httpsPort=&quot;9005&quot;/&gt;
-                        &lt;member hostName=&quot;127.0.0.1&quot; httpPort=&quot;9002&quot; httpsPort=&quot;9006&quot;/&gt;
-                        &lt;member hostName=&quot;127.0.0.1&quot; httpPort=&quot;9003&quot; httpsPort=&quot;9007&quot;/&gt;
-                    &lt;/loadbalance&gt;
-                &lt;/endpoint&gt;
-            &lt;/send&gt;
-            &lt;drop/&gt;
-        &lt;/in&gt;
-
-        &lt;out&gt;
-            &lt;send/&gt;
-        &lt;/out&gt;
-    &lt;/sequence&gt;
-
-    &lt;sequence name=&quot;errorHandler&quot;&gt;
-        &lt;makefault response=&quot;true&quot;&gt;
-            &lt;code value=&quot;tns:Receiver&quot; xmlns:tns=&quot;http://www.w3.org/2003/05/soap-envelope&quot;/&gt;
-            &lt;reason value=&quot;COULDN'T SEND THE MESSAGE TO THE SERVER.&quot;/&gt;
-        &lt;/makefault&gt;
-        &lt;send/&gt;
-    &lt;/sequence&gt;
-
-&lt;/definitions&gt;
-</pre>
-<p>
-<strong>Objective: Demonstrate the simple static load balancing among a set of nodes</strong> </p>
-<p>
-<strong>Prerequisites:</strong>
-<br/>Start Synapse with sample configuration 58. (i.e. synapse -sample 58)
-<br/>Deploy the LoadbalanceFailoverService by switching to &lt;Synapse installation directory&gt;/samples/axis2Server/src/LoadbalanceFailoverService directory and running ant.
-<br/>Start three instances of sample Axis2 server on HTTP ports 9001, 9002 and 9003 and give some unique names to each server. </p>
-<p>Example commands to run sample Axis2 servers from the &lt;Synapse installation directory&gt;/samples/axis2Server directory in Linux are listed below: </p>
-<pre xml:space="preserve">./axis2server.sh -http 9001 -https 9005 -name MyServer1
-./axis2server.sh -http 9002 -https 9006 -name MyServer2
-./axis2server.sh -http 9003 -https 9007 -name MyServer3</pre>
-<p>Now we are done with setting up the environment for load balance sample. Start the load balance and failover client using the following command: </p>
-<pre xml:space="preserve">ant loadbalancefailover -Di=100</pre>
-<p>This client sends 100 requests to the LoadbalanceFailoverService through Synapse. Synapse will distribute the load among the three nodes mentioned in the configuration in a round-robin manner. LoadbalanceFailoverService appends the name of the server to the response, so that client can determine which server has processed the message. If you examine the console output of the client, you can see that requests are processed by three servers as follows: </p>
-<pre xml:space="preserve">[java] Request: 1 ==&gt; Response from server: MyServer1
-[java] Request: 2 ==&gt; Response from server: MyServer2
-[java] Request: 3 ==&gt; Response from server: MyServer3
-[java] Request: 4 ==&gt; Response from server: MyServer1
-[java] Request: 5 ==&gt; Response from server: MyServer2
-[java] Request: 6 ==&gt; Response from server: MyServer3
-[java] Request: 7 ==&gt; Response from server: MyServer1
-...</pre>
-<p>Now run the client without the -Di=100 parameter, i.e. ant loadbalancefailover, to send infinite requests. While running the client shutdown the server named MyServer1. You can observe that requests are only distributed among MyServer2 and MyServer3 after shutting down MyServer1. Console output before and after shutting down MyServer1 is listed below (MyServer1 was shutdown after request 63): </p>
-<pre xml:space="preserve">...
-[java] Request: 61 ==&gt; Response from server: MyServer1
-[java] Request: 62 ==&gt; Response from server: MyServer2
-[java] Request: 63 ==&gt; Response from server: MyServer3
-[java] Request: 64 ==&gt; Response from server: MyServer2
-[java] Request: 65 ==&gt; Response from server: MyServer3
-[java] Request: 66 ==&gt; Response from server: MyServer2
-[java] Request: 67 ==&gt; Response from server: MyServer3
-...</pre>
-<p>Now restart MyServer1. You can observe that requests will be again sent to all three servers. </p>
-<h2><a name="Sample59">Sample 59: Weighted load balancing between 3
-endpoints</a> </h2>
-<pre xml:space="preserve">&lt;?xml version="1.0" encoding="UTF-8"?&gt;
-&lt;definitions xmlns="http://ws.apache.org/ns/synapse"&gt;
-    &lt;sequence name="main" onError="errorHandler"&gt;
-        &lt;in&gt;
-            &lt;send&gt;
-                &lt;endpoint&gt;
-                    &lt;loadbalance
-                            algorithm="org.apache.synapse.endpoints.algorithms.WeightedRoundRobin"&gt;
-                        &lt;endpoint&gt;
-                            &lt;address uri="http://localhost:9001/services/LBService1"&gt;
-                                &lt;enableAddressing/&gt;
-                                &lt;suspendOnFailure&gt;
-                                    &lt;initialDuration&gt;20000&lt;/initialDuration&gt;
-                                    &lt;progressionFactor&gt;1.0&lt;/progressionFactor&gt;
-                                &lt;/suspendOnFailure&gt;
-                            &lt;/address&gt;
-                            &lt;property name="loadbalance.weight" value="1"/&gt;
-                        &lt;/endpoint&gt;
-                        &lt;endpoint&gt;
-                            &lt;address uri="http://localhost:9002/services/LBService1"&gt;
-                                &lt;enableAddressing/&gt;
-                                &lt;suspendOnFailure&gt;
-                                    &lt;initialDuration&gt;20000&lt;/initialDuration&gt;
-                                    &lt;progressionFactor&gt;1.0&lt;/progressionFactor&gt;
-                                &lt;/suspendOnFailure&gt;
-                            &lt;/address&gt;
-                            &lt;property name="loadbalance.weight" value="2"/&gt;
-                        &lt;/endpoint&gt;
-                        &lt;endpoint&gt;
-                            &lt;address uri="http://localhost:9003/services/LBService1"&gt;
-                                &lt;enableAddressing/&gt;
-                                &lt;suspendOnFailure&gt;
-                                    &lt;initialDuration&gt;20000&lt;/initialDuration&gt;
-                                    &lt;progressionFactor&gt;1.0&lt;/progressionFactor&gt;
-                                &lt;/suspendOnFailure&gt;
-                            &lt;/address&gt;
-                            &lt;property name="loadbalance.weight" value="3"/&gt;
-                        &lt;/endpoint&gt;
-                    &lt;/loadbalance&gt;
-                &lt;/endpoint&gt;
-            &lt;/send&gt;
-            &lt;drop/&gt;
-        &lt;/in&gt;
-        &lt;out&gt;
-            &lt;send/&gt;
-        &lt;/out&gt;
-    &lt;/sequence&gt;
-    &lt;sequence name="errorHandler"&gt;
-        &lt;makefault response="true"&gt;
-            &lt;code xmlns:tns="http://www.w3.org/2003/05/soap-envelope" value="tns:Receiver"/&gt;
-            &lt;reason value="COULDN'T SEND THE MESSAGE TO THE SERVER."/&gt;
-        &lt;/makefault&gt;
-        &lt;send/&gt;
-    &lt;/sequence&gt;
-&lt;/definitions&gt;</pre>
-
-<p><strong>Objective: Demonstrate the weighted load balancing among a set of
-endpoints</strong> </p>
-
-<p><strong>Prerequisites:</strong> </p>
-
-<p>Start ESB with sample configuration 59. (i.e. synapse -sample 59) </p>
-
-<p>Deploy the LoadbalanceFailoverService and start three instances of sample Axis2 server as mentioned in sample 52.</p>
-
-<p>Above configuration sends messages with the weighted loadbalance behaviour. Weight of each leaf
-address endpoint is defined by integer value of "loadbalance.weight" property associated with each endpoint.
-If weight of a endpoint is x, x number of requests will send to that endpoint before switch to next active endpoint.
-<br/>To test this, run the loadbalancefailover client to send 100 requests as follows: </p>
-<pre xml:space="preserve">ant loadbalancefailover -Di=100</pre>
-
-<p>This client sends 100 requests to the LoadbalanceFailoverService through
-ESB. ESB will distribute the load among the three endpoints mentioned in the
-configuration in weighted round-robin manner. LoadbalanceFailoverService appends the
-name of the server to the response, so that client can determine which server
-has processed the message. If you examine the console output of the client,
-you can see that requests are processed by three servers as follows: </p>
-<pre xml:space="preserve">[java] Request: 1 ==&gt; Response from server: MyServer1
-[java] Request: 2 ==&gt; Response from server: MyServer2
-[java] Request: 3 ==&gt; Response from server: MyServer2
-[java] Request: 4 ==&gt; Response from server: MyServer3
-[java] Request: 5 ==&gt; Response from server: MyServer3
-[java] Request: 6 ==&gt; Response from server: MyServer3
-[java] Request: 7 ==&gt; Response from server: MyServer1
-[java] Request: 8 ==&gt; Response from server: MyServer2
-[java] Request: 9 ==&gt; Response from server: MyServer2
-[java] Request: 10 ==&gt; Response from server: MyServer3
-[java] Request: 11 ==&gt; Response from server: MyServer3
-[java] Request: 12 ==&gt; Response from server: MyServer3
-...</pre>
-<p>As logs, endpoint with weight 1 received a 1 request and endpoint with weight 2 received 2
-requests and etc... in a cycle</p>
-
-<h2>
-<a name="Sample60" id="Sample57">Sample 60: Service dynamic load balancing between 2 Service nodes</a></h2>
-<pre xml:space="preserve">
-&lt;definitions xmlns="http://ws.apache.org/ns/synapse"&gt;
-
-    &lt;sequence name="main" onError="errorHandler"&gt;
-        &lt;in&gt;
-            &lt;property name="SERVICE_PREFIX" expression="$axis2:SERVICE_PREFIX"/&gt;
-            &lt;send&gt;
-                &lt;endpoint name="sdlbEndpoint"&gt;
-                    &lt;serviceDynamicLoadbalance failover="true"
-                                               algorithm="org.apache.synapse.endpoints.algorithms.RoundRobin"&gt;
-                        &lt;loadBalancerConfig&gt;
-                            &lt;services&gt;
-                                &lt;service&gt;
-                                    &lt;hosts&gt;
-                                        &lt;host&gt;test1.synapse.apache.org&lt;/host&gt;
-                                    &lt;/hosts&gt;
-                                    &lt;domain&gt;test1.synapse.domain&lt;/domain&gt;
-                                &lt;/service&gt;
-                                &lt;service&gt;
-                                    &lt;hosts&gt;
-                                        &lt;host&gt;test2.synapse.apache.org&lt;/host&gt;
-                                    &lt;/hosts&gt;
-                                    &lt;domain&gt;test2.synapse.domain&lt;/domain&gt;
-                                &lt;/service&gt;
-                            &lt;/services&gt;
-                        &lt;/loadBalancerConfig&gt;
-                    &lt;/serviceDynamicLoadbalance&gt;
-                &lt;/endpoint&gt;
-            &lt;/send&gt;
-            &lt;drop/&gt;
-        &lt;/in&gt;
-
-        &lt;out&gt;
-            &lt;!-- Send the messages where they have been sent (i.e. implicit To EPR) --&gt;
-            &lt;send/&gt;
-        &lt;/out&gt;
-    &lt;/sequence&gt;
-
-    &lt;sequence name="errorHandler"&gt;
-        &lt;makefault response="true"&gt;
-            &lt;code xmlns:tns="http://www.w3.org/2003/05/soap-envelope" value="tns:Receiver"/&gt;
-            &lt;reason value="COULDN'T SEND THE MESSAGE TO THE SERVER."/&gt;
-        &lt;/makefault&gt;
-        &lt;send/&gt;
-    &lt;/sequence&gt;
-
-&lt;/definitions&gt;
-</pre>
-<p>
-<strong>
-    Objective: Demonstrate Service-aware dynamic load balancing between a couple of nodes which belong to two different Services.
-</strong>    
-</p>
-<p>
-    Here, the word Service is used in the context of Cloud Service. A Cloud Service consists of a number of nodes.
-    In this context, a Cloud Service is also associated with a clustering domain. 
-    This can be used in place of the DynamicLoadbalanceEndpoint as well.
-</p>
-<p>
-<strong>Prerequisites:</strong>
-<br/>
-Put the following entries into the /etc/hosts file on your machine.
-
-<pre xml:space="preserve">
-127.0.0.1    test1.synapse.apache.org
-127.0.0.1    test2.synapse.apache.org
-</pre>
-
-<br/>Enable clustering in the &lt;Synapse installation directory&gt;/ repository/conf/axis2.xml file. This can be done by setting the &quot;enable&quot; attribute of the &quot;clustering&quot; element.
-
-<br/>
-Enabled groupManagement in the &lt;Synapse installation directory&gt;/ repository/conf/axis2.xml file by copying the following configuration under the clustering section.
-</p>
-<pre>
-&lt;groupManagement enable="true"&gt;
-    &lt;applicationDomain name="test1.synapse.domain"
-                       description="Axis2 group"
-                       agent="org.apache.axis2.clustering.management.DefaultGroupManagementAgent"/&gt;
-    &lt;applicationDomain name="test2.synapse.domain"
-                       description="Axis2 group"
-                       agent="org.apache.axis2.clustering.management.DefaultGroupManagementAgent"/&gt;
-&lt;/groupManagement&gt;
-</pre>
-
-<p>
-Now we are done with configuring Synapse. Start the Synapse server with sample configuration 60. (i.e. synapse -sample 60)
-</p>
-<p>
-Now we will look at configuring the Axis2 servers.
-Deploy the LoadbalanceFailoverService by switching to &lt;Synapse installation directory&gt;/samples/axis2Server/src/LoadbalanceFailoverService directory and running ant. Enable clustering in the &lt;Synapse installation directory&gt;/samples/axis2Server/ repository/conf/axis2.xml by setting the &quot;enable&quot; attribute of the &quot;clustering&quot; element. Set the applicationDomain to <strong>test1.synapse.domain</strong>.
-Next Start 2 instances of sample Axis2 server on HTTP ports 9001, 9002 and 9003 and give some unique names to each server.
-</p>
-<p>Example commands to run sample Axis2 servers from the &lt;Synapse installation directory&gt;/samples/axis2Server directory in Linux are listed below: </p>
-<pre xml:space="preserve">
-./axis2server.sh -http 9001 -https 9005 -name <strong>test1</strong>.synapse.apache.org-server1
-./axis2server.sh -http 9002 -https 9006 -name <strong>test1</strong>.synapse.apache.org-server2
-</pre>
-<p>Now we are done with setting up the environment for load balance sample. Start the load balance and failover client using the following command: </p>
-<pre xml:space="preserve">
-ant loadbalancefailover -Di=100 -Dtrpurl=http://<strong>test1</strong>.synapse.apache.org:8280/services/LBService1
-</pre>
-<p>This client sends 100 requests to the LoadbalanceFailoverService through Synapse. Synapse will route the request to the nodes in the <strong>test1.synapse.domain</strong> clustering domain in a round-robin manner. LoadbalanceFailoverService appends the name of the server to the response, so that client can determine which server has processed the message. If you examine the console output of the client, you can see that requests are processed by three servers as follows: </p>
-<pre xml:space="preserve">
-[java] Request: 1 ==&gt; Response from server: test1.synapse.apache.org-server1
-[java] Request: 2 ==&gt; Response from server: test1.synapse.apache.org-server2
-[java] Request: 3 ==&gt; Response from server: test1.synapse.apache.org-server1
-[java] Request: 4 ==&gt; Response from server: test1.synapse.apache.org-server2
-[java] Request: 5 ==&gt; Response from server: test1.synapse.apache.org-server1
-[java] Request: 6 ==&gt; Response from server: test1.synapse.apache.org-server2
-...
-</pre>
-<p>
-Shutdown the Axis2 servers you started in the above steps &amp; edit the &lt;Synapse installation directory&gt;/samples/axis2Server/repository.conf/axis2.xml file, and change the clustering applicationDomain to test2.synapse.domain. Now restart 2 instances of this Axis2 server as follows:
-</p>
-<pre>
-./axis2server.sh -http 9001 -https 9005 -name <strong>test2</strong>.synapse.apache.org-server1
-./axis2server.sh -http 9002 -https 9006 -name <strong>test2</strong>.synapse.apache.org-server2
-</pre>
-<p>Now we are done with setting up the environment for load balance sample. Start the load balance and failover client using the following command: </p>
-<pre xml:space="preserve">
-ant loadbalancefailover -Di=100 -Dtrpurl=http://<strong>test2</strong>.synapse.apache.org:8280/services/LBService1
-</pre>
-<p>This client sends 100 requests to the LoadbalanceFailoverService through Synapse. Synapse will route the request to the nodes in the <strong>test2.synapse.domain</strong> clustering domain in a round-robin manner.If you examine the console output of the client, you can see that requests are processed by three servers as follows: </p>
-<pre xml:space="preserve">
-[java] Request: 1 ==&gt; Response from server: test2.synapse.apache.org-server1
-[java] Request: 2 ==&gt; Response from server: test2.synapse.apache.org-server2
-[java] Request: 3 ==&gt; Response from server: test2.synapse.apache.org-server1
-[java] Request: 4 ==&gt; Response from server: test2.synapse.apache.org-server2
-[java] Request: 5 ==&gt; Response from server: test2.synapse.apache.org-server1
-[java] Request: 6 ==&gt; Response from server: test2.synapse.apache.org-server2
-...
-</pre>
-
-<p>
-For the sake of simplicity, we have shown how to run this sample for one clustering domain at a time. However, you can make a copy of the axis2Server directory, and setup both domains simultaneously, and run the sample client to see how the requests are load balanced in a round-robin manner within each clustering domain.
-</p>
-
-
-<h2><a name="Sample61">Sample 61: Routing a message to a static list of recipients</a></h2>
-<pre xml:space="preserve">
-&lt;?xml version="1.0" encoding="UTF-8"?&gt;
-&lt;definitions xmlns="http://ws.apache.org/ns/synapse"&gt;
-
-    &lt;sequence name="main" onError="errorHandler"&gt;
-        &lt;in&gt;
-            &lt;send&gt;
-                &lt;endpoint&gt;
-                    &lt;!--List of Recipients (static)--&gt;
-                    &lt;recipientlist&gt;
-                        &lt;endpoint&gt;
-                            &lt;address uri="http://localhost:9001/services/SimpleStockQuoteService"/&gt;
-                        &lt;/endpoint&gt;
-                        &lt;endpoint&gt;
-                            &lt;address uri="http://localhost:9002/services/SimpleStockQuoteService"/&gt;
-                        &lt;/endpoint&gt;
-			&lt;endpoint&gt;
-                            &lt;address uri="http://localhost:9003/services/SimpleStockQuoteService"/&gt;
-                        &lt;/endpoint&gt;
-                    &lt;/recipientlist&gt;
-                &lt;/endpoint&gt;
-           &lt;/send&gt;
-            &lt;drop/&gt;
-        &lt;/in&gt;
-
-        &lt;out&gt;
-            &lt;log level="full"/&gt;
-            &lt;drop/&gt;
-        &lt;/out&gt;
-    &lt;/sequence&gt;
-
-    &lt;sequence name="errorHandler"&gt;
-        &lt;makefault response="true"&gt;
-            &lt;code xmlns:tns="http://www.w3.org/2003/05/soap-envelope" value="tns:Receiver"/&gt;
-            &lt;reason value="COULDN'T SEND THE MESSAGE TO THE SERVER."/&gt;
-        &lt;/makefault&gt;
-        &lt;send/&gt;
-    &lt;/sequence&gt;
-&lt;/definitions&gt;
-</pre>
-<p><strong>Objective: Demonstrate message routing to a set of
-static endpoints</strong> </p>
-
-<p><strong>Prerequisites:</strong> </p>
-
-<p>Start ESB with sample configuration 61. (i.e. synapse -sample 61) </p>
-
-<p>Deploy the SimpleStockQuoteService and start three instances of sample Axis2 server as mentioned in sample 52.</p>
-
-<p>Above configuration routes a cloned copy of a message to each recipient defined within the static recipient list.
-<br/>To test this, run the stockquote client to send an out-only message: </p>
-<pre xml:space="preserve">ant stockquote -Dmode=placeorder -Dtrpurl=http://localhost:8280/</pre>
-
-<p>This client sends a request to the SimpleStockQuoteService through the
-ESB. ESB will create cloned copies of the message and route to the three endpoints
-mentioned in the configuration. SimpleStockQuoteService prints the details of the placed
-order. If you examine the console output of each server, you can see that requests are
-processed by the three servers as follows: </p>
-<pre xml:space="preserve">Accepted order #1 for : 15738 stocks of IBM at $ 185.51155223506518
-</pre>
-
-<p>Now shutdown MyServer1 and resend the request. You will observe that requests are still processed by MyServer2 and MyServer3.</p>
-
-<h2><a name="Sample62">Sample 62: Routing a message to a dynamic list of recipients</a></h2>
-<pre xml:space="preserve">
-&lt;?xml version="1.0" encoding="UTF-8"?&gt;
-&lt;definitions xmlns=&quot;http://ws.apache.org/ns/synapse&quot;&gt;
-
-    &lt;!-- the SimpleURLRegistry allows access to a URL based registry (e.g. file:/// or http://) --&gt;
-    &lt;registry provider=&quot;org.apache.synapse.registry.url.SimpleURLRegistry&quot;&gt;
-        &lt;!-- the root property of the simple URL registry helps resolve a resource URL as root + key --&gt;
-        &lt;parameter name=&quot;root&quot;&gt;file:repository/conf/sample/resources/&lt;/parameter&gt;
-        &lt;!-- all resources loaded from the URL registry would be cached for this number of milli seconds --&gt;
-        &lt;parameter name=&quot;cachableDuration&quot;&gt;15000&lt;/parameter&gt;
-    &lt;/registry&gt;
-
-    &lt;sequence name=&quot;main&quot; onError=&quot;errorHandler&quot;&gt;
-        &lt;in&gt;
-            &lt;property name=&quot;OUT_ONLY&quot; value=&quot;true&quot; /&gt;
-            &lt;property name=&quot;FORCE_SC_ACCEPTED&quot; scope=&quot;axis2&quot; value=&quot;true&quot; /&gt;
-	    &lt;!--Dynamic Reclipient List--&gt;
-            &lt;send&gt;
-                &lt;endpoint&gt;
-                    &lt;recipientlist&gt;
-                        &lt;endpoints value=&quot;{get-property(&#39;registry&#39;,&#39;recipients/EP_LIST&#39;)}&quot;/&gt;
-                    &lt;/recipientlist&gt;
-                &lt;/endpoint&gt;
-            &lt;/send&gt;
-            &lt;drop/&gt;
-        &lt;/in&gt;
-    &lt;/sequence&gt;
-
-    &lt;sequence name=&quot;errorHandler&quot;&gt;
-        &lt;makefault response=&quot;true&quot;&gt;
-            &lt;code xmlns:tns=&quot;http://www.w3.org/2003/05/soap-envelope&quot; value=&quot;tns:Receiver&quot;/&gt;
-            &lt;reason value=&quot;COULDN&#39;T SEND THE MESSAGE TO THE SERVER.&quot;/&gt;
-        &lt;/makefault&gt;
-        &lt;send/&gt;
-    &lt;/sequence&gt;
-&lt;/definitions&gt;
-</pre>
-<p><strong>Objective: Demonstrate message routing to a set of
-dynamic endpoints</strong> </p>
-
-<p><strong>Prerequisites:</strong> </p>
-
-<p>Start ESB with sample configuration 62. (i.e. synapse -sample 62) </p>
-
-<p>Deploy the SimpleStockQuoteService and start three instances of sample Axis2 server as mentioned in sample 52.</p>
-
-<p>This sample does the same thing as in sample 60. The difference is that unlike in sample 60, this sample defines
-the endpoints as a dynamic list of recipients.
-<br/>To test this, run the stockquote client to send an out-only message: </p>
-<pre xml:space="preserve">ant stockquote -Dmode=placeorder -Dtrpurl=http://localhost:8280/</pre>
-
-<p>The behaviour of this sample should be similar to that of sample 60</p>
-
-<h2><a name="Sample63">Sample 63: Routing a message to a dynamic list of recipients and aggregating responses</a></h2>
-<pre xml:space="preserve">
-&lt;definitions xmlns=&quot;http://ws.apache.org/ns/synapse&quot;&gt;
-
-    &lt;!-- the SimpleURLRegistry allows access to a URL based registry (e.g. file:/// or http://) --&gt;
-    &lt;registry provider=&quot;org.apache.synapse.registry.url.SimpleURLRegistry&quot;&gt;
-        &lt;!-- the root property of the simple URL registry helps resolve a resource URL as root + key --&gt;
-        &lt;parameter name=&quot;root&quot;&gt;file:repository/conf/sample/resources/&lt;/parameter&gt;
-        &lt;!-- all resources loaded from the URL registry would be cached for this number of milli seconds --&gt;
-        &lt;parameter name=&quot;cachableDuration&quot;&gt;15000&lt;/parameter&gt;
-    &lt;/registry&gt;
-
-    &lt;sequence name=&quot;main&quot; onError=&quot;errorHandler&quot;&gt;
-        &lt;in&gt;
-	    &lt;!--Dynamic Recipient List--&gt;
-            &lt;send&gt;
-                &lt;endpoint&gt;
-                   &lt;recipientlist&gt;
-                        &lt;endpoints value=&quot;{get-property(&#39;registry&#39;,&#39;recipients/EP_LIST&#39;)}&quot;/&gt;
-                    &lt;/recipientlist&gt;
-                &lt;/endpoint&gt;
-            &lt;/send&gt;
-            &lt;drop/&gt;
-        &lt;/in&gt;
-
-        &lt;out&gt;
-	    &lt;log level=&quot;full&quot;/&gt;
-	    &lt;!--Aggregate responses--&gt;
-            &lt;aggregate&gt;
-              &lt;onComplete xmlns:m0=&quot;http://services.samples&quot;
-                          expression=&quot;//m0:getQuoteResponse&quot;&gt;
-                 &lt;send/&gt;
-	      &lt;/onComplete&gt;
-	    &lt;/aggregate&gt;
-        &lt;/out&gt;
-    &lt;/sequence&gt;
-
-    &lt;sequence name=&quot;errorHandler&quot;&gt;
-        &lt;makefault response=&quot;true&quot;&gt;
-            &lt;code xmlns:tns=&quot;http://www.w3.org/2003/05/soap-envelope&quot; value=&quot;tns:Receiver&quot;/&gt;
-            &lt;reason value=&quot;COULDN&#39;T SEND THE MESSAGE TO THE SERVER.&quot;/&gt;
-        &lt;/makefault&gt;
-        &lt;send/&gt;
-    &lt;/sequence&gt;
-&lt;/definitions&gt;
-</pre>
-<p><strong>Objective: Demonstrate message routing to a set of
-dynamic endpoints and aggregate responses</strong> </p>
-
-<p><strong>Prerequisites:</strong> </p>
-
-<p>Start ESB with sample configuration 63. (i.e. synapse -sample 63) </p>
-
-<p>Deploy the SimpleStockQuoteService and start three instances of sample Axis2 server as mentioned in sample 52.</p>
-
-<p>Above configuration routes a cloned copy of a message to each recipient defined within the dynamic recipient list.
-Each recipient will respond back with a stock quote. When all the responses appear to synapse those resonses will be
-aggregated to form the resultant response which will be sent back to the client.
-<br/>To test this, invoke the client as follows: </p>
-<pre xml:space="preserve">ant stockquote -Dtrpurl=http://localhost:8280/</pre>
-
-<p>If you sent your client request through a TCP based conversation monitoring tool such as TCPMon, you will notice the
-structrue of the aggregated response message.</p>
-
-
-<h1><a name="MessageMediationQoS" id="MessageMediationQoS">Quality of Service addition or deduction samples in message mediation</a> </h1>
-<h2>
-<a name="Sample100" id="Sample100">Sample 100: Using WS-Security for outgoing messages</a></h2>
-<pre xml:space="preserve">&lt;definitions xmlns=&quot;http://ws.apache.org/ns/synapse&quot;&gt;
-    &lt;localEntry key=&quot;sec_policy&quot; src=&quot;file:repository/conf/sample/resources/policy/policy_3.xml&quot;/&gt;
-
-    &lt;in&gt;
-        &lt;send&gt;
-            &lt;endpoint name=&quot;secure&quot;&gt;
-                &lt;address uri=&quot;http://localhost:9000/services/SecureStockQuoteService&quot;&gt;
-                    &lt;enableSec policy=&quot;sec_policy&quot;/&gt;
-                &lt;/address&gt;
-            &lt;/endpoint&gt;
-        &lt;/send&gt;
-    &lt;/in&gt;
-    &lt;out&gt;
-        &lt;header name=&quot;wsse:Security&quot; action=&quot;remove&quot;
-                xmlns:wsse=&quot;http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd&quot;/&gt;
-        &lt;send/&gt;
-    &lt;/out&gt;
-&lt;/definitions&gt;</pre>
-<p>
-<strong>Objective: Connecting to endpoints with WS-Security for outgoing messages</strong> </p>
-<p>
-<strong>Prerequisites:</strong>
-<br/>You may also need to download and install the unlimited strength policy files for your JDK before using Apache Rampart (e.g. see http://java.sun.com/javase/downloads/index_jdk5.jsp)
-<br/>Start the Synapse configuration numbered 100: i.e. synapse -sample 100
-<br/>Start the Axis2 server and deploy the SecureStockQuoteService if not already done</p>
-
-<p>Use the stock quote client to send a request without WS-Security. Synapse is configured to enable WS-Security as per the policy specified by 'policy_3.xml' for the outgoing messages to the SecureStockQuoteService endpoint hosted on the Axis2 instance. The debug log messages on Synapse shows the encrypted message flowing to the service and the encrypted response being received by Synapse. The wsse:Security header is then removed from the decrypted message and the response is delivered back to the client, as expected. You may execute the client as follows: </p>
-<pre xml:space="preserve">ant stockquote -Dtrpurl=http://localhost:8280/</pre>
-<p>The message sent by Synapse to the secure service can be seen as follows, when TCPMon is used. </p>
-<pre xml:space="preserve">POST http://localhost:9001/services/SecureStockQuoteService HTTP/1.1
-Host: 127.0.0.1
-SOAPAction: urn:getQuote
-Content-Type: text/xml; charset=UTF-8
-Transfer-Encoding: chunked
-Connection: Keep-Alive
-User-Agent: Synapse-HttpComponents-NIO
-
-800
-&lt;?xml version='1.0' encoding='UTF-8'?&gt;
-   &lt;soapenv:Envelope xmlns:xenc=&quot;http://www.w3.org/2001/04/xmlenc#&quot; xmlns:wsa=&quot;http://www.w3.org/2005/08/addressing&quot; ..&gt;
-      &lt;soapenv:Header&gt;
-         &lt;wsse:Security ..&gt;
-            &lt;wsu:Timestamp ..&gt;
-               ...
-            &lt;/wsu:Timestamp&gt;
-            &lt;xenc:EncryptedKey..&gt;
-               ...
-            &lt;/xenc:EncryptedKey&gt;
-            &lt;wsse:BinarySecurityToken ...&gt;
-               &lt;ds:SignedInfo&gt;
-               ...
-               &lt;/ds:SignedInfo&gt;
-               &lt;ds:SignatureValue&gt;
-               ...
-               &lt;/ds:SignatureValue&gt;
-               &lt;ds:KeyInfo Id=&quot;KeyId-29551621&quot;&gt;
-                  ...
-               &lt;/ds:KeyInfo&gt;
-            &lt;/ds:Signature&gt;
-         &lt;/wsse:Security&gt;
-         &lt;wsa:To&gt;http://localhost:9001/services/SecureStockQuoteService&lt;/wsa:To&gt;
-         &lt;wsa:MessageID&gt;urn:uuid:1C4CE88B8A1A9C09D91177500753443&lt;/wsa:MessageID&gt;
-         &lt;wsa:Action&gt;urn:getQuote&lt;/wsa:Action&gt;
-      &lt;/soapenv:Header&gt;
-      &lt;soapenv:Body xmlns:wsu=&quot;http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd&quot; wsu:Id=&quot;Id-3789605&quot;&gt;
-         &lt;xenc:EncryptedData Id=&quot;EncDataId-3789605&quot; Type=&quot;http://www.w3.org/2001/04/xmlenc#Content&quot;&gt;
-            &lt;xenc:EncryptionMethod Algorithm=&quot;http://www.w3.org/2001/04/xmlenc#aes256-cbc&quot; /&gt;
-            &lt;xenc:CipherData&gt;
-                &lt;xenc:CipherValue&gt;Layg0xQcnH....6UKm5nKU6Qqr&lt;/xenc:CipherValue&gt;
-            &lt;/xenc:CipherData&gt;
-         &lt;/xenc:EncryptedData&gt;
-      &lt;/soapenv:Body&gt;
-   &lt;/soapenv:Envelope&gt;0</pre>
-
-<h2>
-<a name="Sample101" id="Sample101">Sample 101: Reliable message exchange between Synapse and the back-end server using WS-ReliableMessaging</a></h2>
-<pre xml:space="preserve">&lt;definitions xmlns=&quot;http://ws.apache.org/ns/synapse&quot;&gt;
-
-    &lt;in&gt;
-        &lt;RMSequence single=&quot;true&quot; version=&quot;1.0&quot;/&gt;
-        &lt;send&gt;
-           &lt;endpoint name=&quot;reliable&quot;&gt;
-              &lt;address uri=&quot;http://localhost:9000/services/ReliableStockQuoteService&quot;&gt;
-                 &lt;enableRM/&gt;
-                 &lt;enableAddressing/&gt;
-              &lt;/address&gt;
-           &lt;/endpoint&gt;
-        &lt;/send&gt;
-    &lt;/in&gt;
-    &lt;out&gt;
-        &lt;header name=&quot;wsrm:SequenceAcknowledgement&quot; action=&quot;remove&quot;
-                xmlns:wsrm=&quot;http://schemas.xmlsoap.org/ws/2005/02/rm&quot;/&gt;
-        &lt;header name=&quot;wsrm:Sequence&quot; action=&quot;remove&quot;
-                xmlns:wsrm=&quot;http://schemas.xmlsoap.org/ws/2005/02/rm&quot;/&gt;
-        &lt;send/&gt;
-    &lt;/out&gt;
-
-&lt;/definitions&gt;</pre>
-<strong>Objective: Demonstrate the message exchange between Synapse and the server using WS-ReliableMessaging (WS-RM)</strong>
-<p>
-<strong>Prerequisites:</strong>
-<br/>Deploy the ReliableStockQuoteService in the sample Axis2 server by switching to the samples/axis2Server/src/ReliableStockQuoteService directory and running the command 'ant'.
-<br/>Start the sample Axis2 server on port 9000.
-<br/>Start Synapse with the sample configuration 101 (i.e. synapse -sample 101).</p>
-
-<p>In the above configuration, WS-RM is engaged to the endpoint using the &lt;enableRM/&gt; tag. It is possible to engage WS-RM to both Address and WSDL endpoints using this tag. In addition to the RM enabled endpoint, RMSequence mediator is specified before the send mediator. This mediator is used to specify the set of messages to be sent using a single RM sequence. In this sample it is specified as single message per sequence. It also specifies the version of the WS-RM to be used. Refer to the Synapse configuration language documentation for more information about the RMSequence mediator. RM related SOAP headers are removed form the message in the out mediator as WS-RM message exchange takes place only between the Synapse and the server. Now run the sample client using the following command. </p>
-<pre xml:space="preserve">ant stockquote -Dsymbol=IBM -Dmode=quote -Daddurl=http://localhost:8280</pre>
-<p>You can observe the client output displaying the quote price for IBM as follows: </p>
-<pre xml:space="preserve">[java] Standard :: Stock price = $189.2521262517493</pre>
-<p>There is no difference to be observed between the normal message exchange and WS-RM enabled message exchange as far as client and server outputs are considered. But if you look at the wire level messages, you would observe additional WS-RM messages and WS-RM elements. Synapse, the initiator of the RM sequence, first try to create a sequence by sending a message with CreateSequence element. </p>
-<pre xml:space="preserve">...
-&lt;soapenv:Body&gt;
-   &lt;wsrm:CreateSequence xmlns:wsrm=&quot;http://schemas.xmlsoap.org/ws/2005/02/rm&quot;&gt;
-      &lt;wsrm:AcksTo&gt;
-         &lt;wsa:Address&gt;http://www.w3.org/2005/08/addressing/anonymous&lt;/wsa:Address&gt;
-      &lt;/wsrm:AcksTo&gt;
-      &lt;wsrm:Offer&gt;
-         &lt;wsrm:Identifier&gt;urn:uuid:546F6F33FB7D8BBE351179807372769&lt;/wsrm:Identifier&gt;
-      &lt;/wsrm:Offer&gt;
-   &lt;/wsrm:CreateSequence&gt;
-&lt;/soapenv:Body&gt;
-...</pre>
-<p>Sample Axis2 server responds to CreateSequence request with the following message: </p>
-<pre xml:space="preserve">...
-&lt;soapenv:Body&gt;
-   &lt;wsrm:CreateSequenceResponse xmlns:wsrm=&quot;http://schemas.xmlsoap.org/ws/2005/02/rm&quot;&gt;
-      &lt;wsrm:Identifier&gt;urn:uuid:879853A6871A66641C1179807373270&lt;/wsrm:Identifier&gt;
-      &lt;wsrm:Accept&gt;
-         &lt;wsrm:AcksTo&gt;
-            &lt;wsa:Address&gt;http://localhost:9000/services/ReliableStockQuoteService&lt;/wsa:Address&gt;
-         &lt;/wsrm:AcksTo&gt;
-      &lt;/wsrm:Accept&gt;
-   &lt;/wsrm:CreateSequenceResponse&gt;
-&lt;/soapenv:Body&gt;
-...</pre>
-<p>Once the sequence is established, Synapse sends the request to the server with the pre-negotiated sequence ID. </p>
-<pre xml:space="preserve">&lt;soapenv:Envelope xmlns:wsa=&quot;http://www.w3.org/2005/08/addressing&quot;
-                  xmlns:soapenv=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot;&gt;
-    &lt;soapenv:Header&gt;
-        &lt;wsa:To&gt;http://localhost:9000/services/ReliableStockQuoteService&lt;/wsa:To&gt;
-        &lt;wsa:MessageID&gt;urn:uuid:DB9A5257B637DDA38B1179807372560712002-1515891720&lt;/wsa:MessageID&gt;
-        &lt;wsa:Action&gt;urn:getQuote&lt;/wsa:Action&gt;
-        &lt;wsrm:Sequence xmlns:wsrm=&quot;http://schemas.xmlsoap.org/ws/2005/02/rm&quot;
-                       soapenv:mustUnderstand=&quot;1&quot;&gt;
-            &lt;wsrm:Identifier&gt;urn:uuid:879853A6871A66641C1179807373270&lt;/wsrm:Identifier&gt;
-            &lt;wsrm:MessageNumber&gt;1&lt;/wsrm:MessageNumber&gt;
-            &lt;wsrm:LastMessage/&gt;
-        &lt;/wsrm:Sequence&gt;
-    &lt;/soapenv:Header&gt;
-    &lt;soapenv:Body&gt;
-        &lt;m0:getQuote xmlns:m0=&quot;http://services.samples/xsd&quot;&gt;
-            &lt;m0:request&gt;
-                &lt;m0:symbol&gt;IBM&lt;/m0:symbol&gt;
-            &lt;/m0:request&gt;
-        &lt;/m0:getQuote&gt;
-    &lt;/soapenv:Body&gt;
-&lt;/soapenv:Envelope&gt;</pre>
-<p>Synapse keeps on sending above message till the server responds with a valid response message with 200 OK HTTP header. If the server is not ready with a response, it will respond with 202 Accepted HTTP header for all requests. Once the server is ready with a response it will send the response message with sequence ID as follows. </p>
-<pre xml:space="preserve">&lt;soapenv:Envelope xmlns:wsa=&quot;http://www.w3.org/2005/08/addressing&quot;
-                  xmlns:soapenv=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot;&gt;
-    &lt;soapenv:Header&gt;
-        &lt;wsa:MessageID&gt;urn:uuid:879853A6871A66641C1179807373804&lt;/wsa:MessageID&gt;
-        &lt;wsa:Action&gt;http://services.samples/ReliableStockQuoteServicePortType/getQuoteResponse
-        &lt;/wsa:Action&gt;
-        &lt;wsa:RelatesTo&gt;urn:uuid:DB9A5257B637DDA38B1179807372560712002-1515891720&lt;/wsa:RelatesTo&gt;
-        &lt;wsrm:Sequence xmlns:wsrm=&quot;http://schemas.xmlsoap.org/ws/2005/02/rm&quot;
-                       soapenv:mustUnderstand=&quot;1&quot;&gt;
-            &lt;wsrm:Identifier&gt;urn:uuid:546F6F33FB7D8BBE351179807372769&lt;/wsrm:Identifier&gt;
-            &lt;wsrm:MessageNumber&gt;1&lt;/wsrm:MessageNumber&gt;
-            &lt;wsrm:LastMessage/&gt;
-        &lt;/wsrm:Sequence&gt;
-        &lt;wsrm:SequenceAcknowledgement xmlns:wsrm=&quot;http://schemas.xmlsoap.org/ws/2005/02/rm&quot;
-                                      soapenv:mustUnderstand=&quot;1&quot;&gt;
-            &lt;wsrm:Identifier&gt;urn:uuid:879853A6871A66641C1179807373270&lt;/wsrm:Identifier&gt;
-            &lt;wsrm:AcknowledgementRange Lower=&quot;1&quot; Upper=&quot;1&quot;/&gt;
-        &lt;/wsrm:SequenceAcknowledgement&gt;
-    &lt;/soapenv:Header&gt;
-    &lt;soapenv:Body&gt;
-        &lt;ns:getQuoteResponse xmlns:ns=&quot;http://services.samples/xsd&quot;&gt;
-...</pre>
-<p>Now both Synapse and the server are done with the actual message exchange. Then Synapse sends a request to terminate the sequence as follows: </p>
-<pre xml:space="preserve">&lt;soapenv:Envelope xmlns:wsa=&quot;http://www.w3.org/2005/08/addressing&quot;
-                  xmlns:soapenv=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot;&gt;
-    &lt;soapenv:Header&gt;
-        &lt;wsa:To&gt;http://localhost:9000/services/ReliableStockQuoteService&lt;/wsa:To&gt;
-        &lt;wsa:MessageID&gt;urn:uuid:546F6F33FB7D8BBE351179807379591&lt;/wsa:MessageID&gt;
-        &lt;wsa:Action&gt;http://schemas.xmlsoap.org/ws/2005/02/rm/TerminateSequence&lt;/wsa:Action&gt;
-        &lt;wsrm:SequenceAcknowledgement xmlns:wsrm=&quot;http://schemas.xmlsoap.org/ws/2005/02/rm&quot;
-                                      soapenv:mustUnderstand=&quot;1&quot;&gt;
-            &lt;wsrm:Identifier&gt;urn:uuid:546F6F33FB7D8BBE351179807372769&lt;/wsrm:Identifier&gt;
-            &lt;wsrm:AcknowledgementRange Lower=&quot;1&quot; Upper=&quot;1&quot;/&gt;
-        &lt;/wsrm:SequenceAcknowledgement&gt;
-    &lt;/soapenv:Header&gt;
-    &lt;soapenv:Body&gt;
-        &lt;wsrm:TerminateSequence xmlns:wsrm=&quot;http://schemas.xmlsoap.org/ws/2005/02/rm&quot;&gt;
-            &lt;wsrm:Identifier&gt;urn:uuid:879853A6871A66641C1179807373270&lt;/wsrm:Identifier&gt;
-        &lt;/wsrm:TerminateSequence&gt;
-    &lt;/soapenv:Body&gt;
-&lt;/soapenv:Envelope&gt;</pre>
-<p>Server responds to the sequence termination message, accepting to terminate the sequence as follows. </p>
-<pre xml:space="preserve">&lt;soapenv:Envelope xmlns:wsa=&quot;http://www.w3.org/2005/08/addressing&quot;
-                  xmlns:soapenv=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot;&gt;
-    &lt;soapenv:Header&gt;
-        &lt;wsa:ReplyTo&gt;
-            &lt;wsa:Address&gt;http://localhost:9000/services/ReliableStockQuoteService&lt;/wsa:Address&gt;
-        &lt;/wsa:ReplyTo&gt;
-        &lt;wsa:MessageID&gt;urn:uuid:879853A6871A66641C1179807380190&lt;/wsa:MessageID&gt;
-        &lt;wsa:Action&gt;http://schemas.xmlsoap.org/ws/2005/02/rm/TerminateSequence&lt;/wsa:Action&gt;
-    &lt;/soapenv:Header&gt;
-    &lt;soapenv:Body&gt;
-        &lt;wsrm:TerminateSequence xmlns:wsrm=&quot;http://schemas.xmlsoap.org/ws/2005/02/rm&quot;&gt;
-            &lt;wsrm:Identifier&gt;urn:uuid:546F6F33FB7D8BBE351179807372769&lt;/wsrm:Identifier&gt;
-        &lt;/wsrm:TerminateSequence&gt;
-    &lt;/soapenv:Body&gt;
-&lt;/soapenv:Envelope&gt;</pre>
-<p>Note that although each of above messages are separate SOAP messages, in most cases they will be exchanged in a single socket connection as HTTP Keep-Alive header is used. </p>
-<h1>
-<a name="ProxyServices" id="ProxyServices">Synapse Proxy service samples</a> </h1>
-
-<h2>
-<a name="Sample150" id="Sample150">Sample 150: Introduction to proxy services</a></h2>
-<pre xml:space="preserve">&lt;definitions xmlns=&quot;http://ws.apache.org/ns/synapse&quot;&gt;
-    &lt;proxy name=&quot;StockQuoteProxy&quot;&gt;
-        &lt;target&gt;
-            &lt;endpoint&gt;
-                &lt;address uri=&quot;http://localhost:9000/services/SimpleStockQuoteService&quot;/&gt;
-            &lt;/endpoint&gt;
-            &lt;outSequence&gt;
-                &lt;send/&gt;
-            &lt;/outSequence&gt;
-        &lt;/target&gt;
-        &lt;publishWSDL uri=&quot;file:repository/conf/sample/resources/proxy/sample_proxy_1.wsdl&quot;/&gt;
-    &lt;/proxy&gt;
-&lt;/definitions&gt;</pre>
-<p>
-<strong>Objective: Introduction to Synapse proxy services</strong> </p>
-<p>
-<strong>Prerequisites:</strong>
-<br/> Start the Synapse configuration numbered 150: i.e. synapse -sample 150
-<br/> Start the Axis2 server and deploy the SimpleStockQuoteService if not already done </p>
-<p>Once Synapse starts, you could go to http://localhost:8280/services/StockQuoteProxy?wsdl and view the WSDL generated for the proxy service defined in the configuration. This WSDL is based on the source WSDL supplied in the proxy service definition, and is updated to reflect the proxy service EPR. </p>
-<p>Execute the stock quote client by requesting for a stock quote on the proxy service as follows: </p>
-<pre xml:space="preserve">ant stockquote -Daddurl=http://localhost:8280/services/StockQuoteProxy</pre>
-<p>An 'inSequence' or 'endpoint' or both of these would decide how the message would be handled after the proxy service receives the message. In the above example, the request received is forwarded to the sample service hosted on Axis2. The 'outSequence' defines how the response is handled before it is sent back to the client. By default, a proxy service is exposed over all transports configured for Synapse, unless these are specifically mentioned through the 'transports' attribute. </p>
-<h2>
-<a name="Sample151" id="Sample151">Sample 151: Custom sequences and endpoints with proxy services</a></h2>
-<pre xml:space="preserve">&lt;definitions xmlns=&quot;http://ws.apache.org/ns/synapse&quot;&gt;
-
-    &lt;sequence name=&quot;proxy_1&quot;&gt;
-        &lt;send&gt;
-            &lt;endpoint&gt;&lt;address uri=&quot;http://localhost:9000/services/SimpleStockQuoteService&quot;/&gt;&lt;/endpoint&gt;
-        &lt;/send&gt;
-    &lt;/sequence&gt;
-    &lt;sequence name=&quot;out&quot;&gt;
-        &lt;send/&gt;
-    &lt;/sequence&gt;
-    &lt;endpoint name=&quot;proxy_2_endpoint&quot;&gt;
-        &lt;address uri=&quot;http://localhost:9000/services/SimpleStockQuoteService&quot;/&gt;
-    &lt;/endpoint&gt;
-    &lt;localEntry key=&quot;proxy_wsdl&quot; src=&quot;file:repository/conf/sample/resources/proxy/sample_proxy_1.wsdl&quot;/&gt;
-
-    &lt;proxy name=&quot;StockQuoteProxy1&quot;&gt;
-        &lt;publishWSDL key=&quot;proxy_wsdl&quot;/&gt;
-        &lt;target inSequence=&quot;proxy_1&quot; outSequence=&quot;out&quot;/&gt;
-    &lt;/proxy&gt;
-
-    &lt;proxy name=&quot;StockQuoteProxy2&quot;&gt;
-        &lt;publishWSDL key=&quot;proxy_wsdl&quot;/&gt;
-        &lt;target endpoint=&quot;proxy_2_endpoint&quot; outSequence=&quot;out&quot;/&gt;
-    &lt;/proxy&gt;
-&lt;/definitions&gt;</pre>
-<p>
-<strong>Objective: Using custom sequences and endpoints for message mediation with proxy services</strong> </p>
-<p>
-<strong>Prerequisites:</strong>
-<br/> Start the Synapse configuration numbered 151: i.e. synapse -sample 151
-<br/> Start the Axis2 server and deploy the SimpleStockQuoteService if not already done </p>
-
-<p>This configuration creates two proxy services. The first proxy service 'StockQuoteProxy1' uses the sequence named 'proxy_1' to process incoming messages and the sequence named &quot;out&quot; to process outgoing responses. The second proxy service 'StockQuoteProxy2' is set to directly forward messages that are received to the endpoint named 'proxy_2_endpoint' without any mediation. </p>
-<p>You could send a stock quote request to each of these proxy services and receive the reply generated by the actual service hosted on the Axis2 server instance. </p>
-<pre xml:space="preserve">ant stockquote -Daddurl=http://localhost:8280/services/StockQuoteProxy1
-<br/>ant stockquote -Daddurl=http://localhost:8280/services/StockQuoteProxy2</pre>
-<h2>
-<a name="Sample152" id="Sample152">Sample 152: Switching transports and message format from SOAP to REST/POX</a></h2>
-<pre xml:space="preserve">&lt;definitions xmlns=&quot;http://ws.apache.org/ns/synapse&quot;&gt;
-    &lt;proxy name=&quot;StockQuoteProxy&quot; transports=&quot;https&quot;&gt;
-        &lt;target&gt;
-            &lt;endpoint&gt;
-                &lt;address uri=&quot;http://localhost:9000/services/SimpleStockQuoteService&quot; format=&quot;pox&quot;/&gt;
-            &lt;/endpoint&gt;
-            &lt;outSequence&gt;
-                &lt;send/&gt;
-            &lt;/outSequence&gt;
-        &lt;/target&gt;
-        &lt;publishWSDL uri=&quot;file:repository/conf/sample/resources/proxy/sample_proxy_1.wsdl&quot;/&gt;
-    &lt;/proxy&gt;
-&lt;/definitions&gt;</pre>
-<p>
-<strong>Objective: Switching transports and message format from SOAP to REST/POX</strong> </p>
-<p>
-<strong>Prerequisites:</strong>
-<br/> Start the Synapse configuration numbered 152: i.e. synapse -sample 152
-<br/>Start the Axis2 server and deploy the SimpleStockQuoteService if not already done </p>
-
-<p>This configuration demonstrates how a proxy service could be exposed on a subset of available transports, and how it could switch from one transport to another. This example exposes the created proxy service only on HTTPS, and thus if the user tries to access it over HTTP, would result in a fault. </p>
-<pre xml:space="preserve">ant stockquote -Dtrpurl=http://localhost:8280/services/StockQuoteProxy
-...
-     [java] org.apache.axis2.AxisFault: The service cannot be found for the endpoint reference (EPR) /soap/StockQuoteProxy</pre>
-
-<p>Accessing this over HTTPS (ant stockquote -Dtrpurl=https://localhost:8243/services/StockQuoteProxy) causes the proxy service to access the SimpleStockQuoteService on the sample Axis2 server using REST/POX. This could be seen if the message exchange was captured using TCPMon as follows. The REST/POX response is now transformed back into a SOAP message and returned to the client. </p>
-<pre xml:space="preserve">POST http://localhost:9000/services/SimpleStockQuoteService HTTP/1.1
-Host: 127.0.0.1
-SOAPAction: urn:getQuote
-Content-Type: application/xml; charset=UTF-8;action=&quot;urn:getQuote&quot;;
-Transfer-Encoding: chunked
-Connection: Keep-Alive
-User-Agent: Synapse-HttpComponents-NIO
-
-75
-&lt;m0:getQuote xmlns:m0=&quot;http://services.samples/xsd&quot;&gt;
-   &lt;m0:request&gt;
-      &lt;m0:symbol&gt;IBM&lt;/m0:symbol&gt;
-   &lt;/m0:request&gt;
-&lt;/m0:getQuote&gt;</pre>
-<pre xml:space="preserve">HTTP/1.1 200 OK
-Content-Type: application/xml; charset=UTF-8;action=&quot;http://services.samples/SimpleStockQuoteServicePortType/getQuoteResponse&quot;;
-Date: Tue, 24 Apr 2007 14:42:11 GMT
-Server: Synapse-HttpComponents-NIO
-Transfer-Encoding: chunked
-Connection: Keep-Alive
-
-2b3
-&lt;ns:getQuoteResponse xmlns:ns=&quot;http://services.samples/xsd&quot;&gt;
-   &lt;ns:return&gt;
-      &lt;ns:change&gt;3.7730036841862384&lt;/ns:change&gt;
-      &lt;ns:earnings&gt;-9.950236235550818&lt;/ns:earnings&gt;
-      &lt;ns:high&gt;-80.23868444613285&lt;/ns:high&gt;
-      &lt;ns:last&gt;80.50750970812187&lt;/ns:last&gt;
-      &lt;ns:lastTradeTimestamp&gt;Tue Apr 24 20:42:11 LKT 2007&lt;/ns:lastTradeTimestamp&gt;
-      &lt;ns:low&gt;-79.67368355714606&lt;/ns:low&gt;
-      &lt;ns:marketCap&gt;4.502043663670823E7&lt;/ns:marketCap&gt;
-      &lt;ns:name&gt;IBM Company&lt;/ns:name&gt;
-      &lt;ns:open&gt;-80.02229531286982&lt;/ns:open&gt;
-      &lt;ns:peRatio&gt;25.089295161182022&lt;/ns:peRatio&gt;
-      &lt;ns:percentageChange&gt;4.28842665653824&lt;/ns:percentageChange&gt;
-      &lt;ns:prevClose&gt;87.98107059692451&lt;/ns:prevClose&gt;
-      &lt;ns:symbol&gt;IBM&lt;/ns:symbol&gt;
-      &lt;ns:volume&gt;19941&lt;/ns:volume&gt;
-   &lt;/ns:return&gt;&lt;/ns:getQuoteResponse&gt;</pre>
-
-<h2>
-<a name="Sample153" id="Sample153">Sample 153: Routing the messages arrived to a proxy service without processing the security headers</a></h2>
-<pre xml:space="preserve">&lt;definitions xmlns=&quot;http://ws.apache.org/ns/synapse&quot;&gt;
-    &lt;proxy name=&quot;StockQuoteProxy&quot;&gt;
-        &lt;target&gt;
-            &lt;inSequence&gt;
-                &lt;property name="preserveProcessedHeaders" value="true"/&gt;
-                &lt;send&gt;
-                    &lt;endpoint&gt;
-                        &lt;address uri=&quot;http://localhost:9000/services/SecureStockQuoteService&quot;/&gt;
-                    &lt;/endpoint&gt;
-                &lt;/send&gt;
-            &lt;/inSequence&gt;
-            &lt;outSequence&gt;
-                &lt;send/&gt;
-            &lt;/outSequence&gt;
-        &lt;/target&gt;
-        &lt;publishWSDL uri=&quot;file:repository/conf/sample/resources/proxy/sample_proxy_1.wsdl&quot;/&gt;
-    &lt;/proxy&gt;
-&lt;/definitions&gt;</pre>
-<p>
-<strong>Objective: Routing the messages arrived to a proxy service without processing the MustUnderstand headers (Security header)</strong> </p>
-<p>
-<strong>Prerequisites:</strong>
-<br/> You may also need to download and install the unlimited strength policy files for your JDK before using Apache Rampart (e.g. see http://java.sun.com/javase/downloads/index_jdk5.jsp)
-<br/>Start the Synapse configuration numbered 153: i.e. synapse -sample 153
-<br/> Start the Axis2 server and deploy the SecureStockQuoteService if not already done </p>
-
-<p>The proxy service will receive secure messages with security headers which are MustUnderstand. But hence element 'engageSec' is not present in the proxy configuration Synapse will not engage that Apache Rampart on this proxy service. It is expected that an MustUnderstand failure exception on the AxisEngine would occur before the message arrives Synapse. But Synapse handles this message and gets it in by setting all the headers which are MustUnderstand and not processed to processed state. This will enable Synapse to route the messages without reading the Security headers (just routing the messages from client to service, both of which are secure). To execute the client, send a stock quote request to the proxy service, and sign and encrypt the request by specifying the client side security policy as follows: </p>
-<pre xml:space="preserve">ant stockquote -Dtrpurl=http://localhost:8280/services/StockQuoteProxy -Dpolicy=./../../repository/conf/sample/resources/policy/client_policy_3.xml</pre>
-<p>By following through the debug logs or TCPMon output, you could see that the request received by the proxy service was signed and encrypted. Also, looking up the WSDL of the proxy service by requesting the URL http://localhost:8280/services/StockQuoteProxy?wsdl reveals the security policy attachments are not there and security is not engaged. When sending the message to the backend service, you could verify that the security headers were there as in the original message to Synapse from client, and that the response received does use WS-Security, and forwarded back to the client without any modification. You should note that this wont be a security hole because the message inside Synapse is signed and encrypted and can only be forwarded to a secure service to be useful. </p>
-<h2>
-<a name="Sample154" id="Sample154">Sample 154: Load Balancing with Proxy Services </a></h2>
-<div>
-<pre xml:space="preserve">   &lt;!-- A proxy service with a loadbalace endpoint --&gt;
-&lt;definitions xmlns=&quot;http://ws.apache.org/ns/synapse&quot;&gt;
-    &lt;proxy name=&quot;LBProxy&quot; transports=&quot;https http&quot; startOnLoad=&quot;true&quot;&gt;
-        &lt;target faultSequence=&quot;errorHandler&quot;&gt;
-            &lt;inSequence&gt;
-                &lt;send&gt;
-                    &lt;endpoint&gt;
-                        &lt;session type=&quot;simpleClientSession&quot;/&gt;
-                        &lt;loadbalance algorithm=&quot;org.apache.synapse.endpoints.algorithms.RoundRobin&quot;&gt;
-                            &lt;endpoint&gt;
-                                &lt;address uri=&quot;http://localhost:9001/services/LBService1&quot;&gt;
-                                    &lt;enableAddressing/&gt;
-                                    &lt;suspendDurationOnFailure&gt;20&lt;/suspendDurationOnFailure&gt;
-                                &lt;/address&gt;
-                            &lt;/endpoint&gt;
-                            &lt;endpoint&gt;
-                                &lt;address uri=&quot;http://localhost:9002/services/LBService1&quot;&gt;
-                                    &lt;enableAddressing/&gt;
-                                    &lt;suspendDurationOnFailure&gt;20&lt;/suspendDurationOnFailure&gt;
-                                &lt;/address&gt;
-                            &lt;/endpoint&gt;
-                            &lt;endpoint&gt;
-                                &lt;address uri=&quot;http://localhost:9003/services/LBService1&quot;&gt;
-                                    &lt;enableAddressing/&gt;
-                                    &lt;suspendDurationOnFailure&gt;20&lt;/suspendDurationOnFailure&gt;
-                                &lt;/address&gt;
-                            &lt;/endpoint&gt;
-                        &lt;/loadbalance&gt;
-                    &lt;/endpoint&gt;
-                &lt;/send&gt;
-                &lt;drop/&gt;
-            &lt;/inSequence&gt;
-            &lt;outSequence&gt;
-                &lt;send/&gt;
-            &lt;/outSequence&gt;
-        &lt;/target&gt;
-        &lt;publishWSDL uri=&quot;file:repository/conf/sample/resources/proxy/sample_proxy_2.wsdl&quot;/&gt;
-    &lt;/proxy&gt;
-    &lt;sequence name=&quot;errorHandler&quot;&gt;
-        &lt;makefault response=&quot;true&quot;&gt;
-            &lt;code value=&quot;tns:Receiver&quot; xmlns:tns=&quot;http://www.w3.org/2003/05/soap-envelope&quot;/&gt;
-            &lt;reason value=&quot;COULDN'T SEND THE MESSAGE TO THE SERVER.&quot;/&gt;
-        &lt;/makefault&gt;
-        &lt;send/&gt;
-    &lt;/sequence&gt;
-&lt;/definitions&gt; </pre>
-<p>
-<strong>Objective: Load Balancing with Proxy Services </strong> </p>
-<p>
-<strong>Prerequisites:</strong>
-<br/>Sample setup is same as LoadBalance endpoints (#53 to #54)
-<br/>Start the Synapse configuration numbered 154: i.e. synapse -sample 154
-<br/>Start the Axis2 server and deploy the SecureStockQuoteService if not already done </p>
-<p>Run the client with </p>
-<pre xml:space="preserve">  ant loadbalancefailover -Dmode=session -Dtrpurl=http://localhost:8280/services/LBProxy </pre>
-<p>Functionality is similar to the sample #54. </p></div>
-
-<h2>
-<a name="Sample155" id="Sample155">Sample 155: Dual channel invocation on both client side and serverside of Synapse with Proxy Services</a></h2>
-<pre xml:space="preserve">&lt;definitions xmlns=&quot;http://ws.apache.org/ns/synapse&quot;&gt;
-    &lt;proxy name=&quot;StockQuoteProxy&quot;&gt;
-        &lt;target&gt;
-            &lt;endpoint&gt;
-                &lt;address uri=&quot;http://localhost:9000/services/SimpleStockQuoteService&quot;&gt;
-                    &lt;enableAddressing separateListener=&quot;true&quot;/&gt;
-                &lt;/address&gt;
-            &lt;/endpoint&gt;
-            &lt;outSequence&gt;
-                &lt;send/&gt;
-            &lt;/outSequence&gt;
-        &lt;/target&gt;
-        &lt;publishWSDL uri=&quot;file:repository/conf/sample/resources/proxy/sample_proxy_1.wsdl&quot;/&gt;
-    &lt;/proxy&gt;
-&lt;/definitions&gt;</pre>
-<p>
-<strong>Objective: Demonstrate the dual channel invocation with Synapse proxy services</strong> </p>
-<p>
-<strong>Prerequisites:</strong>
-<br/> Start the Synapse configuration numbered 150: i.e. synapse -sample 155
-<br/> Start the Axis2 server and deploy the SimpleStockQuoteService if not already done </p>
-
-<p>This sample will show the action of the dual channel invocation within client and Synapse as well as within Synapse and the actual server. Note that if you want to enable dual channel invocation you need to set the separateListener attribute to true of the enableAddressing element of the endpoint. </p>
-<p>Execute the stock quote client by requesting for a stock quote on a dual channel from the proxy service as follows: </p>
-<pre xml:space="preserve">ant stockquote -Daddurl=http://localhost:8280/services/StockQuoteProxy -Dmode=dualquote</pre>
-<p>In the above example, the request received is forwarded to the sample service hosted on Axis2 and the endpoint specifies to enable addressing and do the invocation over a dual channel. If you observe this message flow by using a TCPmon, you could see that on the channel you send the request to Synapse the response has been written as an HTTP 202 Accepted, where as the real response from Synapse will come over a different channel which cannot be obsesrved unless you use tcpdump to dump all the TCP level messages. </p>
-<p>At the same time you can observe the behaviour of the invocation between Synapse and the actual Axis2 service, where you can see a 202 Accepted message being delivered to Synapse as the response to the request. The actual response will be delivered to Synapse over a different channel. </p>
-
-<h2>
-<a name="Sample156" id="Sample156">Sample 156: Service Integration with specifying the receiving sequence</a></h2>
-<pre xml:space="preserve">
-&lt;definitions xmlns=&quot;http://ws.apache.org/ns/synapse&quot;&gt;
-    &lt;localEntry key=&quot;sec_policy&quot; src=&quot;file:repository/conf/sample/resources/policy/policy_3.xml&quot;/&gt;
-    &lt;proxy name=&quot;StockQuoteProxy&quot;&gt;
-        &lt;target&gt;
-            &lt;inSequence&gt;
-                &lt;enrich&gt;
-                    &lt;source type=&quot;body&quot;/&gt;
-                    &lt;target type=&quot;property&quot; property=&quot;REQUEST&quot;/&gt;
-                &lt;/enrich&gt;
-
-                &lt;send receive=&quot;SimpleServiceSeq&quot;&gt;
-                    &lt;endpoint name=&quot;secure&quot;&gt;
-                        &lt;address uri=&quot;http://localhost:9000/services/SecureStockQuoteService&quot;&gt;
-                            &lt;enableSec policy=&quot;sec_policy&quot;/&gt;
-                        &lt;/address&gt;
-                    &lt;/endpoint&gt;
-                &lt;/send&gt;
-            &lt;/inSequence&gt;
-            &lt;outSequence&gt;
-                &lt;drop/&gt;
-            &lt;/outSequence&gt;
-        &lt;/target&gt;
-    &lt;/proxy&gt;
-
-
-    &lt;sequence name=&quot;SimpleServiceSeq&quot;&gt;
-        &lt;property name=&quot;SECURE_SER_AMT&quot; expression=&quot;//ns:getQuoteResponse/ns:return/ax21:last&quot;
-                  xmlns:ns=&quot;http://services.samples&quot; xmlns:ax21=&quot;http://services.samples/xsd&quot;/&gt;
-        &lt;log level=&quot;custom&quot;&gt;
-            &lt;property name=&quot;SecureStockQuoteService-Amount&quot; expression=&quot;get-property(&#39;SECURE_SER_AMT&#39;)&quot;/&gt;
-        &lt;/log&gt;
-        &lt;enrich&gt;
-            &lt;source type=&quot;body&quot;/&gt;
-            &lt;target type=&quot;property&quot; property=&quot;SecureService_Res&quot;/&gt;
-        &lt;/enrich&gt;
-        &lt;enrich&gt;
-            &lt;source type=&quot;property&quot; property=&quot;REQUEST&quot;/&gt;
-            &lt;target type=&quot;body&quot;/&gt;
-        &lt;/enrich&gt;
-        &lt;send receive=&quot;ClientOutSeq&quot;&gt;
-            &lt;endpoint name=&quot;SimpleStockQuoteService&quot;&gt;
-                &lt;address uri=&quot;http://localhost:9000/services/SimpleStockQuoteService&quot;/&gt;
-            &lt;/endpoint&gt;
-        &lt;/send&gt;
-    &lt;/sequence&gt;
-
-    &lt;sequence name=&quot;ClientOutSeq&quot;&gt;
-        &lt;property name=&quot;SIMPLE_SER_AMT&quot; expression=&quot;//ns:getQuoteResponse/ns:return/ax21:last&quot;
-                  xmlns:ns=&quot;http://services.samples&quot; xmlns:ax21=&quot;http://services.samples/xsd&quot;/&gt;
-        &lt;log level=&quot;custom&quot;&gt;
-            &lt;property name=&quot;SimpleStockQuoteService-Amount&quot; expression=&quot;get-property(&#39;SIMPLE_SER_AMT&#39;)&quot;/&gt;
-        &lt;/log&gt;
-        &lt;enrich&gt;
-            &lt;source type=&quot;body&quot;/&gt;
-            &lt;target type=&quot;property&quot; property=&quot;SimpleService_Res&quot;/&gt;
-        &lt;/enrich&gt;
-
-        &lt;filter xpath=&quot;fn:number(get-property(&#39;SIMPLE_SER_AMT&#39;)) &gt; fn:number(get-property(&#39;SECURE_SER_AMT&#39;))&quot;&gt;
-            &lt;then&gt;
-                &lt;log&gt;
-                    &lt;property name=&quot;StockQuote&quot; value=&quot;SecureStockQuoteService&quot;/&gt;
-                &lt;/log&gt;
-                &lt;enrich&gt;
-                    &lt;source type=&quot;property&quot; property=&quot;SecureService_Res&quot;/&gt;
-                    &lt;target type=&quot;body&quot;/&gt;
-                &lt;/enrich&gt;
-            &lt;/then&gt;
-            &lt;else&gt;
-                &lt;log&gt;
-                    &lt;property name=&quot;StockQuote&quot; value=&quot;SimpleStockQuoteService&quot;/&gt;
-                &lt;/log&gt;
-            &lt;/else&gt;
-        &lt;/filter&gt;
-        &lt;send/&gt;
-    &lt;/sequence&gt;
-&lt;/definitions&gt;</pre>
-
-<p>
-<strong>Objective: Using synapse to integrate services.</strong> </p>
-<p/>
-<p>
-<strong>Prerequisites:</strong>
-<br/> We will be using two services in this sample; i.e. SimpleStockQuoteService and SecureStockQuoteService. Therefore the prerequisites of sample 100 is also applied here.</p>
-<p>Start the Synapse configuration numbered 156: i.e. synapse -sample 156
-<br/> Start the Axis2 server and deploy the SimpleStockQuoteService and the SecureStockQuoteService, if not already done </p>
-
-<p>This sample contains a proxy service which provides the seamless integration of SimpleStockQuoteService and SecureStockQuoteService. Once a client send a request to this
-proxy service, it sends the same request to both these services and resolve the service with cheapest stock quote price.</p>
-<p>Execute the stock quote client by requesting for a cheapest stock quote from the proxy service as follows: </p>
-<pre xml:space="preserve">ant stockquote -Daddurl=http://localhost:8280/services/StockQuoteProxy</pre>
-<p>Above sample uses the concept of specifying the receiving sequence in the send mediator. In this case once the message is sent from the in sequence then the response won't come to
-out sequence as the receiving sequence is specified in the send mediator.</p>
-
-<h2>
-<a name="Sample157" id="Sample157">Sample 157: Conditional Router for Routing Messages based on HTTP URL, HTTP Headers and Query Parameters</a></h2>
-<pre xml:space="preserve">
-&lt;definitions xmlns=&quot;http://ws.apache.org/ns/synapse&quot;&gt;
-    &lt;proxy name=&quot;StockQuoteProxy&quot; transports=&quot;https http&quot; startOnLoad=&quot;true&quot; trace=&quot;disable&quot;&gt;
-        &lt;target&gt;
-            &lt;inSequence&gt;
-                &lt;conditionalRouter continueAfter=&quot;false&quot;&gt;
-                    &lt;conditionalRoute breakRoute=&quot;false&quot;&gt;
-                        &lt;condition&gt;
-                            &lt;match xmlns=&quot;&quot; type=&quot;header&quot; source=&quot;foo&quot; regex=&quot;bar.*&quot;/&gt;
-                        &lt;/condition&gt;
-                        &lt;target sequence=&quot;cnd1_seq&quot;/&gt;
-                    &lt;/conditionalRoute&gt;
-
-                    &lt;conditionalRoute breakRoute=&quot;false&quot;&gt;
-                        &lt;condition&gt;
-                            &lt;and xmlns=&quot;&quot;&gt;
-                                &lt;match type=&quot;header&quot; source=&quot;my_custom_header1&quot; regex=&quot;foo.*&quot;/&gt;
-                                &lt;match type=&quot;url&quot; regex=&quot;/services/StockQuoteProxy.*&quot;/&gt;
-                            &lt;/and&gt;
-                        &lt;/condition&gt;
-                        &lt;target sequence=&quot;cnd2_seq&quot;/&gt;
-                    &lt;/conditionalRoute&gt;
-
-                    &lt;conditionalRoute breakRoute=&quot;false&quot;&gt;
-                        &lt;condition&gt;
-                            &lt;and xmlns=&quot;&quot;&gt;
-                                &lt;match type=&quot;header&quot; source=&quot;my_custom_header2&quot; regex=&quot;bar.*&quot;/&gt;
-                                &lt;equal type=&quot;param&quot; source=&quot;qparam1&quot; value=&quot;qpv_foo&quot;/&gt;
-                                &lt;or&gt;
-                                    &lt;match type=&quot;url&quot; regex=&quot;/services/StockQuoteProxy.*&quot;/&gt;
-                                    &lt;match type=&quot;header&quot; source=&quot;my_custom_header3&quot; regex=&quot;foo.*&quot;/&gt;
-                                &lt;/or&gt;
-                                &lt;not&gt;
-                                    &lt;equal type=&quot;param&quot; source=&quot;qparam2&quot; value=&quot;qpv_bar&quot;/&gt;
-                                &lt;/not&gt;
-                            &lt;/and&gt;
-                        &lt;/condition&gt;
-                        &lt;target sequence=&quot;cnd3_seq&quot;/&gt;
-                    &lt;/conditionalRoute&gt;
-                &lt;/conditionalRouter&gt;
-            &lt;/inSequence&gt;
-            &lt;outSequence&gt;
-                &lt;send/&gt;
-            &lt;/outSequence&gt;
-        &lt;/target&gt;
-    &lt;/proxy&gt;
-
-    &lt;sequence name=&quot;cnd1_seq&quot;&gt;
-        &lt;log level=&quot;custom&quot;&gt;
-            &lt;property name=&quot;MSG_FLOW&quot; value=&quot;Condition (I) Satisfied&quot;/&gt;
-        &lt;/log&gt;
-        &lt;sequence key=&quot;send_seq&quot;/&gt;
-    &lt;/sequence&gt;
-    &lt;sequence name=&quot;cnd2_seq&quot;&gt;
-        &lt;log level=&quot;custom&quot;&gt;
-            &lt;property name=&quot;MSG_FLOW&quot; value=&quot;Condition (II) Satisfied&quot;/&gt;
-        &lt;/log&gt;
-        &lt;sequence key=&quot;send_seq&quot;/&gt;
-    &lt;/sequence&gt;
-    &lt;sequence name=&quot;cnd3_seq&quot;&gt;
-        &lt;log level=&quot;custom&quot;&gt;
-            &lt;property name=&quot;MSG_FLOW&quot; value=&quot;Condition (III) Satisfied&quot;/&gt;
-        &lt;/log&gt;
-        &lt;sequence key=&quot;send_seq&quot;/&gt;
-    &lt;/sequence&gt;
-
-    &lt;sequence name=&quot;send_seq&quot;&gt;
-        &lt;log level=&quot;custom&quot;&gt;
-            &lt;property name=&quot;DEBUG&quot; value=&quot;Condition Satisfied&quot;/&gt;
-        &lt;/log&gt;
-        &lt;send&gt;
-            &lt;endpoint name=&quot;simple&quot;&gt;
-                &lt;address uri=&quot;http://localhost:9000/services/SimpleStockQuoteService&quot;/&gt;
-            &lt;/endpoint&gt;
-        &lt;/send&gt;
-    &lt;/sequence&gt;
-&lt;/definitions&gt;
-</pre>
-
-    <p>
-          <strong>Objective: Routing Messages based on the HTTP Transport properties.</strong>
-        </p>
-        <p>
-          <strong>Prerequisites:</strong><br/> Start the Synapse configuration numbered 157: i.e. synapse -sample 157
-            <br/>Start the Axis2 server and deploy the SimpleStockQuoteService if not already done.
-            For this particular case we will be using 'curl' to send requests with custom HTTP Headers to the proxy service. You may use a similar tool with facilitate those requirements.
-            <br/><br/>The request file : stockQuoteReq.xml, should contain the following request.
-        </p>
-        <pre xml:space="preserve">&lt;soap:Envelope xmlns:soap=&quot;http://www.w3.org/2003/05/soap-envelope&quot; xmlns:ser=&quot;http://services.samples&quot; xmlns:xsd=&quot;http://services.samples/xsd&quot;&gt;
-       &lt;soap:Header/&gt;
-       &lt;soap:Body&gt;
-          &lt;ser:getQuote&gt;
-             &lt;ser:request&gt;
-                &lt;xsd:symbol&gt;IBM&lt;/xsd:symbol&gt;
-             &lt;/ser:request&gt;
-          &lt;/ser:getQuote&gt;
-       &lt;/soap:Body&gt;
-    &lt;/soap:Envelope&gt;</pre>
-
-        <p>
-        Condition I : Matching HTTP Header <br/>
-        </p>
-        <pre xml:space="preserve">curl -d @stockQuoteReq.xml -H "Content-Type: application/soap+xml;charset=UTF-8" -H "foo:bar" "http://localhost:8280/services/StockQuoteProxy"
-        </pre>
-
-        <p>
-        Condition II : Matching HTTP Header AND Url<br/>
-        </p>
-            <pre xml:space="preserve">curl -d @stockQuoteReq.xml -H "Content-Type: application/soap+xml;charset=UTF-8" -H "my_custom_header1:foo1" "http://localhost:8280/services/StockQuoteProxy"</pre>
-
-        <p>
-        Condition III : Complex conditions with AND, OR and NOT<br/>
-        </p>
-        <pre xml:space="preserve">curl -d @stockQuoteReq.xml -H "Content-Type: application/soap+xml;charset=UTF-8" -H "my_custom_header2:bar" -H "my_custom_header3:foo" "http://localhost:8280/services/StockQuoteProxy?qparam1=qpv_foo&amp;qparam2=qpv_foo2"</pre>
-
-<h1>
-<a name="ProxyServiceQoS" id="ProxyServiceQoS">QoS addition and deduction for service mediation (proxy) samples</a> </h1>
-<h2>
-<a name="Sample200" id="Sample200">Sample 200: Using WS-Security with policy attachments for proxy services</a></h2>
-<pre xml:space="preserve">&lt;definitions xmlns=&quot;http://ws.apache.org/ns/synapse&quot;&gt;
-    &lt;localEntry key=&quot;sec_policy&quot; src=&quot;file:repository/conf/sample/resources/policy/policy_3.xml&quot;/&gt;
-    &lt;proxy name=&quot;StockQuoteProxy&quot;&gt;
-        &lt;target&gt;
-            &lt;inSequence&gt;
-                &lt;header name=&quot;wsse:Security&quot; action=&quot;remove&quot;
-                        xmlns:wsse=&quot;http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd&quot;/&gt;
-                &lt;send&gt;
-                    &lt;endpoint&gt;
-                        &lt;address uri=&quot;http://localhost:9000/services/SimpleStockQuoteService&quot;/&gt;
-                    &lt;/endpoint&gt;
-                &lt;/send&gt;
-            &lt;/inSequence&gt;
-            &lt;outSequence&gt;
-                &lt;send/&gt;
-            &lt;/outSequence&gt;
-        &lt;/target&gt;
-        &lt;publishWSDL uri=&quot;file:repository/conf/sample/resources/proxy/sample_proxy_1.wsdl&quot;/&gt;
-        &lt;policy key=&quot;sec_policy&quot;/&gt;
-        &lt;enableSec/&gt;
-    &lt;/proxy&gt;
-&lt;/definitions&gt;</pre>
-<p>
-<strong>Objective: Using WS-Security signing and encryption with proxy services through WS-Policy</strong> </p>
-<p>
-<strong>Prerequisites:</strong>
-<br/> You may also need to download and install the unlimited strength policy files for your JDK before using Apache Rampart (e.g. see http://java.sun.com/javase/downloads/index_jdk5.jsp) </p>
-<p>Start the Synapse configuration numbered 200: i.e. synapse -sample 200
-<br/> Start the Axis2 server and deploy the SimpleStockQuoteService if not already done </p>
-
-<p>The proxy service expects to receive a signed and encrypted message as specified by the security policy. Please see Apache Rampart and Axis2 documentation on the format of the policy file. The element 'engageSec' specifies that Apache Rampart should be engaged on this proxy service. Hence if Rampart rejects any request messages that does not conform to the specified policy, those messages will never reach the 'inSequence' to be processed. Since the proxy service is forwarding the received request to the simple stock quote service that does not use WS-Security, we are instructing Synapse to remove the wsse:Security header from the outgoing message. To execute the client, send a stock quote request to the proxy service, and sign and encrypt the request by specifying the client side security policy as follows: </p>
-<pre xml:space="preserve">ant stockquote -Dtrpurl=http://localhost:8280/services/StockQuoteProxy -Dpolicy=./../../repository/conf/sample/resources/policy/client_policy_3.xml</pre>
-<p>By following through the debug logs or TCPMon output, you could see that the request received by the proxy service was signed and encrypted. Also, looking up the WSDL of the proxy service by requesting the URLhttp://localhost:8280/services/StockQuoteProxy?wsdl reveals the security policy attachment to the supplied base WSDL. When sending the message to the backend service, you could verify that the security headers were removed, and that the response received does not use WS-Security, but that the response being forwarded back to the client is signed and encrypted as expected by the client. </p>
-<h2>
-<a name="Sample201" id="Sample201">Sample 201: Reliable message exchange between the client and proxy services using WS-ReliableMessaging</a></h2>
-<pre xml:space="preserve">&lt;definitions xmlns=&quot;http://ws.apache.org/ns/synapse&quot;&gt;
-    &lt;proxy name=&quot;StockQuoteProxy&quot;&gt;
-        &lt;target&gt;
-            &lt;inSequence&gt;
-                &lt;header name=&quot;wsrm:SequenceAcknowledgement&quot; action=&quot;remove&quot;
-                        xmlns:wsrm=&quot;http://schemas.xmlsoap.org/ws/2005/02/rm&quot;/&gt;
-                &lt;header name=&quot;wsrm:Sequence&quot; action=&quot;remove&quot;
-                        xmlns:wsrm=&quot;http://schemas.xmlsoap.org/ws/2005/02/rm&quot;/&gt;
-                &lt;send&gt;
-                    &lt;endpoint&gt;
-                        &lt;address uri=&quot;http://localhost:9000/services/SimpleStockQuoteService&quot;/&gt;
-                    &lt;/endpoint&gt;
-                &lt;/send&gt;
-            &lt;/inSequence&gt;
-            &lt;outSequence&gt;
-                &lt;send/&gt;
-            &lt;/outSequence&gt;
-        &lt;/target&gt;
-        &lt;publishWSDL uri=&quot;file:repository/conf/sample/resources/proxy/sample_proxy_1.wsdl&quot;/&gt;
-        &lt;enableRM/&gt;
-    &lt;/proxy&gt;
-&lt;/definitions&gt;</pre>
-<strong>Objective: Demonstrate the reliable message exchange between the client and Synapse using WS-ReliableMessaging (WS-RM)</strong>
-<p>
-<strong>Prerequisites:</strong>
-<br/>Deploy the SimpleStockQuoteService in the sample Axis2 server and start it on port 9000.
-<br/>Start Synapse with the sample configuration number 201 (i.e. synapse -sample 201). </p>
-
-<p>In the above configuration, a proxy service is created with WS-RM enabled using the &lt;enableRM/&gt; tag. Therefore, this proxy service is capable of communicating with a WS-RM client. It also removes the WS-RM headers in the In Sequence before the message is sent to the backend server. This is required as the reliable messaging is applicable only between the client and Synapse. Now start the client with WS-RM as follows: </p>
-<pre xml:space="preserve">ant stockquote -Dsymbol=IBM -Dmode=quote -Daddurl=http://localhost:8280/services/StockQuoteProxy -Dwsrm=true</pre>
-<p>In this case, client sends a WS-RM enabled request to Synapse where Synapse sends normal request to the server. This can be observed by examining the wire level messages between the client and Synapse. These messages would be similar to the wire level messages shown in sample 101. Each message would perform a similar function to the messages discussed in sample 53. </p>
-
-<h1>
-<a name="Transport" id="Transport">Transport samples and switching transports</a> </h1>
-<h2>
-<a name="Sample250" id="Sample250">Sample 250: Introduction to switching transports - JMS to http/s</a></h2>
-<pre xml:space="preserve">&lt;definitions xmlns="http://ws.apache.org/ns/synapse"&gt;
-
-    &lt;proxy name=&quot;StockQuoteProxy&quot; transports=&quot;jms&quot;&gt;
-        &lt;target&gt;
-            &lt;inSequence&gt;
-                &lt;property action=&quot;set&quot; name=&quot;OUT_ONLY&quot; value=&quot;true&quot;/&gt;
-            &lt;/inSequence&gt;
-            &lt;endpoint&gt;
-                &lt;address uri=&quot;http://localhost:9000/services/SimpleStockQuoteService&quot;/&gt;
-            &lt;/endpoint&gt;
-            &lt;outSequence&gt;
-                &lt;send/&gt;
-            &lt;/outSequence&gt;
-        &lt;/target&gt;
-        &lt;publishWSDL uri=&quot;file:repository/conf/sample/resources/proxy/sample_proxy_1.wsdl&quot;/&gt;
-        &lt;parameter name=&quot;transport.jms.ContentType&quot;&gt;
-            &lt;rules&gt;
-                &lt;jmsProperty&gt;contentType&lt;/jmsProperty&gt;
-                &lt;default&gt;application/xml&lt;/default&gt;
-            &lt;/rules&gt;
-        &lt;/parameter&gt;
-    &lt;/proxy&gt;
-
-&lt;/definitions&gt;</pre>
-<p>
-<strong>Objective: Introduction to switching transports with proxy services</strong> </p>
-<p>
-<strong>Prerequisites:</strong>
-<br/> Start the Axis2 server with the SimpleStockQuoteService deployed
-<br/> Download, install and start a JMS server, and configure Synapse to listen on JMS (refer notes below)
-<br/> Start the Synapse configuration numbered 250: i.e. synapse -sample 250</p>
-
-<p> For this example we will use <a href="http://activemq.apache.org">Apache ActiveMQ</a> as the JMS provider.
-Simply download the binary distribution, extract it and launch the startup script to start the JMS broker.</p>
-<p>Now you have to enable the JMS transport receiver of Synapse. Start by deploying the ActiveMQ client
-libraries into the Synapse runtime. Simply copy the following jars from the ActiveMQ distribution into
-SYNAPSE_HOME/lib directory:</p>
-<ul>
-    <li>activemq-core.jar</li>
-    <li>geronimo-j2ee_management.jar</li>
-    <li>geronimo-jms.jar</li>
-</ul>
-<p>Now you need to add some entries into the axis2.xml file. For a default ActiveMQ v5.x installation, you may
-uncomment the Axis2 transport listener configuration found at repository/conf/axis2.xml as </p>
-<pre xml:space="preserve">&lt;transportReceiver name=&quot;jms&quot; class=&quot;org.apache.axis2.transport.jms.JMSListener&quot;&gt; ...</pre>
-
-<p>Once you start the Synapse configuration and request for the WSDL of the proxy service (http://localhost:8280/services/StockQuoteProxy?wsdl)
-you will notice that its exposed only on the JMS transport. This is because the configuration specified this requirement in the
-proxy service definition. </p>
-<p>Now lets send a stock quote request on JMS, using the dumb stock quote client as follows: </p>
-<pre xml:space="preserve">ant jmsclient -Djms_type=pox -Djms_dest=dynamicQueues/StockQuoteProxy -Djms_payload=MSFT</pre>
-<p>On the Synapse debug log you will notice that the JMS listener received the request message as: </p>
-<pre xml:space="preserve">[JMSWorker-1] DEBUG ProxyServiceMessageReceiver -Proxy Service StockQuoteProxy received a new message...</pre>
-<p>Now if you examine the console running the sample Axis2 server, you will see a message indicating that the server has accepted an order as follows: </p>
-<pre xml:space="preserve">Accepted order for : 16517 stocks of MSFT at $ 169.14622538721846</pre>
-<p>In this sample, the client sends the request message to the proxy service exposed over JMS in Synsape. Synapse forwards this message to the HTTP EPR of the simple stock quote service hosted on the sample Axis2 server.
-Note that the operation is out-only and no response is sent back to the client. The transport.jms.ContentType property
-is necessary to allow the JMS transport to determine the content type of incoming messages. With the given configuration
-it will first try to read the content type from the 'contentType' message property and fall back to 'application/xml'
-(i.e. POX) if this property is not set. Note that the JMS client used in this example doesn't send any content type information.</p>
-<p>Note: It is possible to instruct a JMS proxy service to listen to an already existing destination without creating a new one. To do this, use the parameter elements on the proxy service definition to specify the destination and connection factory etc. </p>
-<p>e.g. </p>
-<pre xml:space="preserve">&lt;parameter name=&quot;transport.jms.Destination&quot;&gt;dynamicTopics/something.TestTopic&lt;/parameter&gt;</pre>
-<h2>
-<a name="Sample251" id="Sample251">Sample 251: Switching from http/s to JMS</a></h2>
-<pre xml:space="preserve">&lt;definitions xmlns=&quot;http://ws.apache.org/ns/synapse&quot;&gt;
-
-    &lt;proxy name=&quot;StockQuoteProxy&quot; transports=&quot;http&quot;&gt;
-        &lt;target&gt;
-            &lt;endpoint&gt;
-                &lt;address uri=&quot;jms:/SimpleStockQuoteService?transport.jms.ConnectionFactoryJNDIName=QueueConnectionFactory&amp;amp;
-                   java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory&amp;amp;java.naming.provider.url=tcp://localhost:61616&quot;/&gt;
-            &lt;/endpoint&gt;
-            &lt;inSequence&gt;
-                &lt;property action=&quot;set&quot; name=&quot;OUT_ONLY&quot; value=&quot;true&quot;/&gt;
-            &lt;/inSequence&gt;
-            &lt;outSequence&gt;
-                &lt;send/&gt;
-            &lt;/outSequence&gt;
-        &lt;/target&gt;
-        &lt;publishWSDL uri=&quot;file:repository/conf/sample/resources/proxy/sample_proxy_1.wsdl&quot;/&gt;
-    &lt;/proxy&gt;
-
-&lt;/definitions&gt;</pre>
-<p>
-<strong>Objective: Demonstrate switching from HTTP to JMS</strong> </p>
-<p>
-<strong>Prerequisites:</strong>
-<br/> Download, install and start a JMS server
-<br/> Configure sample Axis2 server for JMS (refer notes below)
-<br/> Start the Axis2 server and deploy the SimpleStockQuoteService (see below)
-<br/> Configure the Synase JMS transport (refer notes above - sample 250)
-<br/> Start the Synapse configuration numbered 251: i.e. synapse -sample 251 </p>
-    
-<p>To switch from HTTP to JMS, edit the samples/axis2Server/repository/conf/axis2.xml for the sample Axis2 server and enable JMS (refer notes above), and restart the server. Now you can see that the simple stock quote service is available in both JMS and HTTP in the sample Axis2 server. To see this, point your browser to the WSDL of the service at http://localhost:9000/services/SimpleStockQuoteService?wsdl. JMS URL for the service is mentioned as below: </p>
-<pre xml:space="preserve">jms:/SimpleStockQuoteService?transport.jms.ConnectionFactoryJNDIName=
-QueueConnectionFactory&amp;java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory&amp;
-java.naming.provider.url=tcp://localhost:61616</pre>
-<p>You may also notice that the simple stock quote proxy service exposed in Synapse is now available only in HTTP as we have specified transport for that service as HTTP. To observe this, access the WSDL of stock quote proxy service at http://localhost:8280/services/StockQuoteProxy?wsdl. </p>
-<p>This Synapse configuration creates a proxy service over HTTP and forwards received messages to the above EPR using JMS, and sends back the response to the client over HTTP once the simple stock quote service responds with the stock quote reply over JMS to the Synapse server. To test this, send a place order request to Synapse using HTTP as follows: </p>
-<pre xml:space="preserve">ant stockquote -Daddurl=http://localhost:8280/services/StockQuoteProxy -Dmode=placeorder -Dsymbol=MSFT</pre>
-<p>The sample Axis2 server console will print a message indicating that it has accepted the order as follows: </p>
-<pre xml:space="preserve">Accepted order for : 18406 stocks of MSFT at $ 83.58806051152119</pre>
-<h2>
-<a name="Sample252" id="Sample252">Sample 252: Pure text/binary and POX message support with JMS</a></h2>
-<pre xml:space="preserve">&lt;definitions xmlns=&quot;http://ws.apache.org/ns/synapse&quot;&gt;
-    &lt;sequence name=&quot;text_proxy&quot;&gt;
-        &lt;log level=&quot;full&quot;/&gt;
-        &lt;header name=&quot;Action&quot; value=&quot;urn:placeOrder&quot;/&gt;
-        &lt;script language=&quot;js&quot;&gt;&lt;![CDATA[
-            var args = mc.getPayloadXML().toString().split(&quot; &quot;);
-            mc.setPayloadXML(
-            &lt;placeOrder xmlns=&quot;http://services.samples&quot;&gt;
-                &lt;order xmlns=&quot;http://services.samples/xsd&quot;&gt;
-                    &lt;price&gt;{args[0]}&lt;/price&gt;
-                    &lt;quantity&gt;{args[1]}&lt;/quantity&gt;
-                    &lt;symbol&gt;{args[2]}&lt;/symbol&gt;
-                &lt;/order&gt;
-            &lt;/placeOrder&gt;);
-        ]]&gt;&lt;/script&gt;
-        &lt;property action=&quot;set&quot; name=&quot;OUT_ONLY&quot; value=&quot;true&quot;/&gt;
-        &lt;log level=&quot;full&quot;/&gt;
-        &lt;send&gt;
-            &lt;endpoint&gt;
-                &lt;address uri=&quot;http://localhost:9000/services/SimpleStockQuoteService&quot;/&gt;
-            &lt;/endpoint&gt;
-        &lt;/send&gt;
-    &lt;/sequence&gt;
-
-    &lt;sequence name=&quot;mtom_proxy&quot;&gt;
-        &lt;log level=&quot;full&quot;/&gt;
-        &lt;property action=&quot;set&quot; name=&quot;OUT_ONLY&quot; value=&quot;true&quot;/&gt;
-        &lt;header name=&quot;Action&quot; value=&quot;urn:oneWayUploadUsingMTOM&quot;/&gt;
-        &lt;send&gt;
-            &lt;endpoint&gt;
-                &lt;address uri=&quot;http://localhost:9000/services/MTOMSwASampleService&quot; optimize=&quot;mtom&quot;/&gt;
-            &lt;/endpoint&gt;
-        &lt;/send&gt;
-    &lt;/sequence&gt;
-
-    &lt;sequence name=&quot;pox_proxy&quot;&gt;
-        &lt;property action=&quot;set&quot; name=&quot;OUT_ONLY&quot; value=&quot;true&quot;/&gt;
-        &lt;header name=&quot;Action&quot; value=&quot;urn:placeOrder&quot;/&gt;
-        &lt;send&gt;
-            &lt;endpoint&gt;
-                &lt;address uri=&quot;http://localhost:9000/services/SimpleStockQuoteService&quot; format=&quot;soap11&quot;/&gt;
-            &lt;/endpoint&gt;
-        &lt;/send&gt;
-    &lt;/sequence&gt;
-
-    &lt;sequence name=&quot;out&quot;&gt;
-		&lt;send/&gt;
-	&lt;/sequence&gt;
-
-    &lt;proxy name=&quot;JMSFileUploadProxy&quot; transports=&quot;jms&quot;&gt;
-        &lt;target inSequence=&quot;mtom_proxy&quot; outSequence=&quot;out&quot;/&gt;
-        &lt;parameter name=&quot;transport.jms.ContentType&quot;&gt;
-            &lt;rules&gt;
-                &lt;bytesMessage&gt;application/octet-stream&lt;/bytesMessage&gt;
-            &lt;/rules&gt;
-        &lt;/parameter&gt;
-        &lt;parameter name=&quot;Wrapper&quot;&gt;{http://services.samples/xsd}element&lt;/parameter&gt;
-    &lt;/proxy&gt;
-    &lt;proxy name=&quot;JMSTextProxy&quot; transports=&quot;jms&quot;&gt;
-        &lt;target inSequence=&quot;text_proxy&quot; outSequence=&quot;out&quot;/&gt;
-        &lt;parameter name=&quot;transport.jms.ContentType&quot;&gt;
-            &lt;rules&gt;
-                &lt;textMessage&gt;text/plain&lt;/textMessage&gt;
-            &lt;/rules&gt;
-        &lt;/parameter&gt;
-        &lt;parameter name=&quot;Wrapper&quot;&gt;{http://services.samples/xsd}text&lt;/parameter&gt;
-    &lt;/proxy&gt;
-    &lt;proxy name=&quot;JMSPoxProxy&quot; transports=&quot;jms&quot;&gt;
-        &lt;target inSequence=&quot;pox_proxy&quot; outSequence=&quot;out&quot;/&gt;
-        &lt;parameter name=&quot;transport.jms.ContentType&quot;&gt;application/xml&lt;/parameter&gt;
-    &lt;/proxy&gt;
-&lt;/definitions&gt;</pre>
-<p>
-<strong>Objective: Pure POX/Text and Binary JMS Proxy services - including MTOM</strong> </p>
-<p>
-<strong>Prerequisites:</strong>
-<br/> Configure JMS for Synapse (Refer notes)
-<br/> Start the Synapse configuration numbered 252: i.e. synapse -sample 252
-<br/> Start the Axis2 server and deploy the SimpleStockQuoteService and the MTOMSwASampleService if not already done </p>
-
-<p>This configuration creates three JMS proxy services named JMSFileUploadProxy, JMSTextProxy and JMSPoxProxy exposed over JMS queues with the same names as the services. The first part of this example demonstrates the pure text message support with JMS, where a user sends a space separated text JMS message of the form &quot;&lt;price&gt; &lt;qty&gt; &lt;symbol&gt;&quot;. Synapse converts this message into a SOAP message and sends this to the SimpleStockQuoteServices' placeOrder operation. Synapse uses the script mediator to transform the text message into a XML payload using the JavaScript support available to tokenize the string. The proxy service property named &quot;Wrapper&quot; defines a custom wrapper element QName, to be used when wrapping text/binary content into a SOAP envelope. </p>
-
-<p>Execute JMS client as follows. This will post a pure text JMS message with the content defined (e.g. &quot;12.33 1000 ACP&quot;) to the specified JMS destination - dynamicQueues/JMSTextProxy </p>
-<pre xml:space="preserve">ant jmsclient -Djms_type=text -Djms_payload=&quot;12.33 1000 ACP&quot; -Djms_dest=dynamicQueues/JMSTextProxy</pre>
-<p>Following the logs, you could notice that Synapse received the JMS text message and transformed it into a SOAP payload as follows. Notice that the wrapper element &quot;{http://services.samples/xsd}text&quot; has been used to hold the text message content. </p>
-<pre xml:space="preserve">[jms-Worker-1] INFO LogMediator To: , WSAction: urn:mediate, SOAPAction: urn:mediate, MessageID: ID:orcus.veithen.net-50631-1225235276233-1:0:1:1:1, Direction: request,
-Envelope:
-&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
-&lt;soapenv:Envelope xmlns:soapenv=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot;&gt;
-  &lt;soapenv:Body&gt;
-    &lt;axis2ns1:text xmlns:axis2ns1=&quot;http://services.samples/xsd&quot;&gt;12.33 1000 ACP&lt;/axis2ns1:text&gt;
-  &lt;/soapenv:Body&gt;
-&lt;/soapenv:Envelope&gt;</pre>
-<p>Now, you could see how the script mediator created a stock quote request by tokenizing the text as follows, and sent the message to the placeOrder operation of the SimpleStockQuoteService. </p>
-<pre xml:space="preserve">[jms-Worker-1] INFO LogMediator To: , WSAction: urn:placeOrder, SOAPAction: urn:placeOrder, MessageID: ID:orcus.veithen.net-50631-1225235276233-1:0:1:1:1, Direction: request,
-Envelope:
-&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
-&lt;soapenv:Envelope xmlns:soapenv=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot;&gt;
-  &lt;soapenv:Body&gt;
-    &lt;placeOrder xmlns=&quot;http://services.samples&quot;&gt;
-      &lt;order xmlns=&quot;http://services.samples/xsd&quot;&gt;
-        &lt;price&gt;12.33&lt;/price&gt;
-        &lt;quantity&gt;1000&lt;/quantity&gt;
-        &lt;symbol&gt;ACP&lt;/symbol&gt;
-      &lt;/order&gt;
-    &lt;/placeOrder&gt;
-  &lt;/soapenv:Body&gt;
-&lt;/soapenv:Envelope&gt;</pre>
-<p>The sample Axis2 server would now accept the one-way message and issue the following message: </p>
-<pre xml:space="preserve">samples.services.SimpleStockQuoteService :: Accepted order for : 1000 stocks of ACP at $ 12.33</pre>
-
-<p>The next section of this example demonstrates how a pure binary JMS message could be received and processed through Synapse. The configuration creates a proxy service named 'JMSFileUploadProxy' that accepts binary messages and wraps them into a custom element '{http://services.samples/xsd}element'. The received message is then forwarded to the MTOMSwASampleService using the SOAP action 'urn:oneWayUploadUsingMTOM' and optimizing binary content using MTOM. To execute this sample, use the JMS client to publish a pure binary JMS message containing the file './../../repository/conf/sample/resources/mtom/asf-logo.gif' to the JMS destination 'dynamicQueues/JMSFileUploadProxy' as follows: </p>
-<pre xml:space="preserve">ant jmsclient -Djms_type=binary -Djms_dest=dynamicQueues/JMSFileUploadProxy \
-              -Djms_payload=./../../repository/conf/sample/resources/mtom/asf-logo.gif</pre>
-<p>Examining the Synapse debug logs reveals that the binary content was received over JMS and wrapped with the specified element into a SOAP infoset as follows: </p>
-<pre xml:space="preserve">[jms-Worker-1] INFO LogMediator To: , WSAction: urn:mediate, SOAPAction: urn:mediate, MessageID: ID:orcus.veithen.net-50702-1225236039556-1:0:1:1:1, Direction: request,
-Envelope:
-&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
-&lt;soapenv:Envelope xmlns:soapenv=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot;&gt;
-  &lt;soapenv:Body&gt;
-    &lt;axis2ns1:element xmlns:axis2ns1=&quot;http://services.samples/xsd&quot;&gt;R0lGODlhgw...AAOw==&lt;/axis2ns1:element&gt;
-  &lt;/soapenv:Body&gt;
-&lt;/soapenv:Envelope&gt;</pre>
-<p>Thereafter the message was sent as a MTOM optimized message as specified by the 'format=mtom' attribute of the endpoint, to the MTOMSwASampleService using the SOAP action 'urn:oneWayUploadUsingMTOM'. Once received by the sample service, it is saved into a temporary file and could be verified for correctness. </p>
-<pre xml:space="preserve">Wrote to file : ./../../work/temp/sampleServer/mtom-4417.gif</pre>
-
-<p>The final section of this example shows how a POX JMS message received by Synapse is sent to the SimpleStockQuoteService as a SOAP message. Use the JMS client as follows to create a POX (Plain Old XML) message with a stock quote request payload (without a SOAP envelope), and send it to the JMS destination 'dynamicQueues/JMSPoxProxy' as follows: </p>
-<pre xml:space="preserve">ant jmsclient -Djms_type=pox -Djms_dest=dynamicQueues/JMSPoxProxy -Djms_payload=MSFT</pre>
-<p>Synapse converts the POX message into a SOAP payload and sends to the SimpleStockQuoteService after setting the SOAP action as 'urn:placeOrder'.
-The sample Axis2 server displays a successful message on the receipt of the message as: </p>
-<pre xml:space="preserve">samples.services.SimpleStockQuoteService :: Accepted order for : 19211 stocks of MSFT at $ 172.39703010684752</pre>
-<h2>
-<a name="Sample253" id="Sample253">Sample 253: One way bridging from JMS to http and replying with a 202 Accepted response</a></h2>
-<pre xml:space="preserve">&lt;definitions xmlns=&quot;http://ws.apache.org/ns/synapse&quot;&gt;
-
-    &lt;proxy name=&quot;JMStoHTTPStockQuoteProxy&quot; transports=&quot;jms&quot;&gt;
-        &lt;target&gt;
-            &lt;inSequence&gt;
-                &lt;property action=&quot;set&quot; name=&quot;OUT_ONLY&quot; value=&quot;true&quot;/&gt;
-            &lt;/inSequence&gt;
-            &lt;endpoint&gt;
-                &lt;address uri=&quot;http://localhost:9000/services/SimpleStockQuoteService&quot;/&gt;
-            &lt;/endpoint&gt;
-            &lt;outSequence&gt;
-                &lt;send/&gt;
-            &lt;/outSequence&gt;
-        &lt;/target&gt;
-        &lt;publishWSDL uri=&quot;file:repository/conf/sample/resources/proxy/sample_proxy_1.wsdl&quot;/&gt;
-    &lt;/proxy&gt;
-
-    &lt;proxy name=&quot;OneWayProxy&quot; transports=&quot;http&quot;&gt;
-        &lt;target&gt;
-            &lt;inSequence&gt;
-                &lt;log level=&quot;full&quot;/&gt;
-            &lt;/inSequence&gt;
-            &lt;endpoint&gt;
-                &lt;address uri=&quot;http://localhost:9000/services/SimpleStockQuoteService&quot;/&gt;
-            &lt;/endpoint&gt;
-            &lt;outSequence&gt;
-                &lt;send/&gt;
-            &lt;/outSequence&gt;
-        &lt;/target&gt;
-        &lt;publishWSDL uri=&quot;file:repository/conf/sample/resources/proxy/sample_proxy_1.wsdl&quot;/&gt;
-    &lt;/proxy&gt;
-
-&lt;/definitions&gt;</pre>
-<p>
-<strong>Objective: Demonstrate one-way message bridging from JMS to HTTP and replying with a HTTP 202 Accepted response</strong> </p>
-<p>
-<strong>Prerequisites:</strong>
-<br/> Start the Axis2 server and deploy the SimpleStockQuoteService if not already done
-<br/>Start the Synapse configuration numbered 253: i.e. synapse -sample 253 </p>
-
-<p>This example invokes the one-way 'placeOrder' operation on the SimpleStockQuoteService using the Axis2 ServiceClient.fireAndForget() API at the client. To test this, use 'ant -Dmode=placeorder...' and you will notice the one-way JMS message flowing through Synapse into the sample Axis2 server instance over HTTP, and Axis2 acknowledging it with a HTTP 202 Accepted response. </p>
-<pre xml:space="preserve">ant stockquote -Dmode=placeorder -Dtrpurl=&quot;jms:/JMStoHTTPStockQuoteProxy?\
-transport.jms.ConnectionFactoryJNDIName=QueueConnectionFactory\
-&amp;java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory\
-&amp;java.naming.provider.url=tcp://localhost:61616\
-&amp;transport.jms.ContentTypeProperty=Content-Type&amp;transport.jms.DestinationType=queue&quot;</pre>
-<pre xml:space="preserve">SimpleStockQuoteService :: Accepted order for : 7482 stocks of IBM at $ 169.27205579038733</pre>
-<p>The second example shows how Synapse could be made to respond with a HTTP 202 Accepted response to a request received. The proxy service simply logs the message received and acknowledges it. On the Synapse console you could see the logged message, and if TCPMon was used at the client, you would see the 202 Accepted response sent back to the client from Synapse </p>
-<pre xml:space="preserve">ant stockquote -Dmode=placeorder -Dtrpurl=http://localhost:8280/services/OneWayProxy</pre>
-<pre xml:space="preserve">HTTP/1.1 202 Accepted
-Content-Type: text/xml; charset=UTF-8
-Host: 127.0.0.1
-SOAPAction: &quot;urn:placeOrder&quot;
-Date: Sun, 06 May 2007 17:20:19 GMT
-Server: Synapse-HttpComponents-NIO
-Transfer-Encoding: chunked
-
-0</pre>
-<h2>
-<a name="Sample254" id="Sample254">Sample 254: Using the file system as transport medium using VFS transport listener and sender</a></h2>
-<pre xml:space="preserve">&lt;definitions xmlns=&quot;http://ws.apache.org/ns/synapse&quot;&gt;
-    &lt;proxy name=&quot;StockQuoteProxy&quot; transports=&quot;vfs&quot;&gt;
-        &lt;parameter name=&quot;transport.vfs.FileURI&quot;&gt;file:///home/user/test/in&lt;/parameter&gt; &lt;!--CHANGE--&gt;
-        &lt;parameter name=&quot;transport.vfs.ContentType&quot;&gt;text/xml&lt;/parameter&gt;
-        &lt;parameter name=&quot;transport.vfs.FileNamePattern&quot;&gt;.*\.xml&lt;/parameter&gt;
-        &lt;parameter name=&quot;transport.PollInterval&quot;&gt;15&lt;/parameter&gt;
-        &lt;parameter name=&quot;transport.vfs.MoveAfterProcess&quot;&gt;file:///home/user/test/original&lt;/parameter&gt; &lt;!--CHANGE--&gt;
-        &lt;parameter name=&quot;transport.vfs.MoveAfterFailure&quot;&gt;file:///home/user/test/original&lt;/parameter&gt; &lt;!--CHANGE--&gt;
-        &lt;parameter name=&quot;transport.vfs.ActionAfterProcess&quot;&gt;MOVE&lt;/parameter&gt;
-        &lt;parameter name=&quot;transport.vfs.ActionAfterFailure&quot;&gt;MOVE&lt;/parameter&gt;
-
-        &lt;target&gt;
-            &lt;endpoint&gt;
-                &lt;address format=&quot;soap12&quot; uri=&quot;http://localhost:9000/services/SimpleStockQuoteService&quot;/&gt;
-            &lt;/endpoint&gt;
-            &lt;outSequence&gt;
-                &lt;property name=&quot;transport.vfs.ReplyFileName&quot;
-                          expression=&quot;fn:concat(fn:substring-after(get-property('MessageID'), 'urn:uuid:'), '.xml')&quot; scope=&quot;transport&quot;/&gt;
-                &lt;property action=&quot;set&quot; name=&quot;OUT_ONLY&quot; value=&quot;true&quot;/&gt;
-                &lt;send&gt;
-                    &lt;endpoint&gt;
-                        &lt;address uri=&quot;vfs:file:///home/user/test/out&quot;/&gt; &lt;!--CHANGE--&gt;
-                    &lt;/endpoint&gt;
-                &lt;/send&gt;
-            &lt;/outSequence&gt;
-        &lt;/target&gt;
-        &lt;publishWSDL uri=&quot;file:repository/conf/sample/resources/proxy/sample_proxy_1.wsdl&quot;/&gt;
-    &lt;/proxy&gt;
-&lt;/definitions&gt;</pre>
-<p>
-<strong>Objective: Using the file system as transport medium using VFS transport listener and sender</strong> </p>
-
-<p>
-<strong>Prerequisites:</strong>
-<br/>Start the Axis2 server and deploy the SimpleStockQuoteService if not already done
-<br/>Create three new directories in a test directory. e.g. in, out, original in /home/user/test. Open SYNAPSE_HOME/repository/conf/sample/synapse_sample_254.xml and edit the following values. Change transport.vfs.FileURI, transport.vfs.MoveAfterProcess, transport.vfs.MoveAfterFailure parameter values to the above in, original, original directories respectively. Change outSequence endpoint address uri to out directory with the prefix
-<em>vfs:</em>. Values you have to change are marked with &lt;!--CHANGE--&gt;
-<br/>Start the Synapse configuration numbered 254: i.e. synapse -sample 254 </p>
-
-<p>Copy SYNAPSE_HOME/repository/conf/sample/resources/vfs/test.xml to the directory given in transport.vfs.FileURI above. </p>
-<p>test.xml file content is as follows </p>
-<pre xml:space="preserve">&lt;?xml version='1.0' encoding='UTF-8'?&gt;
-    &lt;soapenv:Envelope xmlns:soapenv=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot; xmlns:wsa=&quot;http://www.w3.org/2005/08/addressing&quot;&gt;
-    &lt;soapenv:Body&gt;
-            &lt;m0:getQuote xmlns:m0=&quot;http://services.samples&quot;&gt;
-                    &lt;m0:request&gt;
-                            &lt;m0:symbol&gt;IBM&lt;/m0:symbol&gt;
-                    &lt;/m0:request&gt;
-            &lt;/m0:getQuote&gt;
-    &lt;/soapenv:Body&gt;
-&lt;/soapenv:Envelope&gt;</pre>
-<p>VFS transport listener will pick the file from 
-<em>in</em> directory and send it to the Axis2 service. The request XML file will be moved to 
-<em>original</em> directory. The response from the Axis2 server will be saved to 
-<em>out</em> directory. </p>
-<h2>
-<a name="Sample255" id="Sample255">Sample 255: Switching from ftp transport listener to mail transport sender</a></h2>
-<pre xml:space="preserve">&lt;definitions xmlns=&quot;http://ws.apache.org/ns/synapse&quot;&gt;
-    &lt;proxy name=&quot;StockQuoteProxy&quot; transports=&quot;vfs&quot;&gt;
-    &lt;parameter name=&quot;transport.vfs.FileURI&quot;&gt;vfs:ftp://username:password@localhost/home/user/test?vfs.passive=true&lt;/parameter&gt; &lt;!--CHANGE--&gt;
-            &lt;parameter name=&quot;transport.vfs.ContentType&quot;&gt;text/xml&lt;/parameter&gt;
-            &lt;parameter name=&quot;transport.vfs.FileNamePattern&quot;&gt;.*\.xml&lt;/parameter&gt;
-            &lt;parameter name=&quot;transport.PollInterval&quot;&gt;15&lt;/parameter&gt;
-
-            &lt;target&gt;
-                    &lt;inSequence&gt;
-                            &lt;header name=&quot;Action&quot; value=&quot;urn:getQuote&quot;/&gt;
-                    &lt;/inSequence&gt;
-                    &lt;endpoint&gt;
-                            &lt;address uri=&quot;http://localhost:9000/services/SimpleStockQuoteService&quot;/&gt;
-                    &lt;/endpoint&gt;
-                    &lt;outSequence&gt;
-                            &lt;property action=&quot;set&quot; name=&quot;OUT_ONLY&quot; value=&quot;true&quot;/&gt;
-                            &lt;send&gt;
-                                    &lt;endpoint&gt;
-                                            &lt;address uri=&quot;mailto:user@host&quot;/&gt; &lt;!--CHANGE--&gt;
-                                    &lt;/endpoint&gt;
-                            &lt;/send&gt;
-                    &lt;/outSequence&gt;
-            &lt;/target&gt;
-            &lt;publishWSDL uri=&quot;file:repository/conf/sample/resources/proxy/sample_proxy_1.wsdl&quot;/&gt;
-    &lt;/proxy&gt;
-&lt;/definitions&gt; </pre>
-<p>
-<strong>Objective: Switching from FTP transport listener to mail transport sender</strong> </p>
-<p>
-<strong>Prerequisites:</strong>
-<br/> You will need access to an FTP server and an SMTP server to try this sample. </p>
-<p>Start the Axis2 server and deploy the SimpleStockQuoteService if not already done </p>
-<p>Enable mail transport sender in the Synapse axis2.xml. See 
-<a href="Synapse_Samples_Setup.html#mailsender">Setting up mail transport sender</a> </p>
-<p>Create a new test directory in the FTP server. Open SYNAPSE_HOME/repository/conf/sample/synapse_sample_255.xml and edit the following values. Change transport.vfs.FileURI parameter value point to the test directory at the FTP server. Change outSequence endpoint address uri email address to a working email address. Values you have to change are marked with &lt;!--CHANGE--&gt;. </p>
-<p>Start the Synapse configuration numbered 255: i.e. synapse -sample 255 </p>
-<p>Copy SYNAPSE_HOME/repository/conf/sample/resources/vfs/test.xml to the ftp directory given in transport.vfs.FileURI above. </p>
-<p>VFS transport listener will pick the file from the directory in the FTP server and send it to the Axis2 service. The file in the FTP directory will be deleted. The response will be sent to the given email address. </p>
-<h2>
-<a name="Sample256" id="Sample256">Sample 256: Proxy services with the mail transport </a></h2>
-<pre xml:space="preserve">&lt;definitions xmlns=&quot;http://ws.apache.org/ns/synapse&quot;&gt;
-    &lt;proxy name=&quot;StockQuoteProxy&quot; transports=&quot;mailto&quot;&gt;
-
-        &lt;parameter name=&quot;transport.mail.Address&quot;&gt;synapse.demo.1@gmail.com&lt;/parameter&gt;
-        &lt;parameter name=&quot;transport.mail.Protocol&quot;&gt;pop3&lt;/parameter&gt;
-        &lt;parameter name=&quot;transport.PollInterval&quot;&gt;5&lt;/parameter&gt;
-        &lt;parameter name=&quot;mail.pop3.host&quot;&gt;pop.gmail.com&lt;/parameter&gt;
-        &lt;parameter name=&quot;mail.pop3.port&quot;&gt;995&lt;/parameter&gt;
-        &lt;parameter name=&quot;mail.pop3.user&quot;&gt;synapse.demo.1&lt;/parameter&gt;
-        &lt;parameter name=&quot;mail.pop3.password&quot;&gt;mailpassword&lt;/parameter&gt;
-        &lt;parameter name=&quot;mail.pop3.socketFactory.class&quot;&gt;javax.net.ssl.SSLSocketFactory&lt;/parameter&gt;
-        &lt;parameter name=&quot;mail.pop3.socketFactory.fallback&quot;&gt;false&lt;/parameter&gt;
-        &lt;parameter name=&quot;mail.pop3.socketFactory.port&quot;&gt;995&lt;/parameter&gt;
-        &lt;parameter name=&quot;transport.mail.ContentType&quot;&gt;application/xml&lt;/parameter&gt;
-
-        &lt;target&gt;
-            &lt;inSequence&gt;
-                &lt;property name=&quot;senderAddress&quot; expression=&quot;get-property(&quot;transport&quot;, &quot;From&quot;)&quot;/&gt;
-                &lt;log level=&quot;full&quot;&gt;
-                    &lt;property name=&quot;Sender Address&quot; expression=&quot;get-property(&quot;senderAddress&quot;)&quot;/&gt;
-                &lt;/log&gt;
-                &lt;send&gt;
-                    &lt;endpoint&gt;
-                        &lt;address uri=&quot;http://localhost:9000/services/SimpleStockQuoteService&quot;/&gt;
-                    &lt;/endpoint&gt;
-                &lt;/send&gt;
-            &lt;/inSequence&gt;
-            &lt;outSequence&gt;
-                &lt;property name=&quot;Subject&quot; value=&quot;Custom Subject for Response&quot; scope=&quot;transport&quot;/&gt;
-                &lt;header name=&quot;To&quot; expression=&quot;fn:concat(&quot;mailto:&quot;, get-property(&quot;senderAddress&quot;))&quot;/&gt;
-                &lt;log level=&quot;full&quot;&gt;
-                    &lt;property name=&quot;message&quot; value=&quot;Response message&quot;/&gt;
-                    &lt;property name=&quot;Sender Address&quot; expression=&quot;get-property(&quot;senderAddress&quot;)&quot;/&gt;
-                &lt;/log&gt;
-                &lt;send/&gt;
-            &lt;/outSequence&gt;
-        &lt;/target&gt;
-        &lt;publishWSDL uri=&quot;file:repository/conf/sample/resources/proxy/sample_proxy_1.wsdl&quot;/&gt;
-    &lt;/proxy&gt;
-&lt;/definitions&gt;</pre>
-<p>
-<strong>Objective: Using the mail transport with Proxy services</strong> </p>
-<p>
-<strong>Prerequisites:</strong>
-<br/> You will need access to an email account
-<br/>Start the Axis2 server and deploy the SimpleStockQuoteService if not already done
-<br/>Enable mail transport sender in the Synapse axis2.xml. See
-<a href="Synapse_Samples_Setup.html#mailsender">Setting up mail transport sender</a>
-<br/>Start the Synapse configuration numbered 256: i.e. synapse -sample 256 </p>
-<p>Send an email with the following body and any custom Subject from your mail account. </p>
-<pre xml:space="preserve">&lt;getQuote xmlns=&quot;http://services.samples&quot;&gt;
-   &lt;request xmlns=&quot;http://services.samples/xsd&quot;&gt;
-       &lt;symbol&gt;IBM&lt;/symbol&gt;
-   &lt;/request&gt;
-&lt;/getQuote&gt;</pre>
-<p>After a few seconds (e.g. 30s), you should receive a POX response in your email account with the stock quote reply. </p>
-<p>Note that in this sample we used the <tt>transport.mail.ContentType</tt> property to make sure that the transport parses
-the request message as POX. If you remove this property, you may still be able to send requests using a standard
-mail client if instead of writing the XML in the body of the message, you add it as an attachment. In that case, you
-should use <tt>.xml</tt> as a suffix for the attachment and format the request as a SOAP 1.1 message. Indeed,
-for a file with suffix <tt>.xml</tt> the mail client will most likely use <tt>text/xml</tt> as the content type, exactly
-as required for SOAP 1.1. Sending a POX message using this approach will be a lot trickier, because most standard
-mail clients don't allow the user to explicitly set the content type.</p>
-<h2>
-<a name="Sample257" id="Sample257">Sample 257: Proxy services with the FIX transport </a></h2>
-<pre xml:space="preserve">&lt;!-- Using the FIX transport --&gt;
-&lt;definitions xmlns=&quot;http://ws.apache.org/ns/synapse&quot;&gt;
-    &lt;proxy name=&quot;FIXProxy&quot; transports=&quot;fix&quot;&gt;
-
-        &lt;parameter name=&quot;transport.fix.AcceptorConfigURL&quot;&gt;file:/home/synapse_user/fix-config/fix-synapse.cfg&lt;/parameter&gt;
-        &lt;parameter name=&quot;transport.fix.InitiatorConfigURL&quot;&gt;file:/home/synapse_user/fix-config/synapse-sender.cfg&lt;/parameter&gt;
-        &lt;parameter name=&quot;transport.fix.AcceptorMessageStore&quot;&gt;file&lt;/parameter&gt;
-        &lt;parameter name=&quot;transport.fix.InitiatorMessageStore&quot;&gt;file&lt;/parameter&gt;
-
-        &lt;target&gt;
-            &lt;endpoint&gt;
-                &lt;address uri=&quot;fix://localhost:19876?BeginString=FIX.4.0&amp;amp;SenderCompID=SYNAPSE&amp;amp;TargetCompID=EXEC&quot;/&gt;
-            &lt;/endpoint&gt;
-	    &lt;inSequence&gt;
-		&lt;log level=&quot;full&quot;/&gt;
-	    &lt;/inSequence&gt;
-            &lt;outSequence&gt;
-                &lt;log level=&quot;full&quot;/&gt;
-		&lt;send/&gt;
-            &lt;/outSequence&gt;
-        &lt;/target&gt;
-    &lt;/proxy&gt;
-&lt;/definitions&gt; </pre>
-<p>
-<strong>Objective: Demonstrate the usage of the FIX (Financial Information eXchange) transport with proxy services</strong> </p>
-<p>
-<strong>Prerequisites:</strong>
-<br/> You will need the two sample FIX applications that come with Quickfix/J (Banzai and Executor). Configure the two applications to establish sessions with Synapse. See
-<a href="Synapse_Samples_Setup.html#fixsamplesconfig">Configuring Sample FIX Applications</a>
-<br/>Start Banzai and Executor
-<br/>Enable FIX transport in the Synapse axis2.xml. See
-<a href="Synapse_Samples_Setup.html#fixtransport">Setting up FIX transport </a>
-<br/>Configure Synapse for FIX samples. See
-<a href="Synapse_Samples_Setup.html#fixsamples">Configuring Synapse for FIX Samples</a>
-<br/>Open up the SYNAPSE_HOME/repository/conf/sample/synapse_sample_257.xml file and make sure that transport.fix.AcceptorConfigURL property points to the fix-synapse.cfg file you created. Also make sure that transport.fix. InitiatorConfigURL property points to the synapse-sender.cfg file you created. Once done you can start the Synapse configuration numbered 257: i.e. synapse -sample 257. Note that Synapse creates new FIX sessions with Banzai and Executor at this point. </p>
-<p>Send an order request from Banzai to Synapse. </p>
-<p>Synapse will forward the order request to the session with the Executor. The responses coming from the Executor will be sent back to Banzai. </p>
-<p>To get an idea about the various transport parameters being used in this sample see 
-<a href="Synapse_Samples_Setup.html#fixparameters">FIX Transport Parameters </a>. </p>
-<h2>
-<a name="Sample258" id="Sample258">Sample 258: Switching from HTTP to FIX </a></h2>
-<pre xml:space="preserve">&lt;definitions xmlns=&quot;http://ws.apache.org/ns/synapse&quot;&gt;
-    &lt;proxy name=&quot;FIXProxy&quot; transport&quot;http&quot;&gt;
-
-        &lt;parameter name=&quot;transport.fix.InitiatorConfigURL&quot;&gt;file:/home/synapse_user/fix-config/synapse-sender.cfg&lt;/parameter&gt;
-        &lt;parameter name=&quot;transport.fix.InitiatorMessageStore&quot;&gt;file&lt;/parameter&gt;
-        &lt;parameter name=&quot;transport.fix.SendAllToInSequence&quot;&gt;false&lt;/parameter&gt;
-        &lt;parameter name=&quot;transport.fix.DropExtraResponses&quot;&gt;true&lt;/parameter&gt;
-
-        &lt;target&gt;
-            &lt;endpoint&gt;
-                &lt;address uri=&quot;fix://localhost:19876?BeginString=FIX.4.0&amp;amp;SenderCompID=SYNAPSE&amp;amp;TargetCompID=EXEC&quot;/&gt;
-            &lt;/endpoint&gt;
-	    &lt;inSequence&gt;
-	    	&lt;property name=&quot;transport.fix.ServiceName&quot; value=&quot;FIXProxy&quot; scope=&quot;axis2-client&quot;/&gt;
-			&lt;log level=&quot;full&quot;/&gt;
-	    &lt;/inSequence&gt;
-        &lt;outSequence&gt;
-            &lt;log level=&quot;full&quot;/&gt;
-			&lt;send/&gt;
-        &lt;/outSequence&gt;
-        &lt;/target&gt;
-    &lt;/proxy&gt;
-&lt;/definitions&gt; </pre>
-<p>
-<strong>Objective: Demonstrate switching from HTTP to FIX</strong> </p>
-<p>
-<strong>Prerequisites:</strong>
-<br/> You will need the Executor sample application that comes with Quickfix/J. Configure Executor to establish a session with Synapse. See
-<a href="Synapse_Samples_Setup.html#fixsamplesconfig">Configuring Sample FIX Applications</a>
-<br/>Start Executor
-<br/>Enable FIX transport sender in the Synapse axis2.xml. See
-<a href="Synapse_Samples_Setup.html#fixtransport">Setting up FIX transport </a>
-<br/>Configure Synapse for FIX samples. See
-<a href="Synapse_Samples_Setup.html#fixsamples">Configuring Synapse for FIX Samples</a>. There is no need to create the fix-synapse.cfg file for this sample. Having only the synapse-sender.cfg file is sufficient.
-<br/>Go to the SYNAPSE_HOME/repository/conf/sample/synapse_sample_258.xml file and make sure that transport.fix.InitiatorConfigURL property points to the synapse-sender.cfg file you created. Once done you can start the Synapse configuration numbered 258: i.e. synapse -sample 258 </p>
-
-<p>Invoke the FIX Client as follows. This command sends a FIX message embedded in a SOAP message over HTTP. 
-<pre>ant fixclient -Dsymbol=IBM -Dqty=5 -Dmode=buy -Daddurl=http://localhost:8280/services/FIXProxy</pre> </p>
-<p>Synapse will forward the order request to the session with the Executor. The first response coming from the Executor will be sent back over HTTP. Executor generally sends two responses for each incoming order request. But since the response has to be forwarded over HTTP only one can be sent back to the client. </p>
-<h2>
-<a name="Sample259" id="Sample259">Sample 259: Switch from FIX to HTTP </a></h2>
-<pre xml:space="preserve">&lt;definitions xmlns=&quot;http://ws.apache.org/ns/synapse&quot;&gt;
-    &lt;localEntry key=&quot;xslt-key-req&quot; src=&quot;file:repository/conf/sample/resources/transform/transform_fix_to_http.xslt&quot; /&gt;
-    &lt;proxy name=&quot;FIXProxy&quot; transports=&quot;fix&quot;&gt;
-        &lt;target&gt;
-            &lt;endpoint&gt;
-                &lt;address
-                    uri=&quot;http://localhost:9000/services/SimpleStockQuoteService&quot; /&gt;
-            &lt;/endpoint&gt;
-            &lt;inSequence&gt;
-                &lt;log level=&quot;full&quot; /&gt;
-                &lt;xslt key=&quot;xslt-key-req&quot; /&gt;
-                &lt;log level=&quot;full&quot; /&gt;
-            &lt;/inSequence&gt;
-            &lt;outSequence&gt;
-                &lt;log level=&quot;full&quot; /&gt;
-            &lt;/outSequence&gt;
-        &lt;/target&gt;
-    &lt;parameter name=&quot;transport.fix.AcceptorConfigURL&quot;&gt;
-        file:repository/conf/sample/resources/fix/fix-synapse.cfg
-    &lt;/parameter&gt;
-    &lt;parameter name=&quot;transport.fix.AcceptorMessageStore&quot;&gt;
-        file
-    &lt;/parameter&gt;
-   &lt;/proxy&gt;
-&lt;/definitions&gt;
-      </pre>
-<p>
-<strong>Objective: Demonstrate the capability of switching between FIX to HTTP</strong> </p>
-<p>
-<strong>Prerequisites:</strong>
-<br/> You will need the sample FIX blotter that come with Quickfix/J (Banzai). Configure the blotter to establish sessions with Synapse. See
-<a href="Synapse_Samples_Setup.html#fixsamplesconfig">Configuring Sample FIX Applications</a>
-<br/>Start the Axis2 server and deploy the SimpleStockQuoteService if not already deployed
-<br/>Start Banzai
-<br/>Enable FIX transport in the Synapse axis2.xml. See
-<a href="Synapse_Samples_Setup.html#fixtransport">Setting up FIX transport </a>
-<br/>Configure Synapse for FIX samples. See
-<a href="Synapse_Samples_Setup.html#fixsamples">Configuring Synapse for FIX Samples</a>
-<br/>Open up the SYNAPSE_HOME/repository/conf/sample/synapse_sample_259.xml file and make sure that transport.fix.AcceptorConfigURL property points to the fix-synapse.cfg file you created. Once done you can start the Synapse configuration numbered 259: i.e. synapse -sample 259. Note that Synapse creates a new FIX session with Banzai at this point. </p>
-    
-<p>Send an order request from Banzai to Synapse. e.g. Buy DELL 1000 @ 100. User has to send a 'Limit' Order because price is a mandatory field for 'placeOrder' operation. </p>
-<p>Synapse will forward the order request to one-way 'placeOrder' operation on the SimpleStockQuoteService. Synapse uses a simple XSLT mediator to transform the incoming FIX to a SOAP message. </p>
-<pre xml:space="preserve">&lt;xsl:stylesheet version=&quot;2.0&quot;
-    xmlns:xsl=&quot;http://www.w3.org/1999/XSL/Transform&quot;
-    xmlns:fn=&quot;http://www.w3.org/2005/02/xpath-functions&quot;&gt;
-    &lt;xsl:output method=&quot;xml&quot; omit-xml-declaration=&quot;yes&quot; indent=&quot;yes&quot; /&gt;
-  &lt;xsl:template match=&quot;/&quot;&gt;
-    &lt;m0:placeOrder xmlns:m0=&quot;http://services.samples&quot;&gt;
-        &lt;m0:order&gt;
-            &lt;m0:price&gt;&lt;xsl:value-of select=&quot;//message/body/field[@id='44']&quot;/&gt;&lt;/m0:price&gt;
-            &lt;m0:quantity&gt;&lt;xsl:value-of select=&quot;//message/body/field[@id='38']&quot;/&gt;&lt;/m0:quantity&gt;
-            &lt;m0:symbol&gt;&lt;xsl:value-of select=&quot;//message/body/field[@id='55']&quot;/&gt;&lt;/m0:symbol&gt;
-        &lt;/m0:order&gt;
-    &lt;/m0:placeOrder&gt;
-   &lt;/xsl:template&gt;
-&lt;/xsl:stylesheet&gt;
-      </pre>
-<p>To get an idea about the various transport parameters being used in this sample see 
-<a href="Synapse_Samples_Setup.html#fixparameters">FIX Transport Parameters </a>. </p>
-<h2>
-<a name="Sample260" id="Sample260">Sample 260: Switch from FIX to AMQP </a></h2>
-<pre xml:space="preserve">&lt;definitions xmlns=&quot;http://ws.apache.org/ns/synapse&quot;&gt;
-	&lt;proxy name=&quot;FIXProxy&quot; transports=&quot;fix&quot;&gt;
-		&lt;target&gt;
-			&lt;endpoint&gt;
-				&lt;address uri=&quot;jms:/QpidStockQuoteService?transport.jms.ConnectionFactoryJNDIName=qpidConnectionfactory&amp;amp;java.naming.factory.initial=org.apache.qpid.jndi.PropertiesFileInitialContextFactory&amp;amp;java.naming.provider.url=repository/conf/sample/resources/fix/con.properties&amp;amp;transport.jms.ReplyDestination=replyQueue&quot;/&gt;
-			&lt;/endpoint&gt;
-			&lt;inSequence&gt;
-				&lt;log level=&quot;full&quot; /&gt;
-			&lt;/inSequence&gt;
-			&lt;outSequence&gt;
-			    &lt;property name=&quot;transport.fix.ServiceName&quot;
-					value=&quot;FIXProxy&quot; scope=&quot;axis2-client&quot; /&gt;
-				&lt;log level=&quot;full&quot; /&gt;
-		                &lt;send /&gt;
-			&lt;/outSequence&gt;
-		&lt;/target&gt;
-		&lt;parameter name=&quot;transport.fix.AcceptorConfigURL&quot;&gt;
-			file:repository/conf/sample/resources/fix/fix-synapse.cfg
-		&lt;/parameter&gt;
-		&lt;parameter name=&quot;transport.fix.AcceptorMessageStore&quot;&gt;
-			file
-		&lt;/parameter&gt;
-	&lt;/proxy&gt;
-&lt;/definitions&gt;</pre>
-<p>
-<strong>Objective: Demonstrate the capability of switching between FIX and AMQP protocols</strong> </p>
-<p>
-<strong>Prerequisites:</strong>
-<br/> You will need the sample FIX blotter that comes with Quickfix/J (Banzai). Configure the blotter to establish sessions with Synapse. See
-<a href="Synapse_Samples_Setup.html#fixsamplesconfig">Configuring Sample FIX Applications</a> </p>
-<p>Configure the AMQP transport for Synapse. See 
-<a href="Synapse_Samples_Setup.html#setupamqpjms">Configure Synapse for AMQP Transport</a> </p>
-<p>Start the AMQP consumer, by switching to samples/axis2Client directory and running the consumer using the following command. Consumer will listen to the queue 'QpidStockQuoteService', accept the orders and reply to the queue 'replyQueue'. </p>
-<pre xml:space="preserve">ant amqpconsumer -Dpropfile=$SYNAPSE_HOME/repository/conf/sample/resources/fix/direct.properties</pre>
-<p>Start Banzai </p>
-<p>Enable FIX transport in the Synapse axis2.xml. See 
-<a href="Synapse_Samples_Setup.html#fixtransport">Setting up FIX transport </a> </p>
-<p>Configure Synapse for FIX samples. See 
-<a href="Synapse_Samples_Setup.html#fixsamples">Configuring Synapse for FIX Samples</a> </p>
-<p>Open up the SYNAPSE_HOME/repository/conf/sample/synapse_sample_260.xml file and make sure that the transport.fix.AcceptorConfigURL property points to the fix-synapse.cfg file you created. Once done you can start the Synapse configuration numbered 260: i.e. synapse -sample 260. Note that Synapse creates a new FIX session with Banzai at this point. </p>
-<p>Send an order request from Banzai to Synapse. e.g. Buy DELL 1000 @ MKT. </p>
-<p>Synapse will forward the order request by binding it to a JMS message payload and sending it to the AMQP consumer. AMQP consumer will send a execution back to Banzai. </p>
-<p>To get an idea about the various transport parameters being used in this sample see 
-<a href="Synapse_Samples_Setup.html#fixparameters">FIX Transport Parameters </a>. </p>
-<h2>
-<a name="Sample261" id="Sample261">Sample 261: Switch between FIX versions </a></h2>
-<pre xml:space="preserve">&lt;definitions xmlns=&quot;http://ws.apache.org/ns/synapse&quot;&gt;
-     &lt;proxy name=&quot;OrderProcesserProxy41&quot; transports=&quot;fix&quot;&gt;
-        &lt;target&gt;
-           &lt;endpoint&gt;
-              &lt;address uri=&quot;fix://localhost:19877?BeginString=FIX.4.1&amp;amp;SenderCompID=SYNAPSE&amp;amp;TargetCompID=EXEC&quot;/&gt;
-           &lt;/endpoint&gt;
-           &lt;inSequence&gt;&lt;log level=&quot;full&quot;/&gt;&lt;/inSequence&gt;
-           &lt;outSequence&gt;&lt;log level=&quot;full&quot;/&gt;&lt;send/&gt;&lt;/outSequence&gt;
-        &lt;/target&gt;
-        &lt;parameter name=&quot;transport.fix.AcceptorConfigURL&quot;&gt;file:repository/conf/sample/resources/fix/fix-synapse-m40.cfg&lt;/parameter&gt;
-        &lt;parameter name=&quot;transport.fix.AcceptorMessageStore&quot;&gt;file&lt;/parameter&gt;
-        &lt;parameter name=&quot;transport.fix.InitiatorConfigURL&quot;&gt;file:repository/conf/sample/resources/fix/synapse-sender-m.cfg&lt;/parameter&gt;
-        &lt;parameter name=&quot;transport.fix.InitiatorMessageStore&quot;&gt;file&lt;/parameter&gt;
-     &lt;/proxy&gt;
-&lt;/definitions&gt;</pre>
-<p>
-<strong>Objective: Demonstrate the capability of switching between FIX versions e.g. FIX4.0 to FIX4.1</strong> </p>
-<p>
-<strong>Prerequisites:</strong>
-<br/> You will need the two sample FIX applications that come with Quickfix/J (Banzai and Executor). Configure the two applications to establish sessions with Synapse. See
-<a href="Synapse_Samples_Setup.html#fixsamplesconfig">Configuring Sample FIX Applications.</a> </p>
-<p>Add the following lines to the Banzai configuration file (banzai.cfg). </p>
-<pre xml:space="preserve">DataDictionary=~/etc/spec/FIX40-synapse.xml</pre>
-<p>Note: FIX40-synapse.xml can be found at $SYNAPSE_HOME/repository/conf/samples/resources/fix. This is a custom FIX data dictionary file that has added tag 150,151 to the execution messages (35=8) of FIX4.0. Make sure the DataDictionary property of the banzai.cfg points to this data dictionary file. </p>
-<p>Add the following lines to the Executor configuration file (executor.cfg). </p>
-<pre xml:space="preserve">[session]
-BeginString=FIX.4.1
-SocketAcceptPort=19877</pre>
-<p>Start Banzai and Executor using the custom configuration files. </p>
-<p>Enable FIX transport in the Synapse axis2.xml. See 
-<a href="Synapse_Samples_Setup.html#fixtransport">Setting up FIX transport </a> </p>
-<p>Configure Synapse for FIX samples. We will be using two custom configuration files for Synapse in this sample. These two custom configuration files can be found at SYNAPSE_HOME/repository/conf/sample/resources/fix directory. The two files are called fix-synapse-m40.cfg and synapse-sender-m.cfg. You can point your Synapse configuration to these two files (this is already done in the supplied synapse_sample_261.xml file) or you may create copies of them and point the Synapse configuration to the copies. In either case make sure that the properties like FileStorePath and FileLogPath in the two files point to valid locations in your local file system. </p>
-<p>Open up the SYNAPSE_HOME/repository/conf/sample/synapse_sample_261.xml file and make sure that transport.fix.AcceptorConfigURL property points to the fix-synapse-m40.cfg file described above and transport.fix.InitiatorConfigURL points to the synapse-sender-m.cfg file described above. Once done you can start the Synapse configuration numbered 261: i.e. synapse -sample 261. Note that Synapse creates a new FIX session with Banzai at this point. </p>
-<p>Send an order request from Banzai to Synapse. e.g. Buy DELL 1000 @ MKT. </p>
-<p>Synapse will forward the order request from FIX4.0 to the Executor that accepts FIX4.1 messages. Executor will send an ack and an execution back to Banzai. </p>
-<p>To get an idea about the various transport parameters being used in this sample see 
-<a href="Synapse_Samples_Setup.html#fixparameters">FIX Transport Parameters </a>. </p>
-<h2>
-<a name="Sample262" id="Sample262">Sample 262: CBR of FIX messages</a></h2>
-<pre xml:space="preserve">&lt;definitions xmlns=&quot;http://ws.apache.org/ns/synapse&quot;&gt;
-    &lt;sequence name=&quot;CBR_SEQ&quot;&gt;
-        &lt;in&gt;
-            &lt;switch source=&quot;//message/body/field[@id='55']&quot;&gt;
-                &lt;case regex=&quot;GOOG&quot;&gt;
-                    &lt;send&gt;
-                        &lt;endpoint&gt;
-                            &lt;address
-                                uri=&quot;fix://localhost:19876?BeginString=FIX.4.0&amp;amp;SenderCompID=SYNAPSE&amp;amp;TargetCompID=EXEC&quot; /&gt;
-                        &lt;/endpoint&gt;
-                    &lt;/send&gt;
-                &lt;/case&gt;
-                &lt;case regex=&quot;MSFT&quot;&gt;
-                    &lt;send&gt;
-                        &lt;endpoint&gt;
-                            &lt;address
-                                uri=&quot;fix://localhost:19877?BeginString=FIX.4.1&amp;amp;SenderCompID=SYNAPSE&amp;amp;TargetCompID=EXEC&quot; /&gt;
-                        &lt;/endpoint&gt;
-                    &lt;/send&gt;
-                &lt;/case&gt;
-                &lt;default&gt;&lt;/default&gt;
-            &lt;/switch&gt;
-        &lt;/in&gt;
-        &lt;out&gt;
-            &lt;send /&gt;
-        &lt;/out&gt;
-    &lt;/sequence&gt;
-    &lt;proxy name=&quot;FIXProxy&quot; transports=&quot;fix&quot;&gt;
-        &lt;target inSequence=&quot;CBR_SEQ&quot; /&gt;
-        &lt;parameter name=&quot;transport.fix.AcceptorConfigURL&quot;&gt;
-            file:repository/conf/sample/resources/fix/fix-synapse.cfg
-        &lt;/parameter&gt;
-        &lt;parameter name=&quot;transport.fix.AcceptorMessageStore&quot;&gt;
-            file
-        &lt;/parameter&gt;
-        &lt;parameter name=&quot;transport.fix.InitiatorConfigURL&quot;&gt;
-            file:repository/conf/sample/resources/fix/synapse-sender.cfg
-        &lt;/parameter&gt;
-        &lt;parameter name=&quot;transport.fix.InitiatorMessageStore&quot;&gt;
-            file
-        &lt;/parameter&gt;
-    &lt;/proxy&gt;
-&lt;/definitions&gt;</pre>
-<p>
-<strong>Objective: Demonstrate the capability of CBR FIX messages</strong> </p>
-<p>
-<strong>Prerequisites:</strong>
-<br/> You will need the two sample FIX applications that come with Quickfix/J (Banzai and Executor). Configure the two applications to establish sessions with Synapse. See
-<a href="Synapse_Samples_Setup.html#fixsamplesconfig">Configuring Sample FIX Applications</a> </p>
-<p>Add the following lines to banzai.cfg. </p>
-<pre xml:space="preserve">DataDictionary=~/etc/spec/FIX40-synapse.xml</pre>
-<p>Note: FIX40-synapse.xml can be found at $SYNAPSE_HOME/repository/conf/samples/resources/fix. This is a custom FIX data dictionary file that has added tag 150,151 to the execution messages (35=8) of FIX4.0. Make sure the DataDictionary property of the banzai.cfg points to this data dictionary file. </p>
-<p>Add the following lines to executor.cfg </p>
-<pre xml:space="preserve">[session]
-BeginString=FIX.4.1
-SocketAcceptPort=19877</pre>
-<p>Start Banzai and Executor using the custom config files. </p>
-<p>Enable FIX transport in the Synapse axis2.xml. See 
-<a href="Synapse_Samples_Setup.html#fixtransport">Setting up FIX transport </a> </p>
-<p>Configure Synapse for FIX samples. See 
-<a href="Synapse_Samples_Setup.html#fixsamples">Configuring Synapse for FIX Samples</a> </p>
-<p>Open up the SYNAPSE_HOME/repository/conf/sample/synapse_sample_262.xml file and make sure that transport.fix.AcceptorConfigURL property points to the fix-synapse.cfg file you created and transport.fix.InitiatorConfigURL points to the synapse-sender.cfg file you created. Once done you can start the Synapse configuration numbered 262: i.e. synapse -sample 262. Note that Synapse creates a new FIX session with Banzai at this point. </p>
-<p>Send an order request from Banzai to Synapse. e.g. Buy GOOG 1000 @ MKT, Buy MSFT 3000 @ MKT, Buy SUNW 500 @ 100.20 </p>
-<p>Synapse will forward the order requests with symbol 'GOOG' to FIX endpoint FIX-4.0 @ localhost:19876.</p>
-<p>Synapse will forward the order requests with symbol 'MSFT' to FIX endpoint FIX-4.1 @ localhost:19877.</p>
-<p>Synapse will not forward the orders with other symbols to any endpoint. (default case has kept blank in the configuration)</p>
-<p>To get an idea about the various transport parameters being used in this sample see 
-<a href="Synapse_Samples_Setup.html#fixparameters">FIX Transport Parameters </a>. </p>  
-  
-<h2>
-<a name="Sample263" id="Sample263">Sample 263: Transport switching - JMS to http/s using JBoss Messaging(JBM) </a></h2>
-<pre xml:space="preserve">&lt;definitions xmlns=&quot;http://ws.apache.org/ns/synapse&quot;&gt;
-    &lt;proxy name=&quot;StockQuoteProxy&quot; transports=&quot;jms&quot;&gt;
-        &lt;target&gt;
-            &lt;inSequence&gt;
-                &lt;property action=&quot;set&quot; name=&quot;OUT_ONLY&quot; value=&quot;true&quot;/&gt;
-            &lt;/inSequence&gt;
-            &lt;endpoint&gt;
-                &lt;address uri=&quot;http://localhost:9000/services/SimpleStockQuoteService&quot;/&gt;
-            &lt;/endpoint&gt;
-            &lt;outSequence&gt;
-                &lt;send/&gt;
-            &lt;/outSequence&gt;
-        &lt;/target&gt;
-        &lt;publishWSDL uri=&quot;file:repository/conf/sample/resources/proxy/sample_proxy_1.wsdl&quot;/&gt;
-        &lt;parameter name=&quot;transport.jms.ContentType&quot;&gt;
-            &lt;rules&gt;
-                &lt;jmsProperty&gt;contentType&lt;/jmsProperty&gt;
-                &lt;default&gt;application/xml&lt;/default&gt;
-            &lt;/rules&gt;
-        &lt;/parameter&gt;
-    &lt;/proxy&gt;
-&lt;/definitions&gt;</pre>
-<p>
-<strong>Objective: Introduction to switching transports with proxy services. The JMS provider will be <a href="http://jboss.org/jbossmessaging/">JBoss Messaging(JBM).</a></strong> </p>
-<p>
-<strong>Prerequisites:</strong>
-<br/> Start the Axis2 server and deploy the SimpleStockQuoteService (Refer steps above)
-<br/> <a href="http://jboss.org/jbossmessaging/">Download</a>, install and start JBM server, and configure Synapse to listen on JBM (refer notes below)
-<br/> Start the Synapse configuration numbered 250: i.e. synapse -sample 250
-<br/> We need to configure the required queues in JBM. Add the following entry to JBM jms configuration inside file-config/stand-alone/non-clustered/jbm-jms.xml.
-    Once JBM is installed and started you should get a message as follows: </p>
-<pre xml:space="preserve">
-&lt;queue name=&quot;StockQuoteProxy&quot;&gt;
-    &lt;entry name=&quot;StockQuoteProxy&quot;/&gt;
-&lt;/queue&gt;
-</pre>
-<p>Once you started the JBM server with the above changes you'll be able to see the following on STDOUT.</p>
-<pre xml:space="preserve">10:18:02,673 INFO [org.jboss.messaging.core.server.impl.MessagingServerImpl]  JBoss Messaging Server version 2.0.0.BETA3 (maggot, 104) started </pre>
-<p>You will now need to configure the Axis2 instance used by Synapse (not the sample Axis2 server) to enable JMS support using the above provider. Refer Axis2 documentation on setting up JMS in detail (http://ws.apache.org/axis2/1_1/jms-transport.html). You will also need to copy the jbm-core-client.jar, jbm-jms-client.jar, jnp-client.jar(these jars are inside client folder ) and
-    jbm-transports.jar, netty.jar(these jars are from lib folder) jars from JBM into the lib directory to allow Synapse to connect to the JBM JMS provider. This was tested with JBM 2.0.0.BETA3 </p>
-
-<p>You need to add the following configuration for Axis2 JMS transport listener in axis2.xml found at repository/conf/axis2.xml.</p>
-<pre xml:space="preserve">
-&lt;transportReceiver name=&quot;jms&quot; class=&quot;org.apache.axis2.transport.jms.JMSListener&quot;&gt;
-    &lt;parameter name=&quot;java.naming.factory.initial&quot;&gt;org.jnp.interfaces.NamingContextFactory&lt;/parameter&gt;
-    &lt;parameter name=&quot;java.naming.provider.url&quot;&gt;jnp://localhost:1099&lt;/parameter&gt;
-    &lt;parameter name=&quot;java.naming.factory.url.pkgs&quot;&gt;org.jboss.naming:org.jnp.interfaces&lt;/parameter&gt;
-    &lt;parameter name=&quot;transport.jms.ConnectionFactoryJNDIName&quot;&gt;ConnectionFactory&lt;/parameter&gt;
-&lt;/transportReceiver&gt;
-</pre>
-<p>And also uncomment the section for JMS transport sender in the same file.</p>
-<p>Once you start the Synapse configuration 250 and request for the WSDL of the proxy service (http://localhost:8280/services/StockQuoteProxy?wsdl) you will notice that its exposed only on the JMS transport. This is because the configuration specified this requirement in the proxy service definition. </p>
-<p>Now lets send a stock quote request on JMS, using the dumb stock quote client as follows: </p>
-<pre xml:space="preserve">ant jmsclient -Djms_type=pox -Djms_dest=StockQuoteProxy -Djms_payload=MSFT -Djava.naming.provider.url=jnp://localhost:1099 -Djava.naming.factory.initial=org.jnp.interfaces.NamingContextFactory -D=java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces</pre>
-<p>On the Synapse debug log you will notice that the JMS listener received the request message as: </p>
-<pre xml:space="preserve">[JMSWorker-1] DEBUG ProxyServiceMessageReceiver -Proxy Service StockQuoteProxy received a new message...</pre>
-<p>Now if you examine the console running the sample Axis2 server, you will see a message indicating that the server has accepted an order as follows: </p>
-<pre xml:space="preserve">Accepted order for : 16517 stocks of MSFT at $ 169.14622538721846</pre>
-<p>In this sample, the client sends the request message to the proxy service exposed over JMS in Synsape. Synapse forwards this message to the HTTP EPR of the simple stock quote service hosted on the sample Axis2 server.
-Note that the operation is out-only and no response is sent back to the client. The transport.jms.ContentType property
-is necessary to allow the JMS transport to determine the content type of incoming messages. With the given configuration
-it will first try to read the content type from the 'contentType' message property and fall back to 'application/xml'
-(i.e. POX) if this property is not set. Note that the JMS client used in this example doesn't send any content type information.</p>
-<p>Note: It is possible to instruct a JMS proxy service to listen to an already existing destination without creating a new one. To do this, use the parameter elements on the proxy service definition to specify the destination and connection factory etc. </p>
-<p>e.g. </p>
-<pre xml:space="preserve">&lt;parameter name=&quot;transport.jms.Destination&quot;&gt;dynamicTopics/something.TestTopic&lt;/parameter&gt;</pre>
-
-  <h2>
-    <a name="Sample264" id="Sample264">Sample 264: Sending Two-Way Messages Using JMS transport</a>
-  </h2>
-  <pre xml:space="preserve">&lt;definitions xmlns=&quot;http://ws.apache.org/ns/synapse&quot;&gt;
-    &lt;proxy name=&quot;StockQuoteProxy&quot; transports=&quot;http&quot;&gt;
-        &lt;target&gt;        
-            &lt;endpoint&gt;
-		            &lt;address uri=&quot;jms:/SimpleStockQuoteService?transport.jms.ConnectionFactoryJNDIName=QueueConnectionFactory&amp;
-                  java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory&amp;java.naming.provider.url=tcp://localhost:61616&amp;transport.jms.DestinationType=queue&quot;/&gt;
-            &lt;/endpoint&gt;            
-            &lt;inSequence&gt;                            
-                &lt;property action=&quot;set&quot; name=&quot;transport.jms.ContentTypeProperty&quot; value=&quot;Content-Type&quot; scope=&quot;axis2&quot;/&gt;
-            &lt;/inSequence&gt;
-            &lt;outSequence&gt;
-                &lt;property action=&quot;remove&quot; name=&quot;TRANSPORT_HEADERS&quot; scope=&quot;axis2&quot;/&gt;
-                &lt;send/&gt;
-            &lt;/outSequence&gt;        
-        &lt;target&gt; 
-        &lt;publishWSDL uri=&quot;file:repository/conf/sample/resources/proxy/sample_proxy_1.wsdl&quot;/&gt;        
-    &lt;/proxy&gt;
-&lt;/definitions&gt;</pre>
-  <p>
-    <strong>Objective: Demonstrate sending request response scenario with JMS transport</strong>
-  </p>
-  <p>
-    <strong>Prerequisites:</strong>
-    <br/>You need to set up synpase and axis2 server to use the JMS transport. See
-    <a href="#Sample251">Sample 251</a> for more details.
-  </p>
-  <p>
-    This sample is similar to the <a href="#Sample251">Sample 251</a>. Only difference is we are expecting a response from the server. JMS transport uses <strong>transport.jms.ContentTypeProperty</strong> to
-    determine the content type of the response message. If this property is not set JMS transport treats the incoming message as plain text.
-  </p>
-  <p>
-    In the out path we remove the message context property <strong>TRANSPORT_HEADERS</strong>. If these property is not removed JMS headers will be passed to the client.
-  </p>
-  <p>Start Synpase using sample 264.</p>
-  <pre xml:space="preserve">synapse.bat/synapse.sh -sample 264</pre>
-  <p>Start Axis2 server with SimpleStockService deployed</p>
-  <p>Invoke the stockquote client using the following command.</p>
-  <pre xml:space="preserve">ant stockquote -Daddurl=http://localhost:8280/services/StockQuoteProxy -Dsymbol=MSFT</pre>
-  <p>The sample Axis2 server console will print a message indicating that it has received the request: </p>
-  <pre xml:space="preserve">Generating quote for : MSFT</pre>
-  <p>In the client side it shoud print a message indicating it has received the price.</p>
-  <pre xml:space="preserve"> Standard :: Stock price = $154.31851804993238</pre>
-
-  <h2>
-    <a name="Sample265" id="Sample265">Sample 265: Switching from TCP to HTTP/S</a>
-  </h2>
-  <pre xml:space="preserve">&lt;definitions xmlns="http://ws.apache.org/ns/synapse"&gt;
-    &lt;proxy name="StockQuoteProxy" transports="tcp"&gt;
-        &lt;target&gt;
-            &lt;endpoint&gt;
-		        &lt;address uri="http://localhost:9000/services/SimpleStockQuoteService"/&gt;
-            &lt;/endpoint&gt;
-            &lt;inSequence&gt;
-                &lt;log level="full"/&gt;
-                &lt;property name="OUT_ONLY" value="true"/&gt;
-            &lt;/inSequence&gt;
-        &lt;/target&gt;
-    &lt;/proxy&gt;
-&lt;/definitions&gt;</pre>
-  <p>
-    <strong>Objective: Demonstrate receiving SOAP messages over TCP and forwarding them over HTTP</strong>
-  </p>
-  <p>
-    <strong>Prerequisites:</strong>
-    <br/>You need to configure Synpase to use the TCP transport. The sample Axis2 client should also
-      be setup to send TCP requests. Refer <a href="Synapse_Samples_Setup.html#tcp">Setting
-      Up the TCP Transport</a> section in the sample setup guide for more details.
-    <br/>Start Synpase using sample 265: ie synapse -sample 265
-    <br/>Start Axis2 server with SimpleStockService deployed  
-  </p>
-  <p>
-    This sample is similar to <a href="#Sample250">Sample 250</a>. Only difference is instead of the JMS transport
-    we will be using the TCP transport to receive messages. TCP is not an application layer protocol. Hence there
-    are no application level headers available in the requests. Synapse has to simply read the XML content coming
-    through the socket and dispatch it to the right proxy service based on the information available in the message
-    payload itself. The TCP transport is capable of dispatching requests based on addressing headers or the first
-    element in the SOAP body. In this sample, we will get the sample client to send WS-Addressing headers in the
-    request. Therefore the dispatching will take place based on the addressing header values.
-  </p>
-  <p>Invoke the stockquote client using the following command. Note the TCP URL in the command.</p>
-  <pre xml:space="preserve">ant stockquote -Daddurl=tcp://localhost:6060/services/StockQuoteProxy -Dmode=placeorder</pre>
-  <p>The TCP transport will receive the message and hand it over to the mediation engine. Synapse will
-  dispatch the request to the StockQuoteProxy service based on the addressing header values.</p>
-  <p>The sample Axis2 server console will print a message indicating that it has received the request: </p>
-  <pre xml:space="preserve">Thu May 20 12:25:01 IST 2010 samples.services.SimpleStockQuoteService  :: Accepted order #1 for : 17621 stocks of IBM at $ 73.48068475255796
-</pre>
-
-  <h2>
-    <a name="Sample266" id="Sample266">Sample 266: Switching from UDP to HTTP/S</a>
-  </h2>
-  <pre xml:space="preserve">&lt;proxy xmlns="http://ws.apache.org/ns/synapse" name="StockQuoteProxy" transports="udp"&gt;
-   &lt;target&gt;
-	&lt;endpoint&gt;
-	   &lt;address uri="http://localhost:9000/services/SimpleStockQuoteService"/&gt;
-	&lt;/endpoint&gt;
-	&lt;inSequence&gt;
-	   &lt;log level="full"/&gt;
-	   &lt;property name="OUT_ONLY" value="true"/&gt;
-	&lt;/inSequence&gt;
-   &lt;/target&gt;
-   &lt;parameter name="transport.udp.port"&gt;9999&lt;/parameter&gt;
-   &lt;parameter name="transport.udp.contentType"&gt;text/xml&lt;/parameter&gt;
-   &lt;publishWSDL uri="file:repository/conf/sample/resources/proxy/sample_proxy_1.wsdl"/&gt;
-&lt;/proxy&gt;</pre>
-  <p>
-    <strong>Objective: Demonstrate receiving SOAP messages over UDP and forwarding them over HTTP</strong>
-  </p>
-  <p>
-    <strong>Prerequisites:</strong>
-    <br/>You need to configure Synpase to use the UDP transport. The sample Axis2 client should also
-      be setup to send UDP requests. Refer <a href="Synapse_Samples_Setup.html#udp">Setting
-      Up the UDP Transport</a> section in the sample setup guide for more details.
-    <br/>Start Synpase using sample 266: i.e. synapse -sample 266
-    <br/>Start Axis2 server with SimpleStockService deployed
-  </p>    
-  <p>
-    This sample is similar to <a href="#Sample265">Sample 265</a>. Only difference is instead of the TCP transport
-    we will be using the UDP transport to receive messages.
-  </p>
-  <p>Invoke the stockquote client using the following command. Note the UDP URL in the command.</p>
-  <pre xml:space="preserve">ant stockquote -Daddurl=udp://localhost:9999?contentType=text/xml -Dmode=placeorder</pre>
-  <p>Since we have configured the content type as text/xml for the proxy service, incoming messages will be processed
-  as SOAP 1.1 messages.</p>
-  <p>The sample Axis2 server console will print a message indicating that it has received the request: </p>
-  <pre xml:space="preserve">Thu May 20 12:25:01 IST 2010 samples.services.SimpleStockQuoteService  :: Accepted order #1 for : 17621 stocks of IBM at $ 73.48068475255796
-</pre>
-
-    <h2>
-      <a name="Sample268" id="Sample268">Sample 268: Proxy services with the Local transport</a>
-    </h2>
-    <pre xml:space="preserve">&lt;definitions xmlns="http://ws.apache.org/ns/synapse"&gt;
-    &lt;proxy xmlns="http://ws.apache.org/ns/synapse" name="LocalTransportProxy"
-           transports="https http" startOnLoad="true" trace="disable"&gt;
-        &lt;target&gt;
-            &lt;endpoint name="ep1"&gt;
-                &lt;address uri="local://localhost/services/SecondProxy"/&gt;
-            &lt;/endpoint&gt;
-            &lt;inSequence&gt;
-                &lt;log level="full"/&gt;
-                &lt;log level="custom"&gt;
-                    &lt;property name="LocalTransportProxy" value="In sequence of LocalTransportProxy invoked!"/&gt;
-                &lt;/log&gt;
-            &lt;/inSequence&gt;
-            &lt;outSequence&gt;
-                &lt;log level="custom"&gt;
-                    &lt;property name="LocalTransportProxy" value="Out sequence of LocalTransportProxy invoked!"/&gt;
-                &lt;/log&gt;
-                &lt;send/&gt;
-            &lt;/outSequence&gt;
-        &lt;/target&gt;
-        &lt;publishWSDL uri="file:repository/samples/resources/proxy/sample_proxy_1.wsdl"/&gt;
-    &lt;/proxy&gt;
-    &lt;proxy xmlns="http://ws.apache.org/ns/synapse" name="SecondProxy"
-           transports="https http" startOnLoad="true" trace="disable"&gt;
-        &lt;target&gt;
-            &lt;endpoint name="ep2"&gt;
-                &lt;address uri="local://localhost/services/StockQuoteProxy"/&gt;
-            &lt;/endpoint&gt;
-            &lt;inSequence&gt;
-                &lt;log level="full"/&gt;
-                &lt;log level="custom"&gt;
-                    &lt;property name="SecondProxy" value="In sequence of Second proxy invoked!"/&gt;
-                &lt;/log&gt;
-            &lt;/inSequence&gt;
-            &lt;outSequence&gt;
-                &lt;log level="custom"&gt;
-                    &lt;property name="SecondProxy" value="Out sequence of Second proxy invoked!"/&gt;
-                &lt;/log&gt;
-                &lt;send/&gt;
-            &lt;/outSequence&gt;
-        &lt;/target&gt;
-        &lt;publishWSDL uri="file:repository/samples/resources/proxy/sample_proxy_1.wsdl"/&gt;
-    &lt;/proxy&gt;
-    &lt;proxy xmlns="http://ws.apache.org/ns/synapse" name="StockQuoteProxy"
-           startOnLoad="true"&gt;
-        &lt;target&gt;
-            &lt;endpoint name="ep3"&gt;
-                &lt;address uri="http://localhost:9000/services/SimpleStockQuoteService"/&gt;
-            &lt;/endpoint&gt;
-            &lt;outSequence&gt;
-                &lt;log level="custom"&gt;
-                    &lt;property name="StockQuoteProxy"
-                              value="Out sequence of StockQuote proxy invoked!"/&gt;
-                &lt;/log&gt;
-                &lt;send/&gt;
-            &lt;/outSequence&gt;
-        &lt;/target&gt;
-        &lt;publishWSDL uri="file:repository/samples/resources/proxy/sample_proxy_1.wsdl"/&gt;
-    &lt;/proxy&gt;
-&lt;/definitions&gt;</pre>
-    <p>
-      <strong>Objective: Demonstrate the use of Local transport with Proxy services</strong>
-    </p>
-    <p>
-      <strong>Prerequisites:</strong>
-      <br/>You need to configure Synpase to use the Local transport. Refer
-        <a href="Synapse_Samples_Setup.html#local">Setting Up the Local Transport</a>
-        section in the sample setup guide for more details.
-      <br/>Start Synpase using sample 268: i.e. synapse -sample 268
-      <br/>Start Axis2 server with SimpleStockService deployed
-    </p>
-    <p>
-      This sample contains three proxy services. The stockquote client invokes the LocalTransportProxy. Then the message
-        will be sent to the SecondProxy and then it will be sent to the StockQuoteProxy. The StockQuoteProxy will invoke
-        the backend service and return the response to the client. In this sample, the communication between proxy services
-        are done through the Local transport. Since Local transport calls are in-JVM calls, it will reduce the time taken
-        for the communication between proxy services.
-    </p>
-    <p>Invoke the stockquote client using the following command.</p>
-    <pre xml:space="preserve">ant stockquote -Daddurl=http://localhost:8280/services/LocalTransportProxy</pre>
-    <p>The sample Axis2 server console will print a message indicating that it has received the request: </p>
-    <pre xml:space="preserve">Thu May 20 12:25:01 IST 2010 samples.services.SimpleStockQuoteService  :: Accepted order #1 for : 17621 stocks of IBM at $ 73.48068475255796
-  </pre>
-
-  <h1>
-<a name="Task" id="Task">Introduction to Synapse Tasks</a> </h1>
-<h2>
-<a name="Sample300" id="Sample300">Sample 300: Introduction to Tasks with simple trigger</a></h2>
-<pre xml:space="preserve">&lt;definitions xmlns=&quot;http://ws.apache.org/ns/synapse&quot;&gt;
-
-    &lt;task class=&quot;org.apache.synapse.startup.tasks.MessageInjector&quot; name=&quot;CheckPrice&quot;&gt;
-        &lt;property name=&quot;to&quot; value=&quot;http://localhost:9000/services/SimpleStockQuoteService&quot;/&gt;
-        &lt;property name=&quot;soapAction&quot; value=&quot;urn:getQuote&quot;/&gt;
-        &lt;property name=&quot;message&quot;&gt;
-            &lt;m0:getQuote xmlns:m0=&quot;http://services.samples/xsd&quot;&gt;
-                &lt;m0:request&gt;
-                    &lt;m0:symbol&gt;IBM&lt;/m0:symbol&gt;
-                &lt;/m0:request&gt;
-            &lt;/m0:getQuote&gt;
-        &lt;/property&gt;
-        &lt;trigger interval=&quot;5&quot;/&gt;
-    &lt;/task&gt;
-
-    &lt;in&gt;
-        &lt;send/&gt;
-    &lt;/in&gt;
-    &lt;out&gt;
-        &lt;log level=&quot;custom&quot;&gt;
-            &lt;property name=&quot;Stock_Quote_on&quot; expression=&quot;//ns:return/ns:lastTradeTimestamp/child::text()&quot; xmlns:ns=&quot;http://services.samples/xsd&quot;/&gt;
-            &lt;property name=&quot;For_the_organization&quot; expression=&quot;//ns:return/ns:name/child::text()&quot; xmlns:ns=&quot;http://services.samples/xsd&quot;/&gt;
-            &lt;property name=&quot;Last_Value&quot; expression=&quot;//ns:return/ns:last/child::text()&quot; xmlns:ns=&quot;http://services.samples/xsd&quot;/&gt;
-        &lt;/log&gt;
-    &lt;/out&gt;
-
-&lt;/definitions&gt;</pre>
-<p>
-<strong>Objective: Introduce the concept of tasks and how simple trigger works</strong> </p>
-<p>
-<strong>Prerequisites:</strong>
-<br/> Build the SimpleStockQuoteService as mentioned above and start the sample Axis2 server
-<br/> Start Synapse using sample 300: ie synapse -sample 300</p>
-<p>When ever Synapse gets started with this configuration, a task will run periodically in 5 second
-    intervals. You could limit the number of times that you want to run this task by adding a count
-    attribute with an integer as the value, if the count is not present as in this sample this task
-    will run until the server is shutdown.</p>
-<p>One can write his/her own task class implementing the org.apache.synapse.task.Task interface and
-    implementing the execute method to run the necessary logic. For this particular sample we have used the
-    MessageInjector class which just injects a message specified into Synapse environment. </p>
-    
-<h1>
-<a name="AdvancedMediation" id="AdvancedMediation">Advanced mediations with advanced mediators</a> </h1>
-<h2>
-<a name="ScriptMediator" id="ScriptMediator">Using scripts in mediation (Script Mediator)</a></h2>
-<p>The Synapse Script Mediator is a Synapse extension, and thus all prerequisites are not bundled by default with the Synapse distribution. Before you use some script mediators you may need to manually add the required jar files to the Synapse lib directory, and optionally perform other installation tasks as may be required by the individual scripting language. This is explained in the 
-<a href="Synapse_Samples_Setup.html#script">Samples Setup guide</a>. </p>
-<h2>
-<a name="Sample350" id="Sample350">Sample 350: Introduction to the script mediator using js scripts</a></h2>
-<pre xml:space="preserve">
-
-&lt;!-- Introduction to the script mediator using js scripts --&gt;
-&lt;definitions xmlns=&quot;http://ws.apache.org/ns/synapse&quot;&gt;
-
-    &lt;registry provider=&quot;org.apache.synapse.registry.url.SimpleURLRegistry&quot;&gt;
-        &lt;!-- the root property of the simple URL registry helps resolve a resource URL as root + key --&gt;
-        &lt;parameter name=&quot;root&quot;&gt;file:repository/conf/sample/resources/&lt;/parameter&gt;
-        &lt;!-- all resources loaded from the URL registry would be cached for this number of milli seconds --&gt;
-        &lt;parameter name=&quot;cachableDuration&quot;&gt;15000&lt;/parameter&gt;
-    &lt;/registry&gt;
-
-    &lt;localEntry key=&quot;stockquoteScript&quot;
-                src=&quot;file:repository/conf/sample/resources/script/stockquoteTransformRequest.js&quot;/&gt;
-
-    &lt;in&gt;
-        &lt;!-- transform the custom quote request into a standard quote request expected by the service --&gt;
-        &lt;script language=&quot;js&quot; key=&quot;stockquoteScript&quot; function=&quot;transformRequest&quot;/&gt;
-        &lt;send&gt;
-            &lt;endpoint&gt;
-                &lt;address uri=&quot;http://localhost:9000/services/SimpleStockQuoteService&quot;/&gt;
-            &lt;/endpoint&gt;
-        &lt;/send&gt;
-    &lt;/in&gt;
-
-    &lt;out&gt;
-        &lt;!-- transform the standard response back into the custom format the client expects --&gt;
-        &lt;script language=&quot;js&quot; key=&quot;script/stockquoteTransformResponse.js&quot;
-                function=&quot;transformResponse&quot;/&gt;
-        &lt;send/&gt;
-    &lt;/out&gt;
-&lt;/definitions&gt;
- </pre>
-
-<pre xml:space="preserve">&lt;x&gt;&lt;![CDATA[
-  function transformRequest(mc) {
-     var symbol = mc.getPayloadXML()..*::Code.toString();
-     mc.setPayloadXML(
-        &lt;m:getQuote xmlns:m=&quot;http://services.samples&quot;&gt;
-           &lt;m:request&gt;
-              &lt;m:symbol&gt;{symbol}&lt;/m:symbol&gt;
-           &lt;/m:request&gt;
-        &lt;/m:getQuote&gt;);
-  }
-
-  function transformResponse(mc) {
-     var symbol = mc.getPayloadXML()..*::symbol.toString();
-     var price = mc.getPayloadXML()..*::last.toString();
-     mc.setPayloadXML(
-        &lt;m:CheckPriceResponse xmlns:m=&quot;http://www.apache-synapse.org/test&quot;&gt;
-   &lt;m:Code&gt;{symbol}&lt;/m:Code&gt;
-   &lt;m:Price&gt;{price}&lt;/m:Price&gt;
-        &lt;/m:CheckPriceResponse&gt;);
-  }
-]]&gt;&lt;/x&gt;</pre>
-<p>
-<strong>Objective: Introduction to the script mediator</strong> </p>
-<p>
-<strong>Prerequisites:</strong>
-<br/>Start the Synapse configuration numbered 350: i.e. synapse -sample 350
-<br/> Start the Axis2 server and deploy the SimpleStockQuoteService if not already done </p>
-
-<p>This sample is similar to sample 8 but instead of using XSLT, the transformation is done with JavaScript and E4X. Note that the script source loaded from a resource must be specified within a CDATA tag within an XML element. The script used in this example has two functions, 'transformRequest' and 'transformResponse', and the Synapse configuration uses the function attribute to specify which function should be invoked. Use the stock quote client to issue a custom quote client as follows.: </p>
-<pre xml:space="preserve">ant stockquote -Daddurl=http://localhost:9000/services/SimpleStockQuoteService -Dtrpurl=http://localhost:8280/ -Dmode=customquote</pre>
-<p>Synapse uses the script mediator and the specified JavaScript function to convert the custom request to a standard quote request. Subsequently the response received is transformed and sent back to the client. </p>
-<h2>
-<a name="Sample351" id="Sample351">Sample 351: In-line script mediation with JavaScript</a></h2>
-<pre xml:space="preserve">&lt;definitions xmlns=&quot;http://ws.apache.org/ns/synapse&quot;&gt;
-    &lt;in&gt;
-        &lt;!-- transform the custom quote request into a standard quote requst expected by the service --&gt;
-        &lt;script language=&quot;js&quot;&gt;&lt;![CDATA[
-               var symbol = mc.getPayloadXML()..*::Code.toString();
-               mc.setPayloadXML(
-                  &lt;m:getQuote xmlns:m=&quot;http://services.samples&quot;&gt;
-                     &lt;m:request&gt;
-                        &lt;m:symbol&gt;{symbol}&lt;/m:symbol&gt;
-                     &lt;/m:request&gt;
-                  &lt;/m:getQuote&gt;);
-        ]]&gt;&lt;/script&gt;
-        &lt;send&gt;
-            &lt;endpoint&gt;
-                &lt;address uri=&quot;http://localhost:9000/services/SimpleStockQuoteService&quot;/&gt;
-            &lt;/endpoint&gt;
-        &lt;/send&gt;
-    &lt;/in&gt;
-    &lt;out&gt;
-        &lt;!-- transform the standard response back into the custom format the client expects --&gt;
-        &lt;script language=&quot;js&quot;&gt;&lt;![CDATA[
-               var symbol = mc.getPayloadXML()..*::symbol.toString();
-               var price = mc.getPayloadXML()..*::last.toString();
-               mc.setPayloadXML(
-                  &lt;m:CheckPriceResponse xmlns:m=&quot;http://www.apache-synapse.org/test&quot;&gt;
-               &lt;m:Code&gt;{symbol}&lt;/m:Code&gt;
-               &lt;m:Price&gt;{price}&lt;/m:Price&gt;
-                  &lt;/m:CheckPriceResponse&gt;);
-            ]]&gt;&lt;/script&gt;
-        &lt;send/&gt;
-    &lt;/out&gt;
-&lt;/definitions&gt; </pre>
-<p>
-<strong>Objective: Introduction to in-line script mediation</strong> </p>
-<p>
-<strong>Prerequisites:</strong>
-<br/>Start the Synapse configuration numbered 351: i.e. synapse -sample 351
-<br/> Start the Axis2 server and deploy the SimpleStockQuoteService if not already done </p>
-
-<p>This example is functionally equivalent to sample # 350 and sample # 8, and demonstrates in-line script mediation in Synapse. Use the stock quote client to send a custom quote as in example # 350 to try this example. </p>
-
-<h2>
-<a name="Sample352" id="Sample352">Sample 352: Accessing Synapse message context API methods using scripting language</a></h2>
-<pre xml:space="preserve">&lt;definitions xmlns=&quot;http://ws.apache.org/ns/synapse&quot;&gt;
-    &lt;in&gt;
-       &lt;!-- change the MessageContext into a response and set a response payload --&gt;
-       &lt;script language=&quot;js&quot;&gt;&lt;![CDATA[
-          mc.setTo(mc.getReplyTo());
-          mc.setProperty(&quot;RESPONSE&quot;, &quot;true&quot;);
-          mc.setPayloadXML(
-             &lt;ns:getQuoteResponse xmlns:ns=&quot;http://services.samples/xsd&quot;&gt;
-                &lt;ns:return&gt;
-                   &lt;ns:last&gt;99.9&lt;/ns:last&gt;
-                &lt;/ns:return&gt;
-             &lt;/ns:getQuoteResponse&gt;);
-       ]]&gt;&lt;/script&gt;
-    &lt;/in&gt;
-    &lt;send/&gt;
-&lt;/definitions&gt; </pre>
-<p>
-<strong>Objective: Accessing the Synapse APIs from scripting languages</strong> </p>
-<p>
-<strong>Prerequisites:</strong>
-<br/>Start the Synapse configuration numbered 352: i.e. bin/synapse -sample 352</p>
-
-<p>This example shows how an in-line JavaScript mediator script could access the Synapse message context API to set its 'To' EPR and to set a custom property to mark it as a response. Execute the stock quote client, and you will receive the response &quot;99.9&quot; as the last sale price as per the above script. </p>
-<pre xml:space="preserve">ant stockquote -Daddurl=http://localhost:9000/services/SimpleStockQuoteService -Dtrpurl=http://localhost:8280/
-...
-stockquote:
-     [java] Standard :: Stock price = $99.9</pre>
-<h2>
-<a name="Sample353" id="Sample353">Sample 353: Using Ruby scripts for mediation</a></h2>
-<pre xml:space="preserve">&lt;definitions xmlns=&quot;http://ws.apache.org/ns/synapse&quot;&gt;
-
-    &lt;localEntry key=&quot;stockquoteScript&quot; src=&quot;file:repository/conf/sample/resources/script/stockquoteTransform.rb&quot;/&gt;
-    &lt;in&gt;
-        &lt;!-- transform the custom quote request into a standard quote request expected by the service --&gt;
-        &lt;script language=&quot;rb&quot; key=&quot;stockquoteScript&quot; function=&quot;transformRequest&quot;/&gt;
-
-        &lt;!-- send message to real endpoint referenced by name &quot;stockquote&quot; and stop --&gt;
-        &lt;send&gt;
-            &lt;endpoint name=&quot;stockquote&quot;&gt;
-                &lt;address uri=&quot;http://localhost:9000/services/SimpleStockQuoteService&quot;/&gt;
-            &lt;/endpoint&gt;
-        &lt;/send&gt;
-    &lt;/in&gt;
-    &lt;out&gt;
-        &lt;!-- transform the standard response back into the custom format the client expects --&gt;
-        &lt;script language=&quot;rb&quot; key=&quot;stockquoteScript&quot; function=&quot;transformResponse&quot;/&gt;
-        &lt;send/&gt;
-    &lt;/out&gt;
-&lt;/definitions&gt; </pre>
-<pre xml:space="preserve">&lt;x&gt;&lt;![CDATA[
-require 'rexml/document'
-include REXML
-
-def transformRequest(mc)
-   newRequest= Document.new '&lt;m:getQuote xmlns:m=&quot;http://services.samples&quot;&gt;'&lt;&lt;
-      '&lt;m:request&gt;&lt;m:symbol&gt;&lt;/m:symbol&gt;&lt;/m:request&gt;&lt;/m:getQuote&gt;'
-   newRequest.root.elements[1].elements[1].text = mc.getPayloadXML().root.elements[1].get_text
-   mc.setPayloadXML(newRequest)
-end
-
-def transformResponse(mc)
-   newResponse = Document.new '&lt;m:CheckPriceResponse xmlns:m=&quot;http://www.apache-synapse.org/test&quot;&gt;&lt;m:Code&gt;' &lt;&lt;
-      '&lt;/m:Code&gt;&lt;m:Price&gt;&lt;/m:Price&gt;&lt;/m:CheckPriceResponse&gt;'
-   newResponse.root.elements[1].text = mc.getPayloadXML().root.elements[1].elements[1].get_text
-   newResponse.root.elements[2].text = mc.getPayloadXML().root.elements[1].elements[2].get_text
-   mc.setPayloadXML(newResponse)
-end
-]]&gt;&lt;/x&gt;</pre>
-<p>
-<strong>Objective: Script mediators using Ruby</strong> </p>
-<p>
-<strong>Prerequisites:</strong>
-<br/>This sample uses Ruby so first setup support for this in Synapse as described at
-<a href="Synapse_Samples_Setup.html#script">Configuring JRuby</a>
-<br/>Start the Synapse configuration numbered 353: i.e. bin/synapse -sample 353
-<br/> Start the Axis2 server and deploy the SimpleStockQuoteService if not already done </p>
-<p>This sample is functionally equivalent to sample # 350 (#351 and #8) but instead uses a Ruby script using the JRuby interpreter. The script has two functions, 'transformRequest' and 'transformResponse', and the Synapse configuration specifies which function to be invoked when used. Execute the stock quote client to send a custom stock quote as per example #350 and check the received stock quote response. </p>
-
-<h2>
-<a name="Sample354" id="Sample354">Sample 354: Using In-lined Ruby scripts for mediation</a></h2>
-<div>
-<pre xml:space="preserve">      &lt;!-- Using In-lined Ruby scripts for mediation --&gt;
-&lt;definitions xmlns=&quot;http://ws.apache.org/ns/synapse&quot;&gt;
-    &lt;in&gt;
-        &lt;script language=&quot;rb&quot;&gt;
-            &lt;![CDATA[
-                require 'rexml/document'
-                include REXML
-                newRequest= Document.new '&lt;m:getQuote xmlns:m=&quot;http://services.samples&quot;&gt;&lt;m:request&gt;&lt;m:symbol&gt;...test...&lt;/m:symbol&gt;&lt;/m:request&gt;&lt;/m:getQuote&gt;'
-                newRequest.root.elements[1].elements[1].text = $mc.getPayloadXML().root.elements[1].get_text
-                $mc.setPayloadXML(newRequest)
-            ]]&gt;
-        &lt;/script&gt;
-        &lt;send&gt;
-            &lt;endpoint&gt;
-                &lt;address uri=&quot;http://localhost:9000/services/SimpleStockQuoteService&quot;/&gt;
-            &lt;/endpoint&gt;
-        &lt;/send&gt;
-    &lt;/in&gt;
-    &lt;out&gt;
-        &lt;script language=&quot;rb&quot;&gt;
-            &lt;![CDATA[
-                require 'rexml/document'
-                include REXML
-                newResponse = Document.new '&lt;m:CheckPriceResponse xmlns:m=&quot;http://services.samples/xsd&quot;&gt;&lt;m:Code&gt;&lt;/m:Code&gt;&lt;m:Price&gt;&lt;/m:Price&gt;&lt;/m:CheckPriceResponse&gt;'
-                newResponse.root.elements[1].text = $mc.getPayloadXML().root.elements[1].elements[1].get_text
-                newResponse.root.elements[2].text = $mc.getPayloadXML().root.elements[1].elements[2].get_text
-                $mc.setPayloadXML(newResponse)
-            ]]&gt;
-        &lt;/script&gt;
-        &lt;send/&gt;
-    &lt;/out&gt;
-&lt;/definitions&gt; </pre>
-<p>
-<strong>Objective: Script mediators using Ruby(In-line Ruby Script)</strong> </p>
-<p>
-<strong>Prerequisites:</strong>
-<br/>This sample uses Ruby so first setup support for this in Synapse as described at
-<a href="Synapse_Samples_Setup.html#script">Configuring JRuby</a>
-<br/>Start the Synapse configuration numbered 354: i.e. bin/synapse -sample 354
-<br/> Start the Axis2 server and deploy the SimpleStockQuoteService if not already done </p>
-
-<p>This sample is functionally equivalent to the sample 353. </p>
-<p>Run the client with </p>
-<pre xml:space="preserve"> ant stockquote -Daddurl=http://localhost:9000/services/SimpleStockQuoteService -Dtrpurl=http://localhost:8280/ -Dmode=customquote</pre></div>
-<h2>
-<a name="DBMediators" id="DBMediators">Database interactions in mediation (DBLookup / DBReport)</a></h2>
-<p>Following database mediators use Derby in a client/server configuration by using the network server. Therefore, to proceed with the following samples, you need a working Derby database server and you have to follow the steps in 
-<a href="Synapse_Samples_Setup.html#derby">Sample Setup Guide</a> before going through the samples. </p>
-
-<h2>
-<a name="Sample360" id="Sample360">Sample 360: Introduction to dblookup mediator</a></h2>
-<pre xml:space="preserve">&lt;definitions xmlns=&quot;http://ws.apache.org/ns/synapse&quot;&gt;
-
-    &lt;sequence name=&quot;myFaultHandler&quot;&gt;
-        &lt;makefault response=&quot;true&quot;&gt;
-            &lt;code value=&quot;tns:Receiver&quot; xmlns:tns=&quot;http://www.w3.org/2003/05/soap-envelope&quot;/&gt;
-            &lt;reason expression=&quot;get-property('ERROR_MESSAGE')&quot;/&gt;
-        &lt;/makefault&gt;
-        &lt;send/&gt;
-        &lt;drop/&gt;
-    &lt;/sequence&gt;
-
-    &lt;sequence name=&quot;main&quot; onError=&quot;myFaultHandler&quot;&gt;
-        &lt;in&gt;
-            &lt;log level=&quot;custom&quot;&gt;
-                &lt;property name=&quot;text&quot;
-                          value=&quot;** Looking up from the Database **&quot;/&gt;
-            &lt;/log&gt;
-            &lt;dblookup xmlns=&quot;http://ws.apache.org/ns/synapse&quot;&gt;
-                &lt;connection&gt;
-                    &lt;pool&gt;
-                        &lt;driver&gt;org.apache.derby.jdbc.ClientDriver&lt;/driver&gt;
-                        &lt;url&gt;jdbc:derby://localhost:1527/synapsedb;create=false&lt;/url&gt;
-                        &lt;user&gt;synapse&lt;/user&gt;
-                        &lt;password&gt;synapse&lt;/password&gt;
-                    &lt;/pool&gt;
-                &lt;/connection&gt;
-                &lt;statement&gt;
-                    &lt;sql&gt;select * from company where name =?&lt;/sql&gt;
-                    &lt;parameter expression=&quot;//m0:getQuote/m0:request/m0:symbol&quot;
-                               xmlns:m0=&quot;http://services.samples&quot; type=&quot;VARCHAR&quot;/&gt;
-                    &lt;result name=&quot;company_id&quot; column=&quot;id&quot;/&gt;
-                &lt;/statement&gt;
-            &lt;/dblookup&gt;
-
-            &lt;switch source=&quot;get-property('company_id')&quot;&gt;
-                &lt;case regex=&quot;c1&quot;&gt;
-                    &lt;log level=&quot;custom&quot;&gt;
-                        &lt;property name=&quot;text&quot;
-                                  expression=&quot;fn:concat('Company ID - ',get-property('company_id'))&quot;/&gt;
-                    &lt;/log&gt;
-                    &lt;send&gt;
-                        &lt;endpoint&gt;
-                            &lt;address uri=&quot;http://localhost:9000/services/SimpleStockQuoteService&quot;/&gt;
-                        &lt;/endpoint&gt;
-                    &lt;/send&gt;
-                &lt;/case&gt;
-                &lt;case regex=&quot;c2&quot;&gt;
-                    &lt;log level=&quot;custom&quot;&gt;
-                        &lt;property name=&quot;text&quot;
-                                  expression=&quot;fn:concat('Company ID - ',get-property('company_id'))&quot;/&gt;
-                    &lt;/log&gt;
-                    &lt;send&gt;
-                        &lt;endpoint&gt;
-                            &lt;address uri=&quot;http://localhost:9000/services/SimpleStockQuoteService&quot;/&gt;
-                        &lt;/endpoint&gt;
-                    &lt;/send&gt;
-                &lt;/case&gt;
-                &lt;case regex=&quot;c3&quot;&gt;
-                    &lt;log level=&quot;custom&quot;&gt;
-                        &lt;property name=&quot;text&quot;
-                                  expression=&quot;fn:concat('Company ID - ',get-property('company_id'))&quot;/&gt;
-                    &lt;/log&gt;
-                    &lt;send&gt;
-                        &lt;endpoint&gt;
-                            &lt;address uri=&quot;http://localhost:9000/services/SimpleStockQuoteService&quot;/&gt;
-                        &lt;/endpoint&gt;
-                    &lt;/send&gt;
-                &lt;/case&gt;
-                &lt;default&gt;
-                    &lt;log level=&quot;custom&quot;&gt;
-                        &lt;property name=&quot;text&quot; value=&quot;** Unrecognized Company ID **&quot;/&gt;
-                    &lt;/log&gt;
-                    &lt;makefault response=&quot;true&quot;&gt;
-                        &lt;code value=&quot;tns:Receiver&quot;
-                              xmlns:tns=&quot;http://www.w3.org/2003/05/soap-envelope&quot;/&gt;
-                        &lt;reason value=&quot;** Unrecognized Company ID **&quot;/&gt;
-                    &lt;/makefault&gt;
-                    &lt;send/&gt;
-                    &lt;drop/&gt;
-                &lt;/default&gt;
-            &lt;/switch&gt;
-            &lt;drop/&gt;
-        &lt;/in&gt;
-
-        &lt;out&gt;
-            &lt;send/&gt;
-        &lt;/out&gt;
-
-    &lt;/sequence&gt;
-
-&lt;/definitions&gt;</pre>
-
-<p>
-<strong>Objective:Introduction to the dblookup mediator</strong> </p>
-<p>
-<strong>Prerequisites:</strong>
-<br/>Setting up Derby database as explained above.
-<br/>Start the Synapse configuration numbered 360: i.e. synapse -sample 360
-<br/>Start the Axis2 server and deploy the SimpleStockQuoteService if not already done</p>
-
-<p>This sample demonstrates simple database read operations through Synapse. When a message arrives at dblookup mediator, it opens a connection to the database and executes the SQL query. The SQL query use '?' character for attributes that will be filled at runtime. The parameters define how to calculate the value of those attributes at runtime. In this sample a dblookup mediator has been used to extract 'id' of the company from the company database using the symbol which is evaluated using an xpath against the SOAP envelope. Then 'id' base switching will be done by a switch mediator. </p>
-
-<p>When the IBM stock quote is requested, </p>
-<pre xml:space="preserve">ant stockquote -Daddurl=http://localhost:9000/services/SimpleStockQuoteService -Dtrpurl=http://localhost:8280/ -Dsymbol=IBM</pre>
-<p>Synapse console shows </p>
-<pre xml:space="preserve">INFO LogMediator text = ** Looking up from the Database **INFO LogMediator text = Company ID &#x2013; c1
-<br/></pre>
-
-<p>For the SUN stock quote, </p>
-<pre xml:space="preserve">ant stockquote -Daddurl=http://localhost:9000/services/SimpleStockQuoteService -Dtrpurl=http://localhost:8280/ -Dsymbol=SUN</pre>
-
-<p>Synapse console shows </p>
-<pre xml:space="preserve">INFO LogMediator text = ** Looking up from the Database **INFO LogMediator text = Company ID &#x2013; c2
-<br/></pre>
-<p>and for the MSFT stock quote, </p>
-<pre xml:space="preserve">ant stockquote -Daddurl=http://localhost:9000/services/SimpleStockQuoteService -Dtrpurl=http://localhost:8280/ -Dsymbol=MSFT</pre>
-<pre xml:space="preserve">INFO LogMediator text = ** Looking up from the Database **
-<br/>INFO LogMediator text = Company ID &#x2013; c2</pre>
-<p>For any other symbols, Synapse console shows </p>
-<pre xml:space="preserve">INFO LogMediator text = ** Unrecognized Company ID **</pre>
-
-<p>and the client gets a response which has following message. </p>
-<pre xml:space="preserve">** Unrecognized Company ID **</pre>
-<p/>
-<h2>
-<a name="Sample361" id="Sample361">Sample 361: Introduction to dbreport mediator</a></h2>
-<pre xml:space="preserve">&lt;definitions xmlns=&quot;http://ws.apache.org/ns/synapse&quot;&gt;
-
-    &lt;sequence name=&quot;main&quot;&gt;
-        &lt;in&gt;
-            &lt;send&gt;
-                &lt;endpoint&gt;
-                    &lt;address uri=&quot;http://localhost:9000/services/SimpleStockQuoteService&quot;/&gt;
-                &lt;/endpoint&gt;
-            &lt;/send&gt;
-        &lt;/in&gt;
-
-        &lt;out&gt;
-            &lt;log level=&quot;custom&quot;&gt;
-                &lt;property name=&quot;text&quot;
-                          value=&quot;** Reporting to the Database **&quot;/&gt;
-            &lt;/log&gt;
-            &lt;dbreport xmlns=&quot;http://ws.apache.org/ns/synapse&quot;&gt;
-                &lt;connection&gt;
-                    &lt;pool&gt;
-                        &lt;driver&gt;org.apache.derby.jdbc.ClientDriver&lt;/driver&gt;
-                        &lt;url&gt;jdbc:derby://localhost:1527/synapsedb;create=false&lt;/url&gt;
-                        &lt;user&gt;synapse&lt;/user&gt;
-                        &lt;password&gt;synapse&lt;/password&gt;
-                    &lt;/pool&gt;
-                &lt;/connection&gt;
-                &lt;statement&gt;
-                    &lt;sql&gt;update company set price=? where name =?&lt;/sql&gt;
-                    &lt;parameter expression=&quot;//m0:return/m0:last/child::text()&quot;
-                               xmlns:m0=&quot;http://services.samples/xsd&quot; type=&quot;DOUBLE&quot;/&gt;
-                    &lt;parameter expression=&quot;//m0:return/m0:symbol/child::text()&quot;
-                               xmlns:m0=&quot;http://services.samples/xsd&quot; type=&quot;VARCHAR&quot;/&gt;
-                &lt;/statement&gt;
-            &lt;/dbreport&gt;
-            &lt;send/&gt;
-        &lt;/out&gt;
-    &lt;/sequence&gt;
-
-&lt;/definitions&gt;</pre>
-<div>
-<p>
-<strong>Objective:Introduction to the dbreport mediator</strong> </p>
-<p>
-<strong>Prerequisites:</strong>
-<br/>Setting up Derby database as above.
-<br/>Start the Synapse configuration numbered 361: i.e. synapse -sample 361
-<br/>Start the Axis2 server and deploy the SimpleStockQuoteService if not already done</p></div>
-<p>This sample demonstrates simple database write operations. The dbreport mediator writes (i.e. inserts one row) to a table using the message details. It works the same as the dblookup mediator. In this sample , dbreport mediator is used for updating the stock price of the company using the last quote value which is calculated by evaluating an XPath against the response message. After running this sample, user can check the company table using the Derby client tool. It will show the inserted value by the dbreport mediator. </p>
-<p>Run the client using, </p>
-<pre xml:space="preserve">ant stockquote -Daddurl=http://localhost:9000/services/SimpleStockQuoteService -Dtrpurl=http://localhost:8280/ -Dsymbol=IBM</pre>
-<p>and then execute the following query using database client tool against synapsedb. </p>
-<pre xml:space="preserve">select price from company where name='IBM';</pre>
-<p>It will show some value as follows. </p>
-<pre xml:space="preserve">96.39535981018865</pre>
-<p/>
-<h2>
-<a name="Sample362" id="Sample362">Sample 362: Action of dbreport and dblookup mediators together</a></h2>
-<pre xml:space="preserve">&lt;definitions xmlns="http://ws.apache.org/ns/synapse"&gt;
-
-    &lt;sequence name="main" trace="enable"&gt;
-        &lt;in&gt;
-            &lt;send&gt;
-                &lt;endpoint&gt;
-                    &lt;address uri="http://localhost:9000/services/SimpleStockQuoteService"/&gt;
-                &lt;/endpoint&gt;
-            &lt;/send&gt;
-        &lt;/in&gt;
-
-        &lt;out&gt;
-            &lt;log level="custom"&gt;
-                &lt;property name="text" value="** Reporting to the Database **"/&gt;
-            &lt;/log&gt;
-
-            &lt;dbreport&gt;
-                &lt;connection&gt;
-                    &lt;pool&gt;
-                        &lt;driver&gt;com.mysql.jdbc.Driver&lt;/driver&gt;
-                        &lt;url&gt;jdbc:mysql://localhost:3306/synapsedb&lt;/url&gt;
-                        &lt;user&gt;root&lt;/user&gt;
-                        &lt;password&gt;root123&lt;/password&gt;
-                    &lt;/pool&gt;
-                &lt;/connection&gt;
-                &lt;statement&gt;
-                    &lt;sql&gt;update company set price=? where name =?&lt;/sql&gt;
-                    &lt;parameter xmlns:m1="http://services.samples/xsd"
-                               xmlns:m0="http://services.samples"
-                               expression="//m0:return/m1:last/child::text()" type="DOUBLE"/&gt;
-                    &lt;parameter xmlns:m1="http://services.samples/xsd"
-                               xmlns:m0="http://services.samples"
-                               expression="//m0:return/m1:symbol/child::text()" type="VARCHAR"/&gt;
-                &lt;/statement&gt;
-            &lt;/dbreport&gt;
-            &lt;log level="custom"&gt;
-                &lt;property name="text" value="** Looking up from the Database **"/&gt;
-            &lt;/log&gt;
-            &lt;dblookup&gt;
-                &lt;connection&gt;
-                    &lt;pool&gt;
-                        &lt;driver&gt;com.mysql.jdbc.Driver&lt;/driver&gt;
-                        &lt;url&gt;jdbc:mysql://localhost:3306/synapsedb&lt;/url&gt;
-                        &lt;user&gt;root&lt;/user&gt;
-                        &lt;password&gt;root123&lt;/password&gt;
-                    &lt;/pool&gt;
-                &lt;/connection&gt;
-                &lt;statement&gt;
-                    &lt;sql&gt;select * from company where name =?&lt;/sql&gt;
-                    &lt;parameter xmlns:m1="http://services.samples/xsd"
-                               xmlns:m0="http://services.samples"
-                               expression="//m0:return/m1:symbol/child::text()" type="VARCHAR"/&gt;
-                    &lt;result name="stock_price" column="price"/&gt;
-                &lt;/statement&gt;
-            &lt;/dblookup&gt;
-            &lt;log level="custom"&gt;
-                &lt;property name="text"
-                          expression="fn:concat('Stock price - ',get-property('stock_price'))"/&gt;
-            &lt;/log&gt;
-            &lt;send/&gt;
-        &lt;/out&gt;
-    &lt;/sequence&gt;
-
-&lt;/definitions&gt;</pre>
-<p>
-<strong>Objective: Demonstrate the use of dbreport and dblookup mediators</strong> </p>
-<p>
-<strong>Prerequisites:</strong>
-<br/>Setting up Derby database as above
-<br/>Start the Synapse configuration numbered 362: i.e. synapse -sample 362
-<br/>Start the Axis2 server and deploy the SimpleStockQuoteService if not already done</p>
-
-<p>In this sample ,the dbreport mediator works the same as the above sample. It updates the price for the given company using the response messages content. Then the dblookup mediator reads the last updated value from the company database and logs it. </p>
-<p>When running client, </p>
-<pre xml:space="preserve">ant stockquote -Daddurl=http://localhost:9000/services/SimpleStockQuoteService -Dtrpurl=http://localhost:8280/ -Dsymbol=IBM</pre>
-<p>Synapse console shows, </p>
-<pre xml:space="preserve">INFO LogMediator text = ** Reporting to the Database **
-...
-INFO LogMediator text = ** Looking up from the Database **
-...
-INFO LogMediator text = Stock price - 153.47886496064808</pre>
-<p/>
-<h2>
-<a name="Sample363" id="Sample363">Sample 363: Reusable database connection pools</a></h2>
-<div>
-<p>Prior to run this sample please follow the 'Setting up Synapse DataSources' section in the 
-<a href="Synapse_Samples_Setup.html">sample setup guide</a>.</p>
-<pre>&lt;definitions xmlns=&quot;http://ws.apache.org/ns/synapse&quot;&gt;
-    &lt;sequence name=&quot;myFaultHandler&quot;&gt;
-        &lt;makefault response=&quot;true&quot;&gt;
-            &lt;code value=&quot;tns:Receiver&quot; xmlns:tns=&quot;http://www.w3.org/2003/05/soap-envelope&quot;/&gt;
-            &lt;reason expression=&quot;get-property('ERROR_MESSAGE')&quot;/&gt;
-        &lt;/makefault&gt;
-        &lt;send/&gt;
-        &lt;drop/&gt;
-    &lt;/sequence&gt;
-
-    &lt;sequence name=&quot;main&quot; onError=&quot;myFaultHandler&quot;&gt;
-        &lt;in&gt;
-            &lt;log level=&quot;custom&quot;&gt;
-                &lt;property name=&quot;text&quot; value=&quot;** Looking up from the Database **&quot;/&gt;
-            &lt;/log&gt;
-            &lt;dblookup&gt;
-                &lt;connection&gt;
-                    &lt;pool&gt;
-                        &lt;dsName&gt;lookupdb&lt;/dsName&gt;
-                        &lt;icClass&gt;com.sun.jndi.rmi.registry.RegistryContextFactory&lt;/icClass&gt;
-                        &lt;url&gt;rmi://localhost:2199&lt;/url&gt;
-                        &lt;user&gt;synapse&lt;/user&gt;
-                        &lt;password&gt;synapse&lt;/password&gt;
-                    &lt;/pool&gt;
-                &lt;/connection&gt;
-                &lt;statement&gt;
-                    &lt;sql&gt;select * from company where name =?&lt;/sql&gt;
-                    &lt;parameter expression=&quot;//m0:getQuote/m0:request/m0:symbol&quot; xmlns:m0=&quot;http://services.samples&quot; type=&quot;VARCHAR&quot;/&gt;
-                    &lt;result name=&quot;company_id&quot; column=&quot;id&quot;/&gt;
-                &lt;/statement&gt;
-            &lt;/dblookup&gt;
-            &lt;switch source=&quot;get-property('company_id')&quot;&gt;
-                &lt;case regex=&quot;c1&quot;&gt;
-                    &lt;log level=&quot;custom&quot;&gt; &lt;
-                        property name=&quot;text&quot; expression=&quot;fn:concat('Company ID - ',get-property('company_id'))&quot;/&gt;
-                    &lt;/log&gt;
-                    &lt;send&gt;
-                        &lt;endpoint&gt;
-                            &lt;address uri=&quot;http://localhost:9000/services/SimpleStockQuoteService&quot;/&gt;
-                        &lt;/endpoint&gt;
-                    &lt;/send&gt;
-                &lt;/case&gt;
-                &lt;case regex=&quot;c2&quot;&gt;
-                    &lt;log level=&quot;custom&quot;&gt;
-                        &lt;property name=&quot;text&quot; expression=&quot;fn:concat('Company ID - ',get-property('company_id'))&quot;/&gt;
-                    &lt;/log&gt;
-                    &lt;send&gt;
-                        &lt;endpoint&gt;
-                            &lt;address uri=&quot;http://localhost:9000/services/SimpleStockQuoteService&quot;/&gt;
-                        &lt;/endpoint&gt;
-                    &lt;/send&gt;
-                &lt;/case&gt;
-                &lt;case regex=&quot;c3&quot;&gt;
-                    &lt;log level=&quot;custom&quot;&gt;
-                        &lt;property name=&quot;text&quot; expression=&quot;fn:concat('Company ID - ',get-property('company_id'))&quot;/&gt;
-                    &lt;/log&gt;
-                    &lt;send&gt;
-                        &lt;endpoint&gt;
-                            &lt;address uri=&quot;http://localhost:9000/services/SimpleStockQuoteService&quot;/&gt;
-                        &lt;/endpoint&gt;
-                    &lt;/send&gt;
-                &lt;/case&gt;
-                &lt;default&gt;
-                    &lt;log level=&quot;custom&quot;&gt;
-                        &lt;property name=&quot;text&quot; value=&quot;** Unrecognized Company ID **&quot;/&gt;
-                    &lt;/log&gt;
-                    &lt;makefault response=&quot;true&quot;&gt;
-                        &lt;code value=&quot;tns:Receiver&quot; xmlns:tns=&quot;http://www.w3.org/2003/05/soap-envelope&quot;/&gt;
-                        &lt;reason value=&quot;** Unrecognized Company ID **&quot;/&gt;
-                    &lt;/makefault&gt;
-                    &lt;send/&gt;
-                    &lt;drop/&gt;
-                &lt;/default&gt;
-            &lt;/switch&gt;
-        &lt;drop/&gt;
-    &lt;/in&gt;
-    &lt;out&gt;
-        &lt;log level=&quot;custom&quot;&gt;
-            &lt;property name=&quot;text&quot; value=&quot;** Reporting to the Database **&quot;/&gt;
-        &lt;/log&gt;
-        &lt;dbreport&gt;
-            &lt;connection&gt;
-                &lt;pool&gt;
-                    &lt;dsName&gt;reportdb&lt;/dsName&gt;
-                    &lt;icClass&gt;com.sun.jndi.rmi.registry.RegistryContextFactory&lt;/icClass&gt;
-                    &lt;url&gt;rmi://localhost:2199&lt;/url&gt;
-                    &lt;user&gt;synapse&lt;/user&gt;
-                    &lt;password&gt;synapse&lt;/password&gt;
-                &lt;/pool&gt;
-            &lt;/connection&gt;
-            &lt;statement&gt;
-                &lt;sql&gt;update company set price=? where name =?&lt;/sql&gt;
-                &lt;parameter expression=&quot;//m0:return/m0:last/child::text()&quot; xmlns:m0=&quot;http://services.samples/xsd&quot; type=&quot;DOUBLE&quot;/&gt;
-                &lt;parameter expression=&quot;//m0:return/m0:symbol/child::text()&quot; xmlns:m0=&quot;http://services.samples/xsd&quot; type=&quot;VARCHAR&quot;/&gt;
-            &lt;/statement&gt;
-        &lt;/dbreport&gt;
-        &lt;log level=&quot;custom&quot;&gt;
-            &lt;property name=&quot;text&quot; value=&quot;** Looking up from the Database **&quot;/&gt;
-        &lt;/log&gt;
-        &lt;dblookup&gt;
-            &lt;connection&gt;
-                &lt;pool&gt;
-                    &lt;dsName&gt;reportdb&lt;/dsName&gt;
-                    &lt;icClass&gt;com.sun.jndi.rmi.registry.RegistryContextFactory&lt;/icClass&gt;
-                    &lt;url&gt;rmi://localhost:2199&lt;/url&gt;
-                    &lt;user&gt;synapse&lt;/user&gt;
-                    &lt;password&gt;synapse&lt;/password&gt;
-                &lt;/pool&gt;
-            &lt;/connection&gt;
-            &lt;statement&gt;
-                &lt;sql&gt;select * from company where name =?&lt;/sql&gt;
-                &lt;parameter expression=&quot;//m0:return/m0:symbol/child::text()&quot; xmlns:m0=&quot;http://services.samples/xsd&quot; type=&quot;VARCHAR&quot;/&gt;
-                &lt;result name=&quot;stock_price&quot; column=&quot;price&quot;/&gt;
-            &lt;/statement&gt;
-            &lt;/dblookup&gt;
-            &lt;log level=&quot;custom&quot;&gt;
-                &lt;property name=&quot;text&quot; expression=&quot;fn:concat('Stock price - ',get-property('stock_price'))&quot;/&gt;
-            &lt;/log&gt;
-            &lt;send/&gt;
-        &lt;/out&gt;
-    &lt;/sequence&gt;
-&lt;/definitions&gt;</pre></div>
-<div>
-<p>
-<strong>Objective: Demonstrate the use of reusable database connection pools</strong></p>
-<p>
-<strong>Prerequisites:</strong>
-<br/>Set up the database and Data sources according to the
-<a href="Synapse_Samples_Setup.html">sample setup guide</a>
-<br/>Start the Synapse configuration numbered 363: i.e. synapse -sample 363
-<br/>Start the Axis2 server and deploy the SimpleStockQuoteService if not already done </p>
-
-<p>Runs the client as follows</p>
-<pre>ant stockquote -Daddurl=http://localhost:9000/services/SimpleStockQuoteService -Dtrpurl=http://localhost:8280/ -Dsymbol=IBM</pre>
-<p>Then the console output </p>
-<pre>INFO LogMediator text = ** Looking up from the Database ** ...
-    INFO LogMediator text = Company ID - c1 ...
-    INFO LogMediator text = ** Reporting to the Database ** ...
-    INFO LogMediator text = ** Looking up from the Database ** ...
-    INFO LogMediator text = Stock price - 183.3635460215262</pre></div>
-<h2>
-<a name="Sample364" id="Sample364">Sample 364: Executing database Stored Procedures</a></h2>
-<div>
-<p>This sample if functionally similar to sample 363 but uses a stored procedure to query
-the database instead of direct SQL statements. Prior to running this sample please follow the
-instructions given in the 'Setting up MySQL database server' section in the
-<a href="Synapse_Samples_Setup.html#mysql">sample setup guide</a>.</p>
-
-<pre xml:space="preserve">&lt;definitions xmlns="http://ws.apache.org/ns/synapse"&gt;
-
-    &lt;sequence name="main"&gt;
-        &lt;in&gt;
-            &lt;send&gt;
-                &lt;endpoint&gt;
-                    &lt;address uri="http://localhost:9000/services/SimpleStockQuoteService"/&gt;
-                &lt;/endpoint&gt;
-            &lt;/send&gt;
-        &lt;/in&gt;
-
-        &lt;out&gt;
-            &lt;log level="custom"&gt;
-                &lt;property name="text" value="** Reporting to the Database **"/&gt;
-            &lt;/log&gt;
-
-            &lt;dbreport&gt;
-                &lt;connection&gt;
-                    &lt;pool&gt;
-                        &lt;driver&gt;com.mysql.jdbc.Driver&lt;/driver&gt;
-			&lt;url&gt;jdbc:mysql://localhost/synapsedb&lt;/url&gt;
-			&lt;user&gt;root&lt;/user&gt;
-			&lt;password&gt;admin&lt;/password&gt;
-                    &lt;/pool&gt;
-                &lt;/connection&gt;
-                &lt;statement&gt;
-                    &lt;sql&gt;call updateCompany(?,?)&lt;/sql&gt;
-                    &lt;parameter expression="//m0:return/m1:last/child::text()" xmlns:m0="http://services.samples" xmlns:m1="http://services.samples/xsd" type="DOUBLE"/&gt;
-                    &lt;parameter expression="//m0:return/m1:symbol/child::text()" xmlns:m0="http://services.samples" xmlns:m1="http://services.samples/xsd" type="VARCHAR"/&gt;
-                &lt;/statement&gt;
-            &lt;/dbreport&gt;
-            &lt;log level="custom"&gt;
-                &lt;property name="text" value="** Looking up from the Database **"/&gt;
-            &lt;/log&gt;
-            &lt;dblookup&gt;
-                &lt;connection&gt;
-                    &lt;pool&gt;
-                        &lt;driver&gt;com.mysql.jdbc.Driver&lt;/driver&gt;
-			&lt;url&gt;jdbc:mysql://localhost/synapsedb&lt;/url&gt;
-			&lt;user&gt;root&lt;/user&gt;
-			&lt;password&gt;admin&lt;/password&gt;
-                    &lt;/pool&gt;
-                &lt;/connection&gt;
-                &lt;statement&gt;
-                    &lt;sql&gt;call getCompany(?)&lt;/sql&gt;
-                    &lt;parameter expression="//m0:return/m1:symbol/child::text()" xmlns:m0="http://services.samples" xmlns:m1="http://services.samples/xsd" type="VARCHAR"/&gt;
-                    &lt;result name="stock_prize" column="price"/&gt;
-                &lt;/statement&gt;
-            &lt;/dblookup&gt;
-            &lt;log level="custom"&gt;
-                &lt;property name="text" expression="fn:concat('Stock Prize - ',get-property('stock_prize'))"/&gt;
-            &lt;/log&gt;
-            &lt;send/&gt;
-        &lt;/out&gt;
-    &lt;/sequence&gt;
-
-&lt;/definitions&gt;</pre></div>
-<div>
-<p>
-<strong>Objective: Demonstrate the use of dblookup and dbreport mediators to execute a database Stored Procedures</strong></p>
-<p>
-<strong>Prerequisites:</strong>
-<br/>Set up MySQL database server according to the
-<a href="Synapse_Samples_Setup.html#mysql">sample setup guide</a>
-<br/>Edit the synapse_sample_364.xml
-configuration file and update the configuration with the appropriate database connection details
-<br/>Start the Synapse configuration numbered 364: i.e. synapse -sample 364
-<br/>Start the Axis2 server and deploy the SimpleStockQuoteService if not already done </p>
-<p>Run the client as follows</p>
-<pre>ant stockquote -Daddurl=http://localhost:9000/services/SimpleStockQuoteService -Dtrpurl=http://localhost:8280/ -Dsymbol=IBM</pre>
-<p>Then you will get the following console output </p>
-<pre>INFO LogMediator text = ** Looking up from the Database ** ... 
-INFO LogMediator text = Company ID - c1 ...  
-INFO LogMediator text = Stock price - 183.3635460215262</pre></div>
-<h2>
-<a name="Throttle" id="Throttle">Throttling messages (Throttle Mediator)</a></h2>
-<h2>
-<a name="Sample370" id="Sample370">Sample 370: Introduction to throttle mediator and concurrency throttling</a></h2>
-<pre xml:space="preserve">&lt;definitions xmlns=&quot;http://ws.apache.org/ns/synapse&quot;&gt;
-    &lt;sequence name=&quot;main&quot;&gt;
-        &lt;in&gt;
-            &lt;throttle id=&quot;A&quot;&gt;
-                &lt;policy&gt;
-                    &lt;!-- define throttle policy --&gt;
-                    &lt;wsp:Policy xmlns:wsp=&quot;http://schemas.xmlsoap.org/ws/2004/09/policy&quot;
-                                xmlns:throttle=&quot;http://www.wso2.org/products/wso2commons/throttle&quot;&gt;
-                        &lt;throttle:ThrottleAssertion&gt;
-                            &lt;throttle:MaximumConcurrentAccess&gt;10&lt;/throttle:MaximumConcurrentAccess&gt;
-                        &lt;/throttle:ThrottleAssertion&gt;
-                    &lt;/wsp:Policy&gt;
-                &lt;/policy&gt;
-                &lt;onAccept&gt;
-                    &lt;log level=&quot;custom&quot;&gt;
-                        &lt;property name=&quot;text&quot; value=&quot;**Access Accept**&quot;/&gt;
-                    &lt;/log&gt;
-                    &lt;send&gt;
-                        &lt;endpoint&gt;
-                            &lt;address uri=&quot;http://localhost:9000/services/SimpleStockQuoteService&quot;/&gt;
-                        &lt;/endpoint&gt;
-                    &lt;/send&gt;
-                &lt;/onAccept&gt;
-                &lt;onReject&gt;
-                    &lt;log level=&quot;custom&quot;&gt;
-                        &lt;property name=&quot;text&quot; value=&quot;**Access Denied**&quot;/&gt;
-                    &lt;/log&gt;
-                    &lt;makefault response=&quot;true&quot;&gt;
-                        &lt;code value=&quot;tns:Receiver&quot;
-                              xmlns:tns=&quot;http://www.w3.org/2003/05/soap-envelope&quot;/&gt;
-                        &lt;reason value=&quot;**Access Denied**&quot;/&gt;
-                    &lt;/makefault&gt;
-                    &lt;send/&gt;
-                    &lt;drop/&gt;
-                &lt;/onReject&gt;
-            &lt;/throttle&gt;
-        &lt;/in&gt;
-        &lt;out&gt;
-            &lt;throttle id=&quot;A&quot;/&gt;
-            &lt;send/&gt;
-        &lt;/out&gt;
-    &lt;/sequence&gt;
-&lt;/definitions&gt;</pre>
-<p>
-<strong>Objective: </strong>Demonstrate the use of throttle mediator for concurrency throttling </p>
-<p>
-<strong>Prerequisites:</strong>
-<br/>Deploy the SimpleStockQuoteService in sample Axis2 server and start it on port 9000
-<br/>Start Synapse with the sample configuration 370 (i.e. synapse -sample 370)</p>
-
-<p>Above configuration specifies a throttle mediator inside the in mediator. Therefore, all request messages directed to the main sequence will be subjected to throttling. Throttle mediator has 'policy', 'onAccept' and 'onReject' tags at top level. The 'policy' tag specifies the throttling policy for throttling messages. This sample policy only contains a component called &quot;MaximumConcurrentAccess&quot;. This indicates the maximum number of concurrent requests that can pass through Synapse on a single unit of time. To test concurrency throttling, it is required to send concurrent requests to Synapse. If Synapse with above configuration, receives 20 requests concurrently from clients, then approximately half of those will succeed while the others being throttled. The client command to try this is as follows. </p>
-<pre xml:space="preserve">ant stockquote -Dsymbol=IBM -Dmode=quote -Daddurl=http://localhost:8280/</pre>
-<p/>
-<h2>
-<a name="Sample371" id="Sample371">Sample 371: Restricting requests based on policies </a></h2>
-<pre xml:space="preserve">&lt;definitions xmlns=&quot;http://ws.apache.org/ns/synapse&quot;&gt;
-    &lt;sequence name=&quot;main&quot;&gt;
-        &lt;in&gt;
-            &lt;throttle id=&quot;A&quot;&gt;
-                &lt;policy&gt;
-                    &lt;!-- define throttle policy --&gt;
-                    &lt;wsp:Policy xmlns:wsp=&quot;http://schemas.xmlsoap.org/ws/2004/09/policy&quot;
-                                xmlns:throttle=&quot;http://www.wso2.org/products/wso2commons/throttle&quot;&gt;
-                        &lt;throttle:ThrottleAssertion&gt;   
-<br/>                                   &lt;wsp:All&gt;
-                                &lt;throttle:ID throttle:type=&quot;IP&quot;&gt;Other&lt;/throttle:ID&gt;
-                                &lt;wsp:ExactlyOne&gt;
-                                    &lt;wsp:All&gt;
-                                        &lt;throttle:MaximumCount&gt;4&lt;/throttle:MaximumCount&gt;
-                                        &lt;throttle:UnitTime&gt;800000&lt;/throttle:UnitTime&gt;
-                                        &lt;throttle:ProhibitTimePeriod wsp:Optional=&quot;true&quot;&gt;10000&lt;/throttle:ProhibitTimePeriod&gt;
-                                    &lt;/wsp:All&gt;
-                                    &lt;throttle:IsAllow&gt;true&lt;/throttle:IsAllow&gt;
-                                &lt;/wsp:ExactlyOne&gt;
-                            &lt;/wsp:All&gt;
-                            &lt;wsp:All&gt;
-                                &lt;throttle:ID throttle:type=&quot;IP&quot;&gt;192.168.8.200-192.168.8.222&lt;/throttle:ID&gt;
-                                &lt;wsp:ExactlyOne&gt;
-                                    &lt;wsp:All&gt;
-                                        &lt;throttle:MaximumCount&gt;8&lt;/throttle:MaximumCount&gt;
-                                        &lt;throttle:UnitTime&gt;800000&lt;/throttle:UnitTime&gt;
-                                        &lt;throttle:ProhibitTimePeriod wsp:Optional=&quot;true&quot;&gt;10&lt;/throttle:ProhibitTimePeriod&gt;
-                                    &lt;/wsp:All&gt;
-                                    &lt;throttle:IsAllow&gt;true&lt;/throttle:IsAllow&gt;
-                                &lt;/wsp:ExactlyOne&gt;
-                            &lt;/wsp:All&gt;
-                            &lt;wsp:All&gt;
-                                &lt;throttle:ID throttle:type=&quot;IP&quot;&gt;192.168.8.201&lt;/throttle:ID&gt;
-                                &lt;wsp:ExactlyOne&gt;
-                                    &lt;wsp:All&gt;
-                                        &lt;throttle:MaximumCount&gt;200&lt;/throttle:MaximumCount&gt;
-                                        &lt;throttle:UnitTime&gt;600000&lt;/throttle:UnitTime&gt;
-                                        &lt;throttle:ProhibitTimePeriod wsp:Optional=&quot;true&quot;&gt;&lt;/throttle:ProhibitTimePeriod&gt;
-                                    &lt;/wsp:All&gt;
-                                    &lt;throttle:IsAllow&gt;true&lt;/throttle:IsAllow&gt;
-                                &lt;/wsp:ExactlyOne&gt;
-                            &lt;/wsp:All&gt;
-                            &lt;wsp:All&gt;
-                                &lt;throttle:ID throttle:type=&quot;IP&quot;&gt;192.168.8.198&lt;/throttle:ID&gt;
-                                &lt;wsp:ExactlyOne&gt;
-                                    &lt;wsp:All&gt;
-                                        &lt;throttle:MaximumCount&gt;50&lt;/throttle:MaximumCount&gt;
-                                        &lt;throttle:UnitTime&gt;500000&lt;/throttle:UnitTime&gt;
-                                        &lt;throttle:ProhibitTimePeriod wsp:Optional=&quot;true&quot;&gt;&lt;/throttle:ProhibitTimePeriod&gt;
-                                    &lt;/wsp:All&gt;
-                                    &lt;throttle:IsAllow&gt;true&lt;/throttle:IsAllow&gt;
-                                &lt;/wsp:ExactlyOne&gt;
-                            &lt;/wsp:All&gt;
-                        &lt;/throttle:ThrottleAssertion&gt;
-                    &lt;/wsp:Policy&gt;
-                &lt;/policy&gt;
-                &lt;onAccept&gt;
-                    &lt;log level=&quot;custom&quot;&gt;
-                        &lt;property name=&quot;text&quot; value=&quot;**Access Accept**&quot;/&gt;
-                    &lt;/log&gt;
-                    &lt;send&gt;
-                        &lt;endpoint&gt;
-                            &lt;address uri=&quot;http://localhost:9000/services/SimpleStockQuoteService&quot;/&gt;
-                        &lt;/endpoint&gt;
-                    &lt;/send&gt;
-                &lt;/onAccept&gt;
-                &lt;onReject&gt;
-                    &lt;log level=&quot;custom&quot;&gt;
-                        &lt;property name=&quot;text&quot; value=&quot;**Access Denied**&quot;/&gt;
-                    &lt;/log&gt;
-                    &lt;makefault response=&quot;true&quot;&gt;
-                        &lt;code value=&quot;tns:Receiver&quot;
-                              xmlns:tns=&quot;http://www.w3.org/2003/05/soap-envelope&quot;/&gt;
-                        &lt;reason value=&quot;**Access Denied**&quot;/&gt;
-                    &lt;/makefault&gt;
-                    &lt;send/&gt;
-                    &lt;drop/&gt;
-                &lt;/onReject&gt;
-            &lt;/throttle&gt;
-        &lt;/in&gt;
-        &lt;out&gt;
-            &lt;throttle id=&quot;A&quot;/&gt;
-            &lt;send/&gt;
-        &lt;/out&gt;
-    &lt;/sequence&gt;
-&lt;/definitions&gt;</pre>
-<p>
-<strong>Objective: Demonstrate the use of throttle mediator for restricting request counts</strong> </p>
-<p>
-<strong>Prerequisites:</strong>
-<br/>Deploy the SimpleStockQuoteService in sample Axis2 server and start it on port 9000
-<br/>Start Synapse with the sample configuration 371 (i.e. synapse -sample 371)</p>
-
-<p>Above configuration specifies a throttle mediator inside the in mediator. Therefore, all request messages directed to the main sequence will be subjected to throttling. Throttle mediator has policy, onAccept and onReject tags at the top level. Policy tag specifies the throttling policy to be applied for messages. It contains some IP address ranges and the maximum number of messages to be allowed for those ranges within a time period given in &quot;UnitTime&quot; tag. &quot;ProhibitTimePeriod&quot; tag specifies the time period to prohibit further requests after the received request count exceeds the specified time. Now run the client 5 times repetitively using the following command to see how throttling works. </p>
-<pre xml:space="preserve">ant stockquote -Dsymbol=IBM -Dmode=quote -Daddurl=http://localhost:8280/</pre>
-<p>For the first four requests you will get the quote prices for IBM as follows. </p>
-<pre xml:space="preserve">[java] Standard :: Stock price = $177.20143371883802</pre>
-<p>You will receive the following response for the fifth request. </p>
-<pre xml:space="preserve">[java] org.apache.axis2.AxisFault: **Access Denied**</pre>
-<p>Maximum number of requests within 800000 milliseconds is specified as 4 for any server (including localhost) other than the explicitly specified ones. Therefore, our fifth request is denied by the throttle mediator. You can verify this by looking at the Synapse console. </p>
-<pre xml:space="preserve">[HttpServerWorker-1] INFO  LogMediator - text = **Access Accept**
-[HttpServerWorker-2] INFO  LogMediator - text = **Access Accept**
-[HttpServerWorker-3] INFO  LogMediator - text = **Access Accept**
-[HttpServerWorker-4] INFO  LogMediator - text = **Access Accept**
-[HttpServerWorker-5] INFO  LogMediator - text = **Access Denied** </pre>
-<h2>
-<a name="Sample372" id="Sample372">Sample 372: Use of both concurrency throttling and request rate based throttling </a></h2>
-<pre xml:space="preserve">&lt;!-- Use of both concurrency throttling and request rate based throttling --&gt;
-&lt;definitions xmlns=&quot;http://ws.apache.org/ns/synapse&quot;&gt;
-
-    &lt;registry provider=&quot;org.apache.synapse.registry.url.SimpleURLRegistry&quot;&gt;
-        &lt;!-- the root property of the simple URL registry helps resolve a resource URL as root + key --&gt;
-        &lt;parameter name=&quot;root&quot;&gt;file:repository/&lt;/parameter&gt;
-        &lt;!-- all resources loaded from the URL registry would be cached for this number of milli seconds --&gt;
-        &lt;parameter name=&quot;cachableDuration&quot;&gt;150000&lt;/parameter&gt;
-    &lt;/registry&gt;
-
-    &lt;sequence name=&quot;onAcceptSequence&quot;&gt;
-        &lt;log level=&quot;custom&quot;&gt;
-            &lt;property name=&quot;text&quot; value=&quot;**Access Accept**&quot;/&gt;
-        &lt;/log&gt;
-        &lt;send&gt;
-            &lt;endpoint&gt;
-                &lt;address uri=&quot;http://localhost:9000/services/SimpleStockQuoteService&quot;/&gt;
-            &lt;/endpoint&gt;
-        &lt;/send&gt;
-    &lt;/sequence&gt;
-    &lt;sequence name=&quot;onRejectSequence&quot; trace=&quot;enable&quot;&gt;
-        &lt;log level=&quot;custom&quot;&gt;
-            &lt;property name=&quot;text&quot; value=&quot;**Access Denied**&quot;/&gt;
-        &lt;/log&gt;
-        &lt;makefault response=&quot;true&quot;&gt;
-            &lt;code value=&quot;tns:Receiver&quot;
-                  xmlns:tns=&quot;http://www.w3.org/2003/05/soap-envelope&quot;/&gt;
-            &lt;reason value=&quot;**Access Denied**&quot;/&gt;
-        &lt;/makefault&gt;
-        &lt;send/&gt;
-        &lt;drop/&gt;
-    &lt;/sequence&gt;
-    &lt;proxy name=&quot;StockQuoteProxy&quot;&gt;
-        &lt;target&gt;
-             &lt;inSequence&gt;
-                &lt;throttle onReject=&quot;onRejectSequence&quot; onAccept=&quot;onAcceptSequence&quot; id=&quot;A&quot;&gt;
-                    &lt;policy key=&quot;conf/sample/resources/policy/throttle_policy.xml&quot;/&gt;
-                &lt;/throttle&gt;
-            &lt;/inSequence&gt;
-            &lt;outSequence&gt;
-                &lt;throttle id=&quot;A&quot;/&gt;
-                &lt;send/&gt;
-            &lt;/outSequence&gt;
-        &lt;/target&gt;
-        &lt;publishWSDL uri=&quot;file:repository/conf/sample/resources/proxy/sample_proxy_1.wsdl&quot;/&gt;
-    &lt;/proxy&gt;
-&lt;/definitions&gt;</pre>
-<p>
-<strong>Objective: Use of both concurrency throttling and request rate based throttling </strong> </p>
-<p>
-<strong>Prerequisites:</strong>
-<br/>Deploy the SimpleStockQuoteService in sample Axis2 server and start it on port 9000
-<br/>Start Synapse with the sample configuration 372 (i.e. synapse -sample 372)</p>
-<p>Throttle policy is loaded from the &#x201c;throttle_policy. xml&#x201d; . That policy contains merging policy from sample 370 and 371. To check the functionality, it requires to run a load test. The all enabled request from the concurrency throttling will be controlled by the access rate base throttling according to the policy. </p>
-<p>Run the client as follows </p>
-<pre xml:space="preserve">ant stockquote -Daddurl=http://localhost:8280/services/StockQuoteProxy</pre>
-<div>
-<p>You will get same results as in sample 371. If you run the load test, results will be different due to the effect of concurrency throttling. </p></div>
-<h2>
-<a name="Class" id="Class">Extending the mediation in java (Class Mediator)</a></h2>
-<p>Class mediator can be used to write your own custom mediation in Java and you have access to the SynapseMessageContext and to the full Synapse API in there. This is a useful extension mechanism within Synapse to extend its functionality. This class can contain fields for which you can assign values at runtime through the configuration. </p>
-<h2>
-<a name="Sample380" id="Sample380">Sample 380: Writing your own custom mediation in Java</a></h2>
-<pre xml:space="preserve">&lt;definitions xmlns=&quot;http://ws.apache.org/ns/synapse&quot;&gt;
-
-    &lt;sequence name=&quot;fault&quot;&gt;
-        &lt;makefault&gt;
-            &lt;code value=&quot;tns:Receiver&quot; xmlns:tns=&quot;http://www.w3.org/2003/05/soap-envelope&quot;/&gt;
-            &lt;reason value=&quot;Mediation failed.&quot;/&gt;
-        &lt;/makefault&gt;
-        &lt;send/&gt;
-    &lt;/sequence&gt;
-
-    &lt;sequence name=&quot;main&quot; onError=&quot;fault&quot;&gt;
-        &lt;in&gt;
-            &lt;send&gt;
-                &lt;endpoint name=&quot;stockquote&quot;&gt;
-                    &lt;address uri=&quot;http://localhost:9000/services/SimpleStockQuoteService&quot;/&gt;
-                &lt;/endpoint&gt;
-            &lt;/send&gt;
-        &lt;/in&gt;
-        &lt;out&gt;
-            &lt;class name=&quot;samples.mediators.DiscountQuoteMediator&quot;&gt;
-                &lt;property name=&quot;discountFactor&quot; value=&quot;10&quot;/&gt;
-                &lt;property name=&quot;bonusFor&quot; value=&quot;5&quot;/&gt;
-            &lt;/class&gt;
-            &lt;send/&gt;
-        &lt;/out&gt;
-    &lt;/sequence&gt;
-
-&lt;/definitions&gt;</pre>
-
-<p>
-<strong>Objective: Demonstrate the use of Class mediator to extend the mediation functionality</strong> </p>
-<p>
-<strong>Prerequisites:</strong>
-<br/>Make sure the synapse-samples-1.0.jar is in your class path (by default this jar is placed in the lib directory when installing Synapse)
-<br/>Start Synapse with the sample configuration 380 (i.e. synapse -sample 380)
-<br/>Start the sample Axis2 server and deploy the SimpleStockQuoteService. </p>
-
-<p>In this configuration, Synapse hands over the request message to the specified endpoint, which sends it to the Axis2 server running on port 9000. </p>
-<p>But the response message is passed through the class mediator before sending it back to the client. Two parameters named &quot;discountFactor&quot; </p>
-<p>and &quot;bonusFor&quot; are passed to the instance mediator implementation class (i.e. samples.mediators.DiscountQuoteMediator) before each </p>
-<p>invocation. Code of the mediator implementation class is shown below. </p>
-<pre xml:space="preserve">package samples.mediators;
-
-import org.apache.synapse.MessageContext;
-import org.apache.synapse.Mediator;
-import org.apache.axiom.om.OMElement;
-import org.apache.axiom.om.OMAbstractFactory;
-import org.apache.axiom.om.OMFactory;
-import org.apache.axiom.soap.SOAPFactory;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-import javax.xml.namespace.QName;
-
-public class DiscountQuoteMediator implements Mediator {
-
-    private static final Log log = LogFactory.getLog(DiscountQuoteMediator.class);
-
-    private String discountFactor=&quot;10&quot;;
-
-    private String bonusFor=&quot;10&quot;;
-
-    private int bonusCount=0;
-
-    public DiscountQuoteMediator(){}
-
-    public boolean mediate(MessageContext mc) {
-
-        String price= mc.getEnvelope().getBody().getFirstElement().getFirstElement().
-                getFirstChildWithName(new QName(&quot;http://services.samples/xsd&quot;,&quot;last&quot;)).getText();
-
-        //converting String properties into integers
-        int discount=Integer.parseInt(discountFactor);
-        int bonusNo=Integer.parseInt(bonusFor);
-        double currentPrice=Double.parseDouble(price);
-
-        //discounting factor is deducted from current price form every response
-        Double lastPrice = new Double(currentPrice - currentPrice * discount / 100);
-
-        //Special discount of 5% offers for the first responses as set in the bonusFor property
-        if (bonusCount &lt;= bonusNo) {
-            lastPrice = new Double(lastPrice.doubleValue() - lastPrice.doubleValue() * 0.05);
-            bonusCount++;
-        }
-
-        String discountedPrice = lastPrice.toString();
-
-        mc.getEnvelope().getBody().getFirstElement().getFirstElement().getFirstChildWithName
-                (new QName(&quot;http://services.samples/xsd&quot;,&quot;last&quot;)).setText(discountedPrice);
-
-        System.out.println(&quot;Quote value discounted.&quot;);
-        System.out.println(&quot;Original price: &quot; + price);
-        System.out.println(&quot;Discounted price: &quot; + discountedPrice);
-
-        return true;
-    }
-
-    public String getType() {
-        return null;
-    }
-
-    public void setTraceState(int traceState) {
-        traceState = 0;
-    }
-
-    public int getTraceState() {
-        return 0;
-    }
-
-    public void setDiscountFactor(String discount) {
-        discountFactor=discount;
-    }
-
-    public String getDiscountFactor() {
-        return discountFactor;
-    }
-
-    public void setBonusFor(String bonus){
-        bonusFor=bonus;
-    }
-
-    public String getBonusFor(){
-        return bonusFor;
-    }
-}</pre>
-<p>All classes developed for class mediation should implement the Mediator interface, which contains the mediate(...) method. mediate(...) method of the above class is invoked for each response message mediated through the main sequence, with the message context of the current message as the parameter. All details of the message including the SOAP headers, SOAP body and properties of the context hierarchy can be accessed from the message context. In this sample, the body of the message is retrieved and the discount percentage is subtracted from the quote price. If the quote request number is less than the number specified in the &quot;bonusFor&quot; property in the configuration, a special discount is given. </p>
-
-<p>Now run the client using the following command. </p>
-<pre xml:space="preserve">ant stockquote -Dsymbol=IBM -Dmode=quote -Daddurl=http://localhost:8280</pre>
-<p>You will see the below output in the client console with the discounted quote value. </p>
-<pre xml:space="preserve">[java] Standard :: Stock price = $138.77458254967408</pre>
-<p>Now check the console running Synapse. You will see the original value and the discounted value for the requested quote as follows. </p>
-<pre xml:space="preserve">Quote value discounted.
-Original price: 162.30945327447262
-Discounted price: 138.77458254967408</pre>
-<p/>
-<h2>        
-<a name="Sample381" id="Sample381">Sample 381:Class mediator to CBR binary messages</a></h2>
-<pre xml:space="preserve">&lt;definitions xmlns=&quot;http://ws.apache.org/ns/synapse&quot;&gt;
-	&lt;proxy name=&quot;JMSBinaryProxy&quot; transports=&quot;jms&quot;&gt;
-		&lt;target inSequence=&quot;BINARY_CBR_SEQ&quot; /&gt;
-	&lt;/proxy&gt;
-	&lt;sequence name=&quot;BINARY_CBR_SEQ&quot;&gt;
-		&lt;in&gt;
-			&lt;log level=&quot;full&quot; /&gt;
-			&lt;property action=&quot;set&quot; name=&quot;OUT_ONLY&quot; value=&quot;true&quot; /&gt;
-			&lt;class name=&quot;samples.mediators.BinaryExtractMediator&quot;&gt;
-				&lt;property name=&quot;offset&quot; value=&quot;11&quot; /&gt;
-				&lt;property name=&quot;length&quot; value=&quot;4&quot; /&gt;
-				&lt;property name=&quot;variableName&quot; value=&quot;symbol&quot; /&gt;
-				&lt;property name=&quot;binaryEncoding&quot; value=&quot;utf-8&quot; /&gt;
-			&lt;/class&gt;
-			&lt;log level=&quot;custom&quot;&gt;
-				&lt;property name=&quot;symbol&quot;
-					expression=&quot;get-property('symbol')&quot; /&gt;
-			&lt;/log&gt;
-			&lt;switch source=&quot;get-property('symbol')&quot;&gt;
-				&lt;case regex=&quot;GOOG&quot;&gt;
-					&lt;send&gt;
-						&lt;endpoint&gt;
-							&lt;address
-								uri=&quot;jms:/dynamicTopics/mdd.GOOG?transport.jms.ConnectionFactoryJNDIName=TopicConnectionFactory&amp;amp;java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory&amp;amp;java.naming.provider.url=tcp://localhost:61616&amp;amp;transport.jms.DestinationType=topic&quot; /&gt;
-						&lt;/endpoint&gt;
-					&lt;/send&gt;
-				&lt;/case&gt;
-				&lt;case regex=&quot;MSFT&quot;&gt;
-					&lt;send&gt;
-						&lt;endpoint&gt;
-							&lt;address
-								uri=&quot;jms:/dynamicTopics/mdd.MSFT?transport.jms.ConnectionFactoryJNDIName=TopicConnectionFactory&amp;amp;java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory&amp;amp;java.naming.provider.url=tcp://localhost:61616&amp;amp;transport.jms.DestinationType=topic&quot; /&gt;
-						&lt;/endpoint&gt;
-					&lt;/send&gt;
-				&lt;/case&gt;
-				&lt;default&gt;&lt;/default&gt;
-			&lt;/switch&gt;
-		&lt;/in&gt;
-	&lt;/sequence&gt;
-&lt;/definitions&gt;</pre>
-
-<p>
-<strong>Objective: Demonstrate on CBR a message with binary payload</strong> </p>
-<p>
-<strong>Prerequisites:</strong>
-<br/>Make sure the synapse-samples-1.0.jar is in your class path (by default this jar is placed in the lib directory when installing Synapse)
-<br/>Configure JMS transport using ActiveMQ (refer <a href="Synapse_Samples_Setup.html">Sample Configuration Guide </a>)
-<br/>Start Synapse with the sample configuration 381 (i.e. synapse -sample 381) </p>
-
-<p>In this configuration, a proxy has configured to accept incoming JMS messages. JMS messages contains a binary payload. User configure the offset, length, binary encoding of the text literal that it need to use for CBR. And a variable name to set the  decoded value as a property. Configuration simply route the messages based on the text to different endpoints. </p>
-<p>A JMS producer and two instances of a consumer used to demonstrate the CBR functionality.</p>
-<p>Now run the first consumer using the following command. </p>
-<pre xml:space="preserve">ant mddconsumer -Djms_topic=mdd.MSFT</pre>
-<p>Now run the second consumer using the following command. </p>
-<pre xml:space="preserve">ant mddconsumer -Djms_topic=mdd.GOOG</pre>
-<p>Now run the market data producer to genenrate market data for symbol 'MSFT' using the following command. </p>
-<pre xml:space="preserve">ant mddproducer -Dsymbol=MSFT</pre>
-<p>Now run the market data producer to genenrate market data for symbol 'GOOG' using the following command. </p>
-<pre xml:space="preserve">ant mddproducer -Dsymbol=GOOG</pre>
-<p>You will see the below output in the client console(s) based on the symbol. </p>
-<pre xml:space="preserve">mddconsumer:
-     [java]  Market data recived for symbol : topic://mdd.MSFT
-     [java]  Market data recived for symbol : topic://mdd.MSFT</pre>
-<p/>
-<h2>
-<a name="XQuery" id="XQuery">Evaluating XQuery for mediation (XQuery Mediator)</a></h2>
-<h2>
-<a name="Sample390" id="Sample390">Sample 390: Introduction to the XQuery mediator</a></h2>
-<pre xml:space="preserve">    &lt;!-- Introduction to the XQuery mediator --&gt;
-&lt;definitions xmlns=&quot;http://ws.apache.org/ns/synapse&quot;&gt;
-
-    &lt;!-- the SimpleURLRegistry allows access to a URL based registry (e.g. file:/// or http://) --&gt;
-    &lt;registry provider=&quot;org.apache.synapse.registry.url.SimpleURLRegistry&quot;&gt;
-        &lt;!-- the root property of the simple URL registry helps resolve a resource URL as root + key --&gt;
-        &lt;parameter name=&quot;root&quot;&gt;file:repository/conf/sample/resources/&lt;/parameter&gt;
-        &lt;!-- all resources loaded from the URL registry would be cached for this number of milli seconds --&gt;
-        &lt;parameter name=&quot;cachableDuration&quot;&gt;15000&lt;/parameter&gt;
-    &lt;/registry&gt;
-
-    &lt;localEntry key=&quot;xquery-key-req&quot;
-                src=&quot;file:repository/conf/sample/resources/xquery/xquery_req.xq&quot;/&gt;
-    &lt;proxy name=&quot;StockQuoteProxy&quot;&gt;
-        &lt;target&gt;
-            &lt;inSequence&gt;
-                &lt;xquery key=&quot;xquery-key-req&quot;&gt;
-                    &lt;variable name=&quot;payload&quot; type=&quot;ELEMENT&quot;/&gt;
-                &lt;/xquery&gt;
-                &lt;send&gt;
-                    &lt;endpoint&gt;
-                        &lt;address uri=&quot;http://localhost:9000/services/SimpleStockQuoteService&quot;/&gt;
-                    &lt;/endpoint&gt;
-                &lt;/send&gt;
-            &lt;/inSequence&gt;
-            &lt;outSequence&gt;
-                &lt;out&gt;
-                    &lt;xquery key=&quot;xquery/xquery_res.xq&quot;&gt;
-                        &lt;variable name=&quot;payload&quot; type=&quot;ELEMENT&quot;/&gt;
-                        &lt;variable name=&quot;code&quot; type=&quot;STRING&quot;
-                                  expression=&quot;self::node()//m0:return/m0:symbol/child::text()&quot;
-                                  xmlns:m0=&quot;http://services.samples/xsd&quot;/&gt;
-                        &lt;variable name=&quot;price&quot; type=&quot;DOUBLE&quot;
-                                  expression=&quot;self::node()//m0:return/m0:last/child::text()&quot;
-                                  xmlns:m0=&quot;http://services.samples/xsd&quot;/&gt;
-                    &lt;/xquery&gt;
-                    &lt;send/&gt;
-                &lt;/out&gt;
-            &lt;/outSequence&gt;
-        &lt;/target&gt;
-        &lt;publishWSDL uri=&quot;file:repository/conf/sample/resources/proxy/sample_proxy_1.wsdl&quot;/&gt;
-    &lt;/proxy&gt;
-
-&lt;/definitions&gt; </pre>
-<p>
-<strong>Objective: </strong>Introduction transformation using XQuery mediator </p>
-<p>
-<strong>Prerequisites</strong>:
-<br/>Start the Synapse configuration numbered 390: i.e. synapse -sample 390
-<br/>Start the Axis2 server and deploy the SimpleStockQuoteService if not already done. </p>
-
-<p>This example uses the XQuery mediator to perform transformations. This sample behaves the same as sample number 8 and the only difference is that this sample uses XQuery instead of XSLT for transformation. </p>
-
-<p>Execute the custom quote client as 'ant stockquote -Dmode=customquote ...' </p>
-<pre xml:space="preserve">ant stockquote -Daddurl=http://localhost:8280/services/StockQuoteProxy -Dmode=customquote </pre>
-<p/>
-<h2>
-<a name="Sample391" id="Sample391">Sample 391: How to use data from an external XML document with in XQuery </a></h2>
-<pre xml:space="preserve">&lt;definitions xmlns=&quot;http://ws.apache.org/ns/synapse&quot;&gt;
-
-    &lt;!-- the SimpleURLRegistry allows access to  URL based registry (e.g. file:/// or http://) --&gt;
-    &lt;registry provider=&quot;org.apache.synapse.registry.url.SimpleURLRegistry&quot;&gt;
-        &lt;!-- the root property of the simple URL registry helps resolve a resource URL as root + key --&gt;
-        &lt;parameter name=&quot;root&quot;&gt;file:repository/conf/sample/resources/&lt;/parameter&gt;
-        &lt;!-- all resources loaded from the URL registry would be cached for this number of milli seconds --&gt;
-        &lt;parameter name=&quot;cachableDuration&quot;&gt;15000&lt;/parameter&gt;
-    &lt;/registry&gt;
-
-    &lt;proxy name=&quot;StockQuoteProxy&quot;&gt;
-        &lt;target&gt;
-            &lt;inSequence&gt;
-                &lt;send&gt;
-                    &lt;endpoint&gt;
-                        &lt;address uri=&quot;http://localhost:9000/services/SimpleStockQuoteService&quot;/&gt;
-                    &lt;/endpoint&gt;
-                &lt;/send&gt;
-            &lt;/inSequence&gt;
-            &lt;outSequence&gt;
-                &lt;out&gt;
-                    &lt;xquery key=&quot;xquery/xquery_commisson.xq&quot;&gt;
-                        &lt;variable name=&quot;payload&quot; type=&quot;ELEMENT&quot;&gt;&lt;/variable&gt;
-                            &lt;variable name=&quot;commission&quot; type=&quot;ELEMENT&quot; key=&quot;misc/commission.xml&quot;&gt;&lt;/variable&gt;
-                    &lt;/xquery&gt;
-                    &lt;send/&gt;
-                &lt;/out&gt;
-            &lt;/outSequence&gt;
-        &lt;/target&gt;
-        &lt;publishWSDL uri=&quot;file:repository/conf/sample/resources/proxy/sample_proxy_1.wsdl&quot;/&gt;
-    &lt;/proxy&gt;
-&lt;/definitions&gt;</pre>
-<p>
-<strong>Objective: Demonstrate the use of XQuery mediator to import external XML documents to the XQuery engine</strong> </p>
-<p>
-<strong>Prerequisites:</strong>
-<br/>Deploy the SimpleStockQuoteService in sample Axis2 server and start it on port 9000
-<br/>Start Synapse with the sample configuration 391 (i.e. synapse -sample 391). </p>
-<p>In this sample, data from commission.xml document is used inside XQuery . The stock quote price from the response and commission from the commission.xml document will be added and given as a new price . </p>
-<p>Invoke the client as follows. </p>
-<pre xml:space="preserve">ant stockquote -Daddurl=http://localhost:8280/services/StockQuoteProxy</pre>
-<h2>
-<a name="Splitter" id="Splitter">Splitting messages in to parts and process in parallel (Iterate / Clone)</a></h2>
-<h2>
-<a name="Sample400" id="Sample400">Sample 400: Message splitting and aggregating the responses</a></h2>
-<pre xml:space="preserve">&lt;definitions xmlns=&quot;http://ws.apache.org/ns/synapse&quot;&gt;
-
-    &lt;proxy name=&quot;SplitAggregateProxy&quot;&gt;
-        &lt;target&gt;
-            &lt;inSequence&gt;
-                &lt;iterate expression=&quot;//m0:getQuote/m0:request&quot; preservePayload=&quot;true&quot;
-                         attachPath=&quot;//m0:getQuote&quot;
-                         xmlns:m0=&quot;http://services.samples&quot;&gt;
-                    &lt;target&gt;
-                        &lt;sequence&gt;
-                            &lt;send&gt;
-                                &lt;endpoint&gt;
-                                    &lt;address
-                                        uri=&quot;http://localhost:9000/services/SimpleStockQuoteService&quot;/&gt;
-                                &lt;/endpoint&gt;
-                            &lt;/send&gt;
-                        &lt;/sequence&gt;
-                    &lt;/target&gt;
-                &lt;/iterate&gt;
-            &lt;/inSequence&gt;
-            &lt;outSequence&gt;
-                &lt;aggregate&gt;
-                    &lt;onComplete expression=&quot;//m0:getQuoteResponse&quot;
-                                xmlns:m0=&quot;http://services.samples&quot;&gt;
-                        &lt;send/&gt;
-                    &lt;/onComplete&gt;
-                &lt;/aggregate&gt;
-            &lt;/outSequence&gt;
-        &lt;/target&gt;
-    &lt;/proxy&gt;
-&lt;/definitions&gt;</pre>
-<p>
-<strong>Objective: Demonstrate the use of Iterate mediator to split the messages in to parts and process them asynchronously and then aggregate the responses coming in to Synapse</strong> </p>
-<p>
-<strong>Prerequisites:</strong>
-<br/>Deploy the SimpleStockQuoteService in sample Axis2 server and start it on port 9000
-<br/>Start Synapse with the sample configuration 400 (i.e. synapse -sample 400). </p>
-<p>In this sample, the message sent to Synapse is comprised of a number of elements of the same type. When Synapse receives this message it will iterate through those elements and then will send to the specified endpoint. When all the responses appear to Synapse then those messages will be aggregated to form the resultant response and will send back to the client. </p>
-<p>Invoke the client as follows. </p>
-<pre xml:space="preserve">ant stockquote -Daddurl=http://localhost:8280/services/SplitAggregateProxy -Ditr=4</pre>
-<h2>
-<a name="Cache" id="Cache">Caching the responses over the requests (Cache Mediator)</a></h2>
-<p>Cache mediator can be used to utilize the network bandwidth, to protect the backend service from being loaded with the same type of requests like browser refresh actions and also to speed up the execution of the web service. This mediator should be used with sense, because it is not applicable for each and every service (for example services with dynamic responses for a particular release) </p>
-<h2>
-<a name="Sample420" id="Sample420">Sample 420: Simple cache implemented on Synapse for the actual service</a></h2>
-<pre xml:space="preserve">&lt;definitions xmlns=&quot;http://ws.apache.org/ns/synapse&quot;&gt;
-    &lt;in&gt;
-        &lt;cache timeout=&quot;20&quot; scope=&quot;per-host&quot; collector=&quot;false&quot;
-               hashGenerator=&quot;org.wso2.caching.digest.DOMHASHGenerator&quot;&gt;
-            &lt;implementation type=&quot;memory&quot; maxSize=&quot;100&quot;/&gt;
-        &lt;/cache&gt;
-        &lt;send&gt;
-            &lt;endpoint&gt;
-                &lt;address uri=&quot;http://localhost:9000/services/SimpleStockQuoteService&quot;/&gt;
-            &lt;/endpoint&gt;
-        &lt;/send&gt;
-    &lt;/in&gt;
-    &lt;out&gt;
-        &lt;cache collector=&quot;true&quot;/&gt;
-        &lt;send/&gt;
-    &lt;/out&gt;
-&lt;/definitions&gt;</pre>
-<p>
-<strong>Objective: Demonstrate the use of Cache mediator in order to cache the response and use that cached response as the response for an identical xml request</strong> </p>
-<p>
-<strong>Prerequisites:</strong>
-<br/>Deploy the SimpleStockQuoteService in sample Axis2 server and start it on port 9000
-<br/>Start Synapse with the sample configuration 420 (i.e. synapse -sample 420)</p>
-<p>In this sample, the message sent to Synapse is checked for an existing cached response by calculating the hash value of the request. If there is a cache hit in Synapse then this request will not be forwarded to the actual service, rather Synapse responds to the client with the cached response. In case of a cache miss that particular message will be forwarded to the actual service and caches that response in the out path for the use of consecutive requests of the same type. </p>
-<p>To observe this behaviour, invoke the client as follows. </p>
-<pre xml:space="preserve">ant stockquote -Dtrpurl=http://localhost:8280/</pre>
-<p>You could notice that if you send more than one requests within 20 seconds only the first request is forwarded to the actual service, and the rest of the requests will be served by the cache inside Synapse. You could observe this by looking at the printed line of the axis2 server, as well as by observing a constant rate as the response to the client instead of the random rate, which changes by each and every 20 seconds.
-<br/> </p>
-<h2>
-<a name="Callout" id="Callout">Synchronous Web Services Invocations with the Callout Mediator</a></h2>
-<p>The Callout mediator calls the given service URL with the request message which is given by the source attribute, waits for the response and attaches the received response to the destination which is given by the target attribute. Both the source and the target can be a key or an XPath. In the case of the source, this key refers to either a message context property or to a local entry. For the target, this key refers to a message context property only. </p>
-<h2>
-<a name="Sample430" id="Sample430">Sample 430: Simple Callout Mediator for synchronizing web service invocation</a></h2>
-<pre xml:space="preserve">    &lt;!-- Simple callout  mediator --&gt;
-&lt;definitions xmlns=&quot;http://ws.apache.org/ns/synapse&quot;&gt;
-    &lt;callout serviceURL=&quot;http://localhost:9000/services/SimpleStockQuoteService&quot;
-             action=&quot;urn:getQuote&quot;&gt;
-        &lt;source xmlns:s11=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot;
-                xmlns:s12=&quot;http://www.w3.org/2003/05/soap-envelope&quot;
-                xpath=&quot;s11:Body/child::*[fn:position()=1] | s12:Body/child::*[fn:position()=1]&quot;/&gt;
-        &lt;target xmlns:s11=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot;
-                xmlns:s12=&quot;http://www.w3.org/2003/05/soap-envelope&quot;
-                xpath=&quot;s11:Body/child::*[fn:position()=1] | s12:Body/child::*[fn:position()=1]&quot;/&gt;
-    &lt;/callout&gt;
-    &lt;property name=&quot;RESPONSE&quot; value=&quot;true&quot;/&gt;
-    &lt;header name=&quot;To&quot; action=&quot;remove&quot;/&gt;
-    &lt;send/&gt;
-    &lt;drop/&gt;
-&lt;/definitions&gt; </pre>
-<div>
-<p>
-<strong>Objective:</strong> Demonstrate the use of the callout mediator for the synchronized web service invocation </p>
-<p>
-<strong>Prerequisites:</strong>
-<br/>Deploy the SimpleStockQuoteService in sample Axis2 server and start it on port 9000
-<br/>Start Synapse with the sample configuration 430 (i.e. synapse -sample 430)</p>
-<p>In this sample, the callout mediator does the direct service invocation to the StockQuoteService using the client request, gets the response and sets it as the first child of the SOAP message body. Then using the send mediator, the message is sent back to the client. </p>
-<p>Invoke the client as follows. </p>
-<pre xml:space="preserve">ant stockquote -Daddurl=http://localhost:9000/services/SimpleStockQuoteService -Dtrpurl=http://localhost:8280/</pre></div>
-<h2>
-    <a name="Sample440" id="Sample440">Sample 440: Exposing a SOAP Service Over JSON</a>
-</h2>
-<pre xml:space="preserve">&lt;definitions xmlns="http://ws.apache.org/ns/synapse"&gt;
-
-    &lt;proxy name="JSONProxy" transports="http https"&gt;
-        &lt;target&gt;
-            &lt;endpoint&gt;
-                &lt;address uri="http://localhost:9000/services/SimpleStockQuoteService"/&gt;
-            &lt;/endpoint&gt;
-            &lt;inSequence&gt;
-                &lt;log level="full"/&gt;
-                &lt;xslt key="in_transform"/&gt;
-                &lt;property name="messageType" scope="axis2" value="text/xml"/&gt;
-            &lt;/inSequence&gt;
-            &lt;outSequence&gt;
-                &lt;log level="full"/&gt;
-                &lt;xslt key="out_transform"/&gt;
-                &lt;property name="messageType" scope="axis2" value="application/json"/&gt;
-                &lt;send/&gt;
-            &lt;/outSequence&gt;
-        &lt;/target&gt;
-    &lt;/proxy&gt;
-
-    &lt;localEntry key="in_transform"&gt;
-        &lt;xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                        xmlns:fn="http://www.w3.org/2005/02/xpath-functions"
-                        xmlns:m0="http://services.samples" version="2.0" exclude-result-prefixes="m0 fn"&gt;
-            &lt;xsl:output method="xml" omit-xml-declaration="yes" indent="yes"/&gt;
-            &lt;xsl:template match="*"&gt;
-                &lt;xsl:element name="{local-name()}" namespace="http://services.samples"&gt;
-                    &lt;xsl:copy-of select="attribute::*"/&gt;
-                    &lt;xsl:apply-templates/&gt;
-                &lt;/xsl:element&gt;
-            &lt;/xsl:template&gt;
-        &lt;/xsl:stylesheet&gt;
-    &lt;/localEntry&gt;
-
-    &lt;localEntry key="out_transform"&gt;
-        &lt;xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"&gt;
-            &lt;xsl:output method="xml" version="1.0" encoding="UTF-8"/&gt;
-            &lt;xsl:template match="*"&gt;
-                &lt;xsl:element name="{local-name()}"&gt;
-                    &lt;xsl:apply-templates/&gt;
-                &lt;/xsl:element&gt;
-            &lt;/xsl:template&gt;
-        &lt;/xsl:stylesheet&gt;
-    &lt;/localEntry&gt;
-
-&lt;/definitions&gt;</pre>
-<div>
-<p>
-<strong>Objective:</strong> Demonstrate the ability to switch between JSON and XML/SOAP content interchange formats</p>
-<p>
-<strong>Prerequisites:</strong>
-<br/>Deploy the SimpleStockQuoteService in sample Axis2 server and start it on port 9000
-<br/>Setup Synapse and the sample Axis2 client for JSON (Refer <a href="Synapse_Samples_Setup.html#json">Synapse Samples Setup Guide</a>
-for details)
-<br/>Start Synapse with the sample configuration 440 (i.e. synapse -sample 440)</p>
-<p>Invoke the JSON client as follows. </p>
-<pre xml:space="preserve">ant jsonclient -Daddurl=http://localhost:9000/services/SimpleStockQuoteService -Dtrpurl=http://localhost:8280/services/JSONProxy</pre>
-<p>JSON client will send a stockquote request to Synapse using the JSON content interchange format. Synapse
-will trnasform it into a SOAP request and forward to the Axis2 server. The SOAP response from the Axis2 server
-will be converted into a JSON message and sent back to the JSON client.</p>
-<p>You may use a tool like TCPMon to monitor the JSON requests sent over the wire. A sample JSON request and response
- is shown below:</p>
-<pre>{"getQuote":{"request":{"symbol":"IBM"}}}</pre>
-<pre>{"getQuoteResponse":{"return":{"change":3.853593376681722,"earnings":12.802850763714854,"high":67.92488310190126,"last":66.14619264746406,"lastTradeTimestamp":"Mon Aug 23 16:48:40 IST 2010","low":-66.04000424423522,"marketCap":-9334516.42324327,"name":"IBM Company","open":-64.61950137150009,"peRatio":-19.78600441437058,"percentageChange":5.411779328273005,"prevClose":71.2075112994578,"symbol":"IBM","volume":16842}}}</pre>
-</div>
-
-<h2>
-    <a name="Sample450" id="Sample450">Sample 450: Introduction to the URL Rewrite Mediator</a>
-</h2>
-<pre xml:space="preserve">&lt;definitions xmlns="http://ws.apache.org/ns/synapse"&gt;
-    &lt;sequence xmlns="http://ws.apache.org/ns/synapse" name="main"&gt;
-        &lt;in&gt;
-            &lt;rewrite&gt;
-               &lt;rewriterule&gt;
-                  &lt;action type="replace" regex="soap" value="services" fragment="path"/&gt;
-               &lt;/rewriterule&gt;
-            &lt;/rewrite&gt;
-            &lt;send/&gt;
-        &lt;/in&gt;
-        &lt;out&gt;
-            &lt;send/&gt;
-        &lt;/out&gt;
-    &lt;/sequence&gt;
-&lt;/definitions&gt;</pre>
-<div>
-<p>
-<strong>Objective:</strong> Demonstrate the basic functions of the URL rewrite mediator</p>
-<p>
-<strong>Prerequisites:</strong>
-<br/>Deploy the SimpleStockQuoteService in sample Axis2 server and start it on port 9000
-<br/>Start Synapse with the sample configuration 450 (i.e. synapse -sample 450)</p>
-<p>Invoke the Axis2 client as follows. </p>
-<pre xml:space="preserve">ant stockquote -Dtrpurl=http://localhost:8280 -Daddurl=http://localhost:9000/soap/SimpleStockQuoteService</pre>
-<p>Note that the address URL of the client request contains the context 'soap'. But in the Axis2 server all the
-services are deployed under a context named 'services' by default. Synapse will rewrite the To header of the request
-by replacing the 'soap' context with 'services. Hence the request will be delivered to the Axis2 server and the
-Axis2 client will receive a valid response.</p>
-</div>
-<h2>
-    <a name="Sample451" id="Sample451">Sample 451: Conditional URL Rewriting</a>
-</h2>
-<pre xml:space="preserve">&lt;definitions xmlns="http://ws.apache.org/ns/synapse"&gt;
-    &lt;sequence xmlns="http://ws.apache.org/ns/synapse" name="main"&gt;
-        &lt;in&gt;
-            &lt;rewrite&gt;
-               &lt;rewriterule&gt;
-                  &lt;condition&gt;
-                     &lt;and&gt;
-                        &lt;equal type="url" source="host" value="localhost"/&gt;
-                        &lt;not&gt;
-                           &lt;equal type="url" source="protocol" value="https"/&gt;
-                        &lt;/not&gt;
-                     &lt;/and&gt;
-                  &lt;/condition&gt;
-                  &lt;action fragment="protocol" value="https"/&gt;
-                  &lt;action fragment="port" value="9002"/&gt;
-               &lt;/rewriterule&gt;
-            &lt;/rewrite&gt;
-            &lt;log level="full"/&gt;
-            &lt;send/&gt;
-        &lt;/in&gt;
-        &lt;out&gt;
-            &lt;send/&gt;
-        &lt;/out&gt;
-    &lt;/sequence&gt;
-&lt;/definitions&gt;</pre>
-<div>
-<p>
-<strong>Objective:</strong> Demonstrate the ability of the URL rewrite mediator to evaluate conditions on messages and
-perform rewrites based on the results.</p>
-<p>
-<strong>Prerequisites:</strong>
-<br/>Deploy the SimpleStockQuoteService in sample Axis2 server and start it on port 9000
-<br/>Start Synapse with the sample configuration 451 (i.e. synapse -sample 451)</p>
-<p>Invoke the Axis2 client and send some requests to Synapse with different address URL values. If the address
-URL value contains localhost as the hostname and https as the protocol prefix, Synapse will route the message as
-it is. But if the hostname is localhost and the protocol is not https, Synapse will rewrite the URL by setting
-https as the protocol. The port number will also be set to the HTTPS port of the Axis2 server.</p>
-<p>The condition evaluation feature is provided by the Synapse evaluator framework. Currently one can evaluate
-expressions on URL values, query parameters, transport headers, properties and SOAP envelope content using this
-framework. Hence URL rewriting can be done based on any of these aspects.</p>    
-</div>
-
-<h2>
-    <a name="Sample452" id="Sample452">Sample 452: Conditional URL Rewriting with Multiple Rules</a>
-</h2>
-<pre xml:space="preserve">&lt;definitions xmlns="http://ws.apache.org/ns/synapse"&gt;
-    &lt;sequence name="main"&gt;
-        &lt;in&gt;
-            &lt;property name="http.port" value="9000"/&gt;
-            &lt;property name="https.port" value="9002"/&gt;
-            &lt;rewrite&gt;
-                &lt;rewriterule&gt;
-                    &lt;action fragment="host" value="localhost"/&gt;
-                    &lt;action fragment="path" type="prepend" value="/services"/&gt;
-                &lt;/rewriterule&gt;
-                &lt;rewriterule&gt;
-                    &lt;condition&gt;
-                        &lt;equal type="url" source="protocol" value="http"/&gt;
-                    &lt;/condition&gt;
-                    &lt;action fragment="port" xpath="get-property('http.port')"/&gt;
-                &lt;/rewriterule&gt;
-                &lt;rewriterule&gt;
-                    &lt;condition&gt;
-                        &lt;equal type="url" source="protocol" value="https"/&gt;
-                    &lt;/condition&gt;
-                    &lt;action fragment="port" xpath="get-property('https.port')"/&gt;
-                &lt;/rewriterule&gt;
-            &lt;/rewrite&gt;
-            &lt;log level="full"/&gt;
-            &lt;send/&gt;
-        &lt;/in&gt;
-        &lt;out&gt;
-            &lt;send/&gt;
-        &lt;/out&gt;
-    &lt;/sequence&gt;
-&lt;/definitions&gt;</pre>
-<div>
-<p>
-<strong>Objective:</strong> Demonstrate the ability of the URL rewrite mediator to perform rewrites based
-on multiple rules.</p>
-<p>
-<strong>Prerequisites:</strong>
-<br/>Deploy the SimpleStockQuoteService in sample Axis2 server and start it on port 9000
-<br/>Start Synapse with the sample configuration 452 (i.e. synapse -sample 452)</p>
-<p>Invoke the Axis2 client as follows. </p>
-<pre xml:space="preserve">ant stockquote -Dtrpurl=http://localhost:8280 -Daddurl=http://test.com/SimpleStockQuoteService</pre>
-<p>The provided address URL does not contain a port number and the context. The URL rewrite mediator will replace
-the hostname to be 'localhost' and add the context '/services' to the path. Then it will add the appropriate
-port number to the URL by looking at the protocol prefix. Ultimately the service request will be routed the sample Axis2
-server and the client will receive a valid response.</p>
-<p>Another important aspect shown by this sample is the ability of the URL rewirte mediator to obtain the necessary
-values by executing XPath expressions. The port numbers are calculated by executing an XPath on the messages.</p>
-</div>
-
-<h2>
-<a name="Sample460" id="Sample460">Sample 460: How to initialize and use a Spring Bean as a Mediator</a></h2>
-<pre xml:space="preserve">&lt;definitions xmlns="http://ws.apache.org/ns/synapse"&gt;
-
-    &lt;registry provider="org.apache.synapse.registry.url.SimpleURLRegistry"&gt;
-        &lt;parameter name="root">file:repository/conf/sample/resources/&lt;/parameter&gt;
-        &lt;parameter name="cachableDuration">15000&lt;/parameter&gt;
-    &lt;/registry&gt;
-
-    &lt;sequence name="main"&gt;
-        &lt;!--Setting the Spring Mediator and its Spring Beans xml file location --&gt;
-        &lt;!--Note that springtest is the bean id used in springCustomLogger.xml --&gt;
-        &lt;spring bean="springtest" key="spring/springCustomLogger.xml"/&gt;
-        &lt;send/&gt;
-    &lt;/sequence&gt;
-
-&lt;/definitions&gt;
-
-</pre>
-<p>springCustomLogger.xml file</p>
-<pre xml:space="preserve">
-&lt;?xml version="1.0" encoding="UTF-8"?&gt;
-&lt;!DOCTYPE beans PUBLIC  "-//SPRING//DTD BEAN//EN"
-    "http://www.springframework.org/dtd/spring-beans.dtd"&gt;
-
-&lt;beans&gt;
-
-   &lt;bean id="springtest" class="samples.mediators.extentions.SpringCustomLogger" singleton="false"&gt;
-	   &lt;property name="userName"&gt;&lt;value&gt;"Synapse User"&lt;/value&gt;&lt;/property&gt;
-	   &lt;property name="email"&gt;&lt;value&gt;"usr@synapse.org"&lt;/value&gt;&lt;/property&gt;
-   &lt;/bean&gt;
-
-&lt;/beans&gt;
-
-</pre>
-<div>
-<p>
-<strong>Objective:</strong> Demonstrate How to initialize and use a SpringBean as a mediator  </p>
-<p>
-<strong>Prerequisites:</strong>
-<br/>Deploy the SimpleStockQuoteService in sample Axis2 server and start it on port 9000
-<br/>Start Synapse with the sample configuration 460 (i.e. synapse -sample 460)</p>
-<p>In this sample, the Spring Bean, SpringCustomLogger get initialized using springCustomLogger.xml file and then it log the message Id.</p>
-<p>Invoke the client as follows. </p>
-<pre xml:space="preserve">ant stockquote -Daddurl=http://localhost:9000/services/SimpleStockQuoteService -Dtrpurl=http://localhost:8280/</pre>
-<p>If you have enabled logging for the samples.mediators package you will see an output similar to the
-following on the console:</p>
-<pre xml:space="preserve">2010-09-26 20:46:57,946 [-] [HttpServerWorker-1]  INFO SpringCustomLogger Starting Spring Meditor
-2010-09-26 20:46:57,946 [-] [HttpServerWorker-1]  INFO SpringCustomLogger Bean in Initialized with User:["Synapse User"]
-2010-09-26 20:46:57,946 [-] [HttpServerWorker-1]  INFO SpringCustomLogger E-MAIL:["usr@synapse.org"]
-2010-09-26 20:46:57,946 [-] [HttpServerWorker-1]  INFO SpringCustomLogger Massage Id:  urn:uuid:383FA8B27D7CC549D91285514217720
-2010-09-26 20:46:57,946 [-] [HttpServerWorker-1]  INFO SpringCustomLogger Logged....</pre>
-</div>
-    
-   <h2>
-      <a name="Sample500" id="Sample500">Sample 500: Simple Eventing Sample</a>
-    </h2>
-<pre xml:space="preserve">&lt;!-- Simple Eventing configuration --&gt;
-&lt;definitions xmlns=&quot;http://ws.apache.org/ns/synapse&quot;&gt;
-     &lt;eventSource name=&quot;SampleEventSource&quot;&gt;
-           &lt;subscriptionManager class=&quot;org.apache.synapse.eventing.managers.DefaultInMemorySubscriptionManager&quot;&gt;
-               &lt;property name=&quot;topicHeaderName&quot; value=&quot;Topic&quot;/&gt;
-               &lt;property name=&quot;topicHeaderNS&quot; value=&quot;http://apache.org/aip&quot;/&gt;
-           &lt;/subscriptionManager&gt;
-     &lt;/eventSource&gt;
-
-    &lt;sequence name=&quot;PublicEventSource&quot; &gt;
-           &lt;log level=&quot;full&quot;/&gt;
-           &lt;eventPublisher eventSourceName=&quot;SampleEventSource&quot;/&gt;
-    &lt;/sequence&gt;
-
-    &lt;proxy name=&quot;EventingProxy&quot;&gt;
-        &lt;target inSequence=&quot;PublicEventSource&quot; /&gt;
-    &lt;/proxy&gt;
-&lt;/definitions&gt;</pre>
-    <div>
-      <p>
-        <strong>Objective:</strong> Demonstrate the use of the Eventing functionality built with Synapse
-      </p>
-      <p>
-        <strong>Prerequisites:</strong>
-        <br/>Deploy the SimpleStockQuoteService in sample Axis2 server and start it on port 9000
-        <br/>Start Synapse with the sample configuration 500 (i.e. synapse -sample 500)
-      </p>
-      <p>
-        In this sample, the event source creted based on the configuration. Event subscriber subscribes for the events, Event sender publish events and the SimpleStockQuoteService act as the Event Sink.
-      </p>
-      <p>
-        Invoke the client (Subscriber) as follows:
-      </p>
-<pre xml:space="preserve">ant eventsubscriber</pre>
-      <p>
-        This will create a new subscription with the SimpleStockQuoteService deployed on the sample
-        Axis2 server acting as the sink: whenever a new event is published, SimpleStockQuoteService
-        will receive a message with that event.
-        You should see a message like this:
-      </p>
-<pre>[java] Subscription identifier: urn:uuid:6989F66706E73C69F5259116575749162017010321</pre>
-      <p>
-        You will need this identifier to modify the subscription in the next steps below.
-        Now, invoke the client (Sender) as follows:
-      </p>
-<pre xml:space="preserve">ant eventsender</pre>
-      <p>
-        This will send a placeOrder message to the EventingProxy. You should see this message in the
-        Synapse logs. Note the presence of the following SOAP header in the request:
-      </p>
-<pre>&lt;aip:Topic xmlns:aip="http://apache.org/aip">synapse/event/test&lt;/aip:Topic></pre>
-      <p>
-        Since there is a single subscription with SimpleStockQuoteService as the sink, Synapse will
-        send the message to the sample Axis2 server and you should see the following message in
-        its logs:
-      </p>
-<pre>Accepted order for : 1000 stocks of GOOG at $ 10.1</pre>
-      <p>
-        To get the current status of the subscription, invoke the client as follows:
-      </p>
-<pre xml:space="preserve">ant eventsubscriber -Dmode=getstatus -Didentifier=<i>&lt;identifier></i></pre>
-      <p>
-        To renew the subscription, invoke the client as follows:
-      </p>
-<pre xml:space="preserve">ant eventsubscriber -Dmode=renew -Didentifier=<i>&lt;identifier></i> -Dexpires=2009-12-31T21:07:00.000-08:00</pre>
-      <p>
-        Finally, in order to unsubscribe, use the following command:
-      </p>
-<pre xml:space="preserve">ant eventsubscriber -Dmode=unsubscribe -Didentifier=<i>&lt;identifier></i></pre>
-    </div>
-   <h2>
-      <a name="Sample501" id="Sample501">Sample 501: EventSource with static subscriptions</a>
-    </h2>
-<pre xml:space="preserve">&lt;!-- Eventing configuration with static subscriptions--&gt;
-&lt;definitions xmlns=&quot;http://ws.apache.org/ns/synapse&quot;&gt;
-     &lt;eventSource name=&quot;SampleEventSource&quot;&gt;
-           &lt;subscriptionManager class=&quot;org.apache.synapse.eventing.managers.DefaultInMemorySubscriptionManager&quot;&gt;
-               &lt;property name=&quot;topicHeaderName&quot; value=&quot;Topic&quot;/&gt;
-               &lt;property name=&quot;topicHeaderNS&quot; value=&quot;http://apache.org/aip&quot;/&gt;
-           &lt;/subscriptionManager&gt;
-           &lt;subscription id=&quot;mysub1&quot;&gt;
-                &lt;filter source =&quot;synapse/event/test&quot; dialect=&quot;http://synapse.apache.org/eventing/dialect/topicFilter&quot;/&gt;
-                &lt;endpoint&gt;&lt;address uri=&quot;http://localhost:9000/services/SimpleStockQuoteService&quot;/&gt;&lt;/endpoint&gt;
-           &lt;/subscription&gt;
-           &lt;subscription id=&quot;mysub2&quot;&gt;
-                &lt;filter source =&quot;synapse/event/test&quot; dialect=&quot;http://synapse.apache.org/eventing/dialect/topicFilter&quot;/&gt;
-                &lt;endpoint&gt;&lt;address uri=&quot;http://localhost:9000/services/SimpleStockQuoteService&quot;/&gt;&lt;/endpoint&gt;
-                &lt;expires&gt;2020-06-27T21:07:00.000-08:00&lt;/expires&gt;
-           &lt;/subscription&gt;
-     &lt;/eventSource&gt;
-
-    &lt;sequence name=&quot;PublicEventSource&quot; &gt;
-           &lt;log level=&quot;full&quot;/&gt;
-           &lt;eventPublisher eventSourceName=&quot;SampleEventSource&quot;/&gt;
-    &lt;/sequence&gt;
-
-    &lt;proxy name=&quot;EventingProxy&quot;&gt;
-        &lt;target inSequence=&quot;PublicEventSource&quot; /&gt;
-    &lt;/proxy&gt;
-&lt;/definitions&gt;</pre>
-    <div>
-      <p>
-        <strong>Objective:</strong> Demonstrate static subscription capability of Synapse
-      </p>
-      <p>
-        <strong>Prerequisites:</strong>
-        <br/>Deploy the SimpleStockQuoteService in sample Axis2 server and start it on port 9000
-        <br/>Start Synapse with the sample configuration 501 (i.e. synapse -sample 501)
-      </p>
-      <p>
-        In this sample, two static subscriptions created by providing the SimpleStockQuoteService as the event sink.
-      </p>
-        <p>
-          Invoke the client (Sender) as follows.
-        </p>
-<pre xml:space="preserve">ant eventsender</pre>
-      <p>
-        Event sender will send the events to the static subscriptions
-      </p>
-    </div>
-      <h2>
-         <a name="Sample502" id="Sample502">Sample 502: Transform events before publish</a>
-       </h2>
-       <p>
-         &#xa0;
-       </p>
-   <pre xml:space="preserve">&lt;!-- Eventing configuration with transformation before publish--&gt;
-&lt;definitions xmlns=&quot;http://ws.apache.org/ns/synapse&quot;&gt;
-     &lt;eventSource name=&quot;SampleEventSource&quot;&gt;
-           &lt;subscriptionManager class=&quot;org.apache.synapse.eventing.managers.DefaultInMemorySubscriptionManager&quot;&gt;
-               &lt;property name=&quot;topicHeaderName&quot; value=&quot;Topic&quot;/&gt;
-               &lt;property name=&quot;topicHeaderNS&quot; value=&quot;http://apache.org/aip&quot;/&gt;
-           &lt;/subscriptionManager&gt;
-           &lt;subscription id=&quot;mysub1&quot;&gt;
-                &lt;filter source =&quot;synapse/event/test&quot; dialect=&quot;http://synapse.apache.org/eventing/dialect/topicFilter&quot;/&gt;
-                &lt;endpoint&gt;&lt;address uri=&quot;http://localhost:9000/services/SimpleStockQuoteService&quot;/&gt;&lt;/endpoint&gt;
-           &lt;/subscription&gt;
-     &lt;/eventSource&gt;
-
-
-    &lt;sequence name=&quot;PublicEventSource&quot;&gt;
-           &lt;log level=&quot;full&quot;/&gt;
-           &lt;xslt key=&quot;xslt-key-req&quot;/&gt;
-           &lt;log level=&quot;full&quot;/&gt;
-           &lt;eventPublisher eventSourceName=&quot;SampleEventSource&quot;/&gt;
-    &lt;/sequence&gt;
-
-    &lt;proxy name=&quot;EventingProxy&quot;&gt;
-        &lt;target inSequence=&quot;PublicEventSource&quot; /&gt;
-    &lt;/proxy&gt;
-
-    &lt;localEntry key=&quot;xslt-key-req&quot; src=&quot;file:repository/conf/sample/resources/transform/transform_eventing.xslt&quot;/&gt;
-&lt;/definitions&gt;</pre>
-       <div>
-         <p>
-           <strong>Objective:</strong> Demonstrate the mediation capability of events before publishsing to event sink.
-         </p>
-         <p>
-           <strong>Prerequisites:</strong>
-           <br/>Deploy the SimpleStockQuoteService in sample Axis2 server and start it on port 9000
-           <br/>Start Synapse with the sample configuration 502 (i.e. synapse -sample 502)
-         </p>
-         <p>
-           In this sample, the event (order request) transform to a new order with different namesapce using XSLT mediator.
-         </p>
-           <p>
-             Invoke the client (Sender) as follows.
-           </p>
-   <pre xml:space="preserve">ant eventsender</pre>
-         <p>
-           Event publish after transformation.
-         </p>
-       </div>
-    
-       <h2>
-         <a name="Sample600" id="Sample600">Sample 600: File hierarchy based configuration builder</a>
-       </h2>
-       <p>
-         &#xa0;
-       </p>
-       <pre xml:space="preserve">
-         synapse_sample_600.xml
-            |-- endpoints
-            |   `-- foo.xml
-            |-- events
-            |   `-- event1.xml
-            |-- local-entries
-            |   `-- bar.xml
-            |-- proxy-services
-            |   |-- proxy1.xml
-            |   |-- proxy2.xml
-            |   `-- proxy3.xml
-            |-- registry.xml
-            |-- sequences
-            |   |-- custom-logger.xml
-            |   |-- fault.xml
-            |   `-- main.xml
-            |-- synapse.xml
-            `-- tasks
-                `-- task1.xml
-
-       </pre>
-       <div>
-         <p>
-           <strong>Objective:</strong> Demonstrate the ability to construct the Synapse configuration from a file hierarchy
-         </p>
-         <p>
-           <strong>Prerequisites:</strong>
-           <br/>Deploy the SimpleStockQuoteService in sample Axis2 server and start it on port 9000
-           <br/>Start Synapse with the sample configuration 600 (i.e. synapse -sample 600)
-         </p>
-         <p>
-            Go to the SYNAPSE_HOME/repository/conf/sample directory and locate the subdirectory named synapse_sample_600.xml
-            within it. When Synapse is started with the sample configuration 600, Synapse will load the configuration from
-            this directory. You will find a number of subdirectories and a set of XML files in each of those directories.
-            Synapse will parse all the XML files in this file hierarchy and construct the full Synapse configuration at startup. 
-            As a result when this sample is executed Synapse will start with four proxy services, several sequences, a task, an event
-            source and some endpoint and local entry definitions.
-         </p>
-         <p>
-            The names of the subdirectories (eg: proxy-services, sequences, endpoints) are fixed and hence cannot be changed.
-            Also the registry definition should go into a file named registry.xml which resides at the top level of the file
-            hierarchy. It can also be specified in the synapse.xml file at top level. This synapse.xml file can include
-            any item that can be normally defined in a synapse.xml file. The files which define proxy services, sequences,
-            endpoints etc can have any name. These configuration files must have the .xml extension at the end of the name. Synapse
-            will ignore any files which do not have the .xml extension.
-         </p>
-         <p>
-            None of the directories and files in the sample file hierachy are mandatory. You can leave entire directories out if
-            you do not need them. For example if your configuration does not contain any proxy services you can leave the
-            subdirectory named proxy-services out.
-         </p>
-         <p>
-            To use this feature you should simply pass a path to an existing directory when starting the Synapse server. The
-            SynapseServer class which is responsible for starting the server accepts a file path as an argument from where to
-            load the configuration. Generally we pass the path to the synapse.xml file as the value of this argument. If you
-            pass a directory path instead, Synapse configuration will be loaded from the specified directory. Note the following
-            line on the console when Synapse is loading the configuration from a file hierarchy.
-         </p>
-         <pre>2009-08-04 14:14:42,489 [-] [main]  INFO SynapseConfigurationBuilder Loaded Synapse configuration from the directory hierarchy at : /home/synapse/repository/conf/sample/synapse_sample_600.xml</pre>
-         <p>
-            This feature comes in handy when managing large Synapse configurations. It is easier to maintain a well structured
-            file hierarchy than managing one large flat XML file.
-         </p>
-       </div>
-       <h2>
-         <a name="Sample601" id="Sample601">Sample 601: Using Synapse observers</a>
-       </h2>
-       <div>
-         <p>
-           <strong>Objective:</strong> Demonstrate the ability to monitor the Synapse configuration at runtime using the
-             SynapseObserver interface
-         </p>
-         <p>
-           Open the synapse.properties file in the SYNAPSE_HOME/repository/conf directory using a text editor and uncomment the line which
-           defines the simple logging Synapse observer.
-         </p>
-         <pre xml:space="preserve">synapse.observers=samples.userguide.SimpleLoggingObserver</pre>
-         <p>
-           Open the log4j.properties file in the SYNAPSE_HOME/lib directory and uncomment the line which sets the INFO log
-           level to the samples.userguide package.
-         </p>
-         <pre xml:space="preserve">log4j.category.samples.userguide=INFO</pre>
-         <p>
-           Start Synapse using any of the sample configurations. The SimpleLoggingObserver will capture events that occur
-           while constructing the Synapse configuration and log them on the console as follows.
-         </p>
-         <pre xml:space="preserve">
- 2009-08-06 14:30:24,578 [-] [main]  INFO SimpleLoggingObserver Simple logging observer initialized...Capturing Synapse events...
- 2009-08-06 14:30:24,604 [-] [main]  INFO SimpleLoggingObserver Endpoint : a3 was added to the Synapse configuration successfully
- 2009-08-06 14:30:24,605 [-] [main]  INFO SimpleLoggingObserver Endpoint : a2 was added to the Synapse configuration successfully
- 2009-08-06 14:30:24,606 [-] [main]  INFO SimpleLoggingObserver Endpoint : null was added to the Synapse configuration successfully
- 2009-08-06 14:30:24,611 [-] [main]  INFO SimpleLoggingObserver Local entry : a1 was added to the Synapse configuration successfully
- 2009-08-06 14:30:24,649 [-] [main]  INFO SimpleLoggingObserver Proxy service : StockQuoteProxy2 was added to the Synapse configuration successfully
- 2009-08-06 14:30:24,661 [-] [main]  INFO SimpleLoggingObserver Proxy service : StockQuoteProxy1 was added to the Synapse configuration successfully
- 2009-08-06 14:30:24,664 [-] [main]  INFO SimpleLoggingObserver Sequence : main was added to the Synapse configuration successfully
- 2009-08-06 14:30:24,701 [-] [main]  INFO SimpleLoggingObserver Sequence : fault was added to the Synapse configuration successfully</pre>
-
-         <p>
-           The SimpleLoggingObserver is implemented as follows. It does not override any of the event handler implementations
-           in the AbstractSynapseObserver class. The AbstractSynapseObserver logs all the received events by default.
-         </p>
-         <pre xml:space="preserve">
-    package samples.userguide;
-
-    import org.apache.synapse.config.AbstractSynapseObserver;
-
-    public class SimpleLoggingObserver extends AbstractSynapseObserver {
-
-        public SimpleLoggingObserver() {
-            super();
-            log.info("Simple logging observer initialized...Capturing Synapse events...");
-        }
-    }</pre>
-         <p>
-           Refer Synapse <a href="Synapse_Extending.html#synObservers">Synapse Extending Guide</a> for more details on developing Synapse observers.
-         </p>
-       </div>
-
-   <h2>
-         <a name="Sample650" id="Sample650">Sample 650: Priority Based Message Mediation</a>
-   </h2>
-   <pre xml:space="preserve">&lt;definitions xmlns=&quot;http://ws.apache.org/ns/synapse&quot;&gt;
-    &lt;priorityExecutor name=&quot;exec&quot;&gt;
-        &lt;queues&gt;
-            &lt;queue size=&quot;100&quot; priority=&quot;1&quot;/&gt;
-            &lt;queue size=&quot;100&quot; priority=&quot;10&quot;/&gt;
-        &lt;/queues&gt;
-    &lt;/priorityExecutor&gt;
-    &lt;proxy name=&quot;StockQuoteProxy&quot;&gt;
-        &lt;target&gt;
-            &lt;inSequence&gt;
-                &lt;filter source=&quot;$trp:priority&quot; regex=&quot;1&quot;&gt;
-                    &lt;then&gt;
-                        &lt;enqueue priority=&quot;1&quot; sequence=&quot;priority_sequence&quot; executor=&quot;exec&quot;/&gt;
-                    &lt;/then&gt;
-                    &lt;else&gt;
-                        &lt;enqueue priority=&quot;10&quot; sequence=&quot;priority_sequence&quot; executor=&quot;exec&quot;/&gt;
-                    &lt;/else&gt;
-                &lt;/filter&gt;
-            &lt;/inSequence&gt;
-            &lt;outSequence&gt;
-                &lt;send/&gt;
-            &lt;/outSequence&gt;
-        &lt;/target&gt;
-        &lt;publishWSDL uri=&quot;file:repository/conf/sample/resources/proxy/sample_proxy_1.wsdl&quot;/&gt;
-    &lt;/proxy&gt;
-    &lt;sequence name=&quot;priority_sequence&quot;&gt;
-        &lt;log level=&quot;full&quot;/&gt;
-        &lt;send&gt;
-            &lt;endpoint&gt;
-                &lt;address uri=&quot;http://localhost:9000/services/SimpleStockQuoteService&quot;/&gt;
-            &lt;/endpoint&gt;
-        &lt;/send&gt;
-    &lt;/sequence&gt;
-&lt;/definitions&gt;</pre>
-       <div>
-         <p>
-           <strong>Objective:</strong> Demonstrate the priority based mediation capability of synapse.
-         </p>
-         <p>
-           <strong>Prerequisites:</strong>
-           <br/>Deploy the SimpleStockQuoteService in sample Axis2 server and start it on port
-           9000. Priority is applied only when synapse is loaded with enough messages to consume its core number of threads.
-             So to observe the priority based mediation, it is required to use a load testing tool like JMeter, SOAP UI or Apache bench.
-           <br/>Start Synapse with the sample configuration 650 (i.e. synapse -sample 650)
-         </p>
-         <p>
-           In this sample, client should send a HTTP header that specifies the priority of the message.This header name is priority.
-             This header is retrieved in the synapse configuration using the $trp:priority XPath expression. Then it is matched against
-             the value 1. If it has the value 1, message is executed with priority 1. Otherwise the message is executed with priority 10.
-         </p>
-           <p>
-               Here are two sample XML files that can be used to invoke the service using a tool like JMeter, or Ab. For SOAP UI,
-               user can use the WSDL repository/conf/sample/resources/proxy/sample_proxy_1.wsdl to create the request. The only
-               difference between the two demonstrated requests here is the symbol. One has the symbol as IBM and other has MSFT. For one type of
-               request set the priority header to 1 and for the next set the priority header to 10. Then load synapse with high
-               volume of traffic from both types of requests using the load testing tool. In the back end server it prints the
-               symbol of the incoming requests. User should be able to see more of high priority symbol.
-           </p>
-           <pre xml:space="preserve">
-&lt;soapenv:Envelope xmlns:soapenv=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot;&gt;
-     &lt;soapenv:Header xmlns:wsa=&quot;http://www.w3.org/2005/08/addressing&quot;&gt;
-        &lt;wsa:To&gt;http://localhost:8281/services/SimpleStockQuoteService&lt;/wsa:To&gt;
-        &lt;wsa:MessageID&gt;urn:uuid:1B57D0B0BF770678DE1261165228620&lt;/wsa:MessageID&gt;
-        &lt;wsa:Action&gt;urn:getQuote&lt;/wsa:Action&gt;
-     &lt;/soapenv:Header&gt;
-     &lt;soapenv:Body&gt;
-        &lt;m0:getQuote xmlns:m0=&quot;http://services.samples&quot;&gt;
-           &lt;m0:request&gt;
-              &lt;m0:symbol&gt;IBM&lt;/m0:symbol&gt;
-           &lt;/m0:request&gt;
-        &lt;/m0:getQuote&gt;
-     &lt;/soapenv:Body&gt;
-&lt;/soapenv:Envelope&gt;
-           </pre>
-           <pre xml:space="preserve">
-&lt;soapenv:Envelope xmlns:soapenv=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot;&gt;
-     &lt;soapenv:Header xmlns:wsa=&quot;http://www.w3.org/2005/08/addressing&quot;&gt;
-        &lt;wsa:To&gt;http://localhost:8281/services/SimpleStockQuoteService&lt;/wsa:To&gt;
-        &lt;wsa:MessageID&gt;urn:uuid:1B57D0B0BF770678DE1261165228620&lt;/wsa:MessageID&gt;
-        &lt;wsa:Action&gt;urn:getQuote&lt;/wsa:Action&gt;
-     &lt;/soapenv:Header&gt;
-     &lt;soapenv:Body&gt;
-        &lt;m0:getQuote xmlns:m0=&quot;http://services.samples&quot;&gt;
-           &lt;m0:request&gt;
-              &lt;m0:symbol&gt;MSFT&lt;/m0:symbol&gt;
-           &lt;/m0:request&gt;
-        &lt;/m0:getQuote&gt;
-     &lt;/soapenv:Body&gt;
-&lt;/soapenv:Envelope&gt;
-           </pre>
-       </div>
-
-    <h2>
-         <a name="Sample651" id="Sample651">Sample 651: NHTTP Transport Priority Based Dispatching</a>
-    </h2>
-    <p>
-        Here is the priority configuration file used by the NHTTP transport to determine the priority based on HTTP level properties.
-    </p>
-   <pre xml:space="preserve">&lt;priorityConfiguration&gt;
-    &lt;priorityExecutor&gt;
-        &lt;!-- two priorities specified with priority 10 and 1. Both priority messages has a queue depth of 100 --&gt;
-        &lt;queues isFixedCapacity=&quot;true&quot; nextQueue=&quot;org.apache.synapse.commons.executors.PRRNextQueueAlgorithm&quot;&gt;
-            &lt;queue size=&quot;100&quot; priority=&quot;10&quot;/&gt;
-            &lt;queue size=&quot;100&quot; priority=&quot;1&quot;/&gt;
-        &lt;/queues&gt;
-        &lt;!-- these are the default values, values are put here to show their availability --&gt;
-        &lt;threads core=&quot;20&quot; max=&quot;100&quot; keep-alive=&quot;5&quot;/&gt;
-    &lt;/priorityExecutor&gt;
-
-    &lt;!-- if a message comes that we cannot determine priority, we set a default priority of 1 --&gt;
-    &lt;conditions defaultPriority=&quot;1&quot;&gt;
-        &lt;condition priority=&quot;10&quot;&gt;
-            &lt;!-- check for the header named priority --&gt;
-            &lt;equal type=&quot;header&quot; source=&quot;priority&quot; value=&quot;5&quot;/&gt;
-        &lt;/condition&gt;
-        &lt;condition priority=&quot;1&quot;&gt;
-            &lt;equal type=&quot;header&quot; source=&quot;priority&quot; value=&quot;1&quot;/&gt;
-        &lt;/condition&gt;
-    &lt;/conditions&gt;
-&lt;/priorityConfiguration&gt;</pre>
-       <div>
-         <p>
-           <strong>Objective:</strong> Demonstrate the priority based dispatching of NHTTP transport.
-         </p>
-         <p>
-           <strong>Prerequisites:</strong>
-           <br/>Deploy the SimpleStockQuoteService in sample Axis2 server and start it on port
-           9000. Priority is applied only when synapse is loaded with enough messages to consume its core number of threads.
-           So to observe the priority based dispatching, it is required to use a load testing tool like JMeter, SOAP UI or Apache bench.
-           <br/>Open axis2.xml in repository/conf directory and uncomment the following parameter to the configuration.
-             <strong>priorityConfigFile</strong>. Set the value to repository/conf/sample/resources/priority/priority-configuration.xml
-           <br/>Start Synapse with the sample configuration 150 (i.e. synapse -sample 150).
-         </p>
-         <p>
-           In this sample, client should send a HTTP header that specifies the priority of the message.This header name is priority.
-             This header is retrieved in the prioirty configuration. Then it is matched against
-             the value 1 and 10. Depending on this value message is executed with priority 1 or 10.
-         </p>
-           <p>
-               Here are two sample XML files that can be used to invoke the service using a tool like JMeter, or Apache Ab. For SOAP UI,
-               user can use the WSDL repository/conf/sample/resources/proxy/sample_proxy_1.wsdl to create the request. The only
-               difference between the two demonstrated requests here is the symbol. One has the symbol as IBM and other has MSFT. For one type of
-               request set the priority header to 1 and for the next set the priority header to 10. Then load synapse with high
-               volume of traffic from both types of requests using the load testing tool. In the back end server it prints the
-               symbol of the incoming requests. User should be able to see more of high priority symbol.
-           </p>
-           <pre xml:space="preserve">
-&lt;soapenv:Envelope xmlns:soapenv=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot;&gt;
-     &lt;soapenv:Header xmlns:wsa=&quot;http://www.w3.org/2005/08/addressing&quot;&gt;
-        &lt;wsa:To&gt;http://localhost:8281/services/SimpleStockQuoteService&lt;/wsa:To&gt;
-        &lt;wsa:MessageID&gt;urn:uuid:1B57D0B0BF770678DE1261165228620&lt;/wsa:MessageID&gt;
-        &lt;wsa:Action&gt;urn:getQuote&lt;/wsa:Action&gt;
-     &lt;/soapenv:Header&gt;
-     &lt;soapenv:Body&gt;
-        &lt;m0:getQuote xmlns:m0=&quot;http://services.samples&quot;&gt;
-           &lt;m0:request&gt;
-              &lt;m0:symbol&gt;IBM&lt;/m0:symbol&gt;
-           &lt;/m0:request&gt;
-        &lt;/m0:getQuote&gt;
-     &lt;/soapenv:Body&gt;
-&lt;/soapenv:Envelope&gt;
-           </pre>
-           <pre xml:space="preserve">
-&lt;soapenv:Envelope xmlns:soapenv=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot;&gt;
-     &lt;soapenv:Header xmlns:wsa=&quot;http://www.w3.org/2005/08/addressing&quot;&gt;
-        &lt;wsa:To&gt;http://localhost:8281/services/SimpleStockQuoteService&lt;/wsa:To&gt;
-        &lt;wsa:MessageID&gt;urn:uuid:1B57D0B0BF770678DE1261165228620&lt;/wsa:MessageID&gt;
-        &lt;wsa:Action&gt;urn:getQuote&lt;/wsa:Action&gt;
-     &lt;/soapenv:Header&gt;
-     &lt;soapenv:Body&gt;
-        &lt;m0:getQuote xmlns:m0=&quot;http://services.samples&quot;&gt;
-           &lt;m0:request&gt;
-              &lt;m0:symbol&gt;MSFT&lt;/m0:symbol&gt;
-           &lt;/m0:request&gt;
-        &lt;/m0:getQuote&gt;
-     &lt;/soapenv:Body&gt;
-&lt;/soapenv:Envelope&gt;
-           </pre>
-       </div>
-    <h2>
-        <a name="Sample652" id="Sample652">Distributed transaction with Transaction
-            mediator
-        </a>
-    </h2>
-    <p>This sample describes how to use transaction mediator to participate in a distributed
-        transaction
-    </p>
-    <h2>
-        <a name="Sample652" id="Sample652">Sample 652: Distributed transaction management</a>
-    </h2>
-    <pre xml:space="preserve"> &lt;definitions xmlns="http://ws.apache.org/ns/synapse"&gt;
-
-        &lt;sequence name="myFaultHandler"&gt;
-            &lt;log level="custom"&gt;
-                &lt;property name="text" value="** Rollback Transaction**"/&gt;
-            &lt;/log&gt;
-            &lt;transaction action="rollback"/&gt;
-            &lt;send/&gt;
-        &lt;/sequence&gt;
-
-        &lt;sequence name="main" onError="myFaultHandler"&gt;
-            &lt;in&gt;
-                &lt;send&gt;
-                    &lt;endpoint&gt;
-                        &lt;address uri="http://localhost:9000/services/SimpleStockQuoteService"/&gt;
-                    &lt;/endpoint&gt;
-                &lt;/send&gt;
-            &lt;/in&gt;
-
-            &lt;out&gt;
-                &lt;transaction action="new"/&gt;
-
-                &lt;log level="custom"&gt;
-                    &lt;property name="text" value="** Reporting to the Database esbdb**"/&gt;
-                &lt;/log&gt;
-                &lt;dbreport useTransaction="true" xmlns="http://ws.apache.org/ns/synapse"&gt;
-                    &lt;connection&gt;
-                        &lt;pool&gt;
-                            &lt;dsName&gt;java:jdbc/XADerbyDS&lt;/dsName&gt;
-                            &lt;icClass&gt;org.jnp.interfaces.NamingContextFactory&lt;/icClass&gt;
-                            &lt;url&gt;localhost:1099&lt;/url&gt;
-                            &lt;user&gt;synapse&lt;/user&gt;
-                            &lt;password&gt;synapse&lt;/password&gt;
-                        &lt;/pool&gt;
-                    &lt;/connection&gt;
-                    &lt;statement&gt;
-                        &lt;sql&gt;delete from company where name =?&lt;/sql&gt;
-                        &lt;parameter expression="//m0:return/m1:symbol/child::text()"
-                                   xmlns:m0="http://services.samples" xmlns:m1="http://services.samples/xsd"
-                                   type="VARCHAR"/&gt;
-                    &lt;/statement&gt;
-                &lt;/dbreport&gt;
-
-                &lt;log level="custom"&gt;
-                    &lt;property name="text" value="** Reporting to the Database esbdb1**"/&gt;
-                &lt;/log&gt;
-                &lt;dbreport useTransaction="true" xmlns="http://ws.apache.org/ns/synapse"&gt;
-                    &lt;connection&gt;
-                        &lt;pool&gt;
-                            &lt;dsName&gt;java:jdbc/XADerbyDS1&lt;/dsName&gt;
-                            &lt;icClass&gt;org.jnp.interfaces.NamingContextFactory&lt;/icClass&gt;
-                            &lt;url&gt;localhost:1099&lt;/url&gt;
-                            &lt;user&gt;synapse&lt;/user&gt;
-                            &lt;password&gt;synapse&lt;/password&gt;
-                        &lt;/pool&gt;
-                    &lt;/connection&gt;
-                    &lt;statement&gt;
-                        &lt;sql&gt; INSERT into company values ('IBM','c4',12.0)&lt;/sql&gt;
-                    &lt;/statement&gt;
-                &lt;/dbreport&gt;
-                &lt;transaction action="commit"/&gt;
-                &lt;send/&gt;
-            &lt;/out&gt;
-        &lt;/sequence&gt;
-        &lt;/definitions&gt; </pre>
-
-
-    <div>
-        <p>
-            <strong>Objective:</strong>
-            Demonstrate the use of the transaction mediator in a distributed transaction
-        </p>
-        <p>
-            <strong>Prerequisites:</strong>
-            Deploy the SimpleStockQuoteService in sample Axis2 server and start it on port 9000.
-        </p>
-        <p>Start Synapse with the sample configuration 652 (i.e. synapse -sample 652).</p>
-        <p>To run this sample it is required to deploy synpase on JBoss application server(This is
-            only tested with JBoss application sever), you can use the
-            war distribution to deploy synapse on JBoss application server. Use the
-            synpase_sample_652.xml as the synapse confiuration file and start JBoss with
-            that synpase configuration file. Also you need to define two XA datasources for above
-            two datasources. You'll need to refer JBoss documentation to see how
-            to do this.
-        </p>
-        <p>It also required to have two database instances, this will be used by the two XA
-            datasources. Refer the
-            <a href="Synapse_Samples_Setup.html#derby">Sample Setup Guide</a>
-            to see how you can set up the derby database server.
-        </p>
-        <p>In this sample a record is delete from one database and it is added into the second
-            database. If either of the operations(deleting from the 1st database and adding into the
-            second database) fails everything will be roll backed. The records will be untoched.
-        </p>
-        <p>Invoke the client as follows.</p>
-        <pre xml:space="preserve">ant stockquote -Daddurl=http://localhost:9000/services/SimpleStockQuoteService -Dtrpurl=http://localhost:8280/ -Dsymbol=SUN/
-        </pre>
-
-        <h2>
-            <a name="StoreNFwd" id="StoreNFwd">Store and Forward Messaging patterns with Message
-                Stores and Message Processors
-            </a>
-        </h2>
-        <p>
-            Synapse Message Stores and Message Processors can be used to implement different store
-            and forward messaging patterns.
-            This can be use to cater different SLA s and other QoS aspects.
-        </p>
-        <h2>
-            <a name="Sample700" id="Sample700">Sample 700: Introduction to Synapse Message Store</a></h2>
-        <pre xml:space="preserve">
-            &lt;!-- Introduction to the Synapse Message Store --&gt;
-            &lt;definitions xmlns="http://ws.apache.org/ns/synapse"&gt;
-            &lt;sequence name="fault"&gt;
-            &lt;log level="full"&gt;
-            &lt;property name="MESSAGE" value="Executing default 'fault' sequence"/&gt;
-            &lt;property name="ERROR_CODE" expression="get-property('ERROR_CODE')"/&gt;
-            &lt;property name="ERROR_MESSAGE" expression="get-property('ERROR_MESSAGE')"/&gt;
-            &lt;/log&gt;
-            &lt;drop/&gt;
-            &lt;/sequence&gt;
-            &lt;sequence name="onStoreSequence"&gt;
-            &lt;log&gt;
-            &lt;property name="On-Store" value="Storing message"/&gt;
-            &lt;/log&gt;
-            &lt;/sequence&gt;
-            &lt;sequence name="main"&gt;
-            &lt;in&gt;
-            &lt;log level="full"/&gt;
-            &lt;property name="FORCE_SC_ACCEPTED" value="true" scope="axis2"/&gt;
-            &lt;store messageStore="MyStore" sequence="onStoreSequence"/&gt;
-            &lt;/in&gt;
-            &lt;description&gt;The main sequence for the message mediation&lt;/description&gt;
-            &lt;/sequence&gt;
-            &lt;messageStore name="MyStore"/&gt;
-            &lt;/definitions&gt;
-        </pre>
-    <p>
-    <strong>Objective: </strong>Introduction to Synapse Message Stores</p>
-    <strong>Prerequisites</strong>:
-    <br/>Start the Synapse configuration numbered 700: i.e. synapse -sample 700
-    <p>To Execute the Client : </p>
-    <pre xml:space="preserve">ant stockquote -Daddurl=http://localhost:9000/services/SimpleStockQuoteService -Dtrpurl=http://localhost:8280/ -Dmode=placeorder
-    </pre>
-    <p>When you execute the client the message will be dispatched to the main sequence.
-        In the Main sequence store mediator will store the placeOrder request message in the "MyStore" Message Store</p>
-
-        <p>Before Storing the message store mediator will invoke the sequence :onStoreSequence. See the log</p>
-        <p>INFO - LogMediator To: http://localhost:9000/services/SimpleStockQuoteService, WSAction: urn:placeOrder, SOAPAction: urn:placeOrder, ReplyTo: http://www.w3.org/2005/08/addressing/none, MessageID: urn:uuid:54f0e7c6-7b43-437c-837e-a825d819688c, Direction: request, On-Store = Storing message
-        </p>
-
-
-    <p>You can then use the JMX view of Synapse Message Store by using the jconsole and view the stored
-        Messages and delete them.
-    </p>
-            <h2>
-    <a name="Sample701" id="Sample701">Sample 701: Introduction to Synapse Message Sampling Processor</a></h2>
-        <pre xml:space="preserve">
-            &lt;!-- Introduction to Synapse Message Sampling Processor --&gt;
-
-            &lt;definitions xmlns="http://ws.apache.org/ns/synapse"&gt;
-
-            &lt;sequence name="send_seq"&gt;
-            &lt;send&gt;
-            &lt;endpoint&gt;
-            &lt;address uri="http://localhost:9000/services/SimpleStockQuoteService"&gt;
-            &lt;suspendOnFailure&gt;
-            &lt;errorCodes&gt;-1&lt;/errorCodes&gt;
-            &lt;progressionFactor&gt;1.0&lt;/progressionFactor&gt;
-            &lt;/suspendOnFailure&gt;
-            &lt;/address&gt;
-            &lt;/endpoint&gt;
-            &lt;/send&gt;
-            &lt;/sequence&gt;
-            &lt;sequence name="main"&gt;
-            &lt;in&gt;
-            &lt;log level="full"/&gt;
-            &lt;property name="FORCE_SC_ACCEPTED" value="true" scope="axis2"/&gt;
-            &lt;property name="OUT_ONLY" value="true"/&gt;
-            &lt;store messageStore="MyStore"/&gt;
-            &lt;/in&gt;
-            &lt;description&gt;The main sequence for the message mediation&lt;/description&gt;
-            &lt;/sequence&gt;
-            &lt;messageStore name="MyStore"/&gt;
-            &lt;messageProcessor
-            class="org.apache.synapse.message.processors.sampler.SamplingProcessor"
-            name="SamplingProcessor" messageStore="MyStore"&gt;
-            &lt;parameter name="interval"&gt;20000&lt;/parameter&gt;
-            &lt;parameter name="sequence"&gt;send_seq&lt;/parameter&gt;
-            &lt;/messageProcessor&gt;
-            &lt;/definitions&gt;
-        </pre>
-        <p>
-            <strong>Objective:</strong>Introduction to Synapse Message Sampling Processor
-        </p>
-        <strong>Prerequisites</strong>:
-        <br/>Start the Synapse configuration numbered 701: i.e. synapse -sample 701
-        <p>Start the SimpleStockQuoteService if its not already started</p>
-        <p>To Execute the Client few times:</p>
-        <pre xml:space="preserve">ant stockquote
-            -Daddurl=http://localhost:9000/services/SimpleStockQuoteService
-            -Dtrpurl=http://localhost:8280/ -Dmode=placeorder
-        </pre>
-        <p>When you execute the client the message will be dispatched to the main sequence.
-            In the Main sequence store mediator will store the placeOrder request message in the
-            "MyStore" Message Store
-        </p>
-
-        <p>Message Processor will consume the messages and forward to the send_seq sequence in
-            configured rate.
-        </p>
-        <p>You will observe that service invocation rate is not changing when increasing the rate we
-            execute the client.
-        </p>
-    <h2>
-    <a name="Sample702" id="Sample702">Sample 702: Introduction to Synapse Message Forwarding Processor</a></h2>
-        <pre xml:space="preserve">
-
-            &lt;!-- Introduction to Synapse Scheduled Message Forwarding Processor --&gt;
-
-            &lt;definitions xmlns="http://ws.apache.org/ns/synapse"&gt;
-
-            &lt;endpoint name="StockQuoteServiceEp"&gt;
-            &lt;address uri="http://localhost:9000/services/SimpleStockQuoteService"&gt;
-            &lt;suspendOnFailure&gt;
-            &lt;errorCodes&gt;-1&lt;/errorCodes&gt;
-            &lt;progressionFactor&gt;1.0&lt;/progressionFactor&gt;
-            &lt;/suspendOnFailure&gt;
-            &lt;/address&gt;
-            &lt;/endpoint&gt;
-            &lt;sequence name="fault"&gt;
-            &lt;log level="full"&gt;
-            &lt;property name="MESSAGE" value="Executing default 'fault' sequence"/&gt;
-            &lt;property name="ERROR_CODE" expression="get-property('ERROR_CODE')"/&gt;
-            &lt;property name="ERROR_MESSAGE" expression="get-property('ERROR_MESSAGE')"/&gt;
-            &lt;/log&gt;
-            &lt;drop/&gt;
-            &lt;/sequence&gt;
-            &lt;sequence name="main"&gt;
-            &lt;in&gt;
-            &lt;log level="full"/&gt;
-            &lt;property name="FORCE_SC_ACCEPTED" value="true" scope="axis2"/&gt;
-            &lt;property name="OUT_ONLY" value="true"/&gt;
-            &lt;property name="target.endpoint" value="StockQuoteServiceEp"/&gt;
-            &lt;store messageStore="MyStore"/&gt;
-            &lt;/in&gt;
-            &lt;description&gt;The main sequence for the message mediation&lt;/description&gt;
-            &lt;/sequence&gt;
-            &lt;messageStore name="MyStore"/&gt;
-            &lt;messageProcessor
-            class="org.apache.synapse.message.processors.forward.ScheduledMessageForwardingProcessor"
-            name="ScheduledProcessor" messageStore="MyStore"&gt;
-            &lt;parameter name="interval"&gt;10000&lt;/parameter&gt;
-            &lt;/messageProcessor&gt;
-            &lt;/definitions&gt;
-        </pre>
-    <p>
-    <strong>Objective: </strong>Introduction to Synapse Message Forwarding Processor</p>
-    <strong>Prerequisites</strong>:
-    <br/>Start the Synapse configuration numbered 702: i.e. synapse -sample 702
-
-    <p>To Execute the Client: </p>
-    <pre xml:space="preserve">ant stockquote -Daddurl=http://localhost:9000/services/SimpleStockQuoteService -Dtrpurl=http://localhost:8280/ -Dmode=placeorder
-</pre>
-
-        <p>Now Start the SimpleStockQuoteService</p>
-        <p>When you Start the service you will see message getting delivered to the service. Even
-            though service is down when we invoke it from the client
-        </p>
-        <p>Here in the Main sequence store mediator will store the placeOrder request message in the
-            "MyStore" Message Store
-        </p>
-        <p>Message Processor will send the message to the endpoint configured as a message context
-            property.
-        </p>
-        <p>Message processor will remove the message from the store only if message delivered
-            successfully
-        </p>
-
-    </div>
-</body>
-</document>
diff --git a/src/site/xdoc/Synapse_Samples_Setup.xml b/src/site/xdoc/Synapse_Samples_Setup.xml
deleted file mode 100644
index 8cb0dc0..0000000
--- a/src/site/xdoc/Synapse_Samples_Setup.xml
+++ /dev/null
@@ -1,1173 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-
-<document>
-    <properties>
-        <title>Apache Synapse - Samples Setup</title>
-    </properties>
-    <head>
-        <style type="text/css" xml:space="preserve">
-    .command {
-        border: 1px dashed #3c78b5;
-        text-align: left;
-        background-color: #f0f0f0;
-        padding: 3px;
-        font-size: 11px;
-        font-family: Courier;
-        margin: 10px;
-        line-height: 13px;
-    }
-    .consoleOutput {
-        border: 1px dashed #3c78b5;
-        font-size: 11px;
-        font-family: Courier;
-        margin: 10px;
-        line-height: 13px;
-        background-color: #f0f0f0;
-        border-bottom: 1px dashed #3c78b5;
-        padding: 3px;
-        border-style: solid;
-    }
-    .info {
-        border-style: solid;
-        border-width: 1px;
-        border-color: #090;
-        background-color: #dfd;
-        text-align:left;
-        margin-top: 5px;
-        margin-bottom: 5px;
-    }
-    li {
-        font-family: Verdana, arial, sans-serif;
-        font-size: 11px;
-        line-height: 16px;
-        color: #000000;
-        font-weight: normal;
-    }
-    p, td {
-        font-family: Verdana, arial, sans-serif;
-        font-size: 11px;
-        line-height: 16px;
-        color: #000000;
-        font-weight: normal;
-    }
-    pre {
-        padding: 0px;
-        margin-top: 5px;
-        margin-left: 15px;
-        margin-bottom: 5px;
-        margin-right: 5px;
-        text-align: left;
-        background-color: #f0f0f0;
-        padding: 3px;
-        border: 1px dashed #3c78b5;
-        font-size: 11px;
-        font-family: Courier;
-        margin: 10px;
-        line-height: 13px;
-    }
-    h1 {
-        font-size: 24px;
-        line-height: normal;
-        font-weight: bold;
-        background-color: #f0f0f0;
-        color: #003366;
-        border-bottom: 1px solid #3c78b5;
-        padding: 2px;
-        margin: 36px 0px 4px 0px;
-    }
-    h2 {
-        font-size: 18px;
-        line-height: normal;
-        font-weight: bold;
-        background-color: #f0f0f0;
-        border-bottom: 1px solid #3c78b5;
-        padding: 2px;
-        margin: 27px 0px 4px 0px;
-    }
-    h3 {
-        font-size: 14px;
-        line-height: normal;
-        font-weight: bold;
-        background-color: #f0f0f0;
-        padding: 2px;
-        margin: 21px 0px 4px 0px;
-    }
-    h4 {
-        font-size: 12px;
-        line-height: normal;
-        font-weight: bold;
-        background-color: #f0f0f0;
-        padding: 2px;
-        margin: 18px 0px 4px 0px;
-    }</style>
-    </head>
-    <body>
-    <div style="margin-top:-40px; float:right; _margin-top:0px;">
-      <img alt="Synapse logo"
-           src="images/synapse-logo-web2.png" width="197"
-           height="82"/>
-    </div>
-    <div>
-      <h1>
-        Apache Synapse ESB - Samples Setup
-      </h1>
-    </div>
-    
-    <p>
-      Synapse ships with a set of working examples that demonstrate some of the
-      basic features and capabilities of Synapse. A set of sample clients and
-      services are provided in addition to the sample configurations. Scripts
-      are provided to execute the sample scenarios as explained below.
-    </p>
-    <h4>
-      Prerequisites
-    </h4>
-    <p>
-      To try out the samples you will need Java development kit version 1.5.x or
-      later and Apache Ant version 1.6.5 or later. Ant can be downloaded from
-      <a href="http://ant.apache.org">http://ant.apache.org</a>. The JMS examples can be executed against an
-      ActiveMQ installation by default (or another JMS provider with relevant
-      configuration changes.)
-    </p>
-    <p>
-      Note*: The samples and the documentation assume that you are running
-      Synapse in DEBUG mode. You can switch from the default INFO log messages
-      to DEBUG log messages by changing the line
-      "log4j.category.org.apache.synapse=INFO" as
-      "log4j.category.org.apache.synapse=DEBUG" in the lib/log4j.properties
-      file.
-    </p>
-    <h2>
-      Understanding the Samples
-    </h2>
-    <table border="0" style="width: 100%">
-      <caption/>
-      <tbody>
-        <tr>
-          <td>
-            Client
-          </td>
-          <td>
-            Synapse
-          </td>
-          <td>
-            Service
-          </td>
-        </tr>
-        <tr>
-          <td/>
-          <td/>
-          <td/>
-        </tr>
-        <tr>
-          <td>
-            ant stockquote
-          </td>
-          <td>
-            ./synapse.sh -sample &lt;n&gt;
-          </td>
-          <td>
-            SimpleStockQuoteService
-          </td>
-        </tr>
-        <tr>
-          <td/>
-          <td/>
-          <td>
-            SecureStockQuoteService etc.
-          </td>
-        </tr>
-      </tbody>
-    </table>
-    <p>
-      The above table depicts the interactions between the clients, Synapse
-      and the services at a higher level. The Clients are able to send SOAP/REST
-      or POX messages over transports such as HTTP/S or JMS with WS-Addressing,
-      WS-Security or WS-Reliable messaging. They can send binary optimized
-      content using MTOM or SwA or binary or plain text JMS messages. After
-      mediation through Synapse, the requests are passed over to the sample
-      services. The sample clients and services are explained below.
-    </p>
-
-    <h2>
-      Using the Sample Clients
-    </h2>
-    <p>
-      The sample clients can be executed from the samples/axis2Client directory
-      through the provided ant script. Simply executing 'ant' displays the
-      available clients and some of the sample options used to configure them.
-      The sample clients available are listed below:
-    </p>
-    <h3>
-      1. Stock Quote Client
-    </h3>
-    <p>
-      This is a simple SOAP client that can send stock quote requests, and
-      receive and display the last sale price for a stock symbol.
-    </p>
-<pre xml:space="preserve">ant stockquote [-Dsymbol=IBM|MSFT|SUN|..]
-  [-Dmode=quote | customquote | fullquote | placeorder | marketactivity]
-  [-Dsoapver=soap11 | soap12]
-  [-Daddurl=http://localhost:9000/services/SimpleStockQuoteService]
-  [-Dtrpurl=http://localhost:8280] [-Dprxurl=http://localhost:8280]
-  [-Dpolicy=../../repository/conf/sample/resources/policy/policy_1.xml]</pre>
-
-    <p>
-      The client is able to operate in the following modes, and send the
-      payloads listed below as SOAP messages:
-    </p>
-    <ul>
-      <li>
-        quote - send a quote request for a single stock as follows. The response
-        contains the last sales price for the stock which will be displayed
-<pre xml:space="preserve">&lt;m:getQuote xmlns:m="http://services.samples/xsd"&gt;
-  &lt;m:request&gt;
-    &lt;m:symbol&gt;IBM&lt;/m:symbol&gt;
-  &lt;/m:request&gt;
-&lt;/m:getQuote&gt;</pre>
-      </li>
-      <li>
-        customquote - send a quote request in a custom format. Synapse will
-        transform this custom request to the standard stock quote request format
-        and send it to the service. Upon receipt of the response, it will be
-        transformed again to a custom response format and returned to the
-        client, which will then display the last sales price.
-<pre xml:space="preserve">&lt;m0:checkPriceRequest xmlns:m0="http://www.apache-synapse.org/test"&gt;
-  &lt;m0:Code&gt;symbol&lt;/m0:Code&gt;
-&lt;/m0:checkPriceRequest&gt;</pre>
-      </li>
-      <li>
-        fullquote - get quote reports for the stock over a number of days (i.e.
-        last 100 days of the year).
-<pre xml:space="preserve">&lt;m:getFullQuote xmlns:m="http://services.samples/xsd"&gt;
-  &lt;m:request&gt;
-    &lt;m:symbol&gt;IBM&lt;/m:symbol&gt;
-  &lt;/m:request&gt;
-&lt;/m:getFullQuote&gt;</pre>
-      </li>
-      <li>
-        placeorder - place an order for stocks using a one way request
-<pre xml:space="preserve">&lt;m:placeOrder xmlns:m="http://services.samples/xsd"&gt;
-  &lt;m:order&gt;
-    &lt;m:price&gt;3.141593E0&lt;/m:price&gt;
-    &lt;m:quantity&gt;4&lt;/m:quantity&gt;
-    &lt;m:symbol&gt;IBM&lt;/m:symbol&gt;
-  &lt;/m:order&gt;
-&lt;/m:placeOrder&gt;</pre>
-      </li>
-      <li>
-        marketactivity - get a market activity report for the day (i.e. quotes
-        for multiple symbols)
-<pre xml:space="preserve">&lt;m:getMarketActivity xmlns:m="http://services.samples/xsd"&gt;
-  &lt;m:request&gt;
-    &lt;m:symbol&gt;IBM&lt;/m:symbol&gt;
-    ...
-    &lt;m:symbol&gt;MSFT&lt;/m:symbol&gt;
-  &lt;/m:request&gt;
-&lt;/m:getMarketActivity&gt;</pre>
-      </li>
-    </ul>
-    <p>
-      Note : See samples/axis2Client/src/samples/common/StockQuoteHandler.java
-      for sample responses expected by the clients.
-    </p>
-    <h4>
-      Smart Client Mode:
-    </h4>
-    <p>
-      The 'addurl' property sets the WS-Addressing EPR, and the 'trpurl' sets a
-      transport URL for a message. Thus by specifying both of these properties,
-      the client can operate in the 'smart client' mode, where the addressing
-      EPR can specify the ultimate receiver, while the transport URL set to
-      Synapse will ensure that any necessary mediation takes place before the
-      message is delivered to the ultimate receiver.
-    </p>
-<pre xml:space="preserve">e.g: ant stockquote -Daddurl=&lt;addressingEPR&gt; -Dtrpurl=&lt;synapse&gt;</pre>
-    <h4>
-      Gateway / Dumb Client Mode:
-    </h4>
-    <p>
-      By specifying only a transport URL, the client operates in the 'dumb
-      client' mode, where it sends the message to Synapse and depends on the
-      Synapse rules for proper mediation and routing of the message to the
-      ultimate destination.
-    </p>
-<pre xml:space="preserve">e.g: ant stockquote -Dtrpurl=&lt;synapse&gt;</pre>
-    <h4>
-      Proxy Client Mode:
-    </h4>
-    <p>
-      In this mode, the client uses the 'prxurl' as a HTTP proxy to send the
-      request. Thus by setting the 'prxurl' to Synapse, the client can ensure
-      that the message will reach Synapse for mediation. The client can
-      optionally set a WS-Addressing EPR if required.
-    </p>
-<pre xml:space="preserve">e.g: ant stockquote -Dprxurl=&lt;synapse&gt; [-Daddurl=&lt;addressingEPR&gt;]</pre>
-
-    <p>
-      Specifying a policy
-    </p>
-    <p>
-      By specifying a WS-Policy using the 'policy' property, QoS aspects such as
-      WS-Security can be enforced on the request. The policy can specify details
-      such as timestamps, signatures and encryption. See Apache Axis2 and Apache
-      Rampart documentation for more information.
-    </p>
-
-    <h3>
-      2. Generic JMS Client
-    </h3>
-
-    <p>
-      The JMS client is able to send plain text, plain binary content or POX
-      content by directly publishing a JMS message to the specified destination.
-      The JMS destination name should be specified with the 'jms_dest' property.
-      The 'jms_type' property can specify 'text', 'binary' or 'pox' to specify
-      the type of message payload.
-    </p>
-
-    <p>
-      The plain text payload for a 'text' message can be specified through the
-      'payload' property. For binary messages, the 'payload' property will
-      contain the path to the binary file. For POX messages, the 'payload'
-      property will hold a stock symbol name to be used within the POX request
-      for stock order placement request.
-    </p>
-    <p>
-      e.g:
-    </p>
-<pre xml:space="preserve">ant jmsclient -Djms_type=text -Djms_dest=dynamicQueues/JMSTextProxy -Djms_payload="24.34 100 IBM"
-ant jmsclient -Djms_type=pox -Djms_dest=dynamicQueues/JMSPoxProxy -Djms_payload=MSFT
-ant jmsclient -Djms_type=binary -Djms_dest=dynamicQueues/JMSFileUploadProxy
-                     -Djms_payload=./../../repository/conf/sample/resources/mtom/asf-logo.gif</pre>
-    <p>
-      Note: The JMS client assumes the existence of a default ActiveMQ (4.1.0 or
-      above) installation on the local machine.
-    </p>
-
-    <h3>
-      3. MTOM / SwA Client
-    </h3>
-
-    <p>
-      The MTOM / SwA client is able to send a binary image file as a MTOM or SwA
-      optimized message, and receive the same file again through the response
-      and save it as a temporary file. The 'opt_mode' can specify 'mtom' or
-      'swa' respectively for the above mentioned optimizations. Optionally the
-      path to a custom file can be specified through the 'opt_file' property,
-      and the destination address can be changed through the 'opt_url' property
-      if required.
-    </p>
-<pre xml:space="preserve">e.g. ant optimizeclient -Dopt_mode=[mtom | swa]</pre>
-
-    <h2>
-      Starting the Sample Services
-    </h2>
-
-    <p>
-      The sample services ship with a pre-configured Axis2 server and
-      demonstrates in-only and in-out SOAP/REST or POX messaging over HTTP/S and
-      JMS transports, using WS-Addressing, WS-Security and WS-Reliable Messaging
-      and handling of binary content using MTOM and SwA.
-    </p>
-    <p>
-      The sample services can be found in the samples/axis2Server/src directory
-      and can be built and deployed using ant from within each service directory
-    </p>
-<pre xml:space="preserve">user@host:/tmp/synapse-1.1/samples/axis2Server/src/SimpleStockQuoteService$ ant
-Buildfile: build.xml
-...
-build-service:
-   ....
-      [jar] Building jar: /tmp/synapse-1.1/samples/axis2Server/repository/services/SimpleStockQuoteService.aar
-
-BUILD SUCCESSFUL
-Total time: 3 seconds</pre>
-
-    <p>
-      To start the Axis2 server, go to the samples/axis2Server directory and
-      execute the axis2server.sh or axis2server.bat script. This starts the
-      Axis2 server with the HTTP transport listener on port 9000 and HTTPS on
-      9002 respectively. To enable JMS transport, you will need to setup and
-      start a JMS provider. An ActiveMQ 4.0.1 or later JMS server on the local
-      machine is supported by default, and can be easily enabled by uncommenting
-      the JMS transport from the repository/conf/axis2.xml
-    </p>
-
-    <h3>
-      Sample services
-    </h3>
-    <h4>
-      1. SimpleStockQuoteService
-    </h4>
-    <p>
-      This service has four operations, getQuote (in-out), getFullQuote(in-out),
-      getMarketActivity(in-out) and placeOrder (in-only). The getQuote operation
-      will generate a sample stock quote for a given symbol. The getFullQuote
-      operation will generate a history of stock quotes for the symbol for a
-      number of days, and the getMarketActivity operation returns stock quotes
-      for a list of given symbols. The placeOrder operation will accept a one
-      way message for an order.
-    </p>
-    <h4>
-      2. SecureStockQuoteService
-    </h4>
-    <p>
-      This service is a clone of the SimpleStockQuoteService, but has
-      WS-Security enabled and an attached security policy for signing and
-      encryption of messages.
-    </p>
-    <h4>
-      3. MTOMSwASampleService
-    </h4>
-    <p>
-      This service has three operations uploadFileUsingMTOM(in-out),
-      uploadFileUsingSwA(in-out) and oneWayUploadUsingMTOM(in-only) and
-      demonstrates the use of MTOM and SwA. The uploadFileUsingMTOM and
-      uploadFileUsingSwA operations accept a binary image from the SOAP request
-      as MTOM and SwA, and returns this image back again as the response, while
-      the oneWayUploadUsingMTOM saves the request message to disk.
-    </p>
-
-    <h3>
-      Starting Sample Synapse Configurations
-    </h3>
-    <p>
-      To start Synapse with the sample default configuration, execute the
-      synapse.bat or synapse.sh script found in the /bin directory. This starts
-      up an instance of Synapse using the Synapse and Axis2 configuration files
-      located in the repository/conf directory. The repository/conf/samples
-      directory contains the sample configurations available as synapse_sample_&lt;n&gt;.xml
-      files. To start a specific sample configuration of Synapse, use the
-      '-sample &lt;n&gt;' switch as follows:
-    </p>
-<pre xml:space="preserve">synapse.bat -sample &lt;n&gt;
-synapse.sh -sample &lt;n&gt;</pre>
-
-    <h2>
-      Setting up the JMS Listener
-    </h2>
-    <p>
-      The samples used in this guide assumes the existence of a local ActiveMQ
-      (4.1.0 or higher) installation properly installed and started up. You also
-      need to copy the following client JAR files into the Synapse 'lib' folder
-      to support ActiveMQ. These files are found in the 'lib' directory of the
-      ActiveMQ installation.
-    </p>
-    <ul>
-      <li>
-        activeio-core-3.x.x.jar
-      </li>
-      <li>
-        activemq-core-4.x.x.jar
-      </li>
-      <li>
-        geronimo-j2ee-management_1.0_spec-1.0.jar
-      </li>
-    </ul>
-    <p>
-      To enable the JMS transport, you need to uncomment the JMS transport
-      listener configuration. If you are using a JMS provider other than
-      ActiveMQ this configuration should be updated to reflect your environment.
-      Once uncommented, the default configuration should be as follows. To
-      enable JMS for Synapse, the repository/conf/axis2.xml must be updated,
-      while to enable JMS support for the sample Axis2 server the
-      samples/axis2Server/repository/conf/axis2.xml file must be updated.
-    </p>
-<pre xml:space="preserve">    &lt;!--Uncomment this and configure as appropriate for JMS transport support, after setting up your JMS environment (e.g. ActiveMQ)--&gt;
-    &lt;transportReceiver name="jms" class="org.apache.synapse.transport.jms.JMSListener"&gt;
-        &lt;parameter name="myTopicConnectionFactory" locked="false"&gt;
-                &lt;parameter name="java.naming.factory.initial" locked="false"&gt;org.apache.activemq.jndi.ActiveMQInitialContextFactory&lt;/parameter&gt;
-                &lt;parameter name="java.naming.provider.url" locked="false"&gt;tcp://localhost:61616&lt;/parameter&gt;
-                &lt;parameter name="transport.jms.ConnectionFactoryJNDIName" locked="false"&gt;TopicConnectionFactory&lt;/parameter&gt;
-        &lt;/parameter&gt;
-
-        &lt;parameter name="myQueueConnectionFactory" locked="false"&gt;
-                &lt;parameter name="java.naming.factory.initial" locked="false"&gt;org.apache.activemq.jndi.ActiveMQInitialContextFactory&lt;/parameter&gt;
-                &lt;parameter name="java.naming.provider.url" locked="false"&gt;tcp://localhost:61616&lt;/parameter&gt;
-                &lt;parameter name="transport.jms.ConnectionFactoryJNDIName" locked="false"&gt;QueueConnectionFactory&lt;/parameter&gt;
-        &lt;/parameter&gt;
-
-        &lt;parameter name="default" locked="false"&gt;
-                &lt;parameter name="java.naming.factory.initial" locked="false"&gt;org.apache.activemq.jndi.ActiveMQInitialContextFactory&lt;/parameter&gt;
-                &lt;parameter name="java.naming.provider.url" locked="false"&gt;tcp://localhost:61616&lt;/parameter&gt;
-                &lt;parameter name="transport.jms.ConnectionFactoryJNDIName" locked="false"&gt;QueueConnectionFactory&lt;/parameter&gt;
-        &lt;/parameter&gt;
-    &lt;/transportReceiver&gt;</pre>
-    <p>
-      If you are using ActiveMQ, you can use the Ant script in <tt>samples/util</tt> to set up Synapse
-      (i.e. copying the required JAR files and modifying <tt>axis2.xml</tt>) in an automated way. In order to do
-      this, change into the <tt>samples/util</tt> directory and execute the following command:
-    </p>
-<pre xml:space="preserve">ant setupActiveMQ -Dactivemq.home=<i>&lt;ActiveMQ home directory></i></pre>
-    <p>
-      Note that if the environment variable <tt>ACTIVEMQ_HOME</tt> is defined, you can omit the <tt>-Dactivemq.home</tt>
-      option. If you also want to set up ActiveMQ for the sample Axis2 server, issue the following command:
-    </p>
-<pre xml:space="preserve">ant setupActiveMQ -Daxis2.xml=..\axis2Server\repository\conf\axis2.xml</pre>
-    <h2 id="setupamqpjms">
-      Configure Synapse for AMQP Transport
-    </h2>
-
-    <p>
-      The samples used in this guide assumes the existence of a local QPid
-      (1.0-M2 or higher) installation properly installed and started up. You also
-      need to copy the following client JAR files into the Synapse 'lib' folder
-      to support AMQP. These files are found in the 'lib' directory of the
-      QPid installation.
-    </p>
-    <ul>
-      <li>qpid-client-1.0-incubating-M2.jar</li>
-      <li>qpid-common-1.0-incubating-M2.jar</li>
-      <li>geronimo-jms_1.1_spec-1.0.jar</li>
-      <li>slf4j-api-1.4.0.jar    **</li>
-      <li>slf4j-log4j12-1.4.0.jar  **</li>
-    </ul>
-        <p>
-          ** To configure FIX (Quickfix/J 1.3) with AMQP (QPid-1.0-M2) copy the sl4j-* libraries comes with QPid and ignore the sl4j-* libraries with Quickfix/J.
-        </p>
-    <p>
-      To enable the AMQP over JMS transport, you need to uncomment the JMS transport
-      listener configuration. To enable AMQP over JMS for synapse, the repository/conf/axis2.xml must be updated,
-      while to enable JMS support for the sample Axis2 server the
-      samples/axis2Server/repository/conf/axis2.xml file must be updated.
-    </p>
-    <pre xml:space="preserve">    &lt;!--Uncomment this and configure as appropriate for JMS transport support, after setting up your JMS environment --&gt;
-        &lt;transportReceiver name="jms" class="org.apache.synapse.transport.jms.JMSListener"&gt;
-        &lt;/transportReceiver&gt;
-
-        &lt;transportSender name="jms" class="org.apache.synapse.transport.jms.JMSSender"&gt;
-        &lt;/transportReceiver&gt;</pre>
-
-    <p>
-        Locate and edit the AMQP connection settings file for the message consumer, this fle is usually named direct.properties.
-        <pre>
-            java.naming.factory.initial = org.apache.qpid.jndi.PropertiesFileInitialContextFactory
-            # register some connection factories
-            # connectionfactory.[jndiname] = [ConnectionURL]
-            connectionfactory.qpidConnectionfactory = amqp://guest:guest@clientid/test?brokerlist='tcp://localhost:5672'
-            # Register an AMQP destination in JNDI
-            # destination.[jniName] = [BindingURL]
-            destination.directQueue = direct://amq.direct//QpidStockQuoteService?routingkey='QpidStockQuoteService'
-            destination.replyQueue = direct://amq.direct//replyQueue?routingkey='replyQueue'</pre>
-    </p>
-    <p>
-        Locate and edit the AMQP connection settings file for Synapse, this fle is usually named con.properties.
-        <pre>
-            #initial context factory
-            #java.naming.factory.initial =org.apache.qpid.jndi.PropertiesFileInitialContextFactory
-            # register some connection factories
-            # connectionfactory.[jndiname] = [ConnectionURL]
-            connectionfactory.qpidConnectionfactory=amqp://guest:guest@clientid/test?brokerlist='tcp://localhost:5672'
-            # Register an AMQP destination in JNDI
-            # destination.[jndiName] = [BindingURL]
-            destination.directQueue=direct://amq.direct//QpidStockQuoteService</pre>
-    </p>
-    <h2 id="mailsender">
-      Setting up Mail Transport Sender
-    </h2>
-    <p>
-      To enable the mail transport for samples, you need to uncomment the mail
-      transport sender configuration in the repository/conf/axis2.xml. Uncomment
-      the MailTransportSender sample configuration and make sure it points to a
-      valid SMTP configuration for any actual scenarios.
-    </p>
-    <pre xml:space="preserve">    &lt;transportSender name="mailto" class="org.apache.synapse.transport.mail.MailTransportSender"&gt;
-        &lt;parameter name="mail.smtp.host"&gt;smtp.gmail.com&lt;/parameter&gt;
-        &lt;parameter name="mail.smtp.port"&gt;587&lt;/parameter&gt;
-        &lt;parameter name="mail.smtp.starttls.enable"&gt;true&lt;/parameter&gt;
-        &lt;parameter name="mail.smtp.auth"&gt;true&lt;/parameter&gt;
-        &lt;parameter name="mail.smtp.user"&gt;synapse.demo.0&lt;/parameter&gt;
-        &lt;parameter name="mail.smtp.password"&gt;mailpassword&lt;/parameter&gt;
-        &lt;parameter name="mail.smtp.from"&gt;synapse.demo.0@gmail.com&lt;/parameter&gt;
-    &lt;/transportSender&gt;</pre>
-
-    <h2 id="fixtransport">
-      Configuring Synapse for the FIX Transport
-    </h2>
-    <h3 id="fixsamples">
-      Configuring Synapse for FIX Samples
-    </h3>
-    <p>
-    In order to configure Synapse to run the FIX samples given in this guide you will need to
-    to enable the FIX transport as described in the <a href="transports.html#Setting_up_the_FIX_Transport">transport
-    documentation</a>.
-	In addition you will need to create some FIX configuration files as
-	specified below.
-    </p>
-    <p>
-	The FileStorePath property in the following two files should point
-        to two directories in your local file system. Once the samples
-        are executed, Synapse will create FIX message stores in these two
-        directories.
-    </p>
-    <p>
-      Put the following entries in a file called fix-synapse.cfg
-
-      <pre>[default]
-FileStorePath=examples/target/data/synapse-acceptor
-ConnectionType=acceptor
-StartTime=00:00:00
-EndTime=00:00:00
-HeartBtInt=30
-ValidOrderTypes=1,2,F
-SenderCompID=SYNAPSE
-TargetCompID=BANZAI
-UseDataDictionary=Y
-DefaultMarketPrice=12.30
-
-[session]
-BeginString=FIX.4.0
-SocketAcceptPort=9876</pre>
-    </p>
-    <p>
-      Put the following entries in a file called synapse-sender.cfg
-      <pre>[default]
-FileStorePath=examples/target/data/synapse-initiator
-SocketConnectHost=localhost
-StartTime=00:00:00
-EndTime=00:00:00
-HeartBtInt=30
-ReconnectInterval=5
-SenderCompID=SYNAPSE
-TargetCompID=EXEC
-ConnectionType=initiator
-
-[session]
-BeginString=FIX.4.0
-SocketConnectPort=19876</pre>
-    </p>
-
-    <h3 id="fixsamplesconfig">
-      Configuring Sample FIX Applications
-    </h3>
-    <p>
-      Locate and edit the FIX configuration file of Executor to be as follows.
-      This file is usually named executor.cfg
-      <pre>[default]
-FileStorePath=examples/target/data/executor
-ConnectionType=acceptor
-StartTime=00:00:00
-EndTime=00:00:00
-HeartBtInt=30
-ValidOrderTypes=1,2,F
-SenderCompID=EXEC
-TargetCompID=SYNAPSE
-UseDataDictionary=Y
-DefaultMarketPrice=12.30
-
-[session]
-BeginString=FIX.4.0
-SocketAcceptPort=19876</pre>
-    </p>
-    <p>
-      Locate and edit the FIX configuration file of Banzai to be as follows.
-      This file is usually named banzai.cfg
-      <pre>[default]
-FileStorePath=examples/target/data/banzai
-ConnectionType=initiator
-SenderCompID=BANZAI
-TargetCompID=SYNAPSE
-SocketConnectHost=localhost
-StartTime=00:00:00
-EndTime=00:00:00
-HeartBtInt=30
-ReconnectInterval=5
-
-[session]
-BeginString=FIX.4.0
-SocketConnectPort=9876</pre>
-   </p>
-    <p>
-	The FileStorePath property in the above two files should point
-        to two directories in your local file system.
-    </p>
-    <p>
-	If you are using a binary distribution of Quickfix/J, the two
-	samples and their default configuration files are all packed to a
-	single jar file called quickfixj-examples.jar. You can extract the jar file,
-    replace the modified configuration files and pack
-	them to a jar file again under the same name.
-    You can pass the new configuration file as a command line parameter too, in that case you don't
-    need to modify the quickfixj-examples.jar.
-    You can copy the config files from $SYNAPSE_HOME/repository/conf/sample/resources/fix folder to
-    $QFJ_HOME/etc folder. Execute the sample apps from $QFJ_HOME/bin, ./banzai.sh/bat ../etc/banzai.cfg
-    executor.sh/bat ../etc/executor.sh. 
-    </p>
-    <p>
-    For more information regarding the FIX sample applications please
-    refer the <a href="http://www.quickfixj.org/quickfixj/usermanual/usage/examples.html">Example Applications</a> section in the Quickfix/J
-    documentation. For more information on configuring Quickfix/J applications
-    refer the <a href="http://www.quickfixj.org/quickfixj/usermanual/usage/configuration.html">Configuring Quickfix/J</a> section of the Quickfix/J 
-    documentation.
-    </p>
-    <h2 id="tcp">
-      Setting up the TCP Transport
-    </h2>
-    <p>
-      To enable the TCP transport for samples first you need to download the Axis2 TCP transport
-      jar and copy it to the lib directory of Synapse. This library can be downloaded from the
-      <a href="http://ws.apache.org/commons/transport">WS-Commons Transports</a> website. Then open
-      up the axis2.xml file and uncomment the TCP transport receiver and sender configurations:
-    </p>
-    <pre xml:space="preserve">
-    &lt;transportReceiver name="tcp" class="org.apache.axis2.transport.tcp.TCPServer"&gt;
-	    &lt;parameter name="port"&gt;6060&lt;/parameter&gt;
-    &lt;/transportReceiver&gt;
-
-    &lt;transportSender name="tcp" class="org.apache.axis2.transport.tcp.TCPTransportSender"/&gt;</pre>
-    <p>
-     If you wish to use the sample Axis2 client to send TCP messages, you have to uncomment the TCP
-     transport sender configuration in the samples/axis2Client/client_repo/conf/axis2.xml file.
-    </p>
-
-    <h2 id="udp">
-      Setting up the UDP Transport
-    </h2>
-    <p>
-      To enable the UDP transport for samples first you need to download the Axis2 UDP transport
-      jar and copy it to the lib directory of Synapse. This library can be downloaded from the
-      <a href="http://ws.apache.org/commons/transport">WS-Commons Transports</a> website. Then
-      open up the axis2.xml file and uncomment the UDP transport receiver and sender configurations:
-    </p>
-    <pre xml:space="preserve">
-    &lt;transportReceiver name="udp" class="org.apache.axis2.transport.udp.UDPListener"/&gt;
-
-    &lt;transportSender name="udp" class="org.apache.axis2.transport.udp.UDPSender"/&gt;</pre>
-    <p>
-     If you wish to use the sample Axis2 client to send UDP messages, you have to uncomment the UDP
-     transport sender configuration in the samples/axis2Client/client_repo/conf/axis2.xml file.
-    </p>
-
-    <h2 id="local">
-      Setting up the Non Blocking Local Transport
-    </h2>
-    <p>
-      To enable the Local transport for samples first you need to download the Axis2 Local transport
-      jar (ie. axis2-transport-local-1.7.0-SNAPSHOT.jar) and copy it to the lib directory of Synapse. Then
-      open up the axis2.xml file and uncomment the Local transport sender configuration:
-    </p>
-    <pre xml:space="preserve">
-    &lt;transportSender name="local" class="org.apache.axis2.transport.local.NonBlockingLocalTransportSender"/&gt;</pre>
-    <p>
-     The Local transport implementation comes with a TransportSender only. It does not ship a TransportListener.
-    </p>
-
-    <h2 id="script">
-      Configuring Synapse for Script Mediator Support
-    </h2>
-
-    <p>
-      The Synapse Script Mediator is a Synapse extension, and thus all
-      prerequisites are not bundled by default with the Synapse distribution.
-      Before you use some script mediators you may need to manually add the
-      required jar files to the Synapse lib directory, and optionally perform
-      other installation tasks as may be required by the individual scripting
-      language. This is explained in the following sections.
-    </p>
-    <h4>
-      JavaScript Support
-    </h4>
-    <p>
-      The JavaScript/E4X support is enabled by default and comes ready-to-use
-      with the Synapse distribution.
-    </p>
-    <h4>
-      Ruby Support
-    </h4>
-    <p>
-      For Ruby support you need to download the 'jruby-complete.jar' from the
-      Maven repository for JRuby, and copy it into the 'lib' folder of Synapse .
-      The JRuby JAR can be downloaded from <a
-      href="http://repo2.maven.org/maven2/org/jruby/jruby-complete/1.3.0/jruby-complete-1.3.0.jar">
-      here</a>.
-    </p>
-
-    <h2 id="json">
-      Configuring Synapse for JSON Support
-    </h2>
-
-    <p>
-      <a href="http://json.org">JSON</a> is a lightweight data-interchange format.
-      It can be used as an alternative to XML or SOAP. To enable the JSON support
-      in Synapse, following two jar files should be deployed into the 'lib' directory
-      of Synapse.
-    </p>
-    <ul>
-        <li><a href="http://repo1.maven.org/maven2/org/apache/axis2/axis2-json">axis2-json.jar</a></li>
-        <li><a href="http://jettison.codehaus.org/Download">jettison.jar</a></li>
-    </ul>
-    <p>
-      Having deployed the necessary libraries you should now register the JSON message
-      builder and formatter with Synapse. Open up 'repository/conf/axis2.xml' file
-      of Synapse and add the following two entries under the 'messageBuilders' and
-      'messageFormatters' sections respectively.
-    </p>
-    <pre>
-      &lt;messageBuilder contentType="application/json"
-                         class="org.apache.axis2.json.JSONOMBuilder"/&gt;
-
-      &lt;messageFormatter contentType="application/json"
-                         class="org.apache.axis2.json.JSONMessageFormatter"/&gt;
-    </pre>
-    <p>
-      If you are planning to run sample 440, you should also add the above two entries
-      to the 'samples/axis2Client/client_repo/conf/axis2.xml' file.
-    </p>    
-
-    <h2 id="derby">
-      Setting up Derby database server
-    </h2>
-    <p>
-      You can download Apache Derby distribution from <a
-      href="http://db.apache.org/derby/">http://db.apache.org/derby/</a>
-    </p>
-    <ol>
-      <li>
-        Set up and start the Derby network server
-      </li>
-      <li>
-        Create and open a connection to the database using the Derby client
-        driver<br/>
-        <pre> CONNECT 'jdbc:derby://localhost:1527/synapsedb;user=synapse;password=synapse;create=true';</pre>
-      </li>
-      <li>
-        Create a table using the following statement
-        <pre> CREATE table company(name varchar(10), id varchar(10), price double);</pre>
-      </li>
-      <li>
-        Inserts some data using following statements
-        <pre> INSERT into company values ('IBM','c1',0.0);
- INSERT into company values ('SUN','c2',0.0);
- INSERT into company values ('MSFT','c3',0.0);</pre>
-      </li>
-    </ol>
-    <p>
-      When using Derby, you need to add derby.jar, derbyclient.jar and
-      derbynet.jar to the classpath. This can be done by putting the above three
-      jars into the Synapse lib directory. For testing these samples Derby
-      10.1.1.0 binary distribution was used.
-    </p>
-    <p>
-      You can use any other database product instead of Derby. Then you have to
-      change the database connection details accordingly. Also you have to copy
-      the required database driver jars to the Synapse classpath.
-    </p>
-
-    <h2 id="mysql">
-      Setting Up MySQL database server
-    </h2>
-    <p>
-      You can use a MySQL installation to try out certain database mediator samples.
-      You can download MySQL distribution from <a
-      href="http://dev.mysql.com/downloads/">http://dev.mysql.com/downloads/</a>
-    </p>
-    <ol>
-      <li>
-        Set up and start the MySQL server
-      </li>
-      <li>
-        Create a sample databasae<br/>
-        <pre> DROP DATABASE IF EXISTS synapsedb;
- CREATE DATABASE synapsedb;</pre>
-      </li>      
-      <li>
-        Create a table in the sample database
-        <pre> USE synapsedb; 
- DROP TABLE IF EXISTS company;
- CREATE table company(name varchar(10), id varchar(10), price double);</pre>
-      </li>
-      <li>
-        Inserts some data using following statements
-        <pre> INSERT into company values ('IBM','c1',3.7563);
- INSERT into company values ('SUN','c2',3.8349);
- INSERT into company values ('MSFT','c3',3.2938);</pre>
-      </li>
-      <li>Create a Stored Procedures<br/>
-        <pre> DROP PROCEDURE If EXISTS getCompany;
- CREATE PROCEDURE getCompany(compName VARCHAR(10)) SELECT name, id, price FROM company WHERE name = compName;
-
- DROP PROCEDURE If EXISTS updateCompany;
- CREATE PROCEDURE updateCompany(compPrice DOUBLE,compName VARCHAR(10)) UPDATE company SET price = compPrice WHERE name = compName;
-</pre>
-      </li>
-    </ol>
-    <p>
-      When using MySQL, you need to add mysql-connector-java.jar to the Synapse classpath. This can be done
-      by putting the above mentioned jar into the Synapse lib directory. For testing the samples
-      MySQL-5.0.75 distribution and mysql-connector-java-5.1.12-bin.jar was used.
-    </p>
-    <p>
-      You can use any other database product instead of MySQL. Then you have to
-      change the database connection details accordingly. Also you have to copy
-      the required database driver jars to the Synapse classpath.
-    </p>
-    <h2>Key Stores Configurations</h2>
-
-<div>
-<p>This configuration is to be used in any location that needs key stores. This is currently used
-    for creating https URL connections and configuring secret manager. This configuration can be
-    specified on synapse.properties. Following shows a sample.
-</p>
-
-<div>
-    <p>
-        <strong>KeyStores configurations
-            <br/>
-        </strong>
-    </p>
-    <pre># KeyStores configurations
-
-        keystore.identity.location=lib/identity.jks
-        keystore.identity.type=JKS
-        keystore.identity.alias=synapse
-        keystore.identity.store.password=password
-        keystore.identity.key.password=password
-        #keystore.identity.parameters=enableHostnameVerifier=false;keyStoreCertificateFilePath=/home/esb.cer
-
-        keystore.trust.location=lib/trust.jks
-        keystore.trust.type=JKS
-        keystore.trust.alias=synapse
-        keystore.trust.store.password=password
-        #keystore.trust.parameters=enableHostnameVerifier=false;keyStoreCertificateFilePath=/home/esb.cer
-
-    </pre>
-</div>
-<p>Note: In the case where use for configuring key store for secret manager, the passwords in the
-    above configurations act as only just alias. There are some mechanisms that can be used to
-    provide actual password for these aliases. Those are described under <strong>Securing Password</strong>.</p>
-</div>
-        <h2>Securing Password</h2>
-
-<div>
-<p>All secrets are managed using Secret Manager. Secret Manager keeps any number of secret
-    repositories.
-    Those are arranged in a cascade manger. Secrets can be accessed by providing alias for those.
-
-    Key Stores needed for Secret Manager and secret repositories need to be configured according to
-    the<strong>Key Stores Configurations</strong>. In this case, all the passwords in the key store
-    configuration
-    contains only alias to refer actual password. For example
-    keystore.identity.storePassword=password
-    Here
-    <strong>password</strong>
-    is an alias and to be used to get actual password
-
-    In order to resolve above passwords (i.e. to get actual passwords); it is needed to provide a
-    <strong>password provider</strong>
-    for each keystore.
-    This can be done by adding property called
-    <strong>secretProvider= any implementation of
-        org.apache.synapse.securevault.secret.SecretCallbackHandler
-    </strong>
-    Example
-    <pre>
-        keystore.identity.store.secretProvider=org.apache.synapse.securevault.secret.handler.JMXSecretCallbackHandler
-    </pre>
-</p>
-<p>
-    The  <strong>password provider</strong> should be an implementation of
-     <strong>org.apache.synapse.securevault.secret.SecretCallbackHandler</strong>.Synapse ships three
-    implementations that can be used for this purpose.
-
-    <ul>
-        <li>
-            org.apache.synapse.securevault.secret.handler.JMXSecretCallbackHandler
-        </li>
-        <li>
-            org.apache.synapse.securevault.secret.handler.JlineSecretCallbackHandler
-        </li>
-        <li>
-            org.apache.synapse.securevault.secret.handler.HardCodedSecretCallbackHandler
-        </li>
-        <li>
-            org.apache.synapse.securevault.secret.handler.JBossEncryptionSecretCallbackHandler
-        </li>
-    </ul>
-    <p>
-        When use <strong>org.apache.synapse.securevault.secret.handler.JMXSecretCallbackHandler</strong>
-        , It is needed to use a JMX Console. Then , using JMX Console need to access the MBean
-        <strong>SecretsProvider</strong>
-        and add passwords for following keys. Therese is method to add secret in
-        <strong>SecretsProvider</strong>
-        MBean.
-
-        <ul>
-            <li>identity.store.pass</li>
-            <li>trust.store.pass</li>
-            <li>identity.key.pass</li>
-        </ul>
-
-        Note: These keys are only meaningful to SecretManager.
-
-        There is a <strong>ServerManager</strong> MBean that can be used to start synapse.
-    </p>
-</p>
- <p>Secret repository can be configured using <strong>synape.properties</strong>.</p>
-<div>
-    <p>
-        <strong>Secret repositories
-            <br/>
-        </strong>
-    </p>
-    <pre>secretRepositories=file
-
-        secretRepositories.file.provider=org.apache.synapse.securevault.secret.repository.FileBaseSecretRepositoryProvider
-        secretRepositories.file.location=cipher-text.properties
-
-    </pre>
-</div>
-<p>
-    Currently, there is only one secret repository and it is  <strong>FileBaseSecretRepository</strong>. It use
-    <strong>cipher-text.properties</strong> to keep secrets. A sample file is shown bellow.
-
-</p>
-<div>
-    <p>
-        <strong>Sample cipher-text.properties
-            <br/>
-        </strong>
-    </p>
-    <pre>aliases=synapse
-
-        # configuration per each plaintext
-        synapse.secret=EsY65tztE9R5b9pErVxLp8Br5d3ol6vRdWAkYHdc7XkZteGf37VJ+iNlCenqxYSEto0vcjpcmmzwf7K2wd9u3KQtVGKEoNLSe2LYZtrm3tKmGd6PX9YpdN72ml3JISNXPJ69yybFi6DVUIJfE5MFOd7gswWfCnkmZ3eJ6M1nuiI=
-        synapse.secret.algorithm=RSA
-        synapse.secret.alias=synapse
-        synapse.secret.keystore=identity
-
-
-    </pre>
-</div>
-<p>
-    To run synapse with secret manager, it is needed to set <strong>deployment mode</strong> into
-    <strong>production</strong> and this can be done using wrapper.conf. There is an inline document on that configuration about
-    where to set this value.
-</p>
-</div>
-        <h2>Setting up Synapse DataSources</h2>
-
-<div>
-<p>Definition of the reusable database connection pool or datasources can be
-done using synapse.properties file. It is possible to configure any number of
-datasources. Currently only two types of datasources are supported and those are
-based on <a href="http://commons.apache.org/dbcp/">Apache DBCP</a> datasources: BasicDataSource and
-PerUserPoolDataSource. Following configuration includes
-both two definitions. This configuration is related with sample 363.</p>
-
-
-<p>Configuration is somewhat similar to the log4j appender configuration.</p>
-
-
-<p>It requires two databases, follow the above specified (Setting up
-Derby Database server) steps to create the two databases
-<strong>'jdbc:derby://localhost:1527/lookupdb'</strong>,
-<strong>'jdbc:derby://localhost:1527/reportdb'</strong> using the user name and password as
-'synapse'. Fill in the data for those two databases as per described in the above section</p>
-
-<div>
-<p><strong>synapse.properties configuration <br />
-</strong></p>
-<pre>#datasources
-synapse.datasources=lookupds,reportds
-synapse.datasources.icFactory=com.sun.jndi.rmi.registry.RegistryContextFactory
-synapse.datasources.providerUrl=rmi://localhost:2199
-synapse.datasources.providerPort=2199
-
-synapse.datasources.lookupds.type=BasicDataSource
-synapse.datasources.lookupds.driverClassName=org.apache.derby.jdbc.ClientDriver
-synapse.datasources.lookupds.url=jdbc:derby://localhost:1527/lookupdb;create=false
-synapse.datasources.lookupds.username=synapse
-synapse.datasources.lookupds.password=synapse
-synapse.datasources.lookupds.dsName=lookupdb
-synapse.datasources.lookupds.maxActive=100
-synapse.datasources.lookupds.maxIdle=20
-synapse.datasources.lookupds.maxWait=10000
-
-synapse.datasources.reportds.type=PerUserPoolDataSource
-synapse.datasources.reportds.cpdsadapter.factory=org.apache.commons.dbcp.cpdsadapter.DriverAdapterCPDS
-synapse.datasources.reportds.cpdsadapter.className=org.apache.commons.dbcp.cpdsadapter.DriverAdapterCPDS
-synapse.datasources.reportds.cpdsadapter.name=cpds
-synapse.datasources.reportds.dsName=reportdb
-synapse.datasources.reportds.driverClassName=org.apache.derby.jdbc.ClientDriver
-synapse.datasources.reportds.url=jdbc:derby://localhost:1527/reportdb;create=false
-synapse.datasources.reportds.username=synapse
-synapse.datasources.reportds.password=synapse
-synapse.datasources.reportds.maxActive=100
-synapse.datasources.reportds.maxIdle=20
-synapse.datasources.reportds.maxWait=10000</pre>
-</div>
- <p>To secure data sources password, it is need to use secret manager. Please first refer that
-    document before reading this. If the secret manager is used, then passwords that have been
-    specified are considered as aliases and those are used for picking actual passwords. To get
-    password securely, it is needed to set the password provider for each data source.
-    The
-    <strong>password provider</strong>
-    should be an implementation of
-    <strong>org.apache.synapse.securevault.secret.SecretCallbackHandler</strong>. There are few
-    options but it is
-    recommended to use
-    <strong>org.apache.synapse.securevault.secret.handler.SecretManagerSecretCallbackHandler</strong>
-    in this case
-    (i.e. securing data source password).
-</p>
-<p>
-<strong>A sample configuration for above
-    <strong>lookupds</strong>
-    data source to use password provider
-    <br/>
-</strong>
-</p>
-<pre>
-    synapse.datasources.lookupds.secretProvider=org.apache.synapse.securevault.secret.handler.SecretManagerSecretCallbackHandler
-</pre>  
-</div>
-<h2>Using CipherTool</h2>
-
-<div>
-<p>
-    This is a simple tool for encrypting and decrypting simple texts such as passwords.
-
-    The arguments that are inputs to this tool with their meanings are shown bellow.
-    <ul>
-        <li><strong>keystore</strong> If keys are in a store , it's location</li>
-        <li><strong>storepass</strong> Password for access keyStore</li>
-        <li><strong>keypass</strong> To get private key</li>
-        <li><strong>alias</strong> Alias to identify key owner</li>
-        <li><strong>storetype</strong> Type of keyStore , Default is JKS </li>
-        <li><strong>keyfile</strong> If key is in a file</li>
-        <li><strong>opmode</strong> encrypt or decrypt , Default is encrypt </li>
-        <li><strong>algorithm</strong> encrypt or decrypt algorithm , Default is RSA</li>
-        <li><strong>source</strong> Either cipher or plain text as an in-lined form</li>
-        <li><strong>outencode</strong> Currently base64 and use for encode result</li>
-        <li><strong>inencode</strong> Currently base64 and use to decode input</li>
-        <li><strong>trusted</strong>  Is KeyStore a trusted store? If presents this, consider as a trusted store</li>
-    </ul>
-</p>
-
-<p>The required scripts (
-    <strong>ciphertool.bat</strong>
-    and <strong>ciphertool.sh</strong>) are available in bin directory.
-</p>
-
-<div>
-    <p>
-        <strong>A simple encrypting sample
-            <br/>
-        </strong>
-    </p>
-    <p>
-        <strong>ciphertool.bat -source synapse -keystore lib\trust.jks -storepass password -alias synapse -outencode base64 -trusted
-            <br/>
-        </strong>
-    </p>
-    <pre>ciphertool.bat -source synapse -keystore lib\trust.jks -storepass password -alias synapse -outencode base64 -trusted
-        Using SYNAPSE_HOME: C:\Project\apache\synapse\trunck2\modules\distribution\target\synapse-2.1.0-SNAPSHOT
-        Using JAVA_HOME: C:\Program Files\Java\jdk1.5.0_14
-        Output : VbwH1pePwf4XmUtCdIvO0MA/EZPl8YK+E0kGkMpFd7CbWKpR2h1evTv902zoVorbJbHsVDNXfuvUUGmQAptUl4GknAm4bgZsgQ/pbsRbXivRkNzg9JVqw3FzWkR2uN2ZCHSacC4IdUwOjSDOTQ+kH7se
-        58kt2xqJSax2a9pdL1w=
-    </pre>
-</div>
-</div>
-</body>
-</document>
diff --git a/src/site/xdoc/building.xml b/src/site/xdoc/building.xml
deleted file mode 100755
index 47e7b40..0000000
--- a/src/site/xdoc/building.xml
+++ /dev/null
@@ -1,88 +0,0 @@
-<document>
-    <properties>
-        <title>How to build Apache Synapse</title>
-    </properties>
-<body>
-<section name="Obtaining the code">
-<p>
-    You can obtain the code by downloading the <a class="externalLink" href="http://ws.apache.org/synapse/download/1.2/download.cgi">source distribution</a> or, more commonly, checking out the source from Subversion (SVN).
-    To checkout the code from <a class="externalLink" href="http://subversion.tigris.org/">Subversion</a>, firstly get subversion installed, then use the following commands:
-    <pre>svn co http://svn.apache.org/repos/asf/synapse/trunk/java [path-where-you-want-the-code]</pre>
-    If you are a committer then you need to use the secure version:
-    <pre>svn co https://svn.apache.org/repos/asf/synapse/trunk/java [path-where-you-want-the-code]</pre></p>
-</section>
-<section name="Building">
-<p>
-The first thing you need to build the code is JDK1.5 and <a class="externalLink" href="http://maven.apache.org/download/">Maven2</a>. You need at least version 2.0.7.
-Synapse is not yet tested on JDK1.6 or above.
-</p>
-<p>
-To build, in the top level  Synapse folder do:
-<pre>
-mvn clean install
-</pre></p>
-<p>
-To build the distribution archive packages do (the distribution archives are created in new folder named target):
-<pre>
-mvn assembly:assembly -Drelease
-</pre></p>
-</section>
-<section name="Offline builds">
-<p>
-The first time you build Maven downloads all the required dependency jars to your local repository,
-after there has been a successful build you can add the &quot;-o&quot; parameter to  the above commands to run in offline mode
-which avoids going out to remote Maven repositories. The result - the build runs faster.
-<hr />
-<pre>
-mvn clean install -o
-</pre>
-or
-<pre>
-mvn assembly:assembly -Drelease -o
-</pre></p>
-</section>
-<section name="Skipping tests">
-<p>
-If you don't want to have all the Synapse test cases run during the build you can add the parameter &quot;-Dmaven.test.skip=true&quot;, eg:
-<pre>
-mvn clean install -o -Dmaven.test.skip=true
-</pre>
-or
-<pre>
-mvn assembly:assembly -Drelease -o -Dmaven.test.skip=true
-</pre></p>
-</section>
-<section name="Updating_Snapshots">
-<p>
-Sometimes the trunk build uses snapshot versions of some dependency jars which can go out
-of date but may not get refreshed in your local Maven repository even when the &quot;-o&quot; parameter is not used.
-So if you get build failures you can try refreshing any snapshot dependencys with the &quot;-U&quot; parameter, eg:
-<pre>
-mvn clean install -U
-</pre>
-By default the Maven local repository is in your home directory, you can change this so the build
-uses use a different local repository with the parameter &quot;-Dmaven.repo.local=&quot;, eg:
-<pre>
-mvn clean install -Dmaven.repo.local=\Synapse\MyRepo
-</pre></p>
-</section>
-<section name="Eclipse_Projects">
-<p>
-You can create Eclipse project definitions for Synapse (that can be imported directly into Eclipse).
-At the top level Synapse folder run:
-<pre>
-mvn eclipse:eclipse
-</pre>
-Now within eclipse you can import those Synapse projects into an Eclipse workspace.
-From Eclipse do File -&gt; Import, expand the &quot;General&quot; toggle and choose &quot;Existing Projects into  Workspace&quot;,
-click Next, click Browse and navigate to your Synapse SVN folder, click OK and it should find the six Synapse projects,
-click Finish. That should set up the projects and show them in the Package Explorer.
-There will be lots of compile errors about missing classpath entries,
-to fix this select Window -&gt; Preferences, expend the Java toggle, then expand the Build Path toggle and
-select Classpath Variables.
-Click New and use the name &quot;M2_REPO&quot; and then click Folder and navigate to you local Maven repository
-(eg C:/Documents and Settings/Administrator/.m2/repository), click OK and again OK and it should rebuild everything with all the compile errors gone.
-</p>
-</section>
-    </body>
-    </document>
\ No newline at end of file
diff --git a/src/site/xdoc/dev/best-practices.xml b/src/site/xdoc/dev/best-practices.xml
new file mode 100644
index 0000000..df5fede
--- /dev/null
+++ b/src/site/xdoc/dev/best-practices.xml
@@ -0,0 +1,147 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+  ~  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.
+  -->
+
+<document>
+    <properties>
+        <title>Apache Synapse - Development Best Practices</title>
+    </properties>
+    <body>
+        <section name="Development Best Practices">
+            <p>
+                This document explains the best practices and conventions that should be followed
+                when writing code, documentation and samples for Apache Synapse. It is mainly
+                intended for Synapse committers who directly commit code into the Synapse code base.
+                It is also a useful resource for potential contributors who are willing to
+                write code for Synapse.
+            </p>
+            <p>
+                Committers are highly encouraged to follow the guidelines mentioned in this document
+                whenever adding a new source file to the code base or when modifying an existing source
+                file. Same best practices should be followed when committing a patch provided by
+                a contributor.
+            </p>
+            <p>
+                This document is a work in progress. We will continue to make this more detailed
+                and comprehensive as we go along. So stay tuned for updates.
+            </p>
+            <subsection name="Contents">
+                <ul>
+                    <li><a href="#Code">Writing Code</a></li>
+                    <li><a href="#Docs">Writing Samples and Documentation</a></li>
+                </ul>
+            </subsection>
+        </section>
+        <section name="Writing Code" id="Code">
+            <ul>
+                <li>
+                    We follow the standard
+                    <a href="http://www.oracle.com/technetwork/java/codeconvtoc-136057.html">Java coding conventions</a>
+                    published by Sun/Oracle. Please stick to these standards whenever writing code
+                    for Synapse.
+                </li>
+                <li>
+                    The maximum number of characters in a single line should not exceed 100. Please
+                    configure your IDE to properly enforce this restriction on all source files.
+                </li>
+                <li>
+                    All source files should contain the following license header at the top.<br/>
+                    <div class="xmlConf">/*
+ *  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.
+ */</div>
+                </li>
+                <li>
+                    Pay attention to indentation and proper spacing between code blocks.
+                </li>
+                <li>
+                    Each Java source file should have a introductory Javadoc comment describing its
+                    main purposes and features.
+                </li>
+                <li>
+                    Every public method should have a Javadoc comment describing its purpose and
+                    behavior. When writing Javadoc comments for methods, input arguments, return
+                    values and checked exceptions should also be clearly explained.
+                </li>
+                <li>
+                    Use meaningful names for all classes, interfaces, methods and variables. Pay
+                    attention to spellings. Code should be easier to follow and understand.
+                </li>
+                <li>
+                    Feel free to include comments within the code to explain non-trivial logic.
+                </li>
+                <li>
+                    When removing a public method or an API, first deprecate the relevant operations
+                    by applying the proper Javadoc annotations. Actual removal of the operation
+                    should be done after some time, in a future release.
+                </li>
+                <li>
+                    Write test cases for each new feature and bug fix implemented in the code base.
+                    Test cases make it easier to check for regressions and keep the code base
+                    healthy at all times.
+                </li>
+            </ul>
+        </section>
+        <section name="Writing Samples and Documentation" id="Docs">
+            <ul>
+                <li>
+                    All documentation files and samples should we well-formed XML documents.
+                </li>
+                <li>
+                    We use the <a href="http://maven.apache.org/maven-1.x/plugins/xdoc/">Maven XDoc plugin</a>
+                    to generate Synapse documentation and website. Please take some time to go through
+                    the documentation of the XDoc plugin and learn and its features. In pariculay,
+                    you should learn the <a href="http://maven.apache.org/doxia/references/xdoc-format.html">XDoc documentation format</a>
+                    and use the standard XDoc tags over HTML whenever possible.
+                </li>
+                <li>
+                    Any XML code samples included in the documentation should be properly HTML
+                    encoded and indented. Such code samples should go in a HTML 'div' section withe
+                    the class 'xmlConf'.
+                    <div class="xmlConf">&lt;div class="xmlConf"&gt;
+    ... Encoded XML content ...
+&lt;/div&gt;</div>
+                </li>
+                <li>
+                    Attempt to keep each line shorter than 100 characters. This is bit tricky to
+                    enforce when writing XML/HTML content. But try to stick to the rule whenever
+                    possible.
+                </li>
+                <li>
+                    Add navigation links wherever possible. When describing a particular feature
+                    add a link to the relevant sample.
+                </li>
+            </ul>
+        </section>
+    </body>
+</document>
\ No newline at end of file
diff --git a/src/site/xdoc/dev/developer-guide.xml b/src/site/xdoc/dev/developer-guide.xml
new file mode 100644
index 0000000..4a66ab7
--- /dev/null
+++ b/src/site/xdoc/dev/developer-guide.xml
@@ -0,0 +1,269 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+  ~  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.
+  -->
+
+<document>
+    <properties>
+        <title>Apache Synapse - Developer Guide</title>
+    </properties>
+    <body>
+        <section name="Developer Guide">
+            <p>
+                Welcome to Apache Synapse Developer Guide. This document is a starting point for
+                anyone who's willing to write code for Synapse and make contributions. We welcome
+                several different types of contributions such as ideas, new features, bug fixes,
+                documentation and samples. This guide strives to provide information on how you can
+                get the Synapse source code, how to setup the development environment and how to
+                make contributions. Further it provides instructions on how to get in touch with the
+                other developers, how to report issues and how to keep track of development activities.
+            </p>
+            <p>
+                If you are an experienced Synapse developer or already a committer
+                for Synapse, this document might still contain useful information on setting up
+                your working copy of the source code and committing code changes. So feel free to
+                read all the way through.
+            </p>
+        </section>
+        <section name="Contents">
+            <ul>
+                <li>
+                    <a href="#subversion">Interacting with the Code Base Using Subversion</a>
+                    <ul>
+                        <li><a href="#checkout">Checking Out the Source</a></li>
+                    </ul>
+                </li>
+                <li>
+                    <a href="#maven">Interacting with the Build System Using Apache Maven</a>
+                    <ul>
+                        <li><a href="#building">Building from Source</a></li>
+                        <li><a href="#environment">Setting Up the Development Environment</a></li>
+                        <li><a href="#integration">Integration Tests</a></li>
+                        <li><a href="#testdebug">Debugging Tests</a></li>
+                    </ul>
+                </li>
+                <li>
+                    <a href="#debug">Debugging the Synapse Server</a>
+                </li>
+                <li>
+                    <a href="#issues">Reporting Issues</a>
+                </li>
+                <li>
+                    <a href="#contrib">Making Contributions</a>
+                </li>
+            </ul>
+        </section>
+        <section name="Interacting with the Code Base Using Subversion" id="subversion">
+            <p>
+                Synapse code base is maintained in a Subversion repository. Therefore anybody willing
+                to go through the Synapse source code in the development trunk and make contributions
+                should use a Subversion client to interact with the Synapse code base. To learn more
+                about using Subversion or to download the latest client distributions, please visit
+                the <a href="http://subversion.apache.org">Apache Subversion project website</a>.
+                Developers on Unix/Linux based systems may use the command line based SVN client,
+                while the developers on Windows platform can use an appropriate client application
+                like <a href="http://tortoisesvn.net/">TortoiseSVN</a>.
+            </p>
+            <p>
+                Some useful information on using the Apache Software Foundation's source code
+                repositories can be found among the ASF
+                <a href="http://www.apache.org/dev/version-control.html">developer documentation</a>.
+            </p>
+            <subsection name="Checking Out the Source" id="checkout">
+                <p>
+                    Synapse development trunk is where all the latest development work takes place.
+                    This is located at
+                    <a href="http://svn.apache.org/repos/asf/synapse/trunk/java/">http://svn.apache.org/repos/asf/synapse/trunk/java/</a>.
+                    Any developer with a Subversion client should be able to checkout the latest
+                    source from this SVN location but only Synapse committers are allowed to actually
+                    commit source code. Synapse committers should access the above SVN location over
+                    HTTPS and provide the ASF committer credentials to checkout and commit source
+                    code. Please refer the <a href="../source-repository.html">source repository guide</a>
+                    for more details on checking out the source code from the above repository.
+                </p>
+                <p>
+                    Once you have checked out the source code, you can update your working copy by
+                    running the 'svn update' command. This will checkout the modifications since the
+                    last checkout/update and bring your local working copy to the latest revision.
+                </p>
+                <p>
+                    If you want to browse the source code of an older release of Synapse or want
+                    to implement a patch for a past release, you may checkout the relevant source
+                    tree from one of the available SVN
+                    <a href="http://svn.apache.org/repos/asf/synapse/tags/">tags</a>.
+                </p>
+            </subsection>
+        </section>
+        <section name="Interacting with the Build System Using Apache Maven" id="maven">
+            <p>
+                Synapse build system is based on Apache Maven. Either Maven2 or Maven3 can be used to
+                build Apache Synapse from source. For information about downloading, installing, and
+                configuring Maven, please go through
+                <a class="externalLink" href="http://maven.apache.org">Maven project website</a>.
+            </p>
+            <subsection name="Building from Source" id="building">
+                <p>
+                    To build all the modules and the Synapse binary distribution, go to
+                    the root of the Synapse source tree and execute the following Maven command.
+                </p>
+                <div class="command">mvn clean install</div>
+                <p>
+                    This will fetch all the required dependencies, compile the source, run the tests
+                    and build the Synapse modules and the binary pack. Please note that building
+                    with tests takes time. To build without the tests, use the following Maven
+                    command.
+                </p>
+                <div class="command">mvn clean install -Dmaven.test.skip=true</div>
+                <p>
+                    Developers and committers making changes to the Synapse code base are highly
+                    recommended to always build the source 'WITH' the tests. This will ensure that
+                    changes do not introduce any obvious regression errors. However running all the
+                    tests does not guarantee that a particular change will not introduce any
+                    regressions. Therefore care must be exercised whenever making changes to the
+                    existing code.
+                </p>
+                <p>
+                    Synapse source tree is organized into several modules. If required you can build
+                    only a selected module by going into the appropriate module and executing one
+                    of the above build commands.
+                </p>
+            </subsection>
+            <subsection name="Setting Up the Development Environment" id="environment">
+                <p>
+                    Apache Synapse development can be based on a number of tools ranging from simple
+                    command line tools like Vim and Emacs to full fledged Java IDEs like Eclipse,
+                    IntelliJ Idea and Netbeans. If Eclipse or Idea is used to develop code for
+                    Synapse, Maven can be used to build the necessary project artifacts.
+                </p>
+                <p>
+                    Simply run the following commands to generate the project artifacts and then
+                    use your IDE to open up the Synapse code base as a Java project.
+                </p>
+                <div class="command">For Idea: mvn idea:idea
+For Eclipse: mvn eclipse:eclipse</div>
+            </subsection>
+            <subsection name="Integration Tests" id="integration">
+                <p>
+                    Starting from Synapse 2.1, a suite of integration tests are included in the
+                    Synapse code base. These tests automate various samples included in the Synapse
+                    binary distribution and provide a convenient way to sanity check a Synapse
+                    distribution and find any regressions. If you build the source tree from the root
+                    without skipping the test cases, these integration tests will be executed by
+                    Maven as a part of the build process. If you just need to run the integration
+                    tests simply go into the modules/integration directory in the source tree and
+                    run the usual Maven build command.
+                </p>
+                <p>
+                    Synapse integration test suite uses the Maven Surefire plugin. Therefore all
+                    tests will generate a report which will be available in the
+                    modules/integration/target/surefire-reports directory. If you ever encounter
+                    a failure while running the integration tests, this is the first place to check.
+                </p>
+                <p>
+                    You can pass additional parameters to the Synapse integration test framework and
+                    limit the number of tests executed by Maven. For an example if you simply want
+                    to run sample 10 in the integration test framework, run the following command.
+                </p>
+                <div class="command">mvn clean install -Dtests=10</div>
+                <p>
+                    You can also run a list of known samples as an integration test.
+                </p>
+                <div class="command">mvn clean install -Dtests=10,11,12</div>
+                <p>
+                    Synapse samples are categorized into several sections. If needed you can run all
+                    the samples in a particular section.
+                </p>
+                <div class="command">mvn clean install -Dsuite=proxy</div>
+                <div class="command">mvn clean install -Dsuite=endpoint</div>
+                <p>
+                    Following values can be passed in as the value of the 'suite' parameter.
+                </p>
+                <ul>
+                    <li>message</li>
+                    <li>endpoint</li>
+                    <li>qos</li>
+                    <li>proxy</li>
+                    <li>tasks</li>
+                    <li>advanced</li>
+                </ul>
+            </subsection>
+            <subsection name="Debugging Tests" id="testdebug">
+                <p>
+                    Maven allows you to remote debug tests at build time. To make use of this
+                    feature simply run the Maven build command with the -Dmaven.surefire.debug
+                    flag.
+                </p>
+                <div class="command">mvn clean install -Dmaven.surefire.debug</div>
+                <p>
+                    This will open up port 5005 for remote debugging and you can use your IDE to
+                    connect to that port and remote debug the test source (or even Synapse source).
+                </p>
+            </subsection>
+        </section>
+        <section name="Debugging the Synapse Server" id="debug">
+            <p>
+                If you are running the Synapse binary distribution and wants to debug the server
+                to fix some issue, simply start the server with the -xdebug option.
+            </p>
+            <div class="command">sh synapse.sh -xdebug</div>
+            <p>
+                This will open up port 8000 for remote debugging. Now you can connect to the server
+                from your IDE and remote debug it against the source code. If you want to debug a
+                message flow in Synapse, it's recommended to place some break points in the
+                org.apache.synapse.core.axis2.SynapseMessageReceiver and org.apache.synapse.core.axis2.ProxyServiceMessageReceiver
+                classes.
+            </p>
+        </section>
+        <section name="Reporting Issues" id="issues">
+            <p>
+                Please report all issues in the <a href="../issue-tracking.html">Synapse JIRA</a>.
+                You can also create JIRA issues for any suggestions, improvements and new features
+                you have in mind. If you wish to further discuss some idea with the rest of the
+                Synapse community, please write to the appropriate <a href="../mail-lists.html">mailing lists</a>.
+            </p>
+            <p>
+                You are also encouraged to comment on other issues in the Synapse JIRA, ask questions
+                and if possible make code/documentation contributions.
+            </p>
+        </section>
+        <section name="Making Contributions" id="contrib">
+            <p>
+                If you have implemented a new feature, fixed some bug in the code or written a new
+                sample, we'll be more than happy to review it and include it in the Synapse code
+                base for everyone's benefit. If you are interested in contributing your work to Synapse,
+                please create an issue in the JIRA system first. Then you can attach your workings to
+                the JIRA issue as a patch.
+            </p>
+            <p>
+                To create a patch file out of your work simply run the 'svn diff' command.
+            </p>
+            <div class="command">svn diff > FixForIssue123.patch</div>
+            <p>
+                If you added any new files as a part of your work you should first run the 'svn add'
+                command on them before creating the patch file. Otherwise they won't be included
+                in the generated patch.
+            </p>
+            <p>
+                Once the patch file has been created, attach it to the relevant JIRA issue and make
+                sure to grant the ASF permission to use your patch in ASF development activities.
+                One of the committers will review your work and provide feedback through the JIRA. If
+                all is well, the patch will eventually go into the Synapse development trunk.
+            </p>
+        </section>
+    </body>
+</document>
\ No newline at end of file
diff --git a/src/site/xdoc/dev/release-process.xml b/src/site/xdoc/dev/release-process.xml
new file mode 100644
index 0000000..1500d87
--- /dev/null
+++ b/src/site/xdoc/dev/release-process.xml
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+  ~  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.
+  -->
+
+<document>
+    <properties>
+        <title>Apache Synapse - Release Process</title>
+    </properties>
+    <body>
+        <section name="Release Process">
+            <p>
+                We follow the standard <a href="http://www.apache.org/dev/release-publishing.html">ASF release process</a>.
+                One of the committers would volunteer to play the release manager role for a given
+                release. A few days will be spent on stabilizing the Synapse development trunk,
+                improving its documentation and test coverage. When the code base is in a satisfactory
+                state a release branch would be created under
+                <a href="https://svn.apache.org/repos/asf/synapse/branches">https://svn.apache.org/repos/asf/synapse/branches</a>.
+            </p>
+            <p>
+                From this point onwards all committers will switch to the newly created development
+                branch. It is highly recommended to ensure that all the changes done on the development
+                branch are also checked into the main development branch. Open JIRA issues will be
+                reviewed and rearranged accordingly. Many of the issues will get resolved during this
+                process and the remaining few will be accordingly prioritized and scheduled for a
+                future release. The unit tests and integration tests will be used extensively during
+                this critical period to keep the development branch in its most stable form.
+            </p>
+            <p>
+                Finally the release manager would trigger the release build, sign the generated artifacts
+                and host them on people.apache.org for review. A release vote will be called urging
+                all those interested to review the packs and provide feedback. Upon receiving the
+                necessary number of votes, a release tag will be created and the release artifacts will
+                be uploaded to the appropriate servers for distribution.
+            </p>
+        </section>
+    </body>
+</document>
\ No newline at end of file
diff --git a/src/site/xdoc/docs_index.xml b/src/site/xdoc/docs_index.xml
deleted file mode 100755
index 8b9d853..0000000
--- a/src/site/xdoc/docs_index.xml
+++ /dev/null
@@ -1,49 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1" ?>
-<!--
-  ~  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.
-  -->
-
-<document>
-
-  <properties>
-    <title>Documentation</title>
-  </properties>
-
-<body>
-
-<section name="Apache Synapse - Documentation">
-  <p>
-      Apache Synapse is an extremely lightweight and easy-to-use Open Source Enterprise Service Bus
-      (ESB) available under the Apache Software License v2.0. Apache Synapse graduated from the
-      Apache Incubator on the 2nd of January 2007, and was accepted as a sub-project of the Apache
-      Web Services project. In December 2007, Apache Synapse became a top level project (TLP) of the
-      Apache Software Foundation
-  </p>
-  <p>Documentation for the 1.2 release:</p>
-
-  <ul>
-  <li><a href="./Synapse_QuickStart.html">Quick Start Guide</a></li>
-  <li><a href="./Synapse_Configuration_Language.html">The Synapse Configuration Language</a></li>
-  <li><a href="./Synapse_Samples.html">A Quick start with Synapse Samples</a></li>
-  <li><a href="./Synapse_Extending.html">Extending Synapse</a></li>
-  <li>The WS Wiki <a href="http://wiki.apache.org/ws/Synapse">http://wiki.apache.org/ws/Synapse</a></li>
-  </ul>
-</section>
-
-</body>
-</document>
diff --git a/src/site/xdoc/download.xml b/src/site/xdoc/download.xml
index d8b1383..2921bf3 100644
--- a/src/site/xdoc/download.xml
+++ b/src/site/xdoc/download.xml
@@ -19,58 +19,54 @@
   -->
 
 <document>
-
-  <properties>
-    <title>Release Downloads</title>
-  </properties>
-
-<body>
-
-<section name="Releases">
-
-    <p>The Apache Synapse team is proud to announce the availability of the 1.2 release on the
-        9th of June 2008. As of December 2007, Apache Synapse has moved on to become a Top Level Project
-        (TLP) of the Apache Software Foundation, moving out from Web Services project.
-    </p>
-
-<table class="bodyTable">
-  <tbody>
-    <tr class="a">
-      <th>Version</th>
-      <th>Date</th>
-      <th>Description</th>
-    </tr>
-    <tr class="b">
-      <td><a
-        href="download/1.2/download.cgi">1.2</a></td>
-      <td>9-Jun-2008</td>
-      <td>1.2 Release (Mirrored)</td>
-    </tr>
-    <tr class="b">
-      <td><a
-        href="download/1.1.1/download.cgi">1.1.1</a></td>
-      <td>28-Jan-2008</td>
-      <td>1.1.1 Release (Mirrored)</td>
-    </tr>
-    <tr class="b">
-      <td><a
-        href="download/1.1/download.cgi">1.1</a></td>
-      <td>12-Nov-2007</td>
-      <td>1.1 Release (Mirrored)</td>
-    </tr>
-    <tr class="b">
-      <td><a
-        href="download/1.0/download.cgi">1.0</a></td>
-      <td>08-Jun-2007</td>
-      <td>1.0 Release (Mirrored)</td>
-    </tr>
-  </tbody>
-</table>
-
-    <p>Note that if you are upgrading from an older release, you should carefully read the
-    <a href="upgrading.html">upgrade guide</a> before starting to use a new release.</p>
-
-</section>
-
-</body>
-</document>
+    <properties>
+        <title>Apache Synapse - Downloads</title>
+    </properties>
+    <body>
+        <section name="Download Latest Stable Release">
+            <p>
+                The latest stable release of Apache Synapse is 2.1. It is highly recommended
+                to use the latest stable release so that you can use our newest features
+                while benefiting from all the recent bug fixes and improvements.
+            </p>
+            <table>
+                <tr>
+                    <th>Version</th>
+                    <th>Release Date</th>
+                </tr>
+                <tr>
+                    <td><a href="download/2.1/download.cgi">2.1</a></td>
+                    <td>22-Dec-2011</td>
+                </tr>
+            </table>
+        </section>
+        <section name="Download Previous Releases">
+            <table>
+                <tr>
+                    <th>Version</th>
+                    <th>Release Date</th>
+                </tr>
+                <tr>
+                    <td><a href="download/2.0.0/download.cgi">2.0.0</a></td>
+                    <td>30-Nov-2010</td>
+                </tr>
+                <tr>
+                    <td><a href="download/1.2/download.cgi">1.2</a></td>
+                    <td>9-Jun-2008</td>
+                </tr>
+                <tr>
+                    <td><a href="download/1.1.1/download.cgi">1.1.1</a></td>
+                    <td>28-Jan-2008</td>
+                </tr>
+                <tr>
+                    <td><a href="download/1.1/download.cgi">1.1</a></td>
+                    <td>12-Nov-2007</td>
+                </tr>
+                <tr>
+                    <td><a href="download/2.0.0/download.cgi">1.0</a></td>
+                    <td>08-Jun-2007</td>
+                </tr>
+            </table>
+        </section>
+    </body>
+</document>
\ No newline at end of file
diff --git a/src/site/xdoc/download/1.0/download.xml b/src/site/xdoc/download/1.0/download.xml
deleted file mode 100755
index 25342bb..0000000
--- a/src/site/xdoc/download/1.0/download.xml
+++ /dev/null
@@ -1,132 +0,0 @@
-<?xml version="1.0"?>
-
-<document>
-    <properties>
-    <title>
-      Synapse 1.0 Release
-    </title>
-  </properties>
-  <body>
-    <div class="section">
-      <h2>
-        Synapse 1.0 Release
-      </h2>
-        <br/>
-      <table class="bodyTable">
-        <tbody>
-          <tr class="b">
-            <th scope="col">
-              <pre class="download-header-pre">  Distribution Name  </pre>
-            </th>
-            <th scope="col" style="width:400px;">
-              <pre class="download-header-pre">                                             Description</pre>
-            </th>
-            <th scope="col">
-              <pre class="download-header-pre">        Download        </pre>
-            </th>
-          </tr>
-          <tr class="a">
-            <td>
-              <a name="std-bin" id="std-bin"/><strong>Standard Binary
-              Distribution</strong>
-            </td>
-            <td>
-              This is the complete version of Synapse and contains useful
-              samples as well.
-            </td>
-            <td>
-              <pre class="download-pre"><a
-              href="[preferred]/ws/synapse/1.0/synapse-1.0-bin.tar.gz"
-              title="[preferred]/ws/synapse/1.0/Apache-Synapse-1.0-bin.zip"><strong>tar.gz </strong></a><a
-              href="http://www.apache.org/dist/ws/synapse/1.0/synapse-1.0-bin.tar.gz.md5"
-              class="externalLink"
-              title="http://www.apache.org/dist/ws/synapse/1.0/synapse-1.0-bin.zip.md5">MD5</a><a
-              href="http://www.apache.org/dist/ws/synapse/1.0/synapse-1.0-bin.tar.gz.asc"
-              class="externalLink"
-              title="http://www.apache.org/dist/ws/synapse/1.0/synapse-1.0-bin.zip.zip">PGP</a></pre>
-              <pre class="download-pre"><a
-              href="[preferred]/ws/synapse/1.0/synapse-1.0-bin.zip"
-              title="[preferred]/ws/synapse/1.0/synapse-1.0-bin.zip"><strong>zip </strong></a><a
-              href="http://www.apache.org/dist/ws/synapse/1.0/synapse-1.0-bin.zip.md5"
-              class="externalLink"
-              title="http://www.apache.org/dist/ws/synapse/1.0/synapse-1.0-bin.zip.md5">MD5</a><a
-              href="http://www.apache.org/dist/ws/synapse/1.0/synapse-1.0-bin.zip.asc"
-              class="externalLink"
-              title="http://www.apache.org/dist/ws/synapse/1.0/synapse-1.0-bin.zip.zip">PGP</a></pre>
-            </td>
-          </tr>
-          <tr class="b">
-            <td>
-              <a name="src" id="src"/><strong>Source Distribution</strong>
-            </td>
-            <td>
-              This contains the source code of Synapse standard distribution.
-              One can generate a binary distribution from this by executing 'mvn
-              clean install' followed by 'mvn assembly:assembly -Drelease'
-            </td>
-            <td>
-              <pre class="download-pre"><a
-              href="[preferred]/ws/synapse/1.0/synapse-1.0-src.tar.gz"
-              title="[preferred]/ws/synapse/1.0/synapse-1.0-src.zip"><strong>tar.gz </strong></a><a
-              href="http://www.apache.org/dist/ws/synapse/1.0/synapse-1.0-src.tar.gz.md5"
-              class="externalLink"
-              title="http://www.apache.org/dist/ws/synapse/1.0/synapse-1.0-src.zip.md5"
-              name="MD5" id="MD5">MD5</a><a
-              href="http://www.apache.org/dist/ws/synapse/1.0/synapse-1.0-src.tar.gz.asc"
-              class="externalLink"
-              title="http://www.apache.org/dist/ws/synapse/1.0/synapse-1.0-src.zip.asc">PGP</a></pre>
-              <pre class="download-pre"><a
-              href="[preferred]/ws/synapse/1.0/synapse-1.0-src.zip"
-              title="[preferred]/ws/synapse/1.0/synapse-1.0-src.zip"><strong>zip </strong></a><a
-              href="http://www.apache.org/dist/ws/synapse/1.0/synapse-1.0-src.zip.md5"
-              class="externalLink"
-              title="http://www.apache.org/dist/ws/synapse/1.0/synapse-1.0-src.zip.md5">MD5</a><a
-              href="http://www.apache.org/dist/ws/synapse/1.0/synapse-1.0-src.zip.asc"
-              class="externalLink"
-              title="http://www.apache.org/dist/ws/synapse/1.0/synapse-1.0-src.zip.asc">PGP</a></pre>
-            </td>
-          </tr>
-        </tbody>
-      </table>
-      <br/>
-      <p>
-        [if-any logo] <a href="[link]"><img align="right" src="[logo]"
-        border="0" alt=""/></a>[end] The currently selected mirror is <b>[preferred]</b>.
-        If you encounter a problem with this mirror, please select another
-        mirror. If all mirrors are failing, there are <i>backup</i>
-        mirrors (at the end of the mirrors list) that should be available.
-      </p>
-      <form action="[location]" method="get" id="SelectMirror">
-        Other mirrors: <select name="Preferred">
-        [if-any http][for http]
-        <option value="[http]" selected="selected">
-          [http]</option>[end][end][if-any ftp][for ftp]
-        <option value="[ftp]">
-          [ftp]</option>[end][end][if-any backup][for backup]
-        <option value="[backup]">
-          [backup] (backup)
-        </option></select>
-        <input type="submit" value="Change"/>
-      </form>
-      <p>
-        You may also consult the <a href="http://www.apache.org/mirrors/"
-        class="externalLink" title="External Link">complete list of mirrors</a>.
-      </p>
-      <p>
-        <strong>Note:</strong> when downloading from a mirror please
-        check the <a href="http://www.apache.org/dev/release-signing#md5"
-        class="externalLink" title="External Link">md5sum</a> and verify
-        the <a href="http://www.apache.org/dev/release-signing#openpgp"
-        class="externalLink" title="External Link">OpenPGP</a> compatible
-        signature from the main Apache site. These can be downloaded by
-        following the links above. This <a
-        href="http://www.apache.org/dist/ws/synapse/KEYS" class="externalLink"
-        title="External Link">KEYS</a> file contains the public keys used
-        for signing release. It is recommended that (when possible) a <a
-        href="http://www.apache.org/dev/release-signing#web-of-trust"
-        class="externalLink" title="External Link">Web of trust</a> is
-        used to confirm the identity of these keys.
-      </p>
-    </div>
-  </body>
-</document>
\ No newline at end of file
diff --git a/src/site/xdoc/download/1.1.1/download.xml b/src/site/xdoc/download/1.1.1/download.xml
deleted file mode 100755
index 9437890..0000000
--- a/src/site/xdoc/download/1.1.1/download.xml
+++ /dev/null
@@ -1,133 +0,0 @@
-<?xml version="1.0"?>
-
-<document>
-    <properties>
-    <title>
-      Synapse 1.1.1 Release
-    </title>
-  </properties>
-  <body>
-    <div class="section">
-      <h2>
-        Synapse 1.1.1 Release
-      </h2>
-        <br/>
-      <table>
-        <tbody>
-          <tr class="b">
-            <th scope="col">
-              <pre class="download-header-pre">  Distribution Name  </pre>
-            </th>
-            <th scope="col">
-              <pre class="download-header-pre">                                             Description</pre>
-            </th>
-            <th scope="col">
-              <pre class="download-header-pre">        Download        </pre>
-            </th>
-          </tr>
-          <tr class="a">
-            <td>
-              <a name="std-bin" id="std-bin"/><strong>Standard Binary
-              Distribution</strong>
-            </td>
-            <td>
-              This is the complete version of Synapse and contains useful
-              samples as well.
-            </td>
-            <td>
-              <pre class="download-pre"><a
-              href="[preferred]/synapse/1.1.1/synapse-1.1.1-bin.tar.gz"
-              class="downloadLink" 
-              title="[preferred]/synapse/1.1.1/Apache-Synapse-1.1.1-bin.zip"><strong>tar.gz </strong></a><a
-              href="http://www.apache.org/dist/synapse/1.1.1/synapse-1.1.1-bin.tar.gz.md5"
-              class="externalLink"                                                              
-              title="http://www.apache.org/dist/synapse/1.1.1/synapse-1.1.1-bin.zip.md5">MD5</a> <a
-              href="http://www.apache.org/dist/synapse/1.1.1/synapse-1.1.1-bin.tar.gz.asc"
-              class="externalLink"
-              title="http://www.apache.org/dist/synapse/1.1.1/synapse-1.1.1-bin.zip.zip">PGP</a></pre>
-              <pre class="download-pre"><a
-              href="[preferred]/synapse/1.1.1/synapse-1.1.1-bin.zip"
-              class="downloadLink"
-              title="[preferred]/synapse/1.1.1/synapse-1.1.1-bin.zip"><strong>zip </strong></a><a
-              href="http://www.apache.org/dist/synapse/1.1.1/synapse-1.1.1-bin.zip.md5"
-              class="externalLink"
-              title="http://www.apache.org/dist/synapse/1.1.1/synapse-1.1.1-bin.zip.md5">MD5</a> <a
-              href="http://www.apache.org/dist/synapse/1.1.1/synapse-1.1.1-bin.zip.asc"
-              class="externalLink"
-              title="http://www.apache.org/dist/synapse/1.1.1/synapse-1.1.1-bin.zip.zip">PGP</a></pre>
-            </td>
-          </tr>
-          <tr class="b">
-            <td>
-              <a name="src" id="src"/><strong>Source Distribution</strong>
-            </td>
-            <td>
-              This contains the source code of Synapse standard distribution.
-              One can generate a binary distribution from this by executing 'mvn
-              clean install' followed by 'mvn assembly:assembly -Drelease'
-            </td>
-            <td>
-              <pre class="download-pre"><a
-              href="[preferred]/synapse/1.1.1/synapse-1.1.1-src.tar.gz"
-              title="[preferred]/synapse/1.1.1/synapse-1.1.1-src.zip"><strong>tar.gz </strong></a><a
-              href="http://www.apache.org/dist/synapse/1.1.1/synapse-1.1.1-src.tar.gz.md5"
-              class="externalLink"
-              title="http://www.apache.org/dist/synapse/1.1.1/synapse-1.1.1-src.zip.md5"
-              name="MD5" id="MD5">MD5</a> <a
-              href="http://www.apache.org/dist/synapse/1.1.1/synapse-1.1.1-src.tar.gz.asc"
-              class="externalLink"
-              title="http://www.apache.org/dist/synapse/1.1.1/synapse-1.1.1-src.zip.asc">PGP</a></pre>
-              <pre class="download-pre"><a
-              href="[preferred]/synapse/1.1.1/synapse-1.1.1-src.zip" 
-              title="[preferred]/synapse/1.1.1/synapse-1.1.1-src.zip"><strong>zip </strong></a><a
-              href="http://www.apache.org/dist/synapse/1.1.1/synapse-1.1.1-src.zip.md5"
-              class="externalLink"
-              title="http://www.apache.org/dist/synapse/1.1.1/synapse-1.1.1-src.zip.md5">MD5</a> <a
-              href="http://www.apache.org/dist/synapse/1.1.1/synapse-1.1.1-src.zip.asc"
-              class="externalLink"
-              title="http://www.apache.org/dist/synapse/1.1.1/synapse-1.1.1-src.zip.asc">PGP</a></pre>
-            </td>
-          </tr>
-        </tbody>
-      </table>
-      <br/>
-       <p>
-        [if-any logo]<a href="[link]"><img src="[logo]" alt="" /></a>[end] The currently selected mirror is <b>[preferred]</b>.        If you encounter a problem with this mirror, please select another
-        mirror. If all mirrors are failing, there are <i>backup</i>
-        mirrors (at the end of the mirrors list) that should be available.
-      </p>
-      <form action="[location]" method="get" id="SelectMirror">
-        Other mirrors: <select name="Preferred">
-        [if-any http][for http]
-        <option value="[http]" selected="selected">
-          [http]</option>[end][end][if-any ftp][for ftp]
-        <option value="[ftp]">
-          [ftp]</option>[end][end][if-any backup][for backup]
-        <option value="[backup]">
-          [backup] (backup)
-        </option></select>
-        <input type="submit" value="Change"/>
-      </form>
-      <p>
-     
-        You may also consult the <a href="http://www.apache.org/mirrors/"
-        class="externalLink" title="External Link">complete list of mirrors</a>.
-      </p>
-      <p>
-        <strong>Note:</strong> when downloading from a mirror please
-        check the <a href="http://www.apache.org/dev/release-signing#md5"
-        class="externalLink" title="External Link">md5sum</a> and verify
-        the <a href="http://www.apache.org/dev/release-signing#openpgp"
-        class="externalLink" title="External Link">OpenPGP</a> compatible
-        signature from the main Apache site. These can be downloaded by
-        following the links above. This <a
-        href="http://www.apache.org/dist/synapse/KEYS" class="externalLink"
-        title="External Link">KEYS</a> file contains the public keys used
-        for signing release. It is recommended that (when possible) a <a
-        href="http://www.apache.org/dev/release-signing#web-of-trust"
-        class="externalLink" title="External Link">Web of trust</a> is
-        used to confirm the identity of these keys.
-      </p>
-    </div>
-  </body>
-</document>
\ No newline at end of file
diff --git a/src/site/xdoc/download/1.1/download.xml b/src/site/xdoc/download/1.1/download.xml
deleted file mode 100755
index a3c5dcf..0000000
--- a/src/site/xdoc/download/1.1/download.xml
+++ /dev/null
@@ -1,132 +0,0 @@
-<?xml version="1.0"?>
-
-<document>
-    <properties>
-    <title>
-      Synapse 1.1 Release
-    </title>
-  </properties>
-  <body>
-    <div class="section">
-      <h2>
-        Synapse 1.1 Release
-      </h2>
-        <br/>
-      <table class="bodyTable">
-        <tbody>
-          <tr class="b">
-            <th scope="col">
-              <pre class="download-header-pre">  Distribution Name  </pre>
-            </th>
-            <th scope="col">
-              <pre class="download-header-pre">                                             Description</pre>
-            </th>
-            <th scope="col">
-              <pre class="download-header-pre">        Download        </pre>
-            </th>
-          </tr>
-          <tr class="a">
-            <td>
-              <a name="std-bin" id="std-bin"/><strong>Standard Binary
-              Distribution</strong>
-            </td>
-            <td>
-              This is the complete version of Synapse and contains useful
-              samples as well.
-            </td>
-            <td>
-              <pre class="download-pre"><a
-              href="[preferred]/ws/synapse/1.1/synapse-1.1-bin.tar.gz"
-              title="[preferred]/ws/synapse/1.1/Apache-Synapse-1.1-bin.zip"><strong>tar.gz </strong></a><a
-              href="http://www.apache.org/dist/ws/synapse/1.1/synapse-1.1-bin.tar.gz.md5"
-              class="externalLink"
-              title="http://www.apache.org/dist/ws/synapse/1.1/synapse-1.1-bin.zip.md5">MD5</a><a
-              href="http://www.apache.org/dist/ws/synapse/1.1/synapse-1.1-bin.tar.gz.asc"
-              class="externalLink"
-              title="http://www.apache.org/dist/ws/synapse/1.1/synapse-1.1-bin.zip.zip">PGP</a></pre>
-              <pre class="download-pre"><a
-              href="[preferred]/ws/synapse/1.1/synapse-1.1-bin.zip"
-              title="[preferred]/ws/synapse/1.1/synapse-1.1-bin.zip"><strong>zip </strong></a><a
-              href="http://www.apache.org/dist/ws/synapse/1.1/synapse-1.1-bin.zip.md5"
-              class="externalLink"
-              title="http://www.apache.org/dist/ws/synapse/1.1/synapse-1.1-bin.zip.md5">MD5</a><a
-              href="http://www.apache.org/dist/ws/synapse/1.1/synapse-1.1-bin.zip.asc"
-              class="externalLink"
-              title="http://www.apache.org/dist/ws/synapse/1.1/synapse-1.1-bin.zip.zip">PGP</a></pre>
-            </td>
-          </tr>
-          <tr class="b">
-            <td>
-              <a name="src" id="src"/><strong>Source Distribution</strong>
-            </td>
-            <td>
-              This contains the source code of Synapse standard distribution.
-              One can generate a binary distribution from this by executing 'mvn
-              clean install' followed by 'mvn assembly:assembly -Drelease'
-            </td>
-            <td>
-              <pre class="download-pre"><a
-              href="[preferred]/ws/synapse/1.1/synapse-1.1-src.tar.gz"
-              title="[preferred]/ws/synapse/1.1/synapse-1.1-src.zip"><strong>tar.gz </strong></a><a
-              href="http://www.apache.org/dist/ws/synapse/1.1/synapse-1.1-src.tar.gz.md5"
-              class="externalLink"
-              title="http://www.apache.org/dist/ws/synapse/1.1/synapse-1.1-src.zip.md5"
-              name="MD5" id="MD5">MD5</a><a
-              href="http://www.apache.org/dist/ws/synapse/1.1/synapse-1.1-src.tar.gz.asc"
-              class="externalLink"
-              title="http://www.apache.org/dist/ws/synapse/1.1/synapse-1.1-src.zip.asc">PGP</a></pre>
-              <pre class="download-pre"><a
-              href="[preferred]/ws/synapse/1.1/synapse-1.1-src.zip"
-              title="[preferred]/ws/synapse/1.1/synapse-1.1-src.zip"><strong>zip </strong></a><a
-              href="http://www.apache.org/dist/ws/synapse/1.1/synapse-1.1-src.zip.md5"
-              class="externalLink"
-              title="http://www.apache.org/dist/ws/synapse/1.1/synapse-1.1-src.zip.md5">MD5</a><a
-              href="http://www.apache.org/dist/ws/synapse/1.1/synapse-1.1-src.zip.asc"
-              class="externalLink"
-              title="http://www.apache.org/dist/ws/synapse/1.1/synapse-1.1-src.zip.asc">PGP</a></pre>
-            </td>
-          </tr>
-        </tbody>
-      </table>
-      <br/>
-      <p>
-        [if-any logo] <a href="[link]"><img align="right" src="[logo]"
-        border="0" alt=""/></a>[end] The currently selected mirror is <b>[preferred]</b>.
-        If you encounter a problem with this mirror, please select another
-        mirror. If all mirrors are failing, there are <i>backup</i>
-        mirrors (at the end of the mirrors list) that should be available.
-      </p>
-      <form action="[location]" method="get" id="SelectMirror">
-        Other mirrors: <select name="Preferred">
-        [if-any http][for http]
-        <option value="[http]" selected="selected">
-          [http]</option>[end][end][if-any ftp][for ftp]
-        <option value="[ftp]">
-          [ftp]</option>[end][end][if-any backup][for backup]
-        <option value="[backup]">
-          [backup] (backup)
-        </option></select>
-        <input type="submit" value="Change"/>
-      </form>
-      <p>
-        You may also consult the <a href="http://www.apache.org/mirrors/"
-        class="externalLink" title="External Link">complete list of mirrors</a>.
-      </p>
-      <p>
-        <strong>Note:</strong> when downloading from a mirror please
-        check the <a href="http://www.apache.org/dev/release-signing#md5"
-        class="externalLink" title="External Link">md5sum</a> and verify
-        the <a href="http://www.apache.org/dev/release-signing#openpgp"
-        class="externalLink" title="External Link">OpenPGP</a> compatible
-        signature from the main Apache site. These can be downloaded by
-        following the links above. This <a
-        href="http://www.apache.org/dist/ws/synapse/KEYS" class="externalLink"
-        title="External Link">KEYS</a> file contains the public keys used
-        for signing release. It is recommended that (when possible) a <a
-        href="http://www.apache.org/dev/release-signing#web-of-trust"
-        class="externalLink" title="External Link">Web of trust</a> is
-        used to confirm the identity of these keys.
-      </p>
-    </div>
-  </body>
-</document>
\ No newline at end of file
diff --git a/src/site/xdoc/download/1.2/download.xml b/src/site/xdoc/download/1.2/download.xml
deleted file mode 100755
index 2c9ad3e..0000000
--- a/src/site/xdoc/download/1.2/download.xml
+++ /dev/null
@@ -1,146 +0,0 @@
-<?xml version="1.0"?>
-
-<document>
-    <properties>
-    <title>
-      Synapse 1.2 Release
-    </title>
-  </properties>
-  <body>
-    <div class="section">
-      <h2>
-        Synapse 1.2 Release
-      </h2>
-        <br/>
-      <table>
-        <tbody>
-          <tr class="b">
-            <th scope="col">
-              <pre class="download-header-pre">  Distribution Name  </pre>
-            </th>
-            <th scope="col">
-              <pre class="download-header-pre">                                             Description</pre>
-            </th>
-            <th scope="col">
-              <pre class="download-header-pre">        Download        </pre>
-            </th>
-          </tr>
-          <tr class="a">
-            <td>
-              <a name="std-bin" id="std-bin"/><strong>Standard Binary
-              Distribution</strong>
-            </td>
-            <td>
-              This is the complete version of Synapse and contains useful
-              samples as well.
-            </td>
-            <td>
-              <pre class="download-pre"><a
-              href="[preferred]/synapse/1.2/synapse-1.2-bin.tar.gz"
-              class="downloadLink"
-              title="[preferred]/synapse/1.2/Apache-Synapse-1.2-bin.tar.gz"><strong>synapse-1.2-bin.tar.gz</strong></a>
- (<a href="http://www.apache.org/dist/synapse/1.2/synapse-1.2-bin.tar.gz.md5"
-              class="externalLink"
-              title="http://www.apache.org/dist/synapse/1.2/synapse-1.2-bin.tar.gz.md5">MD5</a> <a
-              href="http://www.apache.org/dist/synapse/1.2/synapse-1.2-bin.tar.gz.sha"
-              class="externalLink"
-              title="http://www.apache.org/dist/synapse/1.2/synapse-1.2-bin.tar.gz.sha">SHA1</a> <a
-              href="http://www.apache.org/dist/synapse/1.2/synapse-1.2-bin.tar.gz.asc"
-              class="externalLink"
-              title="http://www.apache.org/dist/synapse/1.2/synapse-1.2-bin.tar.gz.asc">PGP</a>)</pre>
-              <pre class="download-pre"><a
-              href="[preferred]/synapse/1.2/synapse-1.2-bin.zip"
-              class="downloadLink"
-              title="[preferred]/synapse/1.2/synapse-1.2-bin.zip"><strong>synapse-1.2-bin.zip</strong></a>
- (<a href="http://www.apache.org/dist/synapse/1.2/synapse-1.2-bin.zip.md5"
-              class="externalLink"
-              title="http://www.apache.org/dist/synapse/1.2/synapse-1.2-bin.zip.md5">MD5</a> <a
-              href="http://www.apache.org/dist/synapse/1.2/synapse-1.2-bin.zip.sha"
-              class="externalLink"
-              title="http://www.apache.org/dist/synapse/1.2/synapse-1.2-bin.zip.sha">SHA1</a> <a
-              href="http://www.apache.org/dist/synapse/1.2/synapse-1.2-bin.zip.asc"
-              class="externalLink"
-              title="http://www.apache.org/dist/synapse/1.2/synapse-1.2-bin.zip.asc">PGP</a>)</pre>
-            </td>
-          </tr>
-          <tr class="b">
-            <td>
-              <a name="src" id="src"/><strong>Source Distribution</strong>
-            </td>
-            <td>
-              This contains the source code of Synapse standard distribution.
-              One can generate a binary distribution from this by executing 'mvn
-              clean install' followed by 'mvn assembly:assembly -Drelease'
-            </td>
-            <td>
-              <pre class="download-pre"><a
-              href="[preferred]/synapse/1.2/synapse-1.2-src.tar.gz"
-              title="[preferred]/synapse/1.2/synapse-1.2-src.tar.gz"><strong>synapse-1.2-src.tar.gz</strong></a>
- (<a href="http://www.apache.org/dist/synapse/1.2/synapse-1.2-src.tar.gz.md5"
-              class="externalLink"
-              title="http://www.apache.org/dist/synapse/1.2/synapse-1.2-src.tar.gz.md5"
-              name="MD5" id="MD5">MD5</a> <a
-              href="http://www.apache.org/dist/synapse/1.2/synapse-1.2-src.tar.gz.sha"
-              class="externalLink"
-              title="http://www.apache.org/dist/synapse/1.2/synapse-1.2-src.tar.gz.sha"
-              name="SHA1" id="SHA1">SHA1</a> <a
-              href="http://www.apache.org/dist/synapse/1.2/synapse-1.2-src.tar.gz.asc"
-              class="externalLink"
-              title="http://www.apache.org/dist/synapse/1.2/synapse-1.2-src.tar.gz.asc">PGP</a>)</pre>
-              <pre class="download-pre"><a
-              href="[preferred]/synapse/1.2/synapse-1.2-src.zip"
-              title="[preferred]/synapse/1.2/synapse-1.2-src.zip"><strong>synapse-1.2-src.zip</strong></a>
- (<a href="http://www.apache.org/dist/synapse/1.2/synapse-1.2-src.zip.md5"
-              class="externalLink"
-              title="http://www.apache.org/dist/synapse/1.2/synapse-1.2-src.zip.md5">MD5</a> <a
-              href="http://www.apache.org/dist/synapse/1.2/synapse-1.2-src.zip.sha"
-              class="externalLink"
-              title="http://www.apache.org/dist/synapse/1.2/synapse-1.2-src.zip.sha">SHA1</a> <a
-              href="http://www.apache.org/dist/synapse/1.2/synapse-1.2-src.zip.asc"
-              class="externalLink"
-              title="http://www.apache.org/dist/synapse/1.2/synapse-1.2-src.zip.asc">PGP</a>)</pre>
-            </td>
-          </tr>
-        </tbody>
-      </table>
-      <br/>
-       <p>
-        [if-any logo]<a href="[link]"><img src="[logo]" alt="" /></a>[end] The currently selected mirror is <b>[preferred]</b>.        If you encounter a problem with this mirror, please select another
-        mirror. If all mirrors are failing, there are <i>backup</i>
-        mirrors (at the end of the mirrors list) that should be available.
-      </p>
-      <form action="[location]" method="get" id="SelectMirror">
-        Other mirrors: <select name="Preferred">
-        [if-any http][for http]
-        <option value="[http]" selected="selected">
-          [http]</option>[end][end][if-any ftp][for ftp]
-        <option value="[ftp]">
-          [ftp]</option>[end][end][if-any backup][for backup]
-        <option value="[backup]">
-          [backup] (backup)
-        </option></select>
-        <input type="submit" value="Change"/>
-      </form>
-      <p>
-
-        You may also consult the <a href="http://www.apache.org/mirrors/"
-        class="externalLink" title="External Link">complete list of mirrors</a>.
-      </p>
-      <p>
-        <strong>Note:</strong> when downloading from a mirror please
-        check the <a href="http://www.apache.org/dev/release-signing#md5"
-        class="externalLink" title="External Link">md5sum</a> and verify
-        the <a href="http://www.apache.org/dev/release-signing#openpgp"
-        class="externalLink" title="External Link">OpenPGP</a> compatible
-        signature from the main Apache site. These can be downloaded by
-        following the links above. This <a
-        href="http://www.apache.org/dist/synapse/KEYS" class="externalLink"
-        title="External Link">KEYS</a> file contains the public keys used
-        for signing release. It is recommended that (when possible) a <a
-        href="http://www.apache.org/dev/release-signing#web-of-trust"
-        class="externalLink" title="External Link">Web of trust</a> is
-        used to confirm the identity of these keys.
-      </p>
-    </div>
-  </body>
-</document>
\ No newline at end of file
diff --git a/src/site/xdoc/download_index.xml b/src/site/xdoc/download_index.xml
deleted file mode 100755
index 67371c1..0000000
--- a/src/site/xdoc/download_index.xml
+++ /dev/null
@@ -1,53 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1" ?>
-<!--
-  ~  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.
-  -->
-
-<document>
-
-  <properties>
-    <title>Downloads</title>
-  </properties>
-
-<body>
-
-<section name="Apache Synapse - Downloads">
-
-    <p>The Apache Synapse team is proud to announce the availability of the 1.2 release on the
-        9th of June 2008. As of December 2007, Apache Synapse has moved on to become a Top Level Project
-        (TLP) of the Apache Software Foundation, moving out from Web Services project.
-    </p>
-
-    <p>Releases are available for download under the ASL v2.0 License
-
-    <ul>
-        <li><a href="download.html">Releases</a></li>
-    </ul>
-    </p>
-
-    <p>Source code is available to download under the ASL v2.0 License
-
-    <ul>
-        <li><a href="source-repository.html">Source code</a></li>
-    </ul>
-    </p>
-
-</section>
-
-</body>
-</document>
diff --git a/src/site/xdoc/history.xml b/src/site/xdoc/history.xml
old mode 100755
new mode 100644
index 358512e..38b3572
--- a/src/site/xdoc/history.xml
+++ b/src/site/xdoc/history.xml
@@ -19,50 +19,45 @@
   -->
 
 <document>
-
-  <properties>
-    <title>Documentation</title>
-  </properties>
-
-<body>
-
-<section name="Previous version documentation">
-
-    <p>The Apache Synapse team is proud to announce the availability of the 1.1.1 release on the
-        28th of January 2008. As of December 2007, Apache Synapse has moved on to become a Top Level Project
-        (TLP) of the Apache Software Foundation, moving out from Web Services project.
-    </p>
-
-<table class="bodyTable">
-  <tbody>
-    <tr class="a">
-      <th>Version</th>
-      <th>Date</th>
-      <th>Documentation</th>
-    </tr>
-    <tr class="b">
-      <td>1.2</td>
-      <td>09-Jun-2008</td>
-      <td><a href="1_1_1/docs_index.html">click here</a> for 1.2 documentation</td>
-    </tr>
-    <tr class="b">
-      <td>1.1.1</td>
-      <td>28-Jan-2008</td>
-      <td><a href="1_1_1/content.html">click here</a> for 1.1.1 documentation</td>
-    </tr>
-    <tr class="b">
-      <td>1.1</td>
-      <td>12-Nov-2007</td>
-      <td><a href="1_1/content.html">click here</a> for 1.1 documentation</td>
-    </tr>
-    <tr class="b">
-      <td>1.0</td>
-      <td>08-Jun-2007</td>
-      <td><a href="1_0/content.html">click here</a> for 1.0 documentation</td>
-    </tr>
-  </tbody>
-</table>
-</section>
-
-</body>
-</document>
+    <properties>
+        <title>Apache Synapse - Down the Memory Lane</title>
+    </properties>
+    <body>
+        <section name="History of Synapse">
+            <p>
+                Synapse started out as an Apache Incubator project co-proposed by a number of
+                companies. The real key starting point was a face-to-face meeting held in the
+                Bay Area in September 2005 hosted at Infravio's offices. In that meeting the
+                overall approach for Synapse was hammered out, and then we set out to coding.
+            </p>
+            <p>
+                The first real usable build followed early in January 2006. Known as M1, this was a
+                real runnable release, but only providing very simple functionality. Other releases
+                throughout 2006 lead to the 0.90 release in December 2006, and in December 2006, the
+                Board voted to approve Synapse as a graduate from the Incubator and a member of the
+                Web Services project. The namespace URL (http://ws.apache.org/ns/synapse) used in
+                the Synapse configuration language is a remnant from our Apache Web Services heritage.
+            </p>
+            <p>
+                A year later, in December 2007, Synapse became an Apache top level project (TLP),
+                and since then has released 3 versions.
+            </p>
+            <p>
+                Here are some more interesting resources that show the growth and development
+                of Synapse from its humble beginnings.
+            </p>
+            <ul>
+                <li><a href="http://wiki.apache.org/incubator/SynapseProposal">Project proposal</a></li>
+                <li><a href="http://markmail.org/message/ac27hfeyvj4bbgde">What's available in Synapse M1?</a></li>
+                <li><a href="http://markmail.org/message/ueoox6fgpu5zwsrn">1.1 release announcement</a></li>
+                <li><a href="http://markmail.org/message/7wuu2jfsk2qfwhdp">1.1.1 release announcement</a></li>
+                <li><a href="http://markmail.org/message/od5si63jdjhj3mhc">1.2 release announcement</a></li>
+                <li><a href="http://apache-synapse.blogspot.com/">Old Apache Synapse blog</a></li>
+                <li><a href="http://www.slideshare.net/pizak/fast-soa-with-apache-synapse">Synapse at ApacheCon EU 2008</a></li>
+                <li><a href="http://www.slideshare.net/guest60ed0b/aceu2009-synapse-scalability-availability">Synapse at ApacheCon EU 2009</a></li>
+                <li><a href="http://www.slideshare.net/hiranya911/introduction-to-apache-synapse">Synapse at Apache Asia Roadshow 2009</a></li>
+                <li><a href="http://en.wikipedia.org/wiki/Apache_Synapse">Synapse on Wikipedia</a></li>
+            </ul>
+        </section>
+    </body>
+</document>
\ No newline at end of file
diff --git a/src/site/xdoc/index.xml b/src/site/xdoc/index.xml
index e1d020f..1f7bc63 100644
--- a/src/site/xdoc/index.xml
+++ b/src/site/xdoc/index.xml
@@ -19,99 +19,124 @@
   -->
 
 <document>
-
-  <properties>
-    <title>The lightweight ESB</title>
-  </properties>
-
-<body>
-  
-<section name="Apache Synapse Enterprise Service Bus (ESB)">
-  <p>
-      Apache Synapse is a lightweight and high-performance Enterprise Service Bus (ESB). Powered
-      by a small and asynchronous mediation engine, Apache Synapse provides exceptional support
-      for XML, Web Services and REST. In addition to XML and SOAP, Apache Synapse supports
-      several other content interchange formats, such as plain text, binary, Hessian and JSON. The
-      wide range of transport adapters available for Synapse, enables it to communicate over many
-      application and transport layer protocols. As of now, Apache Synapse has support for protocols
-      like HTTP/S, Mail (POP3, IMAP, SMTP), JMS, TCP, UDP, VFS and FIX.
-  </p>
-  <p>
-      Apache Synapse is designed to be lightweight and fast. The non-blocking HTTP transport,
-      the multi-threaded mediation engine and the streaming XML infoset combine to ensure that
-      Synapse can mediate very high volumes of messages through the service bus with minimum
-      delay and resource usage. Synapse also comes with comprehensive logging capabilities,
-      statistics collection and JMX monitoring support which are crucial in production deployments.
-  </p>
-  <p>
-      Synapse uses Apache Axis2 as the underlying Web Services engine. Therefore it has outstanding
-      support for Web Services and related standards such as SOAP and WSDL. Tried and tested
-      Axis2 modules like Apache Rampart and Apache Sandesha2 can be used with Synapse with no
-      configuration overhead. Using such external modules, Apache Synapse supports a range of
-      Web Services standards including WS-Security, WS-Reliable Messaging and WS-Eventing. Synapse
-      also makes use of the Axis2 clustering framework and the deployment framework to provide
-      enteprise grade clustering support and development time hot deployment support.
-  </p>
-  <p>
-      The Synapse mediation engine is configured using a simple, XML-based configuration language.
-      The configuration language and the related functional components are designed with SOA
-      best practices in mind. As a result one could easily store configuration fragments in an
-      external registry and import them to the mediation engine on demand.
-      Synapse ships with a large collection of useful mediators that can be used to develop even the
-      most complex enterprise integration scenarios. If necessary, the mediation engine can be
-      easily extended by developing custom mediators using Java or your favorite scripting
-      language.
-  </p>
-  <p>
-      Apache Synapse is free and open source software distributed under the
-      <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache Software License 2.0</a>.
-  </p>
-  <p>Want to get started? Please refer one of these comprehensive manuals:
-      <ul>
-          <li><a href="./Synapse_QuickStart.html">Quick Start Guide</a></li>
-          <li><a href="./Synapse_Configuration_Language.html">The Synapse Configuration Language</a></li>
-          <li><a href="./Synapse_Samples.html">Synapse Samples Catalog</a></li>
-          <li><a href="./Synapse_Extending.html">Extending Synapse</a></li>
-      </ul>
-  </p>
-  <p>Need some assistance with a problem? Feel free to get in touch with the community over these
-      mailing lists:
-      <ul>
-          <li>The Developer mailing list:  <a href="mailto:dev-subscribe@synapse.apache.org">Subscribe</a></li>
-          <li>The User mailing list:  <a href="mailto:user-subscribe@synapse.apache.org">Subscribe</a></li>
-      </ul>
-  </p>
-</section>
-	
-<section name="Key Features">
-		<p>The latest release of Synapse is <a href="download/2.0/download.cgi">2.0</a>. Its key features are </p>
-
-	<ul>
-        <li><p>Proxy services - facilitating transport, interface (WSDL/Schema/Policy), message format (SOAP 1.1/1.2, POX/REST, Text, Binary), QoS (WS-Addressing/WS-Security/WS-RM) and optimization switching (MTOM/SwA)</p></li>
-        <li><p>Non-blocking HTTP/S transports based on Apache <a target="_blank" href="http://hc.apache.org/httpcomponents-core/index.html">HttpCore</a> for ultrafast execution and support for thousands of connections at high concurreny with constant memory usage</p></li>
-        <li><p>Built in Registry/Repository, facilitating dynamic updating and reloading of the configuration and associated resources (e.g. XSLTs, XSD, JS, ..)</p></li>
-        <li><p>Easily extended via custom Java class (mediator and command)/Spring mediators, or BSF Scripting languages (Javascript, Ruby, Groovy, etc.)</p></li>
-        <li><p>Built in support for scheduling tasks using the <a target="_blank" href="http://www.opensymphony.com/quartz">Quartz</a> scheduler</p></li>
-        <li><p>Load-balancing (with or without sticky sessions) /Fail-over, and clustered Throttling and Caching support</p></li>
-        <li><p>WS-Security, WS-Reliable Messaging &amp; Throttling configurable via (message/operation/service level) WS-Policies</p></li>
-        <li><p>JMS (v1.x upwards) message support for binary, plain text and XML and SOAP payloads</p></li>
-        <li><p>Support for <a href="http://hessian.caucho.com/">Hessian binary web service protocol</a></p></li>
-        <li><p>Industry driven <a href="http://www.fixprotocol.org/">Financial Information eXchange (FIX)</a> protocol</p></li>
-        <li><p>Enhanced support for Apache VFS transports (s/ftp, file, zip/tar/gz, webdav, cifs..)</p></li>
-        <li><p>Support for message splitting &amp; aggregation using the EIP</p></li>
-        <li><p>Database lookup &amp; store support with DBMediators with reusable database connection pools</p></li>
-        <li><p>Enhanced Mail transport with POP3/SMTP/IMAP protocols</p></li>
-        <li><p>GZip encoding over the HTTP/S transport</p></li>
-        <li><p>Dual-Channel message exchange with WS-Addressing</p></li>
-        <li><p>Ability to pin a proxy service or a task to server instances on a cluster</p></li>
-        <li><p>Mandatory sequence if required before mediation</p></li>
-        <li><p>Lightweight, XML and Web services centric messaging model</p></li>
-        <li><p>Configurations serialized into a file system for versioning/backup &amp; restoration with built-in Registry support</p></li>
-        <li><p>Support for Error handling and timeouts, recovery with http/s maintainance mode &amp; gracefull shutdown</p></li>
-        <li><p>JMX monitoring support</p></li>
-    	<li><p>Many samples and a built-in Axis2 server to try out and experiment with samples (Samples includes WS-Security, JMS POX/Text messages, Script mediation and many more samples which can be run out of the box) </p></li>
-	    <li><p>Enhanced documentation for samples and getting started</p></li>
-	</ul>
-</section>
-</body>
+    <properties>
+        <title>Apache Synapse - The Lightweight ESB</title>
+    </properties>
+    <body>
+        <section name="Apache Synapse Enterprise Service Bus (ESB)">
+            <p>
+                Apache Synapse is a lightweight and high-performance Enterprise Service Bus (ESB).
+                Powered by a fast and asynchronous mediation engine, Apache Synapse provides
+                exceptional support for XML, Web Services and REST. In addition to XML and SOAP,
+                Apache Synapse supports several other content interchange formats, such as plain
+                text, binary, Hessian and JSON. The wide range of transport adapters available for
+                Synapse, enables it to communicate over many application and transport layer
+                protocols. As of now, Apache Synapse supports HTTP/S, Mail (POP3, IMAP, SMTP),
+                JMS, TCP, UDP, VFS, SMS, XMPP and FIX.
+            </p>
+            <p>
+                Apache Synapse is free and open source software distributed under the
+                <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache Software License 2.0</a>.
+                The latest version of Synaspe is <a href="download/2.1/download.cgi">v2.1</a>.
+                This release comes with a horde of new features, bug fixes, performance and
+                stability improvements.
+            </p>
+            <p>
+                Apache Synapse, Synapse, Apache, the Apache feather logo, and the Apache Synapse
+                project logo are trademarks of The <a href="http://www.apache.org">Apache Software
+                Foundation</a>
+            </p>
+        </section>
+        <section name="New in Version 2.1">
+            <ul>
+                <li>
+                    Support for creating and managing REST APIs with URL patterns and URI templates
+                </li>
+                <li>
+                    Define sequences and endpoints as templates and reuse seamlessly across the
+                    whole configuration
+                </li>
+                <li>
+                    Payload factory mediator for constructing custom XML payloads
+                </li>
+                <li>
+                    Recipient list endpoint
+                </li>
+                <li>
+                    HTTPD like access logging capability in the NHTTP transport
+                </li>
+                <li>
+                    Message stores and message processors for implementing complex integration
+                    patterns and advanced messaging scenarios
+                </li>
+                <li>
+                    Receiving sequence support in the send mediator to make service chaining
+                    easier
+                </li>
+                <li>
+                    Conditional router mediator for implementing complex routing scenarios with
+                    many conditions and rules
+                </li>
+            </ul>
+        </section>
+        <section name="Key Features">
+            <ul>
+                <li>Proxy services - facilitating transport, interface (WSDL/Schema/Policy), 
+                    message format (SOAP 1.1/1.2, POX/REST, Text, Binary), QoS (WS-Addressing/
+                    WS-Security/WS-RM) and optimization switching (MTOM/SwA)</li>
+                <li>Non-blocking HTTP/S transports for fast HTTP interactions and support for
+                    thousands of concurrent connections</li>
+                <li>VFS transport for file manipulation and interaction with FTP, SFTP, CIFS
+                    and WEBDAV</li>
+                <li>JMS support for binary, plain text, XML and SOAP payloads</li>
+                <li>Mail transport with extensive support for POP3, IMAP and SMTP</li>
+                <li>Support for industry driven <a href="http://www.fixprotocol.org/">Financial
+                    Information eXchange (FIX)</a> protocol</li>
+                <li>Built-in Registry/Repository, facilitating dynamic reloading of the
+                    configuration and associated resources (e.g. XSLTs, XSD, JS, ..)</li>
+                <li>Built-in support for scheduling tasks using the
+                    <a target="_blank" href="http://www.opensymphony.com/quartz">Quartz</a> scheduler</li>
+                <li>Load-balancing (with or without sticky sessions) and fail-over routing</li>
+                <li>Support for many Web Services standards including WS-Addressing, WS-Security
+                    and WS-Reliable Messaging</li>
+                <li>Policy based message throttling and caching (with special support for clustered
+                    environments)</li>
+                <li>Message splitting and aggregation</li>
+                <li>Database lookup and update support with database connection pooling</li>
+                <li>Fine grained statistics collection over sequences, endpoints and proxy services</li>
+                <li>JMX monitoring and management</li>
+                <li>Easily extendable with Java, Spring, or BSF Scripting languages (Javascript,
+                    Ruby, Groovy, etc.)</li>
+            </ul>
+        </section>
+        <section name="High Level Architecture">
+            <p>
+                Apache Synapse is designed to be lightweight and fast. The non-blocking HTTP
+                transport, the multi-threaded mediation engine and the streaming XML infoset combine
+                to ensure that Synapse can mediate very high volumes of messages through the service
+                bus with minimum delay and resource usage. Synapse also comes with comprehensive
+                logging capabilities, statistics collection and JMX monitoring support which are
+                crucial in production deployments.
+            </p>
+            <img src="images/synapse-arch.png"/>
+            <p>
+                Synapse uses Apache Axis2 as the underlying Web Services engine. Therefore it
+                has outstanding support for Web Services and related standards such as SOAP and
+                WSDL. Tried and tested Axis2 modules like Apache Rampart and Apache Sandesha2 can be
+                used with Synapse with no configuration overhead. Using such external modules,
+                Apache Synapse supports a range of Web Services standards including WS-Security and
+                WS-Reliable Messaging. Synapse also makes use of the Axis2 clustering framework to
+                provide enterprise grade clustering support.
+            </p>
+            <p>
+                Synapse is configured using a simple, XML-based configuration language. The
+                configuration language and the related functional components are designed with SOA
+                best practices in mind. It is trivial to store configuration fragments in an external
+                SOA registry and import them to the mediation engine on demand. Synapse ships with a
+                large collection of mediators that can be used to implement even the most complex
+                enterprise integration scenarios. If necessary, the mediation engine can be extended
+                by developing custom mediators using Java or your favorite scripting language.
+            </p>
+        </section>
+    </body>
 </document>
diff --git a/src/site/xdoc/upgrading.xml b/src/site/xdoc/upgrading.xml
deleted file mode 100644
index 4c27cc6..0000000
--- a/src/site/xdoc/upgrading.xml
+++ /dev/null
@@ -1,92 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1" ?>
-<!--
-  ~  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.
-  -->
-<document>
-    <properties>
-        <title>Upgrade guide</title>
-    </properties>
-    <body>
-        <section name="General comments">
-            <p>If you are using custom extensions (mediators, startups, etc.) implemented in Java and
-            depending on Synapse APIs, you should go through the following process before upgrading
-            to a new release:</p>
-            <ol>
-                <li>Compile the extension with the libraries from the Synapse release you are
-                currently using and check for any deprecation warnings. You should change your code
-                to eliminate all those warnings. In general the Javadoc of the deprecated class or
-                method gives you a hint on how to change your code. Test all your changes with
-                your current Synapse release.</li>
-                <li>Recompile and test the extension with the libraries from the new Synapse release.
-                We try to avoid to introduce incompatible changes to Synapse's core APIs between
-                releases (except if the related classes or methods were deprecated in the previous
-                release). However, it is not always possible to maintain compatibility. In addition
-                your code might depend on features that are not part of the core API. Therefore, even
-                if you don't use deprecated methods and classes, there is no guarantee that your code
-                will not break when upgrading to a new release and you always need to recompile and test
-                them before deploying to the new release.</li>
-                <li>Upgrade your Synapse installation and deploy the new version of your extensions.</li>
-            </ol>
-            <p>If you are skipping releases when upgrading your installation, you might nevertheless want
-            to go through the first step for all the intermediate releases. This will make the migration
-            easier.</p>
-        </section>
-        <section name="Upgrading from 1.2 to 1.3">
-          <subsection name="Endpoint URLs for proxy services">
-            <p>In release 1.3 the endpoint URLs for proxy services have changed from <tt>/soap</tt>
-            to <tt>/services</tt>. E.g. <tt>http://localhost:8280/services/StockQuote</tt> should be
-            used instead of <tt>http://localhost:8280/soap/StockQuote</tt>.</p>
-          </subsection>
-          <subsection name="MediatorDeployer">
-            <p>Release 1.3 has enhanced capabilities for extension deployment. While in 1.2 extension
-            deployment was limited to mediators bundled as simple JAR files, 1.3 extended this support
-            to startups and defined a new archive format (XAR) that allows to bundle these extensions
-            together with their dependency JARs (see
-            <a href="http://issues.apache.org/jira/browse/SYNAPSE-377">SYNAPSE-377</a> for more details).
-            Enabling these features requires changes to the <tt>axis2.xml</tt> configuration file.
-            In 1.2 the deployer was configured as follows:
-            </p>
-<pre>
-&lt;deployer extension="jar" directory="mediators" class="org.apache.synapse.core.axis2.MediatorDeployer"/>
-</pre>
-            <p>In 1.3 the suggested configuration is:</p>
-<pre>
-&lt;deployer extension="xar" directory="extensions" class="org.apache.synapse.deployers.ExtensionDeployer"/>
-</pre>
-            <p>Note that the XAR format is compatible with simple JAR files and that the
-            <code>MediatorDeployer</code> class still exists in 1.3. Therefore the old configuration will
-            still work. However you are strongly advised to replace references to the <code>MediatorDeployer</code>
-            class as it will disappear in later releases.</p>
-            <p>It is possible to have multiple configuration entries for the extension deployer with different
-            settings. For example, if you used the deployer in 1.2 you might want to have the following
-            configuration:</p>
-<pre>
-&lt;deployer extension="jar" directory="mediators" class="org.apache.synapse.deployers.ExtensionDeployer"/>
-&lt;deployer extension="xar" directory="extensions" class="org.apache.synapse.deployers.ExtensionDeployer"/>
-</pre>
-          </subsection>
-          <subsection name="JMS transport">
-            <p>The way the JMS transport determines the content type of incoming messages has slightly changed
-            between Synapse 1.2 and 1.3. The mechanism is also more flexible. See SYNAPSE-304 and SYNAPSE-424
-            for the reasons of this change and refer to the
-            <a href="http://ws.apache.org/commons/transport/">WS-Commons Transport project</a> for
-            documentation.</p>
-          </subsection>
-        </section>
-    </body>
-</document>
\ No newline at end of file
diff --git a/src/site/xdoc/userguide/config.xml b/src/site/xdoc/userguide/config.xml
new file mode 100644
index 0000000..77b3cb8
--- /dev/null
+++ b/src/site/xdoc/userguide/config.xml
@@ -0,0 +1,1626 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+  ~  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.
+  -->
+
+<document>
+    <properties>
+        <title>Apache Synapse - Configuration Language Guide</title>
+    </properties>
+    <body>
+        <section name="Introduction" id="Intro">
+            <p>
+                Apache Synapse loads its configuration from a set of XML files. This enables the
+                user to easily hand edit the configuration, maintain backups and even include the
+                entire configuration in a version control system for easier management and control.
+                For an example one may check-in all Synapse configuration files into a version
+                control system such as Subversion and easily move the configuration files from
+                development, through QA, staging and into production.
+            </p>
+            <p>
+                All the configuration files related to Synapse are housed in the repository/conf/synapse-config
+                directory of the Synapse installation. Synapse is also capable of loading certain
+                configuration elements (eg: sequences, endpoints) from an external SOA registry.
+                When using a registry to store fragments of the configuration, some configuration
+                elements such as endpoints can be updated dynamically while Synapse is executing.
+            </p>
+            <p>
+                This article describes the hierarchy of XML files from which Synapse reads its
+                configuration. It describes the high level structure of the file set and the XML
+                syntax used to configure various elements in Synapse.
+            </p>
+        </section>
+        <section name="Contents">
+            <ul>
+                <li>
+                    <a href="#SynapseConfig">Synapse Configuration</a>
+                    <ul>
+                        <li><a href="#ServiceMediation">Service Mediation (Proxy Services)</a></li>
+                        <li><a href="#MessageMediation">Message Mediation</a></li>
+                        <li><a href="#TaskScheduling">Task Scheduling</a></li>
+                        <li><a href="#Eventing">Eventing</a></li>
+                    </ul>
+                </li>
+                <li>
+                    <a href="#Overview">Functional Components Overview</a>
+                    <ul>
+                        <li><a href="#MediatorsAndSequences">Mediators and Sequences</a></li>
+                        <li><a href="#Endpoints">Endpoints</a></li>
+                        <li><a href="#ProxyServices">Proxy Services</a></li>
+                        <li><a href="#ScheduledTasks">Scheduled Tasks</a></li>
+                        <li><a href="#Templates">Templates</a></li>
+                        <li><a href="#Registry">Remote Registry and Local Registry</a></li>
+                        <li><a href="#API">APIs</a></li>
+                        <li><a href="#PriorityExecutors">Priority Executors</a></li>
+                        <li><a href="#Stores">Message Stores and Processors</a></li>
+                    </ul>
+                </li>
+                <li><a href="#ConfigFiles">Synapse Configuration Files</a></li>
+                <li><a href="#Syntax">Configuration Syntax</a></li>
+                <li><a href="#RegistryConfig">Registry Configuration</a></li>
+                <li><a href="#LocalEntryConfig">Local Entry (Local Registry) Configuration</a></li>
+                <li><a href="#SequenceConfig">Sequence Configuration</a></li>
+                <li>
+                    <a href="#EndpointConfig">Endpoint Configuration</a>
+                    <ul>
+                        <li><a href="#AddressEndpointConfig">Address Endpoint</a></li>
+                        <li><a href="#DefaultEndpointConfig">Default Endpoint</a></li>
+                        <li><a href="#WSDLEndpointConfig">WSDL Endpoint</a></li>
+                        <li><a href="#LBEndpointConfig">Load Balance Endpoint</a></li>
+                        <li><a href="#DLBEndpointConfig">Dynamic Load Balance Endpoint</a></li>
+                        <li><a href="#FOEndpointConfig">Fail-Over Endpoint</a></li>
+                        <li><a href="#RecipientListEndpointConfig">Recipient List Endpoint"</a></li>
+                    </ul>
+                </li>
+                <li><a href="#ProxyServiceConfig">Proxy Service Configuration</a></li>
+                <li><a href="#TaskConfig">Scheduled Task Configuration</a></li>
+                <li><a href="#TemplateConfig">Template Configuration</a></li>
+                <li><a href="#EventSourceConfig">Event Source Configuration</a></li>
+                <li><a href="#APIConfig">API Configuration</a></li>
+                <li><a href="#ExecutorConfig">Priority Executor Configuration</a></li>
+                <li><a href="#StoresConfig">Message Stores and Processors Configuration</a></li>
+            </ul>
+        </section>
+        <section name="The Synapse Configuration" id="SynapseConfig">
+            <p>
+                A typical Synapse configuration is comprised of sequences, endpoints, proxy services
+                and local entries. In certain advanced scenarios, Synapse configuration may also
+                contain scheduled tasks, event sources, messages stores and priority executors.
+                Synapse configuration may also include a registry adapter through which the mediation
+                engine can import various resources to the mediation engine at runtime. Following
+                diagram illustrates different functional components of Synapse and how they interact
+                with each other.
+            </p>
+            <img src="../images/synapse-flow.png"/>
+            <p>
+                All the functional components of the Synapse configuration are configured through
+                XML files. The Synapse configuration language governs the XML syntax used to define
+                and configure different types of components. This configuration language is now
+                available as a <a href="http://synapse.apache.org/ns/2010/04/configuration/synapse_config.xsd">XML schema</a>.
+            </p>
+            <p>
+                Typically the Synapse ESB is used to mediate the message flow between a client
+                and a back-end service implementation. Therefore Synapse can accept a message on
+                behalf of the actual service and perform a variety of mediation tasks on it such
+                as authentication, validation, transformation, logging and routing. Synapse can also
+                detect timeouts and other communication errors when connecting to back-end services.
+                In addition to that users can configure Synapse to perform load balancing, access
+                throttling and response caching. In case of a fault scenario, such as an authentication
+                failure or a schema validation failure, the Synapse ESB can be configured to return
+                a custom message or a SOAP fault to the requesting client without forwarding the
+                message to the back-end service. All these scenarios and use cases can be put into
+                action by selecting the right set of functional components of Synapse and combining
+                them appropriately through the Synapse configuration.
+            </p>
+            <p>
+                Depending on how functional components are used in the Synapse configuration, Synapse
+                can execute in one or more of the following operational modes.
+            </p>
+            <subsection name="Service Mediation (Proxy Services)" id="ServiceMediation">
+                <p>
+                    In service mediation, the Synapse ESB exposes a service endpoint on the ESB, which
+                    accepts messages from clients. Typically these services acts as proxies for existing
+                    (external) services, and the role of Synapse would be to 'mediate' these messages
+                    before they are delivered to the actual service. In this mode, Synapse could expose
+                    a service already available in one transport, over a different transport; or expose
+                    a service that uses one schema or WSDL as a service that uses a different schema or
+                    WSDL. A Proxy service could define the transports over which the service is exposed,
+                    and point to the mediation sequences that should be used to process request and
+                    response messages. A proxy service maybe a SOAP or a REST/POX service over HTTP/S or
+                    SOAP, POX, plain text or binary/legacy service for other transports such as JMS
+                    and VFS file systems.
+                </p>
+            </subsection>
+            <subsection name="Message Mediation" id="MessageMediation">
+                <p>
+                    In message mediation, Synapse acts as a transparent proxy for clients. This way,
+                    Synapse could be configured to filter all the messages on a network for logging,
+                    access control etc, and could 'mediate' messages without the explicit knowledge
+                    of the original client. If Synapse receives a message that is not accepted by any
+                    proxy service, that message is handled through message mediation. Message mediation
+                    always processes messages according to the mediation sequence defined with
+                    the name 'main'.
+                </p>
+            </subsection>
+            <subsection name="Task Scheduling" id="TaskScheduling">
+                <p>
+                    In task scheduling, Synapse can execute a predefined task (job) based on a user
+                    specified schedule. This way a task can be configured to run exactly once or
+                    multiple times with fixed intervals. The schedule can be defined by specifying
+                    the number of times the task should be executed and the interval between
+                    executions. Alternatively one may use the Unix Cron syntax to define task
+                    schedules. This mode of operation can be used to periodically invoke a given
+                    service, poll databases and execute other periodic maintenance activities.
+                </p>
+            </subsection>
+            <subsection name="Eventing" id="Eventing">
+                <p>
+                    In eventing mode, Synapse can be used as an event source and users or systems can
+                    subscribe to receive events from Synapse. Synapse can also act as an event broker
+                    which receives events from other systems and delivers them to the appropriate
+                    subscribers with or without mediation. The set of subscribers will be selected
+                    by applying a predefined filter criteria. This mode enables Synapse to integrate
+                    applications and systems based on the Event Driven Architecture (EDA).
+                </p>
+            </subsection>
+        </section>
+        <section name="Functional Components Overview" id="Overview">
+            <p>
+                As described in the previous section, Synapse engine is comprised of a range of
+                functional components. Synapse configuration language is used to define, configure
+                and combine these components so various messaging scenarios and integration
+                patterns can be realized. Before diving into the specifics of the configuration
+                language, it is useful to have a thorough understanding of all the functional
+                components available, their capabilities and features. A good knowledge on Synapse
+                functional components will help you determine which components should be used to
+                implement any given scenario or use case. In turns it will allow you to develop
+                powerful and efficient Synapse configurations thus putting the ESB to maximum use.
+            </p>
+            <p>
+                As of now Synapse mediation engine consists of following functional elements:
+            </p>
+            <p>
+                <ul>
+                    <li>Mediators and sequences</li>
+                    <li>Endpoints</li>
+                    <li>Proxy services</li>
+                    <li>Scheduled tasks</li>
+                    <li>Event sources</li>
+                    <li>Sequence templates</li>
+                    <li>Endpoint templates</li>
+                    <li>Registry adapter</li>
+                    <li>APIs</li>
+                    <li>Priority executors</li>
+                    <li>Message stores and processors</li>
+                </ul>
+            </p>
+            <subsection name="Mediators and Sequences" id="MediatorsAndSequences">
+                <p>
+                    The Synapse ESB defines a 'mediator' as a component which performs a predefined
+                    action on a message during a message flow. It is the most fundamental message
+                    processing unit in Synapse. A mediator can be thought of as a filter that resides
+                    in a message flow, which processes all the messages passing through it.
+                </p>
+                <p>
+                    A mediator gets full access to the messages at the point where it is defined.
+                    Thus they can inspect, validate and modify messages. Further, mediators can take
+                    external action such as looking up a database or invoking a remote service,
+                    depending on some attributes or values in the current message. Synapse ships
+                    with a variety of built-in mediators which are capable of handling an array of
+                    heterogeneous tasks. There are built-in mediators that can log the requests,
+                    perform content transformations, filter out traffic and a plethora of other
+                    messaging and integration activities.
+                </p>
+                <p>
+                    Synapse also provides an API using which custom mediators can be implemented
+                    easily in Java. The 'Class' and 'POJO (command)' mediators allow one to plugin a
+                    Java class into Synapse with minimal effort. In addition, the 'Script' mediator
+                    allows one to provide an Apache BSF script (eg: JavaScript, Ruby, Groovy etc)
+                    for mediation.
+                </p>
+                <p>
+                    A mediation sequence, commonly called a 'sequence' is a list of mediators. A
+                    sequence may be named for re-use, or defined in-line or anonymously within a
+                    configuration. Sequences may be defined within the Synapse configuration or in
+                    the Registry. From an ESB point of view, a sequence equates to a message flow.
+                    It can be thought of as a pipe consisting of many filters, where individual
+                    mediators play the role of the filters.
+                </p>
+                <p>
+                    A Synapse configuration contains two special sequences named 'main' and 'fault'.
+                    These too may be defined in the Synapse configuration, or externally in the
+                    Registry. If either is not found, a suitable default configuration is generated at
+                    runtime by the ESB. The default 'main' sequence will simply send a message without
+                    any mediation, while the default 'fault' sequence would log the message and error
+                    details and stop further processing. The 'fault' sequence executes whenever Synapse
+                    itself encounters an error while processing a message, or when a fault handler has
+                    not been defined to handle exceptions. A sequence can assign another named sequence
+                    as its 'fault' handler sequence, and handover control to the fault handler if an
+                    error is encountered during the execution of the initial sequence.
+                </p>
+            </subsection>
+            <subsection name="Endpoints" id="Endpoints">
+                <p>
+                    An Endpoint definition within Synapse defines an external service endpoint and
+                    any attributes or semantics that should be followed when communicating with that
+                    endpoint. An endpoint definition can be named for re-use, or defined in-line or
+                    anonymously within a configuration. Typically an endpoint would be based on a
+                    service address or a WSDL. Additionally the Synapse ESB supports Failover and
+                    Load-balance endpoints - which are defined over a group of endpoints. Endpoints
+                    may be defined within the local Synapse configuration or within the Registry.
+                </p>
+                <p>
+                    From a more practical stand point, an endpoint can be used to represent any
+                    entity to which Synapse can make a connection. An endpoint may represent a
+                    URL, a mail box, a JMS queue or a TCP socket. The 'send' mediator of Synapse
+                    which is used to forward messages can take an endpoint as an argument. In that
+                    case the 'send' mediator would forward the message to the specified endpoint.
+                </p>
+            </subsection>
+            <subsection name="Proxy Services" id="ProxyServices">
+                <p>
+                    A proxy service is a virtual service exposed on Synapse. For the external
+                    clients, a proxy service looks like a full fledged web service which has a
+                    set of endpoint references (EPRs), a WSDL and a set of developer specified
+                    policies. But in reality, a proxy service sits in front of a real web service
+                    implementation, acting as a proxy, mediating messages back and forth. The
+                    actual business logic of the service resides in the real back-end web service.
+                    Proxy service simply hides the real service from the consumer and provides
+                    an interface through which the actual service can be reached but with some
+                    added mediation/routing logic.
+                </p>
+                <p>
+                    Proxy services have many use cases. A proxy can be used to expose an existing
+                    service over a different protocol or a schema. The mediation logic in the proxy
+                    can take care of performing the necessary content transformations and protocol
+                    switching. A proxy service can act as a load balancer or a lightweight process
+                    manager thereby hiding multiple back-end services from the client. Proxy services
+                    also provide a convenient way of extending existing web services without changing
+                    the back-end service implementations. For an example a proxy service can add logging
+                    and validation capabilities to an existing service without the developer having
+                    to implement such functionality at service level. Another very common usage of
+                    proxy services is to secure an existing service or a legacy system.
+                </p>
+                <p>
+                    A proxy service is a composite functional component. It is made of several
+                    sequences and endpoints. Typically a proxy service consists of an 'in sequence',
+                    an 'out sequence' and an endpoint. The 'in sequence' handles all the incoming
+                    requests sent by the client. Mediated messages are then forwarded to the target
+                    endpoint which generally points to the real back-end service. Responses coming
+                    back from the back-end service are processed by the 'out sequence'. In addition
+                    to these a 'fault sequence' can also be associated with a proxy service which
+                    is invoked in case of an error.
+                </p>
+                <p>
+                    In addition to the above basic configuration elements, a proxy service can
+                    also define a WSDL file to be published, a set of policies and various other
+                    parameters.
+                </p>
+            </subsection>
+            <subsection name="Scheduled Tasks" id="ScheduledTasks">
+                <p>
+                    A scheduled task is a job deployed in the Synapse runtime for periodic execution.
+                    Users can program the jobs using the task API (Java) provided by Synapse. Once
+                    deployed, tasks can be configured to run periodically. The execution schedule
+                    can be configured by specifying the delay between successive executions or using
+                    the Unix Cron syntax.
+                </p>
+            </subsection>
+            <subsection name="Templates" id="Templates">
+                <p>
+                    A Template is an abstract concept in synapse. One way to view a template, is as
+                    a prototype or a function. Templates try to minimize redundancy in synapse
+                    artifacts (ie sequences and endpoints) by creating prototypes that users can
+                    re-use and utilize as and when needed. This is very much analogous to classes
+                    and instances of classes whereas, a template is a class that can be used to
+                    wield instance objects such as sequences and endpoints.
+                </p>
+                <p>
+                    Templates is an ideal way to improve re-usability and readability of
+                    ESB configurations (XML). Addition to that users can utilize predefined templates
+                    that reflect commonly used EIP patterns for rapid development of ESB
+                    message/mediation flows.There are two flavours of templates which are Endpoint
+                    and Sequence Templates.
+                </p>
+                <p>
+                    An endpoint template is an abstract definition of a synapse endpoint. Users have
+                    to invoke this kind of a template using a special template endpoint. Endpoint
+                    templates can specify various commons parameters of an endpoint that can be reused
+                    across many endpoint definitions (eg: address uri, timeouts, error codes etc).
+                </p>
+                <p>
+                    A sequence template defines a functional form of an ESB sequence. Sequence
+                    templates have the ability to parametrize a sequence flow. Generally
+                    parametrization is in the form of static values as well as xpath expressions.
+                    Users can invoke a template of this kind with a mediator named 'call-template'
+                    by passing in the required parameter values.
+                </p>
+            </subsection>
+            <subsection name="Remote Registry and Local Registry (Local Entries)" id="Registry">
+                <p>
+                    Synapse configuration can refer to an external registry/repository for resources
+                    such as WSDLs, schemas, scripts, XSLT and XQuery transformations etc. One or
+                    more remote registries may be hidden or merged behind a local registry interface
+                    defined in the Synapse configuration. Resources from an external registry are
+                    looked up using 'keys' - which are known to the external registry. The Synapse
+                    ESB ships with a simple URL based registry implementation that uses the file system
+                    for storage of resources, and URLs or fragments as 'keys'.
+                </p>
+                <p>
+                    A registry may define a duration for which a resource served may be cached by the
+                    Synapse runtime. If such a duration is specified, the Synapse ESB is capable of
+                    refreshing the resource after cache expiry to support dynamic re-loading of resources
+                    at runtime. Optionally, a configuration could define certain 'keys' to map to locally
+                    defined entities. These entities may refer to a source URL or file, or may be defined
+                    as in-line XML or text within the configuration itself. If a registry contains a
+                    resource whose 'key' matches the key of a locally defined entry, the local entry
+                    shadows the resource available in the registry. Thus it is possible to override
+                    registry resources locally from within the configuration. To integrate Synapse with
+                    a custom/new registry, one needs to implement the org.apache.synapse.registry.Registry
+                    interface to suit the actual registry being used.
+                </p>
+            </subsection>
+            <subsection name="APIs" id="API">
+                <p>
+                    An API is similar to a web application deployed in Synapse. It provides a
+                    convenient approach for filtering and processing HTTP traffic (specially RESTful
+                    invocations) through the service bus.  Each API is anchored at a user defined
+                    URL context (eg: /ws) and can handle all the HTTP requests that
+                    fall within that context. Each API is also comprised of one or more resources.
+                    Resources contain the mediation logic for processing requests and responses.
+                    Resources can also be associated with a set of HTTP methods and header values.
+                    For an example one may define an API with two resources, where one resources is
+                    used to handle GET requests and the other is used to handle POST requests.
+                    Similarly an API can be defined with separate resources for handling XML and JSON
+                    content (by looking at the Content-type HTTP header).
+                </p>
+                <p>
+                    Resources bare a strong resemblance to proxy services. Similar to proxy services,
+                    a resource can also define an 'in sequence', an 'out sequence' and a 'fault
+                    sequence'. Just like in the case of proxy services, the 'in sequence' is used
+                    to process incoming requests and the 'out sequence' is used to mediate responses.
+                </p>
+                <p>
+                    APIs provide a powerful framework using which comprehensive REST APIs can be
+                    constructed on existing systems. For an example a set of SOAP services can be
+                    hidden behind an API defined in Synapse. Clients can access the API in Synapse
+                    by making pure RESTful invocations over HTTP. Synapse takes care of transforming
+                    the requests and routing them to appropriate back-end services which may or may
+                    not be based on REST.
+                </p>
+            </subsection>
+            <subsection name="Priority Executors" id="PriorityExecutors">
+                <p>
+                    Priority executors can be used to execute sequences with a given priority.
+                    Priority executors are used in high load scenarios where user wants to execute
+                    different sequences at different priority levels. This allows user to control
+                    the resources allocated to executing sequences and prevent high priority messages
+                    from getting delayed and dropped. A priority has a specific meaning compared to
+                    other priorities specified. For example if we have two priorities with value 10
+                    and 1, messages with priority 10 will get 10 times more resources than messages
+                    with priority 1.
+                </p>
+            </subsection>
+            <subsection name="Message Stores and Processors" id="Stores">
+                <p>
+                    Message store acts as a unit of storage for messages/data exchanged during synapse
+                    runtime. By default synapse ships with a in-memory message store and the storage
+                    can be plugged in depending on the requirement. There is a specific mediator called
+                    store mediator which is able to direct message traffic to a particular message
+                    store at runtime.
+                </p>
+                <p>
+                    On the other hand a Message processor has the ability to connect to a message
+                    store and perform message mediation or required data manipulations. Essentially
+                    a particular message processor will be coupled with a message store and as a
+                    result respective message processor will be inherited with the traits of that
+                    particular message storage.
+                </p>
+                <p>
+                    For example in the eye of a message processor,  data/messages coming from in-memory
+                    message store will be seen as more volatile compared to a persistent message store.
+                    Nevertheless it will find it can perform operations much faster on the former.
+                    This is in fact a very powerful concept and hence depending on the processor and
+                    store combination users can define limitless number of EI patterns in synapse
+                    that could meet different runtime requirements and SLA's. Synapse by default
+                    support two processors which are scheduled message processor and sampling
+                    processor.
+                </p>
+            </subsection>
+        </section>
+        <section name="Synapse Configuration Files" id="ConfigFiles">
+            <p>
+                All the XML files pertaining to the Synapse configuration are available in the
+                repository/conf/synapse-config directory of the Synapse installation. This file
+                hierarchy consists of two files named synapse.xml and registry.xml. In addition to
+                that, following sub-directories can be found in the synapse-config directory.
+            </p>
+            <ul>
+                <li>api</li>
+                <li>endpoints</li>
+                <li>events</li>
+                <li>local-entries</li>
+                <li>message-processors</li>
+                <li>message-stores</li>
+                <li>priority-executors</li>
+                <li>proxy-services</li>
+                <li>sequences</li>
+                <li>tasks</li>
+                <li>templates</li>
+            </ul>
+            <p>
+                Each of these sub-directories can contain zero or more configuration items. For
+                an example the 'endpoints' directory may contain zero or more endpoint definitions
+                and the 'sequences' directory may contain zero or more sequence definitions. The
+                registry adapter is defined in the top level registry.xml file. The synapse.xml file
+                is there mainly for backward compatibility reasons. It can be used to define any
+                type of configuration items. One may define few endpoints in the 'endpoints' directory
+                and a few endpoints in the synapse.xml file. However it is recommended to stick to
+                a single, consistent way of defining configuration elements. So you should either
+                define everything in synapse.xml file, or not use it at all.
+            </p>
+            <p>
+                The following tree diagram shows the high-level view of the resulting file
+                hierarchy.
+            </p>
+            <div class="consoleOutput">synapse-config
+    |-- api
+    |-- endpoints
+    |   `-- foo.xml
+    |-- events
+    |   `-- event1.xml
+    |-- local-entries
+    |   `-- bar.xml
+    |-- message-processors
+    |-- message-stores
+    |-- priority-executors
+    |-- proxy-services
+    |   |-- proxy1.xml
+    |   |-- proxy2.xml
+    |   `-- proxy3.xml
+    |-- registry.xml
+    |-- sequences
+    |   |-- custom-logger.xml
+    |   |-- fault.xml
+    |   `-- main.xml
+    |-- synapse.xml
+    |-- tasks
+    |   `-- task1.xml
+    `-- templates</div>
+        </section>
+        <section name="Configuration Syntax" id="Syntax">
+            <p>
+                Synapse ESB is configured using an XML based configuration language. This is a
+                Domain Specific Language (DSL) created and maintained by the Synapse community.
+                The language is designed to be simple, intuitive and easy to learn. All XML
+                elements (tags) in this language must be namespace qualified with the namespace
+                URL <strong>http://ws.apache.org/ns/synapse</strong>.
+            </p>
+            <p>
+                As stated earlier, the synapse.xml file can be used to define all kinds of artifacts.
+                All these different configuration items should be wrapped in a top level 'definitions'
+                element. A configuration defined in the synapse.xml file looks like this at the
+                high level.
+            </p>
+            <div class="xmlConf">&lt;definitions&gt;
+   &lt;<a href="#RegistryConfig">registry</a> provider="string"&gt;...&lt;/registry&gt;?
+   &lt;<a href="#LocalEntryConfig">localEntry</a> key="string"&gt;...&lt;/localEntry&gt;?
+   &lt;<a href="#SequenceConfig">sequence</a> name="string"&gt;...&lt;/sequence&gt;?
+   &lt;<a href="#EndpointConfig">endpoint</a> name="string"&gt;...&lt;/endpoint&gt;?
+   &lt;<a href="#ProxyServiceConfig">proxy</a> name="string" ...&gt;...&lt;/proxy&gt;?
+   &lt;<a href="#TaskConfig">task</a> name="string" ...&gt;...&lt;/task&gt;?
+   &lt;<a href="#EventSourceConfig">eventSource</a> name="string" ...&gt;...&lt;/eventSource&gt;?
+   &lt;<a href="#ExecutorConfig">executor</a> name="string" ...&gt;...&lt;/executor&gt;?
+   &lt;<a href="#APIConfig">api</a> name="string" ...&gt;...&lt;/api&gt;?
+   &lt;<a href="#TemplateConfig">template</a> name="string" ...&gt;...&lt;/template&gt;?
+   &lt;<a href="#StoresConfig">messageStore</a> name="string" ...&gt;...&lt;/messageStore&gt;?
+&lt;/definitions&gt;</div>
+            <p>
+                The registry adapter definition is defined under the &lt;registry&gt; element. Similarly
+                &lt;endpoint&gt;, &lt;sequence&gt;, &lt;proxy&gt;, &lt;localEntry&gt;, &lt;eventSource
+                and &lt;executor&gt; elements are used to define other functional components.
+            </p>
+            <p>
+                As pointed out earlier, the synapse.xml file is there in the synapse-config directory
+                for backwards compatibility reasons. Any artifact defined in this file can be
+                defined separately in its own XML file. The registry can be defined in the registry.xml
+                and other artifacts can be defined in the corresponding sub-directories of the synapse-config
+                directory. However the XML syntax used to configure these artifacts are always the same.
+                Next few sections of this document explains the XML syntax for defining various
+                types of components in the Synapse configuration.
+            </p>
+        </section>
+        <section name="Registry Configuration" id="RegistryConfig">
+            <p>
+                The &lt;registry&gt; element is used to define the registry adapter used by the
+                Synapse runtime. The registry provider specifies an implementation class for the
+                registry being used, and optionally a number of configuration parameters as may be
+                required by the particular registry implementation. An outline configuration is given
+                below.
+            </p>
+            <div class="xmlConf">&lt;registry provider="string"/&gt;
+    &lt;parameter name="string"&gt;text | xml&lt;/parameter&gt;*
+&lt;/registry&gt;</div>
+            <p>
+                Registry entries loaded from a remote registry may be cached as governed by the
+                registry, and reloaded after the cache periods expires if a newer version is found.
+                Hence it is possible to define configuration elements such as (dynamic) sequences and
+                endpoints, as well as resources such as XSLT's, scripts or XSDs in the registry, and
+                update the configuration as these are allowed to dynamically change over time.
+            </p>
+            <p>
+                Synapse ships with a built-in URL based registry implementation called the
+                'SimpleURLRegistry' and this can be configured as follows:
+            </p>
+            <div class="xmlConf">&lt;registry provider="org.apache.synapse.registry.url.SimpleURLRegistry"&gt;
+    &lt;parameter name="root"&gt;file:./repository/conf/sample/resources/&lt;/parameter&gt;
+    &lt;parameter name="cachableDuration"&gt;15000&lt;/parameter&gt;
+&lt;/registry&gt;</div>
+            <p>
+                The 'root' parameter specifies the root URL of the registry for loaded resources. The
+                SimpleURLRegistry keys are path fragments, that when combined with the root prefix
+                would form the full URL for the referenced resource. The 'cachableDuration' parameter
+                specifies the number of milliseconds for which resources loaded from the registry
+                should be cached. More advanced registry implementations allows different cachable
+                durations to be specified for different resources, or mark some resources as never
+                expires. (e.g. Check the WSO2 ESB implementation based on Apache Synapse)
+            </p>
+        </section>
+        <section name="Local Entry (Local Registry) Configuration" id="LocalEntryConfig">
+            <p>
+                Local entries provide a convenient way to import various external configuration
+                artifacts into the Synapse runtime. This includes WSDLs, policies, XSLT files,
+                and scripts. Local entry definitions are parsed at server startup and the referenced
+                configurations are loaded to the memory where they will remain until the server is
+                shut down. Other functional components such as sequences, endpoints and proxy services
+                can refer these locally defined in-memory configuration elements by using the local
+                entry keys.
+            </p>
+            <p>
+                The &lt;localEntry&gt; element is used to declare registry entries that are local
+                to the Synapse instance. Following syntax is used to define a local entry in the
+                Synapse configuration.
+            </p>
+            <div class="xmlConf">&lt;localEntry key="string" [src="url"]&gt;text | xml&lt;/localEntry&gt;</div>
+            <p>
+                A local entry may contain static text or static XML specified as inline content.
+                Following examples show how such static content can be included in local entry
+                definitions.
+            </p>
+            <div class="xmlConf">&lt;localEntry key="version"&gt;0.1&lt;/localEntry&gt;
+
+&lt;localEntry key="validate_schema"&gt;
+    &lt;xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+        ...
+    &lt;/xs:schema&gt;
+&lt;/localEntry&gt;</div>
+            <p>
+                Note the validate_schema local entry which wraps some static XML schema content. A
+                mediator such as the validate mediator can refer this local entry to load its XML
+                schema definition.
+            </p>
+            <p>
+                A local entry may also point to a remote URL (specified using the 'src'
+                attribute) from which the contents can be loaded. This way the user does not have
+                to specify all external configurations in the Synapse configuration itself. The
+                required artifacts can be kept on the file system or hosted on a web server from where
+                Synapse can fetch them using a local entry definition. Following example shows
+                how a local entry is configured to load an XSLT file from the local file system.
+            </p>
+            <div class="xmlConf">&lt;localEntry key="xslt-key-req" src="file:repository/conf/sample/resources/transform/transform.xslt"/&gt;</div>
+            <p>
+                It is important to note that Synapse loads the local entry contents only during
+                server start up (even when they are defined with a remote URL). Therefore any
+                changes done on the remote artifacts will not reflect on Synapse until the server
+                is restarted. This is in contrast to the behavior with remote registry where
+                Synapse reloads configuration artifacts as soon as the cache period expires.
+            </p>
+        </section>
+        <section name="Sequence Configuration" id="SequenceConfig">
+            <p>
+                As explained earlier a sequence resembles a message flow in Synapse and consists
+                of an array of mediators. The &lt;sequence&gt; element is used to define a sequence
+                in the Synapse configuration.  Sequences can be defined with names so they can be
+                reused across the Synapse configuration. The sequences named 'main' and 'fault' have
+                special significance in a Synapse configuration. The 'main' sequence handles any message
+                that is accepted for '<a href="#MessageMediation">Message Mediation</a>'. The
+                'fault' sequence is invoked if Synapse encounters a fault, and a custom fault handler
+                is not specified for the sequence via its 'onError' attribute. If the 'main' or
+                'fault' sequences are not defined locally or not found in the Registry, Synapse
+                auto generates suitable defaults at initialization.
+            </p>
+            <p>
+                A Dynamic Sequence may be defined by specifying a key reference to a registry entry.
+                As the remote registry entry changes, the sequence will dynamically be updated
+                according to the specified cache duration and expiration. If tracing is enabled on a
+                sequence, all messages being processed through the sequence would write tracing
+                information through each mediation step to the 'trace.log' file configured via the
+                log4j.properties configuration.
+            </p>
+            <p>
+                The syntax outline of a sequence definition is given below.
+            </p>
+            <div class="xmlConf">&lt;sequence name="string" [onError="string"] [key="string"] [trace="enable"] [statistics="enable"]&gt;
+    mediator*
+&lt;/sequence&gt;</div>
+            <p>
+                The 'onError' attribute can be used to define a custom error handler sequence.
+                Statistics collection can be activated by setting the 'statistics' attribute to
+                'enable' on the sequence. In this mode the sequence will keep track of the number
+                of messages processed and their processing times. This statistical information can
+                then be retrieved through the Synapse statistics API.
+            </p>
+            <p>
+                All the immediate child elements of the sequence element must be valid mediators.
+                Following example shows a sequence configuration which consists of three child
+                mediators.
+            </p>
+            <div class="xmlConf">&lt;sequence name="main" onError="errorHandler"&gt;
+    &lt;log/&gt;
+    &lt;property name="test" value="test value"/&gt;
+    &lt;send/&gt;
+&lt;/sequence&gt;</div>
+            <p>
+                Sequences can also hand over messages to other sequences. In this sense a sequence
+                is analogous to a procedure in a larger program. In many programming languages
+                procedures can invoke other procedures. See the following example sequence
+                configuration.
+            </p>
+            <div class="xmlConf">&lt;sequence name="foo"&gt;
+    &lt;log/&gt;
+    &lt;property name="test" value="test value"/&gt;
+    &lt;sequence key="other_sequence"/&gt;
+    &lt;send/&gt;
+&lt;/sequence&gt;</div>
+            <p>
+                Note how the message is handed to a sequence named 'other_sequence' using the
+                'sequence' element. The 'key' attribute could point to another named sequence, a
+                local entry or a remote registry entry.
+            </p>
+        </section>
+        <section name="Endpoint Configuration" id="EndpointConfig">
+            <p>
+                An &lt;endpoint&gt; element defines a destination for an outgoing message. There
+                are several types of endpoints that can be defined in a Synapse configuration.
+            </p>
+            <ul>
+                <li>Address endpoint</li>
+                <li>WSDL endpoint</li>
+                <li>Load balance endpoint</li>
+                <li>Fail-over endpoint</li>
+                <li>Default endpoint</li>
+                <li>Recipient list endpoint</li>
+            </ul>
+            <p>
+                Configuration syntax and runtime semantics of these endpoint types differ from
+                each other. However the high level configuration syntax of an endpoint definition
+                takes the following form.
+            </p>
+            <div class="xmlConf">&lt;endpoint [name="string"] [key="string"]&gt;
+    <a href="#AddressEndpointConfig">address-endpoint</a> | <a href="#DefaultEndpointConfig">default-endpoint</a> | <a href="#WSDLEndpointConfig">wsdl-endpoint</a> |
+    <a href="#LBEndpointConfig">load-balanced-endpoint</a> | <a href="#FOEndpointConfig">fail-over-endpoint</a> | <a href="#RecipientListEndpointConfig">recipient-list-endpoint</a>
+&lt;/endpoint&gt;</div>
+            <p>
+                Note how the endpoint definitions always start with an 'endpoint' element. The
+                immediate child element of this top level 'endpoint' element determines the type of
+                the endpoint. All above endpoint types can have a 'name' attribute, and such named
+                endpoints can be referred by other endpoints, through the key attribute. For example
+                if there is an endpoint named 'foo', the following endpoint can be used in any place,
+                where 'foo' has to be used.
+            </p>
+            <div class="xmlConf">&lt;endpoint key="foo"/&gt;</div>
+            <p>
+                This provides a simple mechanism for reusing endpoint definitions within a Synapse
+                configuration.
+            </p>
+            <p>
+                The 'trace' attribute turns on detailed trace information for messages being sent
+                to the endpoint. These will be available in the 'trace.log' file configured via the
+                log4j.properties file.
+            </p>
+            <subsection name="Address Endpoint" id="AddressEndpointConfig">
+                <div class="xmlConf">&lt;address uri="<em>endpoint address</em>" [format="soap11|soap12|pox|get"] [optimize="mtom|swa"]
+         [encoding="<em>charset encoding</em>"]
+         [statistics="enable|disable"] [trace="enable|disable"]&gt;
+    &lt;enableRM [policy="<em>key</em>"]/&gt;?
+    &lt;enableSec [policy="<em>key</em>"]/&gt;?
+    &lt;enableAddressing [version="final|submission"] [separateListener="true|false"]/&gt;?
+
+    &lt;timeout&gt;
+        &lt;duration&gt;<em>timeout duration in milliseconds</em>&lt;/duration&gt;
+        &lt;responseAction&gt;discard|fault&lt;/responseAction&gt;
+    &lt;/timeout&gt;?
+
+    &lt;markForSuspension&gt;
+        [&lt;errorCodes&gt;xxx,yyy&lt;/errorCodes&gt;]
+        &lt;retriesBeforeSuspension&gt;m&lt;/retriesBeforeSuspension&gt;
+        &lt;retryDelay&gt;d&lt;/retryDelay&gt;
+    &lt;/markForSuspension&gt;
+
+    &lt;suspendOnFailure&gt;
+        [&lt;errorCodes&gt;xxx,yyy&lt;/errorCodes&gt;]
+        &lt;initialDuration&gt;n&lt;/initialDuration&gt;
+        &lt;progressionFactor&gt;r&lt;/progressionFactor&gt;
+        &lt;maximumDuration&gt;l&lt;/maximumDuration&gt;
+    &lt;/suspendOnFailure&gt;
+&lt;/address&gt;</div>
+                <p>
+                    Address endpoint is an endpoint defined by specifying the EPR and other
+                    attributes of the endpoint directly in the configuration. The 'uri' attribute
+                    of the address element contains the EPR of the target endpoint. Message format
+                    for the endpoint and the method to optimize attachments can be specified in the
+                    'format' and 'optimize' attributes respectively. Reliable messaging and security
+                    policies for the endpoint can be specified in the policy attribute of the
+                    'enableRM' and 'enableSec' elements respectively. WS-Addressing can be engaged
+                    for the messages sent to the endpoint by using the 'enableAddressing' element.
+                </p>
+                <p>
+                    The 'timeout' element of the endpoint configuration is used to set a specific
+                    socket timeout for the endpoint. By default this is set to 1 minute (60 seconds).
+                    When integrating with back-end services which take longer to respond the timeout
+                    duration should be increased accordingly. The 'responseAction' element states
+                    the action that should be taken in case a response is received after the timeout
+                    period has elapsed. Synapse can either 'discard' the delayed response or inject it
+                    into a 'fault' handler.
+                </p>
+                <p>
+                    A Synapse endpoint is a state machine. At any given point in time it could be
+                    in one of four states - Active, Timeout, Suspended and Switched Off. How and
+                    when an endpoint changes its state is configurable through the Synapse configuration.
+                    An endpoint in suspended or switched off states cannot be used to send messages.
+                    Such an attempt would generate a runtime error.
+                </p>
+                <p>
+                    By default an endpoint is in the 'Active' state. The endpoint will continue to
+                    forward requests as long as its in this state. If an active endpoint encounters
+                    an error while trying to send a message out (eg: a connection failure), the
+                    endpoint may get pushed into the 'Timeout' state or the 'Suspended' state.
+                    Generally most errors will put the endpoint straight into the 'Suspended' state.
+                    Connection timeouts (error code 101504) and connection closed errors (101505)
+                    are the only errors that will not directly suspend an endpoint. Using the
+                    'errorCodes' element in the 'suspendOnFailure' configuration one can explicitly
+                    define the errors for which the endpoint should be suspended. Similarly the
+                    'errorCodes' element in the 'markForSuspension' configuration can be used to
+                    define the errors for which the endpoint should be pushed into the 'Timeout'
+                    state.
+                </p>
+                <p>
+                    Endpoints in 'Timeout' state can be used to send messages. But any consecutive
+                    errors while in this state can push the endpoint into the 'Suspended' state.
+                    The number of consecutive errors that can suspend the endpoint can be configured
+                    using the 'retriesBeforeSuspension' element in the 'markForSuspension' configuration.
+                    The 'retryDelay' is used to specify a duration for which an endpoint will not be
+                    available for immediate use after moving it to the 'Timeout' state. This duration
+                    should be specified in milliseconds.
+                </p>
+                <p>
+                    An endpoint in 'Suspended' state cannot be used to send messages. However the
+                    suspension is only temporary. The suspend duration can be configured using the
+                    'initialDuration' element. When this time period expires a suspended endpoint
+                    becomes available for use again. However any recurring errors can put the
+                    endpoint back in the 'Suspended' state. Such consecutive suspensions can also
+                    progressively increase the suspend duration of the endpoint as configured by the
+                    'progressionFactor' element. But the suspend duration will never exceed the
+                    period configured in the 'maximumDuration' element. Note that both 'initialDuration'
+                    and 'maximumDuration' should be specified in milliseconds.
+                </p>
+                <p>
+                    Some example address endpoint configurations are given below. Note how the
+                    communication protocol is used as a suffix to indicate the outgoing transport.
+                </p>
+                <table border="1">
+                    <tbody>
+                        <tr><th>Transport</th><th>Sample address</th></tr>
+                        <tr><td>HTTP</td><td><tt>http://localhost:9000/services/SimpleStockQuoteService</tt></td></tr>
+                        <tr><td>JMS</td><td><tt>jms:/SimpleStockQuoteService?<br/>
+                          &#160;&#160;&#160;transport.jms.ConnectionFactoryJNDIName=QueueConnectionFactory&amp;<br/>
+                          &#160;&#160;&#160;java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory&amp;<br/>
+                          &#160;&#160;&#160;java.naming.provider.url=tcp://localhost:61616&amp;<br/>
+                          &#160;&#160;&#160;transport.jms.DestinationType=topic</tt></td></tr>
+                        <tr><td>Mail</td><td><tt>mailto:guest@host</tt></td></tr>
+                        <tr><td>VFS</td><td><tt>vfs:file:///home/user/directory</tt></td></tr>
+                        <tr><td/><td><tt>vfs:file:///home/user/file</tt></td></tr>
+                        <tr><td/><td><tt>vfs:ftp://guest:guest@localhost/directory?vfs.passive=true</tt></td></tr>
+                    </tbody>
+                </table>
+            </subsection>
+            <subsection name="Default Endpoint" id="DefaultEndpointConfig">
+                <p>
+                    Default endpoint is an endpoint defined for adding QoS and other configurations
+                    to the endpoint which is resolved from the 'To' address of the message context.
+                    All the configurations such as message format for the endpoint, the method to
+                    optimize attachments, reliable messaging, security policies for the endpoint
+                    can be specified as in the case of Address Endpoint. This endpoint differs from
+                    the address endpoint only in the 'uri' attribute which will not be present in
+                    this endpoint. Following section describes the configuration of a default
+                    endpoint.
+                </p>
+                <div class="xmlConf">&lt;default [format="soap11|soap12|pox|get"] [optimize="mtom|swa"]
+         [encoding="<em>charset encoding</em>"]
+         [statistics="enable|disable"] [trace="enable|disable"]&gt;
+    &lt;enableRM [policy="<em>key</em>"]/&gt;?
+    &lt;enableSec [policy="<em>key</em>"]/&gt;?
+    &lt;enableAddressing [version="final|submission"] [separateListener="true|false"]/&gt;?
+
+    &lt;timeout&gt;
+        &lt;duration&gt;<em>timeout duration in milliseconds</em>&lt;/duration&gt;
+        &lt;responseAction&gt;discard|fault&lt;/responseAction&gt;
+    &lt;/timeout&gt;?
+
+    &lt;markForSuspension&gt;
+        [&lt;errorCodes&gt;xxx,yyy&lt;/errorCodes&gt;]
+        &lt;retriesBeforeSuspension&gt;m&lt;/retriesBeforeSuspension&gt;
+        &lt;retryDelay&gt;d&lt;/retryDelay&gt;
+    &lt;/markForSuspension&gt;
+
+    &lt;suspendOnFailure&gt;
+        [&lt;errorCodes&gt;xxx,yyy&lt;/errorCodes&gt;]
+        &lt;initialDuration&gt;n&lt;/initialDuration&gt;
+        &lt;progressionFactor&gt;r&lt;/progressionFactor&gt;
+        &lt;maximumDuration&gt;l&lt;/maximumDuration&gt;
+    &lt;/suspendOnFailure&gt;
+&lt;/default&gt;</div>
+            </subsection>
+            <subsection name="WSDL Endpoint" id="WSDLEndpointConfig">
+                <p>
+                    WSDL endpoint is an endpoint definition based on a specified WSDL document. The
+                    WSDL document can be specified either as a URI or as an inline definition within
+                    the configuration. The service and port name containing the target EPR has to be
+                    specified with the 'service' and 'port' (or 'endpoint') attributes respectively.
+                    Elements like 'enableRM', 'enableSec', 'enableAddressing', 'suspendOnFailure' and
+                    'timeout' are same as for an Address endpoint.
+                </p>
+                <div class="xmlConf">&lt;wsdl [uri="wsdl-uri"] service="qname" port/endpoint="qname"&gt;
+    &lt;wsdl:definition&gt;...&lt;/wsdl:definition&gt;?
+    &lt;wsdl20:description&gt;...&lt;/wsdl20:description&gt;?
+    &lt;enableRM [policy="key"]/&gt;?
+    &lt;enableSec [policy="key"]/&gt;?
+    &lt;enableAddressing/&gt;?
+
+    &lt;timeout&gt;
+        &lt;duration&gt;timeout duration in milliseconds&lt;/duration&gt;
+        &lt;responseAction&gt;discard|fault&lt;/responseAction&gt;
+    &lt;/timeout&gt;?
+    &lt;markForSuspension&gt;
+        [&lt;errorCodes&gt;xxx,yyy&lt;/errorCodes&gt;]
+        &lt;retriesBeforeSuspension&gt;m&lt;/retriesBeforeSuspension&gt;
+        &lt;retryDelay&gt;d&lt;/retryDelay&gt;
+    &lt;/markForSuspension&gt;
+
+    &lt;suspendOnFailure&gt;
+        [&lt;errorCodes&gt;xxx,yyy&lt;/errorCodes&gt;]
+        &lt;initialDuration&gt;n&lt;/initialDuration&gt;
+        &lt;progressionFactor&gt;r&lt;/progressionFactor&gt;
+        &lt;maximumDuration&gt;l&lt;/maximumDuration&gt;
+    &lt;/suspendOnFailure&gt;
+
+&lt;/wsdl&gt;</div>
+            </subsection>
+            <subsection name="Load Balance Endpoint" id="LBEndpointConfig">
+                <p>
+                    A Load balanced endpoint distributes the messages (load) among a set of listed
+                    endpoints or static members by evaluating the load balancing policy and any other
+                    relevant parameters. The policy attribute of the load balance element specifies the
+                    load balance policy (algorithm) to be used for selecting the target endpoint or
+                    static member. Currently only the roundRobin policy is supported. The 'failover'
+                    attribute determines if the next endpoint or static member should be selected once
+                    the currently selected endpoint or static member has failed, and defaults to true.
+                    The set of endpoints or static members amongst which the load has to be distributed
+                    can be listed under the 'loadBalance' element. These endpoints can belong to any
+                    endpoint type mentioned in this document. For example, failover endpoints can be
+                    listed inside the load balance endpoint to load balance between failover groups etc.
+                    The 'loadbalance' element cannot have both 'endpoint' and 'member' child elements in
+                    the same configuration. In the case of the 'member' child element, the 'hostName',
+                    'httpPort' and/or 'httpsPort' attributes should be specified.
+                </p>
+                <p>
+                    The optional 'session' element makes the endpoint a session affinity based load
+                    balancing endpoint. If it is specified, sessions are bound to endpoints in the
+                    first message and all successive messages for those sessions are directed to their
+                    associated endpoints. Currently there are two types of sessions supported in session
+                    aware load balancing. Namely HTTP transport based session which identifies the
+                    sessions based on http cookies and the client session which identifies the session
+                    by looking at a SOAP header sent by the client with the QName
+                    '{http://ws.apache.org/ns/synapse}ClientID'. The 'failover' attribute mentioned
+                    above is not applicable for session affinity based endpoints and it is always
+                    considered as set to false. If it is required to have failover behavior in session
+                    affinity based load balance endpoints, failover endpoints should be listed as the
+                    target endpoints.
+                </p>
+                <div class="xmlConf">&lt;loadBalance [policy="roundRobin"] [algorithm="impl of org.apache.synapse.endpoints.algorithms.LoadbalanceAlgorithm"]
+                        [failover="true|false"]&gt;
+    &lt;endpoint .../&gt;+
+    &lt;member hostName="host" [httpPort="port"] [httpsPort="port2"]&gt;+
+&lt;/loadBalance&gt;
+&lt;session type="http|simpleClientSession"/&gt;?</div>
+            </subsection>
+            <subsection name="Dynamic Load Balance Endpoint" id="DLBEndpointConfig">
+                <p>
+                    This is a special variation of the load balance endpoint where instead of
+                    having to specify the child endpoints explicitly, the endpoint automatically
+                    discovers the child endpoints available for load balancing. These child
+                    endpoints will be discovered using the 'membershipHandler' class. Generally, this
+                    class will use a group communication mechanism to discover the application members.
+                    The 'class' attribute of the 'membershipHandler' element should be an
+                    implementation of org.apache.synapse.core.LoadBalanceMembershipHandler.
+                    The 'membershipHandler' specific properties can be specified using the 'property'
+                    elements.  The 'policy' attribute of the 'dynamicLoadbalance' element specifies
+                    the load balance policy (algorithm) to be used for selecting the next member to
+                    which the message has to be forwarded. Currently only the 'roundRobin' policy is
+                    supported. 'The failover' attribute determines if the next member should be
+                    selected once the currently selected member has failed, and defaults to true.
+                </p>
+                <div class="xmlConf">&lt;dynamicLoadBalance [policy="roundRobin"] [failover="true|false"]&gt;
+    &lt;membershipHandler class="impl of org.apache.synapse.core.LoadBalanceMembershipHandler"&gt;
+        &lt;property name="name" value="value"/&gt;+
+    &lt;/membershipHandler&gt;
+&lt;/dynamicLoadBalance&gt;</div>
+                <p>
+                    Currently Synapse ships with one implementation of the LoadBalanceMembershipHandler
+                    interface. This class is named 'Axis2LoadBalanceMembershipHandler' and its
+                    usage is demonstrated in sample 57.
+                </p>
+            </subsection>
+            <subsection name="Fail-Over Endpoint" id="FOEndpointConfig">
+                <p>
+                    Failover endpoints send messages to the listed endpoints with the following
+                    failover behavior. At the start, the first listed endpoint is selected as the
+                    primary and all other endpoints are treated as backups. Incoming messages are
+                    always sent only to the primary endpoint. If the primary endpoint fails, next
+                    active endpoint is selected as the primary and failed endpoint is marked as
+                    inactive. Thus it sends messages successfully as long as there is at least one
+                    active endpoint among the listed endpoints.
+                </p>
+                <p>
+                    When a previously failed endpoint becomes available again, it will assume
+                    its position as the primary endpoint and the traffic will be routed to that endpoint.
+                    It is possible to disable this behavior by setting the 'dynamic' attribute to false.
+                </p>
+                <div class="xmlConf">&lt;failover [dynamic="true|false"]&gt;
+    &lt;endpoint .../&gt;+
+&lt;/failover&gt;</div>
+
+            </subsection>
+            <subsection name="Recipient List Endpoint" id="RecipientListEndpointConfig">
+                <p>
+                    A recipient list endpoint can be used to send a single message to a list of
+                    recipients (child endpoints). This is used to implement the well-known
+                    integration pattern named 'recipient list'. The same functionality can
+                    be achieved using the 'clone' mediator, but the recipient list provides
+                    a more natural and intuitive way of implementing such a scenario. Configuration
+                    of the recipient list endpoint takes the following general form.
+                </p>
+                <div class="xmlConf">&lt;recipientList name="string"&gt;
+    &lt;endpoint&gt;+
+    &lt;member hostName="host" [httpPort="port"] [httpsPort="port2"]&gt;+
+&lt;/recipientList&gt;</div>
+                <p>
+                    A recipient list can be named by setting the 'name' attribute on the 'recipientList'
+                    element. Similar to a load balance endpoint, the recipient list endpoint also
+                    wraps a set of endpoint definitions or a set of member definitions. At runtime
+                    messages will be sent to all the child endpoints or members.
+                </p>
+            </subsection>
+        </section>
+        <section name="Proxy Service Configuration" id="ProxyServiceConfig">
+            <p>
+                A &lt;proxy&gt; element is used to define a Synapse Proxy service.
+            </p>
+            <div class="xmlConf">&lt;proxy name="string" [transports="(http |https |jms |.. )+|all"] [pinnedServers="(serverName )+"] [serviceGroup="string"]&gt;
+    &lt;description&gt;...&lt;/description&gt;?
+    &lt;target [inSequence="name"] [outSequence="name"] [faultSequence="name"] [endpoint="name"]&gt;
+        &lt;inSequence&gt;...&lt;/inSequence&gt;?
+        &lt;outSequence&gt;...&lt;/outSequence&gt;?
+        &lt;faultSequence&gt;...&lt;/faultSequence&gt;?
+        &lt;endpoint&gt;...&lt;/endpoint&gt;?
+    &lt;/target&gt;?
+    &lt;publishWSDL key="string" uri="string"&gt;
+        ( &lt;wsdl:definition&gt;...&lt;/wsdl:definition&gt; | &lt;wsdl20:description&gt;...&lt;/wsdl20:description&gt; )?
+        &lt;resource location="..." key="..."/&gt;*
+    &lt;/publishWSDL&gt;?
+    &lt;enableAddressing/&gt;?
+    &lt;enableSec/&gt;?
+    &lt;enableRM/&gt;?
+    &lt;policy key="string" [type="(in | out)"]/&gt;? // optional service or message level policies such as (e.g. WS-Security and/or WS-RM policies)
+    &lt;parameter name="string"&gt;  // optional service parameters such as (e.g. transport.jms.ConnectionFactory)
+        string | xml
+    &lt;/parameter&gt;
+&lt;/proxy&gt;</div>
+            <p>
+                A proxy service is created and exposed on the specified transports through the
+                underlying Axis2 engine, exposing service EPRs as per the standard Axis2
+                conventions (ie based on the service name). Note that currently Axis2 does not allow
+                custom URI's to be set for services on some transports such as http/s. A proxy
+                service could be exposed over all enabled Axis2 transports such as http, https,
+                JMS, Mail and File etc. or on a subset of these as specified by the optional
+                'transports' attribute. By default, if this attribute is not specified, Synapse
+                will attempt to expose the proxy service on all enabled transports.
+            </p>
+            <p>
+                In a clustered setup it might be required to deploy a particular proxy service
+                on a subset of the available nodes. This can be achieved using the 'pinnedServers'
+                attribute. This attribute takes a list of server names. At server startup Synapse
+                will check whether the name of the current host matches any of the names given
+                in this attribute and only deploy the proxy service if a match is found. The
+                server host name is picked from the system property 'SynapseServerName', failing
+                which the hostname of the machine would be used or default to 'localhost'. User can
+                specify a more meaningful name to a Synapse server instance by starting the server
+                using the following command.
+            </p>
+            <div class="command">./synapse.sh -serverName=&lt;ServerName&gt;</div>
+            <p>
+                If Synapse is started as a daemon or a service, the above setting should be specified
+                in the wrapper.conf file.
+            </p>
+            <p>
+                By default when a proxy service is created it is added to an Axis service group
+                which has the same name as the proxy service. With the 'serviceGroup' attribute
+                this behavior can be further configured. A custom Axis service group can be specified
+                for a proxy service using the 'serviceGroup' attribute. This way multiple proxy
+                services can be grouped together at Axis2 level thus greatly simplifying service
+                management tasks.
+            </p>
+            <p>
+                Each service could define the target for received messages as a named sequence or a
+                direct endpoint. Either target inSequence or endpoint is required for the proxy
+                configuration, and a target outSequence defines how responses should be handled. Any
+                WS-Policies provided would apply as service level policies, and any service parameters
+                could be passed into the proxy service's AxisService instance using the 'parameter'
+                elements (e.g. the JMS destination etc). If the proxy service should enable
+                WS-Reliable Messaging or Security, the appropriate modules should be engaged, and
+                specified service level policies will apply. To engage the required modules, one may
+                use the 'enableSec', 'enableRM' and 'enableAddressing' elements.
+            </p>
+            <p>
+                A dynamic proxy may be defined by specifying the properties of the proxy as dynamic
+                entries by referring them with the key. For example one could specify the
+                inSequence or endpoint with a remote key, without defining it in the local
+                configuration. As the remote registry entry changes, the properties of the proxy
+                will dynamically be updated accordingly. (Note: proxy service definition itself
+                cannot be specified to be dynamic; i.e &lt;proxy key="string"/&gt; is wrong)
+            </p>
+            <p>
+                A WSDL for the proxy service can be published using the 'publishWSDL' element.
+                The WSDL document can be loaded from the registry by specifying the 'key' attribute
+                or from any other location by specifying the 'uri' attribute. Alternatively the WSDL
+                can be provided inline as a child element of the 'publishWSDL' element. Artifacts
+                (schemas or other WSDL documents) imported by the WSDL can be resolved from the
+                registry by specifying appropriate 'resource' elements.
+            </p>
+            <div class="xmlConf">&lt;publishWSDL key="my.wsdl"&gt;
+   &lt;resource location="http://www.standards.org/standard.wsdl" key="standard.wsdl"/&gt;
+&lt;/publishWSDL&gt;</div>
+            <p>
+                In this example the WSDL is retrieved from the registry using the key 'my.wsdl'. It
+                imports another WSDL from location 'http://www.standards.org/standard.wsdl'. Instead
+                of loading it from this location, Synapse will retrieve the imported WSDL from the
+                registry entry 'standard.wsdl'.
+            </p>
+            <p>
+                Some well-known parameters that are useful when writing complex proxy services
+                are listed below. These can be included in a proxy configuration using 'parameter'
+                tags.
+            </p>
+            <table border="1" cellpadding="0" cellspacing="0" style="width: 100%; font-size:small" class="data-table">
+                <tbody>
+                    <tr>
+                        <th>
+                            Parameter
+                        </th>
+                        <th>
+                            Value
+                        </th>
+                        <th>
+                            Default
+                        </th>
+                        <th>
+                            Description
+                        </th>
+                    </tr>
+                    <tr>
+                        <td>
+                            useOriginalwsdl
+                        </td>
+                        <td>
+                            true|false
+                        </td>
+                        <td>
+                            false
+                        </td>
+                        <td>
+                            Use the given WSDL instead of generating the WSDL.
+                        </td>
+                    </tr>
+                    <tr>
+                        <td>
+                            modifyUserWSDLPortAddress
+                        </td>
+                        <td>
+                            true|false
+                        </td>
+                        <td>
+                            true
+                        </td>
+                        <td>
+                            (Effective only with useOriginalwsdl=true) If true (default) modify
+                            the port addresses to current host.
+                        </td>
+                    </tr>
+                    <tr>
+                        <td>
+                            showAbsoluteSchemaURL
+                        </td>
+                        <td>
+                            true|false
+                        </td>
+                        <td>
+                            false
+                        </td>
+                        <td>
+                            Show the absolute path of the referred schemas of the WSDL without
+                            showing the relative paths.
+                        </td>
+                    </tr>
+                </tbody>
+            </table>
+            <p>
+                Following table lists some transport specific parameters that can be passed into
+                proxy service configurations.
+            </p>
+            <table border="1" cellpadding="0" cellspacing="0" style="width: 100%; font-size:small" class="data-table">
+                <tbody>
+                    <tr>
+                        <th>
+                            Transport
+                        </th>
+                        <th>
+                            Require
+                        </th>
+                        <th>
+                            Parameter
+                        </th>
+                        <th>
+                            Description
+                        </th>
+                    </tr>
+                    <tr>
+                        <td>
+                            JMS
+                        </td>
+                        <td>
+                            Optional
+                        </td>
+                        <td>
+                            transport.jms.ConnectionFactory
+                        </td>
+                        <td>
+                            The JMS connection factory definition (from axis2.xml) to be used to
+                            listen for messages for this service
+                        </td>
+                    </tr>
+                    <tr>
+                        <td/>
+                        <td>
+                            Optional
+                        </td>
+                        <td>
+                            transport.jms.Destination
+                        </td>
+                        <td>
+                            The JMS destination name (Defaults to a Queue with the service name)
+                        </td>
+                    </tr>
+                    <tr>
+                        <td/>
+                        <td>
+                            Optional
+                        </td>
+                        <td>
+                            transport.jms.DestinationType
+                        </td>
+                        <td>
+                            The JMS destination type. Accept values 'queue' or 'topic' (default:
+                            queue)
+                        </td>
+                    </tr>
+                    <tr>
+                        <td/>
+                        <td>
+                            Optional
+                        </td>
+                        <td>
+                            transport.jms.ReplyDestination
+                        </td>
+                        <td>
+                            The destination where a reply will be posted
+                        </td>
+                    </tr>
+                    <tr>
+                        <td/>
+                        <td>
+                            Optional
+                        </td>
+                        <td>
+                            transport.jms.Wrapper
+                        </td>
+                        <td>
+                            The wrapper element for the JMS message
+                        </td>
+                    </tr>
+                </tbody>
+            </table>
+        </section>
+        <section name="Scheduled Task Configuration" id="TaskConfig">
+            <p>
+                A &lt;task&gt; element is used to define a Synapse task (aka startup).
+            </p>
+            <div class="xmlConf">&lt;task class="mypackage.MyTask" name="string" [pinnedServers="(serverName)+"]&gt;
+    &lt;property name="stringProp" value="String"/&gt;
+    &lt;property name="xmlProp"&gt;
+        &lt;somexml&gt;config&lt;/somexml&gt;
+    &lt;/property&gt;
+    &lt;trigger ([[count="10"]? interval="1000"] | [cron="0 * 1 * * ?"] | [once=(true | false)])/&gt;
+&lt;/task&gt;</div>
+            <p>
+                A task is created and scheduled to run at specified time intervals or as specified
+                by the cron expression. The 'class' attribute specifies the actual task
+                implementation class (which must implement org.apache.synapse.task.Task interface)
+                to be executed at the specified interval/s, and name specifies an identifier for
+                the scheduled task.
+            </p>
+            <p>
+                Fields in the task class can be set using properties provided as string literals or
+                XML fragments. For example, if the task implementation class has a field named
+                'version' with a corresponding setter method, the configuration value which will be
+                assigned to this field before running the task can be specified using a property with
+                the name 'version'.
+            </p>
+            <p>
+                There are three different trigger mechanisms to schedule tasks. A simple trigger is
+                specified with a 'count' and an 'interval', implying that the task will run a
+                'count' number of times at specified intervals. A trigger may also be specified as
+                a cron trigger using a cron expression. A one-time trigger is specified using the
+                'once' attribute in the definition and could be specified as true in which case the
+                task will be executed only once just after the initialization of Synapse.
+            </p>
+            <p>
+                In clustered deployments sometimes it would be necessary to deploy a particular task
+                in a selected set of nodes. This can be achieved using the optional 'pinnedServers'
+                attribute. A list of server names or host names can be specified in this attribute.
+                At server startup, Synapse will match the current server name or the host name with
+                the values specified in this attribute to see whether the task should be initialized
+                or not.
+            </p>
+        </section>
+        <section name="Template Configuration" id="TemplateConfig">
+            <p>
+                As explained earlier templates in synapse are defined in two flavors; sequence and
+                endpoint templates. The configuration, syntax forms and semantics of these are explained
+                in the following section.
+            </p>
+            <p>
+                A sequence template consist of two parts. As in any kind of a function, it has a
+                parameter set definition (argument list) and a function body definition. An important
+                difference is sequence template parameters are not typed (typically these are
+                string parameters, but can be of any type which is determined at runtime). Also
+                function body is a typical esb flow or a sequence.
+            </p>
+            <p>
+                The syntax outline of a sequence template definition is given below.
+            </p>
+            <div class="xmlConf">&lt;template name=&quot;string&quot;&gt;
+    &lt;!-- parameters this sequence template will be supporting --&gt;
+    (
+    &lt;parameter name=&quot;string&quot;/&gt;
+    ) *
+    &lt;!--this is the in-line sequence of the template     --&gt;
+    &lt;sequence&gt;
+        mediator+
+    &lt;/sequence&gt;
+&lt;/template&gt;</div>
+            <p>
+                A sequence template is a top level element defined with the 'name' attribute in Synapse
+                configuration. Both endpoint and sequence templates start with a 'template' element.
+                Parameters (defined by &lt;parameter&gt; elements) are the inputs supported by a
+                sequence template. These sequence template parameters can be referred by any xpath
+                expression defined within the in-lined sequence. For example parameter named 'foo' can
+                be referred by a property mediator (defined inside the in-line sequence of the template)
+                in following ways.
+            </p>
+            <div class="xmlConf">&lt;property name="PropertyValue" expression="$func:foo"/&gt;
+&lt;property name="PropertyValue" expression="get-property('foo', 'func')"/&gt;</div>
+            <p>
+                Note the scope variable used in the XPath expression. We use 'function' scope or '$func'
+                to refer to template parameters.
+            </p>
+            <p>
+                Invoking a sequence template can be done with a mediator named 'call-template' by
+                passing parameter values. The syntax outline of a call template mediator definition
+                is given below.
+            </p>
+            <div class="xmlConf">&lt;call-template target=&quot;string&quot;&gt;
+    &lt;!-- parameter values will be passed on to a sequence template --&gt;
+    (
+    &lt;!--passing plain static values --&gt;
+    &lt;with-param name=&quot;string&quot; value=&quot;string&quot; /&gt; |
+    &lt;!--passing xpath expressions --&gt;
+    &lt;with-param name=&quot;string&quot; value=&quot;{string}&quot; /&gt; |
+    &lt;!--passing dynamic xpath expressions where values will be compiled dynamically--&gt;
+    &lt;with-param name=&quot;string&quot; value=&quot;{{string}}&quot; /&gt; |
+    ) *
+&lt;/call-template&gt;</div>
+
+            <p>
+                The 'call-template' mediator should define a target template it should be
+                invoking, with 'target' attribute.
+            </p>
+            <p>
+                The 'with-param' element is used to parse parameter values to a target
+                sequence template. Note that parameter names has to be exact matches to the names
+                specified in the target template. Parameter elements can contain three types of
+                parameterized values. xpath values are passed in within curly braces ({}) for value
+                attribute.
+            </p>
+            <p>
+                Endpoint templates are similar to the sequence templates in definition.  Unlike
+                sequence templates, endpoint templates are always parameterized using '$' prefixed
+                values (NOT xpath expressions). Users can parameterize endpoint configuration elements
+                with these '$' prefixed values. An example is shown below.
+            </p>
+            <div class="xmlConf">&lt;template name=&quot;ep_template&quot;&gt;
+    &lt;parameter name=&quot;codes&quot;/&gt;
+    &lt;parameter name=&quot;factor&quot;/&gt;
+    &lt;parameter name=&quot;retries&quot;/&gt;
+    &lt;endpoint name=&quot;$name&quot;&gt;
+        &lt;default&gt;
+            &lt;suspendOnFailure&gt;
+                &lt;errorCodes&gt;$codes&lt;/errorCodes&gt;
+                &lt;progressionFactor&gt;$factor&lt;/progressionFactor&gt;
+            &lt;/suspendOnFailure&gt;
+            &lt;markForSuspension&gt;
+                &lt;retriesBeforeSuspension&gt;$retries&lt;/retriesBeforeSuspension&gt;
+                &lt;retryDelay&gt;0&lt;/retryDelay&gt;
+            &lt;/markForSuspension&gt;
+        &lt;/default&gt;
+     &lt;/endpoint&gt;
+&lt;/template&gt;</div>
+            <p>
+                The syntax outline of a endpoint template definition is given below.
+            </p>
+
+            <div class="xmlConf">&lt;template name=&quot;string&quot;&gt;
+    &lt;!-- parameters this endpoint template will be supporting --&gt;
+    (
+    &lt;parameter name=&quot;string&quot;/&gt;
+    ) *
+    &lt;!--this is the in-line endpoint of the template    --&gt;
+    &lt;endpoint [name=&quot;string&quot;] &gt;
+        address-endpoint | default-endpoint | wsdl-endpoint |
+        load-balanced-endpoint | fail-over-endpoint | recipient-list-endpoint
+    &lt;/endpoint&gt;
+&lt;/template&gt;</div>
+
+             <p>
+                 As described earlier template endpoint is the artifact that makes a template of an
+                 endpoint type into a concrete endpoint. In other words an endpoint template would
+                 be useless without a template endpoint referring to it. This is semantically similar
+                 to the relationship between a sequence template and a 'call-template' mediator.
+             </p>
+             <p>
+                The syntax outline of a template endpoint definition is as following..
+            </p>
+            <div class="xmlConf">&lt;endpoint [name=&quot;string&quot;] [key=&quot;string&quot;] template=&quot;string&quot;&gt;
+    &lt;!-- parameter values will be passed on to a endpoint template --&gt;
+    (
+    &lt;parameter name=&quot;string&quot; value=&quot;string&quot; /&gt;
+    ) *
+&lt;/endpoint&gt;</div>
+            <p>
+                Template endpoint defines parameter values that can parameterize an endpoint.
+                The 'template' attribute points to a target endpoint template.
+            </p>
+            <p>
+                As in the case of sequence template, note that parameter names has to be exact match
+                to the names specified in target endpoint template.
+            </p>
+        </section>
+        <section name="Event Source Configuration" id="EventSourceConfig">
+            <p>
+                Event sources enable the user to run Synapse in the eventing mode of operation.
+                Synapse can act as an event source as well as an event broker. An event source
+                is defined using the &lt;eventSource&gt; configuration element.
+            </p>
+            <div class="xmlConf">&lt;eventSource name="string"&gt;
+    &lt;subscriptionManager class="mypackage.MyClass"&gt;
+        &lt;parameter name="string"/&gt;
+	&lt;/subscriptionManager&gt;
+&lt;/eventSource&gt;</div>
+            <p>
+                Once an event source is deployed in Synapse, it will provide a service URL (EPR) to
+                which clients can send WS-Eventing subscription requests. Clients can subscribe,
+                unsubscribe and renew subscriptions by sending messages to this EPR. The subscription
+                manager configured inside the event source will be responsible for storing
+                and managing the subscriptions. The 'class' attribute of the 'subscriptionManager'
+                element should point to the Java class which provides this subscription management
+                functionality. Synapse ships with an in-memory subscription manager which
+                keeps and manages all subscriptions in memory.
+            </p>
+            <p>
+                Any additional parameters required to configure the subscription manager implementation
+                can be specified using the 'parameter' elements.
+            </p>
+        </section>
+        <section name="API Configuration" id="APIConfig">
+            <p>
+                APIs provide a flexible and powerful approach for defining full fledged REST APIs
+                in Synapse. An API definition starts with the &lt;api&gt; element.
+            </p>
+            <div class="xmlConf">&lt;api name="string" context="string" [hostname="string"][port="int"]&gt;
+    &lt;resource [methods="http-method-list"][inSequence="string"][outSequence="string"]
+   		[faultSequence="string"][content-type="string"][user-agent="str"]&gt;
+
+        &lt;inSequence&gt;...&lt;/inSequence&gt;?
+        &lt;outSequence&gt;...&lt;/outSequence&gt;?
+        &lt;faultSequence&gt;...&lt;/faultSequence&gt;?
+   &lt;/resource&gt;+
+   &lt;handlers&gt;
+        &lt;handler class="name"/&gt;+
+   &lt;/handlers&gt;?
+&lt;/api&gt;</div>
+            <p>
+                Each API definition must be uniquely named using the 'name' attribute. The 'context'
+                attribute is used to define the URL context at which the REST API will be anchored
+                (eg: /ws, /foo/bar, /soap). The API will only receive requests that fall in the
+                specified URL context. In addition to that an API could be bound to a particular
+                host and a port using the 'hostname' and 'port' attributes.
+            </p>
+            <p>
+                An API must also contain one or more resources. Resources define how messages
+                are processed and mediated by the API. An API can be associated with a set of HTTP
+                methods using the 'methods' attribute. This attribute can support a single method name
+                (eg: GET) or a space separated list of methods (eg: GET PUT DELETE). A resource
+                can also refer other sequences using the 'inSequence', 'outSequence' and 'faultSequence'
+                attributes. Alternatively these mediation sequences can be defined inline with the
+                resource using 'inSequence', 'outSequence' and 'faultSequence' tags.
+            </p>
+            <p>
+                An API can also optionally define a set of handlers. These handlers are invoked
+                for each incoming API request, before they are dispatched to the appropriate
+                resources. The 'class' attribute on the 'handler' elements should contain the
+                ful qualified names of the handler implementation classes.
+            </p>
+        </section>
+        <section name="Priority Executor Configuration" id="ExecutorConfig">
+            <p>
+                The priority executor configuration syntax takes the following general form.
+            </p>
+            <div class="xmlConf">&lt;priority-executor name=&quot;string&quot;&gt;
+    &lt;queues isFixed=&quot;true|false&quot; nextQueue=&quot;class implementing NextQueueAlgorithm&quot;&gt;
+        &lt;queue [size=&quot;size of the queue&quot;] priority=&quot;priority of the messages put in to this queue&quot;/&gt;*
+    &lt;/queues&gt;
+    &lt;threads core=&quot;core number of threads&quot; max=&quot;max number of threads&#39; keep-alive=&quot;keep alive time&quot;/&gt;
+&lt;/priority-executor&gt;</div>
+            <p>
+                A priority executor consists of a thread pool and a set of queues for different
+                priority levels. Queues can be either bounded on unbounded in terms of capacity.
+                Each executor must define at least two queues. By default queues are unbounded.
+                By specifying the attribute 'size' they can be configured to have a limited capacity.
+                The 'priority' attribute specifies the priority level associated with a particular
+                queue. As explained earlier, higher the level, higher the priority the messages will
+                get.
+            </p>
+            <p>
+                The next queue algorithm is used to determine the next message processed. By default
+                Synapse uses a built-in priority queueing algorithm for this purpose. If required a
+                custom algorithm can be used by specifying the 'nextQueue' algorithm on the 'queues'
+                element.
+            </p>
+            <p>
+                The 'threads' element is used to configure the underlying thread pool. The 'core'
+                and 'max' attributes are used to specify the initial size and the maximum size of the
+                thread pool. A keep-alive time duration can be specified for idling threads using
+                the 'keep-alive' attribute where the duration is configured in seconds. If not
+                specified a default keep-alive duration of 5 seconds will be used.
+            </p>
+            <p>
+                In order to process messages through a priority executor one must use the 'enqueue'
+                mediator. This mediator can be used in a sequence or a proxy service to get all
+                requests processed through a pre-configured priority executor.
+            </p>
+            <div class="xmlConf">&lt;enqueue priority="10" executor="MyExecutor"/&gt;</div>
+            <p>
+                For best results it's recommended to dispatch messages into priority executors
+                straight from the transport level. This can be achieved by adding an additional
+                parameter to the NHTTP transport configuration in the axis2.xml file of Synapse.
+            </p>
+            <div class="xmlConf">&lt;parameter name="priorityConfigFile"&gt;file path&lt;/parameter&gt;</div>
+            <p>
+                The parameter should point to a separate XML configuration which defines the
+                priority configuration.
+            </p>
+            <div class="xmlConf">&lt;Priority-Configuration&gt;
+    &lt;priority-executor name="priority-executor"&gt;
+        &lt;queues isFixed="true|false"&gt;
+            &lt;queue [size=""] priority=""/&gt;*
+        &lt;/queues&gt;
+        &lt;threads core="core number of threads" max="max number of threads' keep-alive="keep alive time"/&gt;
+    &lt;/priority-executor&gt;
+
+    &lt;!-- conditions for calculating the priorities based on HTTP message --&gt;
+    &lt;conditions defaultPriority="default priority as an integer"&gt;
+        &lt;condition priority="priority value as an integer"&gt;
+            one evaluator, this evaluator can contain other evaluators
+        &lt;/condition&gt;
+    &lt;/conditions&gt;
+&lt;/Priority-Configuration&gt;</div>
+        </section>
+        <section name="Message Stores and Processors Configuration" id="StoresConfig">
+            <p>
+                Both Message Stores and processors are top level configuration of synapse. Following
+                section tries to describe some of the syntax of the message store/processors
+                configurations.
+            </p>
+
+            <p>
+                The syntax outline of a message store definition is given below.
+            </p>
+
+            <div class="xmlConf"> &lt;messageStore name=&quot;string&quot; class=&quot;classname&quot; &gt;
+    &lt;parameter name=&quot;string&quot; &gt; &quot;string&quot; &lt;/parameter&gt;*
+&lt;/messageStore&gt;</div>
+
+            <p>
+                The 'class' attribute value is the fully qualified class name of the underlying message
+                store implementation. There can be many message store implementations.Users can write
+                their own message store implementation and use it. Parameters section is used to
+                configure the parameters that is needed by underlying message store implementation.
+            </p>
+            <p>
+                The syntax outline of a message processor definition is given below.
+            </p>
+
+            <div class="xmlConf"> &lt;messageProcessor name=&quot;string&quot; class=&quot;class name&quot; messageStore=&quot;classname&quot; &gt;
+    &lt;parameter name=&quot;string&quot; &gt; &quot;string&quot; &lt;/parameter&gt;*
+&lt;/messageProcessor&gt;</div>
+
+            <p>
+                The 'class' attribute value is the fully qualified class name of the underlying message
+                processor implementation. There are two message processor implementations shipped by
+                default. There can be many message processor implementations.Users can write their
+                own message processor implementation and use it. Similar to message stores ,parameters
+                section here as well is used to configure the parameters that is needed by underlying
+                message processor implementation
+            </p>
+
+            <div class="xmlConf">Message Forwarding Processor : org.apache.synapse.message.processors.forward.ScheduledMessageForwardingProcessor</div>
+
+            <div class= "xmlConf">Sampling Processor : org.apache.synapse.message.processors.sampler.SamplingProcessor</div>
+
+            <p>
+                As mentioned earlier, there are several message store/processor implementations
+                shipped by default. However if users wants to extend these following interfaces are
+                available.
+            </p>
+            <div class="xmlConf">Interface: org.apache.synapse.message.store.MessageStore
+Abstract Class: org.apache.synapse.message.store.AbstractMessageStore
+
+Interface: org.apache.synapse.message.processors.MessageProcessor
+Abstract Class: org.apache.synapse.message.processors.AbstractMessageProcessor</div>
+        </section>
+    </body>
+</document>
diff --git a/src/site/xdoc/userguide/deployment.xml b/src/site/xdoc/userguide/deployment.xml
new file mode 100644
index 0000000..d6fa126
--- /dev/null
+++ b/src/site/xdoc/userguide/deployment.xml
@@ -0,0 +1,354 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+  ~  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.
+  -->
+
+<document>
+    <properties>
+        <title>Apache Synapse - Deployment Guide</title>
+    </properties>
+    <body>
+        <section name="Deployment Guide">
+            <p>
+                This article explains the various approaches that can be taken to deploy an
+                Apache Synapse server instance. It provides information on each deployment
+                option along with their software requirements and steps that need to be carried
+                out.
+            </p>
+        </section>
+        <section name="Contents">
+            <ul>
+                <li>
+                    <a href="#Platform_requirements">Platform requirements</a>
+                </li>
+                <li>
+                    <a href="#Overview_of_available_deployment_options">Overview of available deployment options</a>
+                </li>
+                <li>
+                    <a href="#Stand-alone_deployment">Stand-alone deployment</a>
+                    <ul>
+                        <li>
+                            <a href="#Using_the_standard_binary_distribution">Using the standard binary distribution</a>
+                        </li>
+                        <li>
+                            <a href="#Using_Maven_to_build_a_custom_distribution">Using Maven to build a custom distribution</a>
+                        </li>
+                    </ul>
+                </li>
+                <li>
+                    <a href="#WAR_deployment">WAR deployment</a>
+                </li>
+            </ul>
+        </section>
+        <section name="Platform requirements" id="Platform_requirements">
+
+            <p>
+                Synapse requires Java 1.5 or higher and has been tested on Java runtime environments
+                from Sun, IBM and Apple. Note that the recommended Java version is 1.6. Synapse is
+                used on various operation systems, including Linux, Mac OS X, Solaris, Windows and AIX,
+                as well as mainframe environments. The recommended operation system for production use
+                is Linux since it offers a wider range of options to tune the TCP/IP stack. This is
+                important to optimize the performance of the NIO HTTP transport.
+            </p>
+            <p>
+                When selecting the environment for deployment, the following known issues should be taken into account:
+            </p>
+            <ul>
+                <li>
+                    The <tt>synapse.bat</tt> and <tt>synapse.sh</tt> scripts included in the binary
+                    distribution use the <tt>-server</tt> option which is not supported by IBM's JRE.
+                    This problem can be easily solved by manually editing these scripts to
+                    remove the unsupported <tt>-server</tt> option. See
+                    <a class="externalLink" href="https://issues.apache.org/jira/browse/SYNAPSE-454">SYNAPSE-454</a>
+                    .
+                </li>
+                <li>
+                    In the past several issues related to subtle concurrency problems have been reported
+                    with the non-blocking HTTP transport (which is the recommended HTTP implementation
+                    for Synapse) when used on more &quot;exotic&quot; platforms. While this has been
+                    improved it is recommended to thoroughly test the HTTP transport before deploying
+                    Synapse in a production environment based on these platforms. Please don't hesitate
+                    to report any issues using JIRA or by posting a message on the mailing list.
+                </li>
+            </ul>
+        </section>
+
+        <section name="Overview of available deployment options" id="Overview_of_available_deployment_options">
+
+            <p>Synapse can be deployed in two different ways:</p>
+            <ul>
+                <li>Stand-alone, i.e. as an independently managed Java process.</li>
+                <li>
+                    As a J2EE application (WAR) deployed into a simple servlet container (e.g. Tomcat)
+                    or a full-featured J2EE application server.
+                </li>
+            </ul>
+            <p>
+                Since Synapse doesn't rely on any container API, the features offered are the same in
+                both deployment scenarios, with very few exceptions:
+            </p>
+            <ul>
+                <li>
+                    There is a minor issue that prevents classpath resources from being used in a
+                    WAR deployment. See <a class="externalLink" href="https://issues.apache.org/jira/browse/SYNAPSE-207">SYNAPSE-207</a>
+                    .
+                </li>
+                <li>
+                    When deployed as a WAR file, Synapse can be configured with the standard Axis2
+                    servlet based HTTP transport: while the recommended HTTP implementation for Synapse
+                    is the NIO HTTP transport, there might be situations where it is preferable or
+                    mandatory to use the HTTP protocol implementation of the application server.
+                </li>
+            </ul>
+            <p>
+                In some scenarios Synapse is used to proxy services that are deployed themselves on
+                an application server. In these cases it would be interesting to deploy Synapse on
+                the same application server and use an in-VM transport instead of HTTP to communicate
+                with these services. Note that for the moment no production-grade implementation of
+                this type of transport exists yet for Axis2, but this might change in the future.
+            </p>
+            <p>
+                Since the features offered are almost the same, the differences between the two
+                deployment options are mainly related to packaging and operational considerations:
+            </p>
+            <ul>
+                <li>
+                    Many IT departments prefer deploying J2EE applications than managing stand-alone
+                    Java processes, because this allows them to leverage the management and monitoring
+                    facilities offered by the application server.
+                </li>
+                <li>
+                    If the use case relies on JNDI resources such as JMS connection factories,
+                    JDBC data source and transactions it might be easier to set up and configure these
+                    resources when Synapse is deployed directly on the application
+                    server that hosts these resources.
+                </li>
+            </ul>
+        </section>
+
+        <section name="Stand-alone deployment" id="Stand-alone_deployment">
+            <subsection name="Using the standard binary distribution" id="Using_the_standard_binary_distribution">
+                <p>
+                    The easiest way to get started with a stand-alone deployment is using the standard
+                    binary distribution ZIP or tarball (see <a href="download.html">download.html</a>).
+                    It already contains everything that is needed to run Synapse stand-alone and you
+                    only need to customize it according to your requirements:
+                </p>
+                <ul>
+                    <li>
+                        Place your mediation configuration in <tt>repository/conf/synapse-config</tt>
+                        directory.
+                    </li>
+                    <li>
+                        Place any additional files such as WSDL files, endpoint definitions, etc.
+                        referenced by your configuration in the <tt>repository</tt> directory.
+                    </li>
+                    <li>
+                        Customize <tt>repository/conf/axis2.xml</tt>
+                        to enable and disable transports according to your needs.
+                    </li>
+                    <li>
+                        Add any additional libraries required by your mediation to the
+                        <tt>lib</tt>directory. Alternatively modify <tt>repository/conf/wrapper.conf</tt>
+                        to add directories and JAR files to the classpath.
+                    </li>
+                    <li>
+                        Add any required modules to <tt>repository/modules</tt>.
+                    </li>
+                    <li>
+                        If necessary, modify <tt>lib/log4j.properties</tt> to configure logging.
+                    </li>
+                </ul>
+                <p>
+                    Since the standard binary distribution also contains samples and documentation,
+                    you might want to remove the following folders:
+                </p>
+                <ul>
+                    <li>
+                        <tt>docs</tt>
+                    </li>
+                    <li>
+                        <tt>repository/conf/sample</tt>
+                    </li>
+                    <li>
+                        <tt>samples</tt>
+                    </li>
+                </ul>
+                <p>
+                    The <tt>bin</tt> directory contains Unix and Windows scripts to run Synapse:
+                </p>
+                <ul>
+                    <li>
+                        <tt>synapse.sh</tt> and <tt>synapse.bat</tt> allow to run Synapse in non
+                        daemon mode.
+                    </li>
+                    <li>
+                        <tt>synapse-daemon.sh</tt> is a Sys V init script that can be used on Unix
+                        systems to start and stop Synapse in daemon mode.
+                    </li>
+                    <li>
+                        <tt>install-synapse-service.bat</tt> and <tt>uninstall-synapse-service.bat</tt>
+                        can be used on Windows to install Synapse as an NT service.
+                    </li>
+                </ul>
+            </subsection>
+            <subsection name="Using Maven to build a custom distribution" id="Using_Maven_to_build_a_custom_distribution">
+                <p>
+                    Building a custom Synapse package based on the standard binary distribution is a
+                    manual process and this has some drawbacks:
+                </p>
+                <ul>
+                    <li>
+                        The JAR files required to run Synapse must be selected manually and it is not easy to identify unused JARs
+                        that could be safely removed.
+                    </li>
+                    <li>
+                        The process is not suitable if there is a requirement for strict configuration management. In particular:
+                        <ul>
+                            <li>
+                                Because of the large number of JAR files, managing the artifacts using
+                                a source control repository is not practical.
+                            </li>
+                            <li>
+                                The process is not repeatable and there is no way to go back to a
+                                previous version of the artifacts.
+                            </li>
+                        </ul>
+                    </li>
+                    <li>
+                        When upgrading to a newer version of Synapse (or when working with snapshot
+                        versions), it is necessary either to manually replace the JARs in the current
+                        package or to start again from a new version of the standard binary
+                        distribution.
+                    </li>
+                    <li>
+                        If Synapse needs to be deployed with slightly different configurations in
+                        multiple environments (e.g. test and production), the corresponding packages
+                        need to be prepared manually.
+                    </li>
+                </ul>
+                <p>
+                    Note that these problems not only arise in the development and maintenance phases
+                    of a project, but also when doing proof of concepts that you want to keep in a safe
+                    place for later reuse. One approach to overcome these difficulties is to use Maven
+                    to assemble a custom package. When used correctly, this approach solves all of the
+                    issues identified above. In particular Maven's dependency management together with
+                    the excellent <a class="externalLink" href="http://maven.apache.org/plugins/maven-assembly-plugin/">assembly plugin</a>
+                    can be used to automatically select the relevant JARs to include and pull them
+                    from Maven repositories. The remaining artifacts required to assemble the package
+                    can then be easily stored in a source control repository.
+                </p>
+                <p>
+                    Synapse provides a Maven archetype that allows to set up this kind of project in
+                    only a few simple steps. To begin with, change to the directory where you want to
+                    create the project and issue the following command:
+                </p>
+                <div class="command">mvn archetype:generate -DarchetypeCatalog=http://synapse.apache.org</div>
+                <p>
+                    In case of problems, you can try to use the latest version of the archetype catalog:
+                </p>
+                <div class="command">mvn archetype:generate -DarchetypeCatalog=http://svn.apache.org/repos/asf/synapse/trunk/java/src/site/resources</div>
+                <p>
+                    Finally, if you have build Synapse from sources, you don't need to specify a
+                    catalog at all: the archetype is added automatically to the local catalog during
+                    the build.
+                </p>
+                <p>
+                    In any case, when prompted by Maven, select <tt>synapse-package-archetype</tt>
+                    for the Synapse version you want to use. In the next step enter the values for
+                    <tt>groupId</tt>, <tt>artifactId</tt> and <tt>version</tt> for your project. You
+                    will also be prompted for a package name. Since the archetype doesn't contain any source
+                    code, this value is irrelevant and you can continue with the default value.
+                </p>
+                <p>
+                    At this stage a Maven project has been created in a sub-directory with the same
+                    name as the <tt>artifactId</tt> specified previously. You should now customize this
+                    projects according to your needs:
+                </p>
+                <ul>
+                    <li>
+                        Add your mediation configuration to <tt>repository/conf/synapse-config</tt>
+                        directory.
+                    </li>
+                    <li>
+                        Customize the dependencies in <tt>pom.xml</tt>. In particular if additional
+                        transports such as JMS are needed, add the required dependencies here. Additional
+                        Axis2 modules should also be added here.
+                    </li>
+                    <li>
+                        Enable and configure additional transports in <tt>repository/conf/axis2.xml</tt>.
+                    </li>
+                    <li>
+                        Place any other files referenced by mediation configuration into the
+                        <tt>repository</tt> directory.
+                    </li>
+                </ul>
+                <p>
+                    The project is built as usual with the following command:
+                </p>
+                <div class="command">mvn package</div>
+                <p>
+                    This will create a ZIP file (in the <tt>target</tt> directory) containing
+                    everything that is needed to run your custom Synapse configuration. You only
+                    need to extract it and use the appropriate script in the <tt>bin</tt>
+                    directory to start Synapse.
+                </p>
+            </subsection>
+        </section>
+        <section name="WAR deployment" id="WAR_deployment">
+            <p>
+                Synapse provides a standard WAR file that can be used to deploy mediation on a servlet
+                container or on a J2EE application server. Note that this WAR file is not part of the
+                downloadable distributions. It can be retrieved from the following location:
+            </p>
+            <ul>
+                <li>
+                    <a class="externalLink" href="http://repo1.maven.org/maven2/org/apache/synapse/synapse-war/">http://repo1.maven.org/maven2/org/apache/synapse/synapse-war/</a>
+                    for released versions.
+                </li>
+                <li>
+                    <a class="externalLink" href="http://hudson.zones.apache.org/hudson/job/Synapse%20-%20Trunk/org.apache.synapse$synapse-war/">http://hudson.zones.apache.org/hudson/job/Synapse%20-%20Trunk/org.apache.synapse$synapse-war/
+                    </a>
+                    for snapshot versions.
+                </li>
+            </ul>
+            <p>
+                Customization of the Web application is similar to the stand-alone option, but the
+                default directory structure is different:
+            </p>
+            <ul>
+                <li>
+                    <tt>synapse.xml</tt> and <tt>axis2.xml</tt> are placed into the <tt>WEB-INF/conf</tt>
+                    directory. All other files referenced by your mediation should go to the
+                    <tt>WEB-INF/repository</tt>
+                    directory.
+                </li>
+                <li>
+                    Additional libraries must be placed into the standard <tt>WEB-INF/lib</tt>
+                    directory.
+                </li>
+                <li>
+                    Axis2 modules are located in <tt>repository/modules</tt>.
+                </li>
+                <li>
+                    <tt>log4j.properties</tt> is located in <tt>WEB-INF/classes</tt>.
+                </li>
+            </ul>
+        </section>
+    </body>
+</document>
\ No newline at end of file
diff --git a/src/site/xdoc/userguide/extending.xml b/src/site/xdoc/userguide/extending.xml
new file mode 100644
index 0000000..5e799bd
--- /dev/null
+++ b/src/site/xdoc/userguide/extending.xml
@@ -0,0 +1,485 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+
+<!--
+  ~  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.
+  -->
+
+<document>
+	<properties>
+		<title>Apache Synapse - Extending Synapse</title>
+	</properties>
+	<body>
+			<div id="contentBox">
+				   <section name="Apache Synapse ESB - Extending Synapse">
+					<p>
+						Apache Synapse provides a number of extension points so that
+						users can plug-in custom developed code to extend the
+						functionality of the ESB. While the built-in mediators are sufficient to implement
+						most integration scenarios, sometimes it is very helpful to be able to deploy some custom code into the
+						service bus and make the solution simpler. Most Synapse APIs are in Java and
+						therefore the users looking to extend Synapse are expected to have a
+						decent knowledge and experience in Java programming.
+					</p>
+					</section>
+					<section name="Writing custom Mediator implementations">
+				
+					<p>
+						The primary interface of the Synapse API is the MessageContext
+						interface defined below. This essentially defines the per-message
+						context passed through the chain of mediators, for each and every
+						message received and processed by Synapse. Each message instance is
+						wrapped within a MessageContext instance, and the message context
+						is set with the references to the SynapseConfiguration and
+						SynapseEnvironment objects. The
+						<a href="../apidocs/org/apache/synapse/config/SynapseConfiguration.html">SynapseConfiguration</a>
+
+						object holds the global configuration model that defines
+						mediation rules, local registry entries and other and configuration, while
+						the
+						<a href="../apidocs/org/apache/synapse/core/SynapseEnvironment.html">SynapseEnvironment</a>
+
+						object gives access to the underlying SOAP implementation used -
+						Axis2. A typical mediator would need to manipulate the
+						MessageContext by referring to the SynapseConfiguration. However it
+						is strongly recommended that the SynapseConfiguration is not
+						updated by mediator instances as it is shared by all messages, and
+						may be updated by Synapse administration or configuration modules.
+						Mediator instances may store local message properties into the
+						MessageContext for later retrieval by successive mediators.
+						<br />
+					</p>
+					<h4>
+						<a class="externalLink"
+							href="http://svn.apache.org/viewvc/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/MessageContext.java?view=markup">MessageContext
+							Interface
+						</a>
+					</h4>
+					<div class="xmlConf">package org.apache.synapse;
+
+import ...
+
+public interface MessageContext {
+
+    /**
+     * Get a reference to the current SynapseConfiguration
+     *
+     * @return the current synapse configuration
+     */
+    public SynapseConfiguration getConfiguration();
+
+    /**
+     * Set or replace the Synapse Configuration instance to be used. May be used to
+     * programatically change the configuration at runtime etc.
+     *
+     * @param cfg The new synapse configuration instance
+     */
+    public void setConfiguration(SynapseConfiguration cfg);
+
+    /**
+     * Returns a reference to the host Synapse Environment
+     * @return the Synapse Environment
+     */
+    public SynapseEnvironment getEnvironment();
+
+    /**
+     * Sets the SynapseEnvironment reference to this context
+     * @param se the reference to the Synapse Environment
+     */
+    public void setEnvironment(SynapseEnvironment se);
+
+    /**
+     * Get the value of a custom (local) property set on the message instance
+     * @param key key to look up property
+     * @return value for the given key
+     */
+    public Object getProperty(String key);
+
+    /**
+     * Set a custom (local) property with the given name on the message instance
+     * @param key key to be used
+     * @param value value to be saved
+     */
+    public void setProperty(String key, Object value);
+
+    /**
+     * Returns the Set of keys over the properties on this message context
+     * @return a Set of keys over message properties
+     */
+    public Set getPropertyKeySet();
+
+    /**
+     * Get the SOAP envelope of this message
+     * @return the SOAP envelope of the message
+     */
+    public SOAPEnvelope getEnvelope();
+
+    /**
+     * Sets the given envelope as the current SOAPEnvelope for this message
+     * @param envelope the envelope to be set
+     * @throws org.apache.axis2.AxisFault on exception
+     */
+    public void setEnvelope(SOAPEnvelope envelope) throws AxisFault;
+
+    /**
+     * SOAP message related getters and setters
+     */
+    public ....get/set()...
+
+}</div>
+					<p>
+						The MessageContext interface is based on the Axis2
+						MessageContext 	interface, and uses the Axis2 EndpointReference and
+						SOAPEnvelope classes/interfaces. The purpose of this interface is
+						to capture a message as it flows through the system. As you will
+						see the message payload is represented using the SOAP infoset.
+						Binary messages can be embedded in the Envelope using MTOM or SwA
+						attachments using the AXIOM object model.
+					</p>
+					<h4>
+						<a class="externalLink"
+							href="http://svn.apache.org/viewvc/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/Mediator.java?view=markup">Mediator
+							interface
+						</a>
+					</h4>
+					<p>
+						The second key interface for mediator writers is the Mediator
+						interface:
+					</p>
+					<div class="xmlConf">package org.apache.synapse;
+
+import org.apache.synapse.MessageContext;
+
+/**
+ * All Synapse mediators must implement this Mediator interface. As a message passes
+ * through the synapse system, each mediator's mediate() method is invoked in the
+ * sequence/order defined in the SynapseConfiguration.
+ */
+public interface <span style="font-weight: bold;">Mediator </span>{
+
+    /**
+     * Invokes the mediator passing the current message for mediation. Each
+     * mediator performs its mediation action, and returns true if mediation
+     * should continue, or false if further mediation should be aborted.
+     *
+     * @param synCtx the current message for mediation
+     * @return true if further mediation should continue
+     */
+    public boolean mediate(MessageContext synCtx);
+
+    /**
+     * This is used for debugging purposes and exposes the type of the current
+     * mediator for logging and debugging purposes
+     * @return a String representation of the mediator type
+     */
+    public String getType();
+}</div>
+					<p>
+						A mediator can read and/or modify the message encapsulated in
+						the MessageContext in any suitable manner - adjusting the routing
+						headers or changing the message body. If the mediate() method
+						returns false, it signals to the Synapse processing model to stop
+						further processing of the message. For example, if the mediator is
+						a security agent it may decide that this message is dangerous and
+						should not be processed further. This is generally the exception as
+						mediators are usually designed to co-operate to rocess the message
+						onwards.
+					</p>
+					</section>
+					
+					<h3>
+						Leaf and Node Mediators, List mediators and Filter mediators
+					</h3>
+					<p>
+						Mediators may be Node mediators (i.e. these that can contain
+						child mediators) or Leaf mediators (mediators that does not hold
+						any	other child mediators). A Node mediator must implement the
+						org.apache.synapse.mediators.ListMediator interface listed below,
+						or extend from the
+						org.apache.synapse.mediators.AbstractListMediator.
+					</p>
+					<h4>
+						<a class="externalLink"
+							href="http://svn.apache.org/viewvc/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/mediators/ListMediator.java?view=markup">The
+							ListMediator interface
+						</a>
+					</h4>
+					<div class="xmlConf">package org.apache.synapse.mediators;
+
+import java.util.List;
+
+/**
+* The List mediator executes a given sequence/list of child mediators
+*/
+public interface ListMediator extends Mediator {
+    /**
+    * Appends the specified mediator to the end of this mediator's (children) list
+    * @param m the mediator to be added
+    * @return true (as per the general contract of the Collection.add method)
+    */
+    public boolean addChild(Mediator m);
+
+    /**
+    * Appends all of the mediators in the specified collection to the end of this mediator's (children)
+    * list, in the order that they are returned by the specified collection's iterator
+    * @param c the list of mediators to be added
+    * @return true if this list changed as a result of the call
+    */
+    public boolean addAll(List c);
+
+    /**
+    * Returns the mediator at the specified position
+    * @param pos index of mediator to return
+    * @return the mediator at the specified position in this list
+    */
+    public Mediator getChild(int pos);
+
+    /**
+    * Removes the first occurrence in this list of the specified mediator
+    * @param m mediator to be removed from this list, if present
+    * @return true if this list contained the specified mediator
+    */
+    public boolean removeChild(Mediator m);
+
+    /**
+    * Removes the mediator at the specified position in this list
+    * @param pos the index of the mediator to remove
+    * @return the mediator previously at the specified position
+    */
+    public Mediator removeChild(int pos);
+
+    /**
+    * Return the list of mediators of this List mediator instance
+    * @return the child/sub mediator list
+    */
+    public List getList();
+}</div>
+					<p>
+						A ListMediator implementation should call super.mediate(synCtx)
+						to process 	its sub mediator sequence. A FilterMediator is a
+						ListMediator which executes its sequence of sub mediators on
+						successful outcome of a test condition. The Mediator instance which
+						performs filtering should implement the FilterMediator interface.
+					</p>
+					<h4>
+						<a class="externalLink"
+							href="http://svn.apache.org/viewvc/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/mediators/FilterMediator.java?view=markup">FilterMediator
+							interface
+						</a>
+					</h4>
+					<div class="xmlConf">package org.apache.synapse.mediators;
+
+import org.apache.synapse.MessageContext;
+
+/**
+ * The filter mediator is a list mediator, which executes the given (sub) list of mediators
+ * if the specified condition is satisfied
+ *
+ * @see FilterMediator#test(org.apache.synapse.MessageContext)
+ */
+public interface <span style="font-weight: bold;">FilterMediator </span>extends ListMediator {
+
+    /**
+     * Should return true if the sub/child mediators should execute. i.e. if the filter
+     * condition is satisfied
+     * @param synCtx
+     * @return true if the configured filter condition evaluates to true
+     */
+    public boolean test(MessageContext synCtx);
+}</div>
+				</div>
+				<section name="Writing custom Configuration implementations for mediators">
+					<p>
+						You may write your own custom configurator for the Mediator
+						implementation 	you write without relying on the Class mediator or
+						Spring extension for its initialization. You could thus write a
+						MediatorFactory implementation 	which defines how to digest a custom
+						XML configuration element to be used to create and configure the
+						custom mediator instance. A MediatorSerializer implementation
+						defines how a configuration should be serialized back into
+						an XML configuration. The custom MediatorFactory &amp;
+						MediatorSerializer 	implementations and the mediator class/es must be bundled in a JAR
+						file conforming to the J2SE Service Provider model (See the
+						description for Extensions below for more details and examples) and
+						placed into the SYNAPSE_HOME/lib folder, so that the Synapse
+						runtime could find and load the definition. Essentially this means
+						that a custom JAR file must bundle your class implementing the
+						Mediator interface, and the MediatorFactory implementation class and
+						contain two text files named
+						&quot;org.apache.synapse.config.xml.MediatorFactory&quot; and
+						&quot;org.apache.synapse.config.xml.MediatorSerializer&quot; which
+						will contain the fully qualified name(s) of your MediatorFactory
+						and MediatorSerializer implementation classes. You should also
+						place any dependency JARs into the same lib folder so that the
+						correct classpath references could be made.
+						The MediatorFactory interface listing is given below, which you
+						should implement, and its getTagQName() method must define the fully qualified
+						element of interest for custom configuration. The Synapse
+						initialization will call back to this MediatorFactory instance through the
+						createMediator(OMElement elem) method passing in this XML element,
+						so that an instance of the mediator could be created utilizing the
+						custom XML specification and returned. See the ValidateMediator and
+						the ValidateMediatorFactory classes under modules/extensions in the
+						Synapse source distribution for examples.
+					</p>
+					<h4>
+						<a class="externalLink"
+							href="http://svn.apache.org/viewvc/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/MediatorFactory.java?view=markup">The
+							MediatorFactory interface
+						</a>
+					</h4>
+					<div class="xmlConf">package org.apache.synapse.config.xml;
+
+import ...
+
+/**
+ * A mediator factory capable of creating an instance of a mediator through a given
+ * XML should implement this interface
+ */
+public interface MediatorFactory {
+    /**
+     * Creates an instance of the mediator using the OMElement
+     * @param elem
+     * @return the created mediator
+     */
+    public Mediator createMediator(OMElement elem);
+
+    /**
+     * The QName of this mediator element in the XML config
+     * @return QName of the mediator element
+     */
+    public QName getTagQName();
+}</div>
+					<h4>
+						<a class="externalLink"
+							href="http://svn.apache.org/viewvc/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/MediatorSerializer.java?view=markup">The
+							MediatorSerializer interface
+						</a>
+					</h4>
+					<div class="xmlConf">package org.apache.synapse.config.xml;
+
+import ...
+
+/**
+ * Interface which should be implemented by mediator serializers. Does the
+ * reverse of the MediatorFactory
+ */
+public interface MediatorSerializer {
+
+    /**
+     * Return the XML representation of this mediator
+     * @param m mediator to be serialized
+     * @param parent the OMElement to which the serialization should be attached
+     * @return the serialized mediator XML
+     */
+    public OMElement serializeMediator(OMElement parent, Mediator m);
+
+    /**
+     * Return the class name of the mediator which can be serialized
+     * @return the class name
+     */
+    public String getMediatorClassName();
+}</div>
+				</section>
+				<section name="Configuring mediators">
+					<p>
+						Mediators could access the Synapse registry to load resources
+						and configure the local behaviour. Refer to the Spring mediator and
+						Script mediator implementations for examples on how this could be
+						achieved.
+					</p>
+					<h4>
+						Loading of Extensions by the Synapse runtime
+					</h4>
+					<p>
+						Synapse loads available extensions from the runtime classpath
+						using the
+						<a class="externalLink"
+							href="http://java.sun.com/j2se/1.3/docs/guide/jar/jar.html#Service%20Provider">J2SE
+							Service Provider model
+						</a>
+						. This essentially iterates over the available JAR files, for a META-INF/services directory within each file,
+						and looks for a text file with the name org.apache.synapse.config.xml.MediatorFactory
+						which contains a list of fully qualified classname that implement
+						the above interface, listing each class in a separate line. e.g. The
+						built-in synapse-extensions.jar contains the following structure
+					</p>
+					<div class="xmlConf">synapse-extensions.jar
+    /META-INF/services
+        org.apache.synapse.config.xml.MediatorFactory
+        org.apache.synapse.config.xml.MediatorSerializer
+    /... the implementation classes as usual...</div>
+				</section>
+				
+				
+				<section name="Writing Synapse Observers">
+					<p>
+						A Synapse observer is developed by either implementing the
+						org.apache.synapse.config.SynapseObserver interface or by
+						extending the org.apache.synapse.config.AbstractSynapseObserver
+						class. A Synapse observer is notified by the Synapse configuration
+						when new elements are added to the configuration and
+						when existing elements are removed from the configuration. The
+						following event handlers are available to the Synapse observer implementations.
+					</p>
+					<div class="xmlConf"> public void sequenceAdded(Mediator sequence);
+ public void sequenceRemoved(Mediator sequence);
+ public void entryAdded(Entry entry);
+ public void entryRemoved(Entry entry);
+ public void endpointAdded(Endpoint endpoint);
+ public void endpointRemoved(Endpoint endpoint);
+ public void proxyServiceAdded(ProxyService proxy);
+ public void proxyServiceRemoved(ProxyService proxy);
+ public void startupAdded(Startup startup);
+ public void startupRemoved(Startup startup);
+ public void eventSourceAdded(SynapseEventSource eventSource);
+ public void eventSourceRemoved(SynapseEventSource eventSource);</div>
+					<p>
+						The AbstractSynapseObserver provides default implementations to
+						all these event handlers. It simply logs any received events.
+					</p>
+					<p>
+						In situations where the custom code has access to the
+						SynapseConfiguration class observers can be directly registered
+						with the SynapseConfiguration by using
+						the registerObserver(SynapseObserver o) method. Otherwise
+						SynapseObserver implementations
+						can be defined in the synapse.properties file which resides in the
+						SYNAPSE_HOME/lib directory. The following example shows how two observers are
+						registered with the Synapse configuration using the
+						synapse.properties file.
+					</p>
+					<div class="xmlConf">synapse.observers=test.LoggingObserverImpl, test.SimpleObserverImpl</div>
+				</section>
+				
+        <section name="Scheduled Tasks">
+            <p>
+                A scheduled task is a custom developed piece of Java code that
+                is scheduled in the ESB to execute periodically. A scheduled task
+                must implement the org.apache.synapse.task.Task
+                interface. This interface has a single 'execute' method. Once scheduled the
+                execute method is called by Synapse periodically.
+            </p>
+            <p>
+                Synapse also comes with a built-in task implementation known as
+                the	MessageInjector.This task can be used to inject messages into
+                the service bus	periodically. Refer	sample 300 to see how to use the
+                MessageInjector task.
+            </p>
+         </section>
+	</body>
+</document>
\ No newline at end of file
diff --git a/src/site/xdoc/userguide/faq.xml b/src/site/xdoc/userguide/faq.xml
new file mode 100644
index 0000000..27a87c1
--- /dev/null
+++ b/src/site/xdoc/userguide/faq.xml
@@ -0,0 +1,289 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+  ~  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.
+  -->
+<document>
+    <properties>
+        <title>FAQ</title>
+    </properties>
+    <body>
+        <section name="Apache Synapse FAQs">
+            <p>
+                Welcome to Apache Synapse FAQs.
+            </p>
+        </section>
+        <section name="General(GeneralApache Synapse questions - Non technical)">
+            <ol>
+                <li>
+                    What is Apache Synapse?
+                    <ul>
+                        <li>
+                            Apache Synapse is a lightweight and high-performance Enterprise Service
+                            Bus (ESB).
+                        </li>
+                    </ul>
+                </li>
+                <p/>
+
+                <li>
+                    What makes Apache Synapse unique?
+                    <ul>
+                        <li>
+                            Apache Synapse is fast and able to handle thousands of concurrent
+                            connections
+                            with constant memory usage. It comes with a rich set of mediators to
+                            support almost any integration scenario out of the box. It is also
+                            easily
+                            extensible and highly customizable.
+                        </li>
+                    </ul>
+                </li>
+                <p/>
+                <li>
+                    What is the license?
+                    <ul>
+                        <li>
+                            Apache Synapse comes with Apache 2.0 licence.
+                        </li>
+                    </ul>
+                </li>
+                <p/>
+            </ol>
+        </section>
+
+        <section name="Mediation(Questions related to sequences, endpoints, proxies etc)">
+            <ol>
+                <li>
+                    What is a proxy service?
+                    <ul>
+                        <li>
+                            A proxy service is a virtual service hosted on the ESB. It can accept
+                            requests from service clients, just like a real Web Service. A proxy
+                            service can process requests and forward them to an actual Web Service
+                            (back end service) to be further processed. The responses coming back
+                            from
+                            the back end service can be routed back to the original client. Proxy
+                            services are mostly used to expose an existing service over a different
+                            transport, format or QoS configuration.
+                        </li>
+                    </ul>
+                </li>
+                <p/>
+
+                <li>
+                    What is a mediator?
+                    <ul>
+                        <li>
+                            A mediator is the basic message processing unit in the ESB. A mediator
+                            can take a message, carry out some predefined actions on it and output
+                            the modified message. Apache Synapse ships with a range of mediators capable
+                            of carrying out various tasks on input messages.
+                        </li>
+                    </ul>
+                </li>
+                <p/>
+                <li>
+                    What is a sequence?
+                    <ul>
+                        <li>
+                            A sequence is an ordered list of mediators (a mediator chain). When a
+                            sequence is given a message, it will go through all the mediators in the
+                            sequence. A sequence can also handover messages to other sequences.
+                        </li>
+                    </ul>
+                </li>
+                <p/>
+                <li>
+                    What is an Endpoint?
+                    <ul>
+                        <li>
+                            A logical representation of an actual endpoint or a group of endpoints
+                            (i.e. Load Balancing and Fail Over).
+                        </li>
+                    </ul>
+                </li>
+                <p/>
+                <li>
+                    What are Local Entries?
+                    <ul>
+                        <li>
+                            Local entries can be used to hold various configuration elements
+                            required by sequences and proxy services. Usually they are used to hold
+                            WSDLs, XSDs, XSLT files etc. A local entry can contain XML content as
+                            well
+                            as plain text content. A local entry can be configured to load content
+                            from a remote file too.
+                        </li>
+                    </ul>
+                </li>
+                <p/>
+
+                <li>
+                    What is a Message Mediation?
+                    <ul>
+                        <li>
+                            Managing and transforming the messages flowing between the client and a
+                            service in an enterprise.
+                        </li>
+                    </ul>
+                </li>
+                <p/>
+
+                <li>
+                    What is Message Mediation?
+                    <ul>
+                        <li>
+                            Mediating messages coming into a specific service by specifying the
+                            target URI as a Synapse mediation service.
+                        </li>
+                    </ul>
+                </li>
+                <p/>
+                <li>
+                    What is Service Mediation?
+                    <ul>
+                        <li>
+                            Mediating messages coming into a specific service by specifying the
+                            target URI as a Synapse mediation service.
+                        </li>
+                    </ul>
+                </li>
+                <p/>
+                <li>
+                    What is a Message Store?
+                    <ul>
+                        <li>
+                            Message Store is the storage for ESB messages. It can be an in-memory
+                            store
+                            or can be JMS store with an external Message Broker. You can always plug
+                            your
+                            own message store implementations as well.
+                        </li>
+                    </ul>
+                </li>
+                <p/>
+                <li>
+                    What is a Message Processor?
+                    <ul>
+                        <li>
+                            Message processor can be used to implement different messaging and
+                            integration patters along with Message stores. Message processors will
+                            consume
+                            the messages in message stores and do the processing of them.
+                        </li>
+                    </ul>
+                </li>
+                <p/>
+                <li>
+                    What is a Template?
+                    <ul>
+                        <li>
+                            ESB Templates try to minimize this redundancy by creating prototypes
+                            that
+                            users can re-use and utilize as and when needed. This is very much
+                            analogous
+                            to classes and instances of classes where-as, a template is a class that
+                            can be used to wield instance objects such as templates and endpoints.
+                        </li>
+                    </ul>
+                </li>
+                <p/>
+                <li>
+                    What is the REST Api?
+                    <ul>
+                        <li>
+                            REST Api can be used to mediate HTTP POST, GET, PUT and DELETE request
+                            through Synapse and to integrate various RESTful services.
+                        </li>
+                    </ul>
+                </li>
+                <p/>
+                <li>
+                    Can Endpoint perform error handling?
+                    <ul>
+                        <li>
+                            Yes. Endpoints can do error handling. User can configure the behavior
+                            of an endpoints when it faced to a erroneous situation.
+                        </li>
+                    </ul>
+                </li>
+                <p/>
+            </ol>
+        </section>
+        <section name="Transports(Transport related questions)">
+            <ol>
+                <li>
+                    What are the transports supported by the Apache Synapse?
+                    <ul>
+                        <li>
+                            HTTP, HTTPS, VFS based file transport, FIX, Hessian, HL7,UDP, JMS, Mail,
+                            TCP, XMPP
+                        </li>
+                    </ul>
+                </li>
+                <p/>
+
+                <li>
+                    Do I need an external JMS broker for the JMS transport?
+                    <ul>
+                        <li>
+                            Yes, Apache Synapse requires an external JMS broker like Apache ActiveMQ
+                        </li>
+                    </ul>
+                </li>
+                <p/>
+                <li>
+                    Does Apache Synapse support two way JMS scenario (request/response) ?
+                    <ul>
+                        <li>
+                            Yes, you can refer sample 264 which demonstrates exactly the JMS
+                            request/response scenario.
+                        </li>
+                    </ul>
+                </li>
+                <p/>
+                <li>
+                    What is the NHTTP transport?
+                    <ul>
+                        <li>
+                           This is the default HTTP transport used by Apache Synapse. NHTTP stands for
+                            non-blocking HTTP. NHTTP transport uses the Java Non-blocking I/O API.
+                            This allows the NHTTP transport to scale into handling hundreds of connections
+                            without blocking the threads. The server worker threads used by the NHTTP
+                            transport do not get blocked on I/O until the Synapse receives responses
+                            for the already forwarded requests. Therefore Apache Synapse can accept
+                            more concurrent connections and requests than most HTTP server products.
+                        </li>
+                    </ul>
+                </li>
+                <p/>
+                <li>
+                    What is the underlying HTTP library used by the NHTTP transport?
+                    <ul>
+                        <li>
+                           NHTTP transport uses the Apache Http Core NIO library underneath. This
+                           library provides low level I/O handling and HTTP level detail handling.
+                        </li>
+                    </ul>
+                </li>
+                <p/>
+            </ol>
+        </section>
+
+    </body>
+</document>
diff --git a/src/site/xdoc/userguide/installation.xml b/src/site/xdoc/userguide/installation.xml
new file mode 100644
index 0000000..3dd2922
--- /dev/null
+++ b/src/site/xdoc/userguide/installation.xml
@@ -0,0 +1,245 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+  ~  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.
+  -->
+<document>
+    <properties>
+        <title>Apache Synapse - Installation Guide</title>
+    </properties>
+    <body>
+        <section name="Apache Synapse Installation Guide">
+            <p>
+                Welcome to Apache Synapse Installation Guide. This guide provides information on,
+            </p>
+            <ul>
+                <li>
+                    <a href="#Prerequisites">Prerequisites for Installing Apache Synapse</a>
+                </li>
+                <li>
+                    <a href="#Distribution">Distribution Packages</a>
+                </li>
+                <li>
+                    <a href="#Installing">Installing Synapse</a>
+                    <ul>
+                        <li>
+                            <a href="#InstallingLinux">Installing on Linux/Unix</a>
+                        </li>
+                        <li>
+                            <a href="#InstallingWin">Installing on MS Windows</a>
+                        </li>
+                    </ul>
+                </li>
+                <li>
+                    <a href="#Building">Building Synapse Using the Source Distribution</a>
+                </li>
+            </ul>
+        </section>
+
+        <section name="Prerequisites for Installing Apache Synapse" id="Prerequisites">
+            <p>
+                You should have following pre-requisites installed on your system to run Apache
+                Synapse.
+            </p>
+            <table border="2">
+                <tbody>
+                    <tr>
+                        <td>
+                            <a href="http://java.sun.com/javase/downloads/index.jsp">Java SE
+                                Development Kit
+                            </a>
+                        </td>
+                        <td>
+                            1.6.0_23 or higher (For instructions on setting up the JDK on different
+                            operating systems, visit<a
+                                href="http://www.oracle.com/technetwork/java/index.html">
+                            Java homepage.
+                        </a>)
+                            <p/>
+                        </td>
+                    </tr>
+                    <tr>
+                        <td>
+                            <a href="http://ant.apache.org/">Apache Ant</a> - To run Synapse samples
+                        </td>
+                        <td>
+                            <p>
+                                To compile and run the sample clients, an Ant installation is
+                                required.
+                                Ant 1.7.0 version or higher is recommended.
+                            </p>
+                        </td>
+                    </tr>
+                    <tr>
+                        <td>
+                            <a href="http://maven.apache.org/">Apache Maven</a> - To
+                            build Synapse from the source
+                        </td>
+                        <td>
+                            To build Apache Synapse from its source distribution, you will need
+                            Maven 2.2.0 or later.
+                        </td>
+                    </tr>
+                    <tr>
+                        <td>
+                            Memory
+                        </td>
+                        <td>
+                            No minimum requirement - A heap size of 1GB is generally
+                            sufficient to process typical SOAP messages. Requirements may vary
+                            with larger message size and on the number of messages processed
+                            concurrently.
+                        </td>
+                    </tr>
+                    <tr>
+                        <td>
+                            Disk
+                        </td>
+                        <td>
+                            No minimum requirement. The installation will require ~75 MB
+                            excluding space allocated for log files and databases.
+                        </td>
+                    </tr>
+                    <tr>
+                        <td>
+                            Operating System
+                        </td>
+                        <td>
+                            Linux, Solaris, MS Windows - XP/2003/2008 (Not fully tested on Windows
+                            Vista or Windows 7). Since Apache Synapse is a Java application, it will
+                            generally be possible to run it on other operating systems with a
+                            JDK 1.6.x runtime. Linux/Solaris is recommended for production
+                            deployments.
+                        </td>
+                    </tr>
+                </tbody>
+            </table>
+        </section>
+
+        <section name="Distribution Packages" id="Distribution">
+            <p>
+                The following distribution packages are available for <a
+                    href="http://synapse.apache.org/download.html">download</a>.
+            </p>
+            <ol>
+                <li>
+                    Binary Distribution: Includes binary files for both Linux and
+                    MS Windows operating systems, compressed into a single a zip file. Recommended
+                    for normal users.
+                </li>
+                <p/>
+                <li>
+                    Source Distribution: Includes the source code for both Linux and MS Windows
+                    operating systems, compressed into a single zip file which can be used to build
+                    the binaries. Recommended for advanced users.
+                </li>
+            </ol>
+        </section>
+
+        <section name="Installing Synapse" id="Installing">
+            <p>
+                The following guide will take you through the binary distribution installation
+                on different platforms.
+            </p>
+            <subsection name="Installing on Linux/Unix" id="InstallingLinux">
+                <ol>
+                    <li>
+                        <a href="http://synapse.apache.org/download.html">Download</a> Apache
+                        Synapse binary distribution.
+                    </li>
+                    <li>
+                        Extract the downloaded zip archive to where you want Synapse installed
+                        (e.g. into /opt).
+                    </li>
+                    <li>
+                        Set the JAVA_HOME environment variable to your Java home using the export
+                        command or by editing /etc/profile, and add the JAVA_HOME/bin
+                        directory to your PATH.
+                    </li>
+                    <li>
+                        Execute the Synapse start script or the daemon script from the bin
+                        directory of your Synapse installation.
+                        <br/>
+                        i.e., ./synapse.sh OR ./synapse-daemon.sh start
+                    </li>
+                    <li>
+                        Synapse is now ready to accept messages for mediation.
+                    </li>
+                </ol>
+            </subsection>
+
+            <subsection name="Installing on MS Windows" id="InstallingWin">
+                <ol>
+                    <li>
+                        <a href="http://synapse.apache.org/download.html">Download</a> Apache
+                        Synapse binary distribution.
+                    </li>
+                    <li>
+                        Extract the downloaded zip archive to where you want Synapse installed
+                        (e.g. into C:\Synapse).
+                    </li>
+                    <li>
+                        Set the JAVA_HOME environment variable to your Java home using the set
+                        command or Windows System Properties dialog, and add the JAVA_HOME\bin
+                        directory to your PATH.
+                    </li>
+                    <li>
+                        Execute the Synapse start script or the service installation script from
+                        the bin directory of your Synapse installation.
+                        <br/>
+                        i.e., synapse.bat OR install-synapse-service.bat
+                    </li>
+                    <li>
+                        Synapse is now ready to accept messages for mediation.
+                    </li>
+                </ol>
+
+            </subsection>
+        </section>
+
+        <section name="Building Synapse Using the Source Distribution" id="Building">
+            <p>
+                Apache Synapse build is based on <a href="http://maven.apache.org/"> Apache
+                Maven 2</a>. Hence, it is a prerequisite to have Maven (version 2.2.0 or later)
+                installed in order to build Synapse from the source distribution. Instructions on
+                installing Maven 2 are available on the <a href="http://maven.apache.org/"> Maven
+                website</a>. Follow these steps to build Synapse after setting up Maven 2.
+            </p>
+            <ol>
+                <li>
+                    <a href="http://synapse.apache.org/download.html">Download</a>
+                    the source
+                    distribution, which is available as a zip archive. All the necessary
+                    build scripts are included with this distribution.
+                </li>
+                <li>
+                    Extract the source archive to a directory of your choice.
+                </li>
+                <li>
+                    Run <strong>mvn clean install</strong> command inside that directory to build
+                    Synapse. Note that you will require a connection to the Internet for the Maven
+                    build to download dependencies required for the build.
+                </li>
+            </ol>
+            <p>
+                This will create the complete set of release artifacts including the binary
+                distribution in the modules/distribution/target/ directory which can be installed
+                using the above instructions.
+            </p>
+        </section>
+    </body>
+</document>
diff --git a/src/site/xdoc/userguide/mediators.xml b/src/site/xdoc/userguide/mediators.xml
new file mode 100644
index 0000000..82906e0
--- /dev/null
+++ b/src/site/xdoc/userguide/mediators.xml
@@ -0,0 +1,1082 @@
+<document>
+    <properties>
+        <title>Apache Synapse - Mediators Catalog</title>
+    </properties>
+    <body>
+        <section name="Mediators Catalog">
+            <p>
+                This document lists all the built-in mediators of Synapse and describes their
+                usage, functionality and configuration syntax.
+            </p>
+        </section>
+        <section name="Contents">
+            <ul>
+                <li><a href="#Intro">Introduction</a></li>
+                <li><a href="#Categories">Mediator Categories</a></li>
+                <li>
+                    <a href="#CoreMediators">Core Mediators</a>
+                    <ul>
+                        <li><a href="#Drop">Drop Mediator</a></li>
+                        <li><a href="#Log">Log Mediator</a></li>
+                        <li><a href="#Property">Property Mediator</a></li>
+                        <li><a href="#Send">Send Mediator</a></li>
+                    </ul>
+                </li>
+                <li>
+                    <a href="#FilterMediators">Filter Mediators</a>
+                    <ul>
+                        <li><a href="#Filter">Filter Mediator</a></li>
+                        <li><a href="#InOut">In/Out Mediator</a></li>
+                        <li><a href="#Switch">Switch Mediator</a></li>
+                    </ul>
+                </li>
+                <li>
+                    <a href="#TransformationMediators">Transformation Mediators</a>
+                    <ul>
+                        <li><a href="#Header">Header Mediator</a></li>
+                        <li><a href="#MakeFault">MakeFault Mediator</a></li>
+                        <li><a href="#PayloadFactory">Payload Factory Mediator</a></li>
+                        <li><a href="#URLRewrite">URL Rewrite Mediator</a></li>
+                        <li><a href="#XSLT">XSLT Mediator</a></li>
+                        <li><a href="#XQuery">XQuery Mediator</a></li>
+                    </ul>
+                </li>
+                <li>
+                    <a href="#ExtensionMediators">Extension Mediators</a>
+                    <ul>
+                        <li><a href="#Clazz">Class Mediator</a></li>
+                        <li><a href="#POJOCommand">POJO Command Mediator</a></li>
+                        <li><a href="#Script">Script Mediator</a></li>
+                        <li><a href="#Spring">Spring Mediator</a></li>
+                    </ul>
+                </li>
+                <li>
+                    <a href="#AdvancedMediators">Advanced Mediators</a>
+                    <ul>
+                        <li><a href="#Aggregate">Aggregate Mediator</a></li>
+                        <li><a href="#Cache">Cache Mediator</a></li>
+                        <li><a href="#Callout">Callout Mediator</a></li>
+                        <li><a href="#Clone">Clone Mediator</a></li>
+                        <li><a href="#DBLookup">DBLookup Mediator</a></li>
+                        <li><a href="#DBReport">DBReport Mediator</a></li>
+                        <li><a href="#Iterate">Iterate Mediator</a></li>
+                        <li><a href="#RMSequence">RMSequence Mediator</a></li>
+                        <li><a href="#Store">Store Mediator</a></li>
+                        <li><a href="#Throttle">Throttle Mediator</a></li>
+                        <li><a href="#Transaction">Transaction Mediator</a></li>
+                    </ul>
+                </li>
+            </ul>
+        </section>
+        <section name="Introduction" id="Intro">
+            <p>
+                Mediator is the basic message processing unit in Synapse. A mediator takes an
+                input message, carries out some processing on it, and provides an output message.
+                Mediators can be linked up and arranged into chains to implement complex message
+                flows (sequences). Mediators can manipulate message content (payload), properties,
+                headers and if needed can also execute additional tasks such as database lookup,
+                service invocation and script execution.
+            </p>
+            <p>
+                Apache Synapse ships with an array of useful mediators that can be used out of the
+                box to implement message flows, services and integration patterns. Rest of this
+                article describes these mediators in detail, along with their use cases and
+                configuration syntax.
+            </p>
+        </section>
+        <section name="Mediator Categories" id="Categories">
+            <p>
+                Built-in mediators of Synapse can be classified into several groups depending
+                on the nature of their functionality and use cases.
+            </p>
+            <ul>
+                <li>
+                    Core mediators - Utility mediators that are useful in a variety of scenarios
+                </li>
+                <li>
+                    Filter mediators - Mediators used to filter out messages
+                </li>
+                <li>
+                    Transform mediators - Mediators used to transform message content, headers and
+                    attributes
+                </li>
+                <li>
+                    Extension mediators - Mediators used to extend the Synapse mediation engine by
+                    plugging in custom developed code
+                </li>
+                <li>
+                    Advanced mediators - Mediators used to implement advanced integration scenarios
+                    and patterns
+                </li>
+            </ul>
+            <p>
+                Rest of this article is structured according to the above classification. Mediators
+                in each section are arranged in the alphabetical order.
+            </p>
+        </section>
+        <section name="Core Mediators" id="CoreMediators">
+            <subsection name="Drop Mediator" id="Drop">
+                <p>
+                    Drop mediator can be used to drop the current message being processed and
+                    terminate a message flow. This mediator is configured as follows and it
+                    does not take any additional parameters or arguments.
+                </p>
+                <div class="xmlConf">&lt;drop/&gt;</div>
+            </subsection>
+            <subsection name="Log Mediator" id="Log">
+                <p>
+                    Log mediator can be used in any sequence or proxy service to log the messages
+                    being mediated. Log entries generated by the log mediator will go into the
+                    standard Synapse log files. This can be further configured using the
+                    log4j.properties file.
+                </p>
+                <p>
+                    By default the log mediator only logs a minimalistic set of details to avoid
+                    the message content being parsed. But if needed it can be configured to log the
+                    full message payload, headers and even custom user defined properties. The log
+                    mediator configuration takes the following general form.
+                </p>
+                <div class="xmlConf">&lt;log [level="simple|full|headers|custom"] [separator="string"]
+                    [category="INFO|DEBUG|WARN|ERROR|TRACE|FATAL"]&gt;
+    &lt;property name="string" (value="literal" | expression="xpath")/&gt;*
+&lt;/log&gt;</div>
+                <p>
+                    The 'level' attribute is used to specify how much information should be logged
+                    by the log mediator. This attribute can take one of following four values.
+                </p>
+                <ul>
+                    <li>
+                        simple - Logs a set of standard headers (To, From, WSAction, SOAPAction,
+                        ReplyTo and MessageID). If no log level is specified, this level will be
+                        used by default.
+                    </li>
+                    <li>
+                        full - Logs all standard headers logged in the log level 'simple' and also
+                        the full payload of the message. This log level causes the message content
+                        to be parsed and hence incurs a performance overhead.
+                    </li>
+                    <li>
+                        headers - Logs all SOAP header blocks
+                    </li>
+                    <li>
+                        custom - Only logs the user defined properties (see the next section)
+                    </li>
+                </ul>
+                <p>
+                    Users can define custom attributes and properties to be logged by the log mediator
+                    by specifying some 'property' elements. Each property must be named, and can
+                    have a constant value or an XPath expression. If a constant value is specified,
+                    that value will be logged with each and every entry logged by the mediator. If
+                    an XPath is specified instead, that XPath will be evaluated on the message being
+                    mediated and the outcome will be included in the generated log entry.
+                </p>
+                <p>
+                    By default all properties and attributes logged by the log mediator are separated
+                    by commas (,). This can be configured using the 'separator' attribute. Further
+                    all logs generated by the mediator are logged at log4j log level 'INFO' by default.
+                    This behavior can also be configured using the 'category' attribute.
+                </p>
+            </subsection>
+            <subsection name="Property Mediator" id="Property">
+                <p>
+                    Every message mediated through Synapse can have a set of associated properties.
+                    Synapse engine and the underlying transports set a number of properties on
+                    each message processed which can be manipulated by the user to modify the
+                    runtime behavior of the message flows. In addition, user can set his/her own
+                    properties on the message which is very helpful when it comes to managing
+                    message flow state and storing scenario specific variables. For an example in
+                    some situations a user might want to access a particular value in the request
+                    payload while processing a response. This can be easily achieved by setting the
+                    required value to a property in the request (in) sequence and then later accessing
+                    that property in the response (out) sequence.
+                </p>
+                <p>
+                    Property mediator is used to manipulate the properties of a message. This
+                    mediator can be used to set and remove property values. When it comes to setting
+                    property values, the input could be a constant or a variable value generated
+                    by an XPath expression. The syntax for configuring the property mediator is as
+                    follows.
+                </p>
+                <div class="xmlConf">&lt;property name="string" [action=set|remove] [type="string"] (value="literal" | expression="xpath") [scope=default|transport|axis2|axis2-client] [pattern="regex" [group="integer"]]&gt;
+    &lt;xml-element/&gt;?
+&lt;/property&gt;</div>
+                <p>
+                    The 'name' attribute specifies the name of the property which needs to be either
+                    set or removed  while the 'action' attribute specifies the exact action that needs
+                    to be carried out by the mediator. If not specified action will default to 'set'.
+                </p>
+                <p>
+                    When setting a property value, either the 'value' or the 'expression' attribute
+                    must be specified. The 'value' attribute can be used to set a constant as
+                    the property value whereas the 'expression' attribute can be used to specify an
+                    XPath expression. If an XPath expression is specified, Synapse will evaluate that
+                    on the message to determine the value that needs to be assigned to the property.
+                </p>
+                <p>
+                    Synapse properties are scoped. Therefore when using this mediator the user should
+                    specify the scope at which the property will be set or removed from. If not
+                    specified, property mediator will work at the 'default' scope. Properties set in
+                    this scope last as long as the transaction (request-response) exists. Properties
+                    set on scope 'axis2' has a shorter life span and it's mainly used for passing
+                    parameters to the underlying Axis2 engine. Properties set in the 'transport'
+                    scope will be treated as transport headers. For an example if it is required to
+                    send an HTTP header named 'CustomHeader' with an outgoing request, one may use
+                    the property mediator configuration.
+                </p>
+                <div class="xmlConf">&lt;property name="CustomHeader" value="some value" scope="transport" type="type name"/&gt;</div>
+                <p>
+                    This will force Synapse to send a transport header named 'CustomHeader' along
+                    with the outgoing message. Property mediator also supports a scope named
+                    'axis2-client'. Properties set in this scope will be treated as Axis2 client
+                    options.
+                </p>
+                <p>
+                    When using properties to store user or scenario specific information it is
+                    recommended to always use the 'default' scope. Other scopes should not be used
+                    for custom development or mediation work since they have the potential to
+                    alter the behavior of the underlying Axis2 engine and transports framework.
+                </p>
+                <p>
+                    By default property mediator sets all property values as strings. It is possible
+                    to set properties in other types by specifying the 'type' attribute. This attribute
+                    can accept one of following values.
+                </p>
+                <ul>
+                    <li>STRING</li>
+                    <li>BOOLEAN</li>
+                    <li>DOUBLE</li>
+                    <li>FLOAT</li>
+                    <li>INTEGER</li>
+                    <li>LONG</li>
+                    <li>SHORT</li>
+                    <li>OM</li>
+                </ul>
+                <p>
+                    The type names are case sensitive. Type 'OM' can be used to set XML property
+                    values on the message context. This becomes useful when the expression associated
+                    with the property mediator evaluates to an XML node during mediation. With the
+                    type attribute set to 'OM' the resulting XML will be converted to an AXIOM
+                    OMElement before assigning it to a property.
+                </p>
+                <p>
+                    It is also possible to use the property mediator to set some static XML content
+                    as a property value. To do this specify the static XML content as a child node
+                    of the 'property' element instead of using the 'value' attribute.
+                </p>
+            </subsection>
+            <subsection name="Send Mediator" id="Send">
+                <p>
+                    Send mediator is used to send requests to endpoints. The same can be used
+                    to send response messages back to clients. The send mediator is configured using
+                    the following XML syntax.
+                </p>
+                <div class="xmlConf">&lt;send [receive="string"]&gt;
+    (endpointref | endpoint)?
+&lt;/send&gt;</div>
+                <p>
+                    Messages are sent to the endpoint specified as the child of the
+                    'send' element. An optional receiving sequence can be configured using the
+                    'receive' attribute. When specified, response messages from the endpoint will
+                    be dispatched to the referred sequence. This makes it easier to implement
+                    complex service chaining scenarios, where the response from one service needs
+                    to be processed and directed to another service.
+                </p>
+                <p>
+                    The send mediator can be configured without any child endpoints. For an example
+                    following is a perfectly valid send mediator configuration.
+                </p>
+                <div class="xmlConf">&lt;send/&gt;</div>
+                <p>
+                    In this case the messages will be sent to an implicit endpoint. If the message
+                    is a request from a client, Synapse will lookup the 'To' header of the request and
+                    simply forward it to the service addressed by that header. If it is a response
+                    from a back-end service, Synapse will simply send it back to the original
+                    client who initiated the original message flow.
+                </p>
+                <p>
+                    The service invocations done by the send mediator may or may not be
+                    synchronous based on the underlying transport used. If the default non-blocking
+                    HTTP transport is used, the send mediator will make an asynchronous invocation
+                    and release the calling thread as soon as possible. Synapse will asynchronously
+                    handle the response from the endpoint while the giving the illusion that Synapse
+                    is making blocking service calls.
+                </p>
+            </subsection>
+        </section>
+        <section name="Filter Mediators" id="FilterMediators">
+            <subsection name="Filter Mediator" id="Filter">
+                <p>
+                    Filter mediator adds 'if-else' like semantics to the Synapse configuration language.
+                    It can be used to evaluate a condition on a message and take some action
+                    based on the outcome. The configuration of the filter mediator takes the
+                    following form.
+                </p>
+                <div class="xmlConf">&lt;filter (source="xpath" regex="string") | xpath="xpath"&gt;
+    mediator+
+&lt;/filter&gt;</div>
+                <p>
+                    The filter mediator either tests the given XPath expression as a boolean
+                    expression, or matches the result of the source XPath expression as a string
+                    against the given regular expression. If the condition evaluates to true, the
+                    filter mediator will execute the enclosed child mediators.
+                </p>
+                <p>
+                    Alternatively one can use the following syntax to configure the filter mediator.
+                </p>
+                <div class="xmlConf">&lt;filter (source="xpath" regex="string") | xpath="xpath"&gt;
+    &lt;then [sequence="string"]&gt;
+        mediator+
+    &lt;/then&gt;
+    &lt;else [sequence="string"]&gt;
+        mediator+
+    &lt;/else&gt;
+&lt;/filter&gt;</div>
+                <p>
+                    In this case too the filter condition is evaluated in the same manner as
+                    described above. Messages for which the condition evaluates to true will be
+                    mediated through the mediators enclosed by the 'then' element. Failed messages
+                    will be mediated through the mediators enclosed by the 'else' element.
+                </p>
+            </subsection>
+            <subsection name="In/Out Mediators" id="InOut">
+                <p>
+                    In mediator and Out mediator are used to filter out traffic based on the
+                    direction of the messages. As their names imply, In mediator processes only
+                    the requests (in messages) while ignoring the responses (out messages). The
+                    out mediator does the exact opposite by processing only the responses while
+                    ignoring the requests. In many occasions these two mediators are deployed
+                    together to create separate flows for requests and responses. The syntax
+                    outline for the two mediators is given below.
+                </p>
+                <div class="xmlConf">&lt;in&gt;
+    mediator+
+&lt;/in&gt;
+
+&lt;out&gt;
+    mediator+
+&lt;/out&gt;</div>
+                <p>
+                    In mediator will process requests through the child mediators anf the Out
+                    mediator will process responses through the child mediators.
+                </p>
+            </subsection>
+            <subsection name="Switch Mediator" id="Switch">
+                <p>
+                    Switch mediator provides switch-case semantics in the Synapse configuration
+                    language.
+                </p>
+                <div class="xmlConf">&lt;switch source="xpath"&gt;
+    &lt;case regex="string"&gt;
+        mediator+
+    &lt;/case&gt;+
+    &lt;default&gt;
+        mediator+
+    &lt;/default&gt;?
+&lt;/switch&gt;</div>
+                <p>
+                    The source XPath is executed on the messages. The resulting value is then
+                    tested against the regular expressions defined in each 'case' element. When
+                    a matching case is found the message will be mediated through its child
+                    mediators. If none of the cases match, the message will handed to the 'default'
+                    case (if available).
+                </p>
+            </subsection>
+        </section>
+        <section name="Transformation Mediators" id="TransformationMediators">
+            <subsection name="Header Mediator" id="Header">
+                <p>
+                    Header mediator sets or removes a specified header from the current SOAP
+                    infoset. The optional 'action' attribute specifies whether the mediator should
+                    set or remove the header. If omitted, it defaults to 'set' action.
+                </p>
+                <div class="xmlConf">&lt;header name="qname" (value="literal" | expression="xpath") [action="set"]/&gt;
+&lt;header name="qname" action="remove"/&gt;</div>
+                <p>
+                    The value of the 'name' attribute must be one of the following aliases or
+                    a valid QName with a namespace prefix. In the latter case the namespace prefix
+                    must be mapped to a valid namespace URI using the standard 'xmlns' attribute.
+                </p>
+                <ul>
+                    <li>To</li>
+                    <li>From</li>
+                    <li>Action</li>
+                    <li>FaultTo</li>
+                    <li>ReplyTo</li>
+                    <li>RelatesTo</li>
+                </ul>
+            </subsection>
+            <subsection name="MakeFault Mediator" id="MakeFault">
+                <p>
+                    MakeFault mediator transforms the current message into a fault message.
+                    It should be noted that makeFault mediator does NOT send the message after
+                    transforming it. A send mediator needs to be invoked separately to send
+                    a fault message created by this mediator.
+                </p>
+                <div class="xmlConf">&lt;makefault [version="soap11|soap12|pox"] [response="true|false"]&gt;
+    &lt;code (value="literal" | expression="xpath")/&gt;
+    &lt;reason (value="literal" | expression="xpath")/&gt;
+    &lt;node&gt;...&lt;/node&gt;?
+    &lt;role&gt;...&lt;/role&gt;?
+   (&lt;detail expression="xpath"/&gt; | &lt;detail&gt;...&lt;/detail&gt;)?
+&lt;/makefault&gt;</div>
+                <p>
+                    The To header of the fault message is set to the 'Fault-To' of the original message
+                    if such a header exists on the original message. Depending on the 'version'
+                    attribute, the fault message is created as a SOAP 1.1, SOAP 1.2
+                    or POX fault. If the optional response attribute value is set as 'true',
+                    makefault mediator marks the message as a response. Optional 'node',
+                    'role' and 'detail' sub-elements in the mediator configuration can
+                    be used to set the corresponding elements in the resulting SOAP fault.
+                </p>
+            </subsection>
+            <subsection name="Payload Factory Mediator" id="PayloadFactory">
+                <p>
+                    Payload-factory mediator creates a new SOAP payload for the message, replacing
+                    the existing one. <tt>printf()</tt> style formatting is used to configure the
+                    transformation performed by this mediator.
+                </p>
+                <div class="xmlConf">&lt;payloadFactory&gt;
+    &lt;format&gt;&quot;xmlstring&quot;&lt;/format&gt;
+    &lt;args&gt;
+        &lt;arg (value=&quot;literal&quot; | expression=&quot;xpath&quot;)/&gt;*
+    &lt;/args&gt;
+&lt;/payloadFactory&gt;</div>
+
+                <p>
+                    'format' sub-element of the mediator configuration specifies the format of the
+                    new payload. All $n occurrences in the format will be replaced by the value of
+                    the n th argument at runtime. Each argument in the mediator configuration could
+                    be a static value or an XPath expression. When an expression is used, value is
+                    fetched at runtime by evaluating the provided XPath expression against the
+                    existing SOAP message/message context.
+                </p>
+            </subsection>
+            <subsection name="URL Rewrite Mediator" id="URLRewrite">
+                <p>
+                    URL Rewrite mediator can be used to modify and transform the URL values
+                    available in the message. By default, this mediator takes the 'To' header of the
+                    message and apples the provided rewrite rules on it. Alternatively, one can
+                    specify a property name in the 'inProperty' attribute, in which case the
+                    mediator takes the value of the specified property as the input URL.
+                </p>
+                <p>
+                    Similarly the mediator by default sets the transformed URL as the 'To' header of
+                    the message and alternatively you can use the 'outProperty' attribute to
+                    instruct the mediator to set the resulting URL as a property.
+                </p>
+                <div class="xmlConf">&lt;rewrite [inProperty="string"] [outProperty="string"]&gt;
+    &lt;rewriterule&gt;
+        &lt;condition&gt;
+        ...
+        &lt;/condition&gt;?
+        &lt;action [type="append|prepend|replace|remove|set"] [value="string"]
+          [xpath="xpath"] [fragment="protocol|host|port|path|query|ref|user|full"] [regex="regex"]&gt;+
+    &lt;/rewriterule&gt;+
+&lt;/rewrite&gt;</div>
+                <p>
+                    The mediator applies URL transformations by evaluating a set of rules on
+                    the message. Rules are specified using the 'rewriterule' element. Rules are
+                    evaluated in the order in which they are specified. A rule can consist of an
+                    optional condition and one or more rewrite actions. If the condition is provided,
+                    it is evaluated first and specified rewrite actions are executed only if the
+                    condition evaluates to true. If no condition is specified, the provided rewrite
+                    actions will be always executed. The condition should be wrapped in a 'condition'
+                    element within the 'rewriterule' element. Rewrite actions are specified using
+                    'action' elements.
+                </p>
+            </subsection>
+            <subsection name="XQuery Mediator" id="XQuery">
+                <p>
+                    The XQuery mediator can be used to perform an XQuery transformation. 'key'
+                    attribute specifies the XQuery transformation, and the optional 'target'
+                    attribute specifies the node of the message that should be transformed.
+                    This defaults to the first child of the SOAP body of the payload. 'variable'
+                    element defines a variable that could be bound to the dynamic context of the
+                    XQuery engine in order to access those variables through the XQuery script.
+                </p>
+                <div class="xmlConf">&lt;xquery key="string" [target="xpath"]&gt;
+    &lt;variable name="string" type="string" [key="string"] [expression="xpath"] [value="string"]/&gt;?
+&lt;/xquery&gt;</div>
+                <p>
+                    It is possible to specify just a literal 'value', or an XPath expression
+                    over the payload, or even specify a registry key or a registry key
+                    combined with an XPath expression that selects the variable. The name of
+                    the variable corresponds to the name of variable declaration in the XQuery
+                    script. The 'type' of the variable must be a valid type defined by the
+                    JSR-000225 (XQJ API).
+                </p>
+                <p>
+                    The supported types are:
+                </p>
+                <ul>
+                    <li>
+                        XQItemType.XQBASETYPE_INT -&gt; INT
+                    </li>
+                    <li>
+                        XQItemType.XQBASETYPE_INTEGER -&gt; INTEGER
+                    </li>
+                    <li>
+                        XQItemType.XQBASETYPE_BOOLEAN -&gt; BOOLEAN
+                    </li>
+                    <li>
+                        XQItemType.XQBASETYPE_BYTE - &gt; BYTE
+                    </li>
+                    <li>
+                        XQItemType.XQBASETYPE_DOUBLE -&gt; DOUBLE
+                    </li>
+                    <li>
+                        XQItemType.XQBASETYPE_SHORT -&gt; SHORT
+                    </li>
+                    <li>
+                        XQItemType.XQBASETYPE_LONG -&gt; LONG
+                    </li>
+                    <li>
+                        XQItemType.XQBASETYPE_FLOAT -&gt; FLOAT
+                    </li>
+                    <li>
+                        XQItemType.XQBASETYPE_STRING -&gt; STRING
+                    </li>
+                    <li>
+                        XQItemType.XQITEMKIND_DOCUMENT -&gt; DOCUMENT
+                    </li>
+                    <li>
+                        XQItemType.XQITEMKIND_DOCUMENT_ELEMENT -&gt; DOCUMENT_ELEMENT
+                    </li>
+                    <li>
+                        XQItemType.XQITEMKIND_ELEMENT -&gt; ELEMENT
+                    </li>
+                </ul>
+            </subsection>
+            <subsection name="XSLT Mediator" id="XSLT">
+                <p>
+                    XSLT mediator applies the specified XSLT transformation to the selected
+                    element of the current message payload. 'source' attribute selects the source
+                    element to apply the transformation on. Where not specified, it defaults to the
+                    first child of the SOAP body. Output of the transformation replaces the source
+                    element when 'target' attribute is not specified. Otherwise, the output is
+                    stored in the property specified by the 'target' attribute.
+                </p>
+                <div class="xmlConf">&lt;xslt key="string" [source="xpath"] [target="string"]&gt;
+    &lt;property name="string" (value="literal" | expression="xpath")/&gt;*
+    &lt;feature name="string" value="true | false" /&gt;*
+    &lt;attribute name="string" value="string" /&gt;*
+    &lt;resource location="..." key="..."/&gt;*
+&lt;/xslt&gt;</div>
+                <p>
+                    If the output method specified by the stylesheet is text (i.e. the stylesheet
+                    has the <tt>&lt;xsl:output method="text"/&gt;</tt> directive),
+                    then the output of the transformation is wrapped in an element with name
+                    <tt>{http://ws.apache.org/commons/ns/payload}text</tt>. Note that when an
+                    element with this name is present as the first child of the SOAP body of an
+                    outgoing message, JMS and VFS transports automatically unwrap the
+                    content and send it out as plain text. XSLT mediator can therefore be used for
+                    integration with systems relying on plain text messages.
+                </p>
+                <p>
+                    Usage of sub-elements of XSLT mediator configuration is as follows:
+                </p>
+                <ul>
+                    <li>
+                        property - Stylesheet parameters can be passed into the transformations
+                        using 'property' elements.
+                    </li>
+                    <li>
+                        feature - Defines any features which should be explicitly set to the
+                        TransformerFactory. For example,
+                        <tt>'http://ws.apache.org/ns/synapse/transform/feature/dom'</tt> feature
+                        enables DOM based transformations instead of serializing elements into byte
+                        streams and/or temporary files. Although enabling this feature could improve
+                        performance of the transformation, it might not work for all transformations.
+                    </li>
+                    <li>
+                        attribute - Defines attributes which should be explicitly set on the
+                        TransformerFactory.
+                    </li>
+                    <li>
+                        resource - Can be used to resolve XSLT imports and includes from the
+                        repository. It works in exactly the same way as the corresponding element in
+                        a &lt;proxy&gt; definition.
+                    </li>
+                </ul>
+            </subsection>
+        </section>
+        <section name="Extension Mediators" id="ExtensionMediators">
+            <subsection name="Class Mediator" id="Clazz">
+                <p>
+                    The class mediator makes it possible to use a custom class as a mediator. The
+                    class must implement the org.apache.synapse.api.Mediator interface. If any properties are
+                    specified, the corresponding setter methods are invoked on the class,
+                    once, during initialization.
+                </p>
+                <div class="xmlConf">&lt;class name="class-name"&gt;
+    &lt;property name="string" value="literal"&gt;
+        (either literal or XML child)
+    &lt;/property&gt;
+&lt;/class&gt;</div>
+                <p>
+                    This mediator creates an instance of a specified class and sets it as a
+                    mediator. If any properties are specified, the corresponding setter methods are
+                    invoked on the class with the given values, once, during initialization.
+                </p>
+            </subsection>
+            <subsection name="POJO Command Mediator" id="POJOCommand">
+                <p>
+                    POJO Command mediator implements the popular Command design pattern and can be
+                    used to invoke an object which encapsulates a method call.
+                </p>
+                <div class="xmlConf">&lt;pojoCommand name="class-name"&gt;
+    (
+    &lt;property name="string" value="string"/&gt; |
+    &lt;property name="string" context-name="literal" [action=(ReadContext | UpdateContext | ReadAndUpdateContext)]&gt;
+        (either literal or XML child)
+    &lt;/property&gt; |
+    &lt;property name="string" expression="xpath" [action=(ReadMessage | UpdateMessage | ReadAndUpdateMessage)]/&gt;
+    )*
+&lt;/pojoCommand&gt;</div>
+                <p>
+                    POJO Command mediator creates an instance of the specified command class,
+                    which may implement the org.apache.synapse.Command interface or should have a
+                    method with "public void execute()" signature. If any properties are specified,
+                    the corresponding setter methods are invoked on the class before each message is
+                    executed. It should be noted that a new instance of the POJO Command class is
+                    created to process each message processed. After execution of the POJO Command
+                    mediator, depending on the 'action' attribute of the property, the new value
+                    returned by a call to the corresponding getter method is stored back to the
+                    message or to the context. The 'action' attribute may specify whether this
+                    behaviour is expected or not via the Read, Update and ReadAndUpdate values.
+                </p>
+            </subsection>
+            <subsection name="Script Mediator" id="Script">
+                <p>
+                    Synapse supports mediators implemented in a variety of scripting languages such
+                    as JavaScript, Python and Ruby. There are two ways of defining a script mediator,
+                    either with the script program statements stored in a separate file which is
+                    referenced via the local or remote registry entry, or with the script program
+                    statements embedded in-line within the Synapse configuration. A script mediator
+                    using a script off the registry (local or remote) is defined as follows:
+                </p>
+                <div class="xmlConf">&lt;script key="string" language="string" [function="script-function-name"]/&gt;</div>
+                <p>
+                    The property key is the registry key to load the script. The language
+                    attribute specifies the scripting language of the script code (e.g. "js"
+                    for Javascript, "rb" for ruby, "groovy" for Groovy, "py" for Python..).
+                    The function is an optional attribute defining the name of the script
+                    function to invoke, if not specified it defaults to a function named
+                    'mediate'. The function is passed a single parameter - which is the
+                    Synapse MessageContext. The function may return a boolean, if it does not,
+                    then true is assumed, and the script mediator returns this value. An
+                    inline script mediator has the script source embedded in the configuration
+                    as follows:
+                </p>
+                <div class="xmlConf">&lt;script language="string"&gt;...script source code...&lt;script/&gt;</div>
+                <p>
+                    If the specified script calls a function defined in another script, then the
+                    latter script should also be included in the script mediator configuration.
+                    It's done using the 'include' sub-element of the mediator configuration. The key
+                    attribute of the 'include' element should point to the script which has to be
+                    included. The included script could be stored as a local entry or in the remote
+                    registry. Script includes are defined as follows:
+                </p>
+                <div class="xmlConf">&lt;script key="string" language="string" [function="script-function-name"]&gt;
+    &lt;include key="string"/&gt;
+&lt;/script&gt;</div>
+                <p>
+                    The execution context environment of the script has access to the Synapse
+                    MessageContext predefined in a script variable named 'mc' . An example of
+                    an inline mediator using JavaScript/E4X which returns false if the SOAP
+                    message body contains an element named 'symbol' which has a value of 'IBM'
+                    would be:
+                </p>
+                <div class="xmlConf">&lt;script language="js"&gt;mc.getPayloadXML()..symbol != "IBM";&lt;script/&gt;</div>
+                <p>
+                    Synapse uses the Apache
+                    <a href="http://jakarta.apache.org/bsf/">Bean Scripting Framework</a>
+                    for the scripting language support, any script language supported by BSF may be
+                    used to implement a Synapse mediator.
+                </p>
+                <p>
+                    Implementing a mediator with a script language can have advantages over
+                    using the built in Synapse mediator types or implementing a custom Java
+                    class mediator. Script mediators have all the flexibility of a class
+                    mediator with access to the Synapse MessageContext and SynapseEnvironment
+                    APIs, and the ease of use and dynamic nature of scripting languages allows
+                    rapid development and prototyping of custom mediators. An additional
+                    benefit of some scripting languages is that they have very simple and
+                    elegant XML manipulation capabilities, for example JavaScript E4X or Ruby
+                    REXML, so this makes them well suited for use in the Synapse mediation
+                    environment. For both types of script mediator definition the
+                    MessageContext passed into the script has additional methods over the
+                    standard Synapse MessageContext to enable working with the XML in a way
+                    natural to the scripting language. For example when using JavaScript
+                    getPayloadXML and setPayloadXML, E4X XML objects, and when using Ruby,
+                    REXML documents.
+                </p>
+                <p>
+                    The complete list of available methods can be found in the
+                    <a href="../apidocs/org/apache/synapse/mediators/bsf/ScriptMessageContext.html">
+                        ScriptMessageContext Javadoc</a>.
+                </p>
+            </subsection>
+            <subsection name="Spring Mediator" id="Spring">
+                <p>
+                    The Spring mediator exposes a spring bean as a mediator. In other terms, it
+                    creates an instance of a mediator, which is managed by Spring. This Spring bean
+                    must implement org.apache.synapse.api.Mediator interface.
+                </p>
+                <div class="xmlConf">&lt;spring:spring bean="string" key="string" xmlns:spring="http://ws.apache.org/ns/synapse/spring"/&gt;</div>
+                <p>
+                    'key' attribute refers to the Spring ApplicationContext/Configuration
+                    (i.e. spring configuration XML) used for the bean. This key can be a registry
+                    key or local entry key. The bean attribute is used for looking up a Spring bean
+                    from the spring Application Context. Therefore, a bean with same name must be in
+                    the given spring configuration. In addition to that, that bean must implement
+                    the Mediator interface.
+                </p>
+            </subsection>
+        </section>
+        <section name="Advanced Mediators" id="AdvancedMediators">
+            <subsection name="Aggregate Mediator" id="Aggregate">
+                <p>
+                    Aggregate mediator implements the Message Aggregator EIP by aggregating the
+                    messages or responses for split messages generated using either the clone or
+                    iterate mediator.
+                </p>
+                <div class="xmlConf">&lt;aggregate [id="string"]&gt;
+    &lt;correlateOn expression="xpath"/&gt;?
+    &lt;completeCondition [timeout="time-in-seconds"]&gt;
+        &lt;messageCount min="int-min" max="int-max"/&gt;?
+    &lt;/completeCondition&gt;?
+    &lt;onComplete expression="xpath" [sequence="sequence-ref"]&gt;
+        (mediator +)?
+    &lt;/onComplete&gt;
+&lt;/aggregate&gt;</div>
+                <p>
+                    This mediator can also aggregate messages on the presence of matching elements
+                    specified by the correlateOn XPath expression. Aggregate will collect the
+                    messages coming into it until the messages collected on the aggregation
+                    satisfies the complete condition. The completion condition can specify a minimum
+                    or maximum number of messages to be collected, or a timeout value in seconds,
+                    after which the aggregation terminates. On completion of the aggregation it will
+                    merge all of the collected messages and invoke the onComplete sequence on it.
+                    The merged message would be created using the XPath expression specified by the
+                    attribute 'expression' on the 'onComplete' element.
+                </p>
+            </subsection>
+            <subsection name="Cache Mediator" id="Cache">
+                <p>
+                    Cache mediator is used for simple response message caching in Synapse. When a
+                    message reaches the cache mediator, it checks weather an equivalent message is
+                    already cached using a hash value.
+                </p>
+                <p>
+                    When the cache mediator detects that the message is a cached message, it fetches
+                    the cached response and prepares Synapse for sending the response. If a sequence
+                    is specified for a cache hit, user can send back the response message within
+                    this sequence using a send mediator. If a sequence is not specified, then cached
+                    response is sent back to the client.
+                </p>
+                <div class="xmlConf">&lt;cache [id="string"] [hashGenerator="class"] [timeout="seconds"] [scope=(per-host | per-mediator)]
+        collector=(true | false) [maxMessageSize="in-bytes"]&gt;
+    &lt;onCacheHit [sequence="key"]&gt;
+        (mediator)+
+    &lt;/onCacheHit&gt;?
+    &lt;implementation type=(memory | disk) maxSize="int"/&gt;
+&lt;/cache&gt;</div>
+                <p>
+                    This mediator will evaluate the hash value of an incoming message as described
+                    in the optional hash generator implementation (which should be a class
+                    implementing the org.wso2.caching.digest.DigestGenerator interface). The default
+                    hash generator is 'org.wso2.caching.digest.DOMHashGenerator'. If the generated
+                    hash value has been found in the cache then the cache mediator will execute the
+                    onCacheHit sequence which can be specified inline or referenced. The cache
+                    mediator must be specified with an 'id' and two instances with this same 'id'
+                    that correlates the response message into the cache for the request message
+                    hash. The optional 'timeout' specifies the valid duration for cached elements,
+                    and the scope defines if mediator instances share a common cache per every host
+                    instance, or per every cache mediator pair (i.e. 'id') instance. 'collector'
+                    attribute value 'true' specifies that the mediator instance is a response
+                    collection instance, and 'false' specifies that its a cache serving instance.
+                    The maximum size of a message to be cached could be specified with the optional
+                    'maxMessageSize' attributes in bytes and defaults to unlimited. Finally,
+                    'implementation' element may define if the cache is disk or memory based, and
+                    'maxSize' attribute defines the maximum number of elements to be cached.
+                </p>
+            </subsection>
+            <subsection name="Callout Mediator" id="Callout">
+                <p>
+                    Callout mediator performs a blocking external service invocation during
+                    mediation. 'serviceURL' and optional 'action' attributes specify the parameters
+                    for the external service call. The source element specifies the payload for the
+                    request message using an XPath expression; or a registry key. The target element
+                    specifies a node, at which the response payload will be attached into the
+                    current message, or the name of a key/property using which the response would be
+                    attached to the current message context as a property.
+                </p>
+                <div class="xmlConf">&lt;callout serviceURL="string" [action="string"]&gt;
+    &lt;configuration [axis2xml="string"] [repository="string"]/&gt;?
+    &lt;source xpath="expression" | key="string"&gt;
+    &lt;target xpath="expression" | key="string"/&gt;
+&lt;/callout&gt;</div>
+                <p>
+                    Since the callout mediator performs a blocking call, it cannot use the default
+                    non-blocking http/s transports based on Java NIO, and thus defaults to using the
+                    samples/axis2Client/client_repo/conf/axis2.xml as the Axis2 configuration, and
+                    samples/axis2Client/client_repo as the client repository unless these are
+                    specified otherwise inside the 'configuration' sub-element.
+                </p>
+            </subsection>
+            <subsection name="Clone Mediator" id="Clone">
+                <p>
+                    Clone mediator can be used to create several clones or copies of a message. This
+                    mediator implements the Message Splitter EIP by splitting the message into
+                    number of identical messages which will be processed in parallel. They can also
+                    be set to process sequentially by setting the value of the optional 'sequential'
+                    attribute to 'true'.
+                </p>
+                <div class="xmlConf">&lt;clone [id="string"] [sequential=(true | false)] [continueParent=(true | false)]&gt;
+    &lt;target [to="uri"] [soapAction="qname"] [sequence="sequence_ref"] [endpoint="endpoint_ref"]&gt;
+        &lt;sequence&gt;
+            (mediator)+
+        &lt;/sequence&gt;?
+        &lt;endpoint&gt;
+            endpoint
+        &lt;/endpoint&gt;?
+    &lt;/target&gt;+
+&lt;/clone&gt;</div>
+                <p>
+                    The original message can be continued or dropped depending on the boolean value
+                    of the optional 'continueParent' attribute. Optionally a custom 'To' address
+                    and/or a 'Action' may be specified for cloned messages. The optional 'id'
+                    attribute can be used to identify the clone mediator which created a particular
+                    split message when nested clone mediators are used. This is particularly useful
+                    when aggregating responses of messages that were created using nested clone
+                    mediators.
+                </p>
+            </subsection>
+            <subsection name="DBLookup" id="DBLookup">
+                <p>
+                    DB Lookup mediator is capable of executing an arbitrary SQL SELECT statement,
+                    and then set some resulting values as local message properties on the message
+                    context. The DB connection used maybe looked up from an external DataSource or
+                    specified in-line, in which case an Apache DBCP connection pool is established
+                    and used.
+                </p>
+                <div class="xmlConf">&lt;dblookup&gt;
+    &lt;connection&gt;
+        &lt;pool&gt;
+        (
+            &lt;driver/&gt;
+            &lt;url/&gt;
+            &lt;user/&gt;
+            &lt;password/&gt;
+            &lt;property name="name" value="value"/&gt;*
+        |
+            &lt;dsName/&gt;
+            &lt;inClass/&gt;
+            &lt;url/&gt;
+            &lt;user/&gt;
+            &lt;password/&gt;
+        )
+        &lt;/pool&gt;
+    &lt;/connection&gt;
+    &lt;statement&gt;
+        &lt;sql&gt;SELECT something FROM table WHERE something_else = ?&lt;/sql&gt;
+        &lt;parameter [value="" | expression=""] type="CHAR|VARCHAR|LONGVARCHAR|NUMERIC|DECIMAL|BIT|TINYINT|SMALLINT|INTEGER|BIGINT|REAL|FLOAT|DOUBLE|DATE|TIME|TIMESTAMP"/&gt;*
+        &lt;result name="string" column="int|string"/&gt;*
+    &lt;/statement&gt;+
+&lt;/dblookup&gt;</div>
+                <p>
+                    For in-lined data sources the following parameters have to be specified.
+                </p>
+                <ul>
+                    <li>driver: Fully qualified class name of the database driver.</li>
+                    <li>url: Database URL.</li>
+                    <li>user: Username for database access.</li>
+                    <li>password: Password for database access.</li>
+                </ul>
+                <p>
+                    This new data source is based on Apache DBCP connection pools. This connection
+                    pool support the following configuration properties:
+                </p>
+                <ul>
+                    <li>autocommit = true | false</li>
+                    <li>isolation = Connection.TRANSACTION_NONE | Connection.TRANSACTION_READ_COMMITTED | Connection.TRANSACTION_READ_UNCOMMITTED |
+                        Connection.TRANSACTION_REPEATABLE_READ | Connection.TRANSACTION_SERIALIZABLE</li>
+                    <li>initialsize = int</li>
+                    <li>maxactive = int</li>
+                    <li>maxidle = int</li>
+                    <li>maxopenstatements = int</li>
+                    <li>maxwait = long</li>
+                    <li>minidle = int</li>
+                    <li>poolstatements = true | false</li>
+                    <li>testonborrow = true | false</li>
+                    <li>testonreturn = true | false</li>
+                    <li>testwhileidle = true | false</li>
+                    <li>validationquery = String</li>
+                </ul>
+                <p/>
+                <p>
+                    When an external data source is used the following parameters have to be
+                    specified.
+                </p>
+                <ul>
+                    <li>dsName: The name of the data source to be looked up.</li>
+                    <li>icClass: Initial context factory class. The corresponding Java environment property is java.naming.factory.initial</li>
+                    <li>url: The naming service provider URL. The corresponding Java environment property is java.naming.provider.url</li>
+                    <li>user: Username corresponding to the Java environment property java.naming.security.principal</li>
+                    <li>password: Password corresponding to the Java environment property java.naming.security.credentials</li>
+                </ul>
+                <p>
+                    More than one statement can be included in the mediator configuration. SQL
+                    statement may specify parameters which could be specified as values or XPath
+                    expressions. The type of a parameter could be any valid SQL type. 'result'
+                    sub-element contains 'name' and 'column' attributes which define the name
+                    under which the result is stored in the Synapse message context, and a column
+                    number or name respectively.
+                </p>
+            </subsection>
+            <subsection name="DBReport" id="DBReport">
+                <p>
+                    DB Report mediator is quite similar to the
+                    <a href="#DBReport">DB Lookup</a>
+                    mediator, but writes data into a database instead of reading data from a
+                    database.
+                </p>
+                <div class="xmlConf">&lt;dbreport useTransaction=(true|false)&gt;
+    &lt;connection&gt;
+        &lt;pool&gt;
+        (
+            &lt;driver/&gt;
+            &lt;url/&gt;
+            &lt;user/&gt;
+            &lt;password/&gt;
+            &lt;property name="name" value="value"/&gt;*
+        |
+            &lt;dsName/&gt;
+            &lt;icClass/&gt;
+            &lt;url/&gt;
+            &lt;user/&gt;
+            &lt;password/&gt;
+        )
+        &lt;/pool&gt;
+    &lt;/connection&gt;
+    &lt;statement&gt;
+        &lt;sql&gt;INSERT INTO table VALUES (?, ?, ?, ?)&lt;/sql&gt;
+        &lt;parameter [value="" | expression=""] type="CHAR|VARCHAR|LONGVARCHAR|NUMERIC|DECIMAL|BIT|TINYINT|SMALLINT|INTEGER|BIGINT|REAL|FLOAT|DOUBLE|DATE|TIME|TIMESTAMP"/&gt;*
+    &lt;/statement&gt;+
+&lt;/dblreport&gt;</div>
+
+                <p>
+                    This mediator executes the specified SQL INSERT on the database specified
+                    in-line or as an external data source. For information on configuring database
+                    related mediators, refer<a href="#DBReport">DB Lookup mediator guide</a>.
+                </p>
+            </subsection>
+            <subsection name="Iterate Mediator" id="Iterate">
+                <p>
+                    Iterate mediator splits the message into number of different messages
+                    derived from the parent message by finding matching elements for the XPath
+                    expression specified. New messages will be created for each matching element and
+                    processed in parallel (default behavior) using either the specified sequence or
+                    endpoint.
+                </p>
+                <div class="xmlConf">&lt;iterate [id="string"] [continueParent=(true | false)] [preservePayload=(true | false)] [sequential=(true | false)]
+        (attachPath="xpath")? expression="xpath"&gt;
+    &lt;target [to="uri"] [soapAction="qname"] [sequence="sequence_ref"] [endpoint="endpoint_ref"]&gt;
+        &lt;sequence&gt;
+            (mediator)+
+        &lt;/sequence&gt;?
+        &lt;endpoint&gt;
+            endpoint
+        &lt;/endpoint&gt;?
+    &lt;/target&gt;+
+ &lt;/iterate&gt;</div>
+                <p>
+                    Created messages can also be set to process sequentially by setting the optional
+                    'sequential' attribute to 'true'. Parent message can be continued or dropped in
+                    the same way as in the clone mediator. The 'preservePayload' attribute specifies
+                    if the original message should be used as a template when creating the split
+                    messages, and defaults to 'false', in which case the split messages would
+                    contain the split elements as the SOAP body. The optional 'id' attribute can be
+                    used to identify the iterator which created a particular split message when
+                    nested iterate mediators are used. This is particularly useful when aggregating
+                    responses of messages that are created using nested iterate mediators.
+                </p>
+            </subsection>
+            <subsection name="RMSequence" id="RMSequence">
+                <p>
+                    RM Sequence mediator can be used to create a sequence of messages to communicate
+                    via WS-Reliable Messaging with a WS-RM enabled endpoint.
+                </p>
+                <div class="xmlConf">&lt;RMSequence (correlation="xpath" [last-message="xpath"]) | single="true" [version="1.0|1.1"]/&gt;</div>
+                <p>
+                    The simplest use case of this mediator sets 'single' attribute to "true",
+                    which means that only one message is involved in the same sequence. However, if
+                    multiple messages should be sent in the same sequence, 'correlation' attribute
+                    should be used with an XPath expression that selects a unique element value from
+                    the incoming message. With the result of the XPath expression, Synapse can group
+                    messages together that belong to the same sequence. To close the sequence
+                    neatly, an XPath expression should be specified for the last message of the
+                    sequence as well. The optional 'version' attribute, which specifies the WS-RM
+                    specification version as 1.0 or 1.1, defaults to 1.0.
+                </p>
+            </subsection>
+            <subsection name="Store" id="Store">
+                <p>
+                    Store mediator can be used to store the current message in a specific message
+                    store.
+                </p>
+                <div class="xmlConf">&lt;store messageStore="string" [sequence="sequence-ref"]&gt;</div>
+                <p>
+                    In the mediator configuration 'messageStore' attribute is used to specify the
+                    message store to store the message in. The optional 'sequence' attribute
+                    specifies a sequence through which the message is sent before storing it.
+                </p>
+            </subsection>
+            <subsection name="Throttle Mediator" id="Throttle">
+                 <p>
+                     Throttle mediator can be used for rate limiting as well as concurrency based
+                     limiting. A WS-Policy dictates the throttling configuration and can be
+                     specified inline or loaded from the registry. Please refer to the samples
+                     document for sample throttling policies.
+                 </p>
+                <div class="xmlConf">&lt;throttle [onReject="string"] [onAccept="string"] id="string"&gt;
+    (&lt;policy key="string"/&gt; | &lt;policy&gt;..&lt;/policy&gt;)
+    &lt;onReject&gt;..&lt;/onReject&gt;?
+    &lt;onAccept&gt;..&lt;/onAccept&gt;?
+&lt;/throttle&gt;</div>
+                 <p>
+                     The throttle mediator could be used in the request path for rate limiting and
+                     concurrent access limiting. When it's used for concurrent access limitation,
+                     the same throttle mediator 'id' must be triggered on the response flow so that
+                     completed responses are deducted from the available limit. (i.e. two instances
+                     of the throttle mediator with the same 'id' attribute in the request and
+                     response flows). 'onReject' and 'onAccept' sequence references or inline
+                     sequences define how accepted and rejected messages are handled.
+                 </p>
+            </subsection>
+            <subsection name="Transaction Mediator" id="Transaction">
+                <p>
+                    Transaction mediator can provide transaction facility for a set of mediators
+                    defined as its child mediators. A transaction mediator with the action "new"
+                    indicates the entry point for the transaction. A transaction is marked completed
+                    by a transaction mediator with the action "commit". The suspend and resume
+                    actions are used to pause a transaction at some point and start it again later.
+                    Additionally, the transaction mediator supports three other actions, i.e.
+                    use-existing-or-new, fault-if-no-tx, rollback.
+                </p>
+                <div class="xmlConf">&lt;transaction action="new|use-existing-or-new|fault-if-no-tx|commit|rollback|suspend|resume"/&gt;</div>
+                <ul>
+                    <li>new: Initiate a new transaction.</li>
+                    <li>use-existing-or-new: If a transaction already exists
+                        continue it, otherwise create a new transaction.</li>
+                    <li>fault-if-no-tx: Go to the error handler if no transaction exists.</li>
+                    <li>commit: End the transaction.</li>
+                    <li>rollback: Rollback a transaction.</li>
+                    <li>suspend: Pause a transaction.</li>
+                    <li>resume: Resume a paused transaction.</li>
+                </ul>
+            </subsection>
+        </section>
+    </body>
+</document>
\ No newline at end of file
diff --git a/src/site/xdoc/userguide/quick_start.xml b/src/site/xdoc/userguide/quick_start.xml
new file mode 100644
index 0000000..9edf2c5
--- /dev/null
+++ b/src/site/xdoc/userguide/quick_start.xml
@@ -0,0 +1,417 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+  ~  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.
+  -->
+
+<document>
+    <properties>
+        <title>Apache Synapse - Quick Start Guide</title>
+    </properties>
+    <body>
+        <section name="Quick Start Guide">
+            <p>
+                Welcome to Apache Synapse quick start guide. This tutorial demonstrates two
+                sample applications covering the fundamental usage scenarios of Synapse, namely
+                message mediation and service mediation. It starts from the absolute begining and
+                walks you through a series of steps while giving a firm grasp on the Synapse
+                messaging model.
+            </p>
+        </section>
+
+        <section name="Pre-requisites">
+            <p>
+                You should have following pre-requisites installed on your system to
+                follow this tutorial.
+            </p>
+            <ul>
+                <li>
+                    A Java 2 SE - JDK or JRE of version 1.5.x or higher (JDK 1.6.0_21 recommended)
+                </li>
+                <li>
+                    Apache Ant <a href="http://ant.apache.org">http://ant.apache.org</a>
+                </li>
+            </ul>
+        </section>
+
+        <section name="Installing Synapse">
+            <p>
+                Let's start by downloading Apache Synapse. Launch a web browser and navigate to
+                the <a href="">Synapse Downloads</a> page. Download the binary distribution
+                of the latest release. Binary distributions are available in standard zip
+                format and Unix tar ball format.
+            </p>
+            <p>
+                Once downloaded you can install Synapse by simply extracting the archive to
+                a suitable location on your local disk. When extracted, a directory named
+                synapse with the corresponding version number will be created. This directory
+                houses all the libraries, configuration files, scripts and other artifacts
+                used by the Synapse runtime. From now on we will refer to this directory as
+                {SYNAPSE_HOME}. So for an example {SYNAPSE_HOME}/bin refers to the subdirectory
+                named 'bin' which is generally available in the Synapse installation.
+            </p>
+        </section>
+
+        <section name="Running the Axis2 Server">
+            <p>
+                Samples described in this tutorial involve routing messages to a Web Service
+                through the Synapse ESB. In real world applications, these Web Services could be
+                hosted in a web server in your organization, or practiacally anywhere in the
+                Internet. In this tutorial we will be using a sample Web Service that ships with
+                Synapse and we will deploy it in the sample Axis2 server that comes bundled with
+                Synapse.
+            </p>
+            <p>
+                To deploy the sample service in the Axis2 server, go to
+                {SYNAPSE_HOME}/samples/axis2Server/src/SimpleStockQuoteService directory and run
+                'ant'. You will see an output similar to the following as the service is built
+                and deployed to the sample Axis2 server.
+            </p>
+            <div class="consoleOutput">user@domain:/opt/synapse-2.0.0/samples/axis2Server/src/SimpleStockQuoteService$ ant
+Buildfile: build.xml
+
+clean:
+
+init:
+[mkdir] Created dir: /opt/synapse-2.0.0/samples/axis2Server/src/SimpleStockQuoteService/temp
+[mkdir] Created dir: /opt/synapse-2.0.0/samples/axis2Server/src/SimpleStockQuoteService/temp/classes
+[mkdir] Created dir: /opt/synapse-2.0.0/samples/axis2Server/repository/services
+
+compile-all:
+[javac] Compiling 9 source files to /opt/synapse-2.0.0/samples/axis2Server/src/SimpleStockQuoteService/temp/classes
+
+build-service:
+[mkdir] Created dir: /opt/synapse-2.0.0/samples/axis2Server/src/SimpleStockQuoteService/temp/SimpleStockQuote
+[mkdir] Created dir: /opt/synapse-2.0.0/samples/axis2Server/src/SimpleStockQuoteService/temp/SimpleStockQuote/META-INF
+[copy] Copying 1 file to /opt/synapse-2.0.0/samples/axis2Server/src/SimpleStockQuoteService/temp/SimpleStockQuote/META-INF
+[copy] Copying 9 files to /opt/synapse-2.0.0/samples/axis2Server/src/SimpleStockQuoteService/temp/SimpleStockQuote
+[jar] Building jar: /opt/synapse-2.0.0/samples/axis2Server/repository/services/SimpleStockQuoteService.aar
+
+BUILD SUCCESSFUL
+Total time: 1 second</div>
+            <p>
+                Now go to {SYNAPSE_HOME}/samples/axis2Server directory and start the sample server
+                by executing the following command.
+            </p>
+            <div class="command">
+                Linux / Unix: . axis2server.sh<br/>
+                Windows: axis2server.bat                
+            </div>
+            <p>
+                This will start the Axis2 server on HTTP port 9000. You can see the WSDL of the
+                sample service by launching your web browser and navigating to the URL
+                http://localhost:9000/services/SimpleStockQuoteService?wsdl.
+            </p>            
+        </section>
+
+        <section name="Message Mediation">
+            <p>
+                Now we are all set to try our first scenario with Synapse. We will be starting
+                Synapse using the sample configuration found in synapse_sample_0.xml file which
+                resides in {SYNAPSE_HOME}/repository/conf/sample directory. This configuration
+                enables Synapse to log all the messages passing through the service bus:
+            </p>
+            <div class="xmlConf">&lt;definitions xmlns="http://ws.apache.org/ns/synapse"&gt;
+    &lt;sequence name="main"&gt;
+        &lt;log level="full"/&gt;
+        &lt;send/&gt;
+    &lt;/sequence&gt;
+&lt;/definitions&gt;</div>
+            <p>
+                To start the ESB with the above configuration go the {SYNAPSE_HOME}/bin directory
+                and execute the following command.
+            </p>
+            <div class="command">
+                Linux / Unix: . synapse.sh -sample 0<br/>
+                Windows: synapse.bat -sample 0                
+            </div>
+            <p>
+                Following messages will be displayed on the console as Synapse boots up with the
+                above configuration.
+            </p>
+            <div class="consoleOutput">Starting Synapse/Java ...
+Using SYNAPSE_HOME:    /opt/synapse-2.0.0
+Using JAVA_HOME:       /opt/jdk1.6.0_16
+Using SYNAPSE_XML:     /opt/synapse-2.0.0/repository/conf/sample/synapse_sample_0.xml
+2010-11-26 01:33:03,651 [-] [main]  INFO SynapseServer Starting Apache Synapse...
+2010-11-26 01:33:03,683 [-] [main]  INFO SynapseControllerFactory Using Synapse home : /opt/synapse-2.0.0
+2010-11-26 01:33:03,683 [-] [main]  INFO SynapseControllerFactory Using Axis2 repository : /opt/synapse-2.0.0/repository
+2010-11-26 01:33:03,683 [-] [main]  INFO SynapseControllerFactory Using axis2.xml location : /opt/synapse-2.0.0/repository/conf/axis2.xml
+2010-11-26 01:33:03,683 [-] [main]  INFO SynapseControllerFactory Using synapse.xml location : /opt/synapse-2.0.0/repository/conf/sample/synapse_sample_0.xml
+2010-11-26 01:33:03,683 [-] [main]  INFO SynapseControllerFactory Using server name : localhost
+2010-11-26 01:33:03,698 [-] [main]  INFO SynapseControllerFactory The timeout handler will run every : 15s
+2010-11-26 01:33:03,808 [-] [main]  INFO Axis2SynapseController Initializing Synapse at : Fri Nov 26 01:33:03 IST 2010
+2010-11-26 01:33:04,536 [-] [main] ERROR SandeshaModule Could not load module policies. Using default values.
+2010-11-26 01:33:04,560 [-] [main]  INFO HttpCoreNIOSSLSender Loading Identity Keystore from : lib/identity.jks
+2010-11-26 01:33:04,576 [-] [main]  INFO HttpCoreNIOSSLSender Loading Trust Keystore from : lib/trust.jks
+2010-11-26 01:33:04,668 [-] [main]  INFO HttpCoreNIOSender HTTPS Sender starting
+2010-11-26 01:33:04,674 [-] [main]  INFO HttpCoreNIOSender HTTP Sender starting
+2010-11-26 01:33:04,675 [-] [main]  INFO JMSSender JMS Sender started
+2010-11-26 01:33:04,677 [-] [main]  INFO JMSSender JMS Transport Sender initialized...
+2010-11-26 01:33:04,681 [-] [main]  INFO VFSTransportSender VFS Sender started
+2010-11-26 01:33:04,828 [-] [main]  WARN JmxAdapter Using unsecured JMX remote access!
+2010-11-26 01:33:04,959 [-] [main]  INFO HttpCoreNIOSSLListener Loading Identity Keystore from : lib/identity.jks
+2010-11-26 01:33:04,961 [-] [main]  INFO HttpCoreNIOSSLListener Loading Trust Keystore from : lib/trust.jks
+2010-11-26 01:33:04,976 [-] [main]  INFO Axis2SynapseController Loading mediator extensions...
+2010-11-26 01:33:05,013 [-] [main]  INFO XMLConfigurationBuilder Generating the Synapse configuration model by parsing the XML configuration
+2010-11-26 01:33:05,114 [-] [main]  INFO SynapseConfigurationBuilder Loaded Synapse configuration from : /opt/synapse-2.0.0/repository/conf/sample/synapse_sample_0.xml
+2010-11-26 01:33:05,158 [-] [main]  INFO Axis2SynapseController Deploying the Synapse service...
+2010-11-26 01:33:05,175 [-] [main]  INFO Axis2SynapseController Deploying Proxy services...
+2010-11-26 01:33:05,175 [-] [main]  INFO Axis2SynapseController Deploying EventSources...
+2010-11-26 01:33:05,190 [-] [main]  INFO MailTransportListener MAILTO Listener started
+2010-11-26 01:33:05,212 [-] [main]  INFO HttpCoreNIOListener HTTPS Listener started on port : 8243
+2010-11-26 01:33:05,215 [-] [main]  INFO HttpCoreNIOListener HTTP Listener started on port : 8280
+2010-11-26 01:33:05,215 [-] [main]  INFO VFSTransportListener VFS Listener started
+2010-11-26 01:33:05,215 [-] [main]  INFO Axis2SynapseController Management using JMX available via: service:jmx:rmi:///jndi/rmi://hiranya.wso2.com:1099/synapse
+2010-11-26 01:33:05,215 [-] [main]  INFO ServerManager Server ready for processing...
+2010-11-26 01:33:05,216 [-] [main]  INFO SynapseServer Apache Synapse started successfully</div>
+            <p>
+                Note that by default Synapse listens for HTTP requests on port 8280.
+            </p>
+            <subsection name="Executing the Sample Client">
+                <p>
+                    Now we have a Web Service hosted in Axis2 and a Synapse ESB instance which
+                    is configured to log and route messages. All that is left is to send some requests
+                    to Synapse and see the magic happen. Synapse comes bundled with a sample
+                    Web Service client that can be used to send different kinds of requests. Go to
+                    {SYNAPSE_HOME}/samples/axis2Client directory and execute the following command
+                    to send a request to Synapse.
+                </p>
+                <div class="command">ant stockquote -Daddurl=http://localhost:9000/services/SimpleStockQuoteService -Dtrpurl=http://localhost:8280 -Dmode=quote -Dsymbol=IBM</div>
+                <p>
+                    You should get the following output on the conosle.
+                </p>
+                <div class="consoleOutput">Buildfile: build.xml
+
+init:
+    [mkdir] Created dir: /opt/synapse-2.0.0/samples/axis2Client/target/classes
+
+compile:
+    [javac] Compiling 22 source files to /opt/synapse-2.0.0/samples/axis2Client/target/classes
+    [javac] Note: /opt/synapse-2.0.0/samples/axis2Client/src/samples/userguide/PWCallback.java uses or overrides a deprecated API.
+    [javac] Note: Recompile with -Xlint:deprecation for details.
+    [javac] Note: /opt/synapse-2.0.0/samples/axis2Client/src/samples/userguide/LoadbalanceFailoverClient.java uses unchecked or unsafe operations.
+    [javac] Note: Recompile with -Xlint:unchecked for details.
+
+stockquote:
+     [java] 2010-11-26 01:35:16,414 [-] [main] ERROR SandeshaModule Could not load module policies. Using default values.
+     [java] 2010-11-26 01:35:16,485 [-] [main]  INFO MailTransportSender MAILTO Sender started
+     [java] 2010-11-26 01:35:16,496 [-] [main]  INFO JMSSender JMS Sender started
+     [java] 2010-11-26 01:35:16,497 [-] [main]  INFO JMSSender JMS Transport Sender initialized...
+     [java] Standard :: Stock price = $99.14593325984416
+
+BUILD SUCCESSFUL
+Total time: 5 seconds</div>
+                <p>
+                    This sends a stock quote request for the symbol 'IBM' with the transport URL set
+                    to http://localhost:8280 (Synapse) and the WS-Addressing EPR set to
+                    http://localhost:9000/services/SimpleStockQuoteService (Axis2). Synapse first
+                    logs the message and then forwards it to the URL given in the WS-Addressing
+                    headers. The actual message sent by the client is as follows.
+                </p>
+                <div class="consoleOutput">POST / HTTP/1.1
+Content-Type: text/xml; charset=UTF-8
+SOAPAction: "urn:getQuote"
+User-Agent: Axis2
+Host: 127.0.0.1
+Transfer-Encoding: chunked
+
+218
+&lt;?xml version='1.0' encoding='UTF-8'?&gt;
+   &lt;soapenv:Envelope xmlns:wsa="http://www.w3.org/2005/08/addressing" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"&gt;
+      &lt;soapenv:Header&gt;
+         &lt;wsa:To&gt;http://localhost:9000/services/SimpleStockQuoteService&lt;/wsa:To&gt;
+         &lt;wsa:MessageID&gt;urn:uuid:D538B21E30B32BB8291177589283717&lt;/wsa:MessageID&gt;
+         &lt;wsa:Action&gt;urn:getQuote&lt;/wsa:Action&gt;
+      &lt;/soapenv:Header&gt;
+      &lt;soapenv:Body&gt;
+         &lt;m0:getQuote xmlns:m0="http://services.samples"&gt;
+            &lt;m0:request&gt;
+               &lt;m0:symbol&gt;IBM&lt;/m0:symbol&gt;
+            &lt;/m0:request&gt;
+         &lt;/m0:getQuote&gt;
+      &lt;/soapenv:Body&gt;
+   &lt;/soapenv:Envelope&gt;0</div>
+                <p>
+                    Now take a look at the console running Synapse. You will see that all the
+                    details of the mediation are logged along with all the SOAP messages
+                    passed through Synapse. If you execute Synapse in debug mode by editing
+                    the lib/log4j.properties file and setting "log4j.category.org.apache.synapse"
+                    as "DEBUG" instead of INFO, you will see even more information as follows after
+                    a restart and on replay of the above scenario.
+                </p>
+                <div class="consoleOutput">2010-11-26 01:39:42,958 [-] [HttpServerWorker-1] DEBUG SynapseMessageReceiver Synapse received a new message for message mediation...
+2010-11-26 01:39:42,959 [-] [HttpServerWorker-1] DEBUG SynapseMessageReceiver Received To: http://localhost:9000/services/SimpleStockQuoteService
+2010-11-26 01:39:42,959 [-] [HttpServerWorker-1] DEBUG SynapseMessageReceiver SOAPAction: urn:getQuote
+2010-11-26 01:39:42,959 [-] [HttpServerWorker-1] DEBUG SynapseMessageReceiver WSA-Action: urn:getQuote
+2010-11-26 01:39:42,960 [-] [HttpServerWorker-1] DEBUG Axis2SynapseEnvironment Injecting MessageContext
+2010-11-26 01:39:42,960 [-] [HttpServerWorker-1] DEBUG Axis2SynapseEnvironment Using Main Sequence for injected message
+2010-11-26 01:39:42,961 [-] [HttpServerWorker-1] DEBUG SequenceMediator Start : Sequence &lt;main&gt;
+2010-11-26 01:39:42,961 [-] [HttpServerWorker-1] DEBUG SequenceMediator Sequence &lt;SequenceMediator&gt; :: mediate()
+2010-11-26 01:39:42,961 [-] [HttpServerWorker-1] DEBUG LogMediator Start : Log mediator
+2010-11-26 01:39:42,989 [-] [HttpServerWorker-1]  INFO LogMediator To: http://localhost:9000/services/SimpleStockQuoteService, WSAction: urn:getQuote, SOAPAction: urn:getQuote, ReplyTo: http://www.w3.org/2005/08/addressing/anonymous, MessageID: urn:uuid:881AF81981B97048961290715782743, Direction: request, Envelope: &lt;?xml version='1.0' encoding='utf-8'?&gt;&lt;soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"&gt;&lt;soapenv:Header xmlns:wsa="http://www.w3.org/2005/08/addressing"&gt;&lt;wsa:To&gt;http://localhost:9000/services/SimpleStockQuoteService&lt;/wsa:To&gt;&lt;wsa:MessageID&gt;urn:uuid:881AF81981B97048961290715782743&lt;/wsa:MessageID&gt;&lt;wsa:Action&gt;urn:getQuote&lt;/wsa:Action&gt;&lt;/soapenv:Header&gt;&lt;soapenv:Body&gt;&lt;m0:getQuote xmlns:m0="http://services.samples"&gt;&lt;m0:request&gt;&lt;m0:symbol&gt;IBM&lt;/m0:symbol&gt;&lt;/m0:request&gt;&lt;/m0:getQuote&gt;&lt;/soapenv:Body&gt;&lt;/soapenv:Envelope&gt;
+2010-11-26 01:39:42,990 [-] [HttpServerWorker-1] DEBUG LogMediator End : Log mediator
+2010-11-26 01:39:42,990 [-] [HttpServerWorker-1] DEBUG SendMediator Start : Send mediator
+2010-11-26 01:39:42,990 [-] [HttpServerWorker-1] DEBUG SendMediator Sending request message using implicit message properties..
+Sending To: http://localhost:9000/services/SimpleStockQuoteService
+SOAPAction: urn:getQuote
+2010-11-26 01:39:42,993 [-] [HttpServerWorker-1] DEBUG Axis2FlexibleMEPClient Sending [add = false] [sec = false] [rm = false] [to=Address: http://localhost:9000/services/SimpleStockQuoteService]
+2010-11-26 01:39:42,997 [-] [HttpServerWorker-1] DEBUG Axis2FlexibleMEPClient Message [Original Request Message ID : urn:uuid:881AF81981B97048961290715782743] [New Cloned Request Message ID : urn:uuid:5e919190-98a9-4441-8bb0-d09271c2758a]
+2010-11-26 01:39:43,003 [-] [HttpServerWorker-1] DEBUG SynapsePropertiesLoader Retrieving synapse properties from the cache
+2010-11-26 01:39:43,003 [-] [HttpServerWorker-1] DEBUG MiscellaneousUtil The name with 'synapse.global_timeout_interval' cannot be found. Using default value : 86400000
+2010-11-26 01:39:43,004 [-] [HttpServerWorker-1]  INFO TimeoutHandler This engine will expire all callbacks after : 86400 seconds, irrespective of the timeout action, after the specified or optional timeout
+2010-11-26 01:39:43,004 [-] [HttpServerWorker-1] DEBUG SynapsePropertiesLoader Retrieving synapse properties from the cache
+2010-11-26 01:39:43,004 [-] [HttpServerWorker-1] DEBUG MiscellaneousUtil The name with 'synapse.timeout_handler_interval' cannot be found. Using default value : 15000
+2010-11-26 01:39:43,039 [-] [HttpServerWorker-1] DEBUG SynapseCallbackReceiver Callback added. Total callbacks waiting for : 1
+2010-11-26 01:39:43,144 [-] [HttpServerWorker-1] DEBUG SendMediator End : Send mediator
+2010-11-26 01:39:43,145 [-] [HttpServerWorker-1] DEBUG SequenceMediator End : Sequence &lt;main&gt;
+2010-11-26 01:39:43,271 [-] [HttpClientWorker-1] DEBUG SynapseCallbackReceiver Callback removed for request message id : urn:uuid:5e919190-98a9-4441-8bb0-d09271c2758a. Pending callbacks count : 0
+2010-11-26 01:39:43,271 [-] [HttpClientWorker-1] DEBUG SynapseCallbackReceiver Synapse received an asynchronous response message
+2010-11-26 01:39:43,271 [-] [HttpClientWorker-1] DEBUG SynapseCallbackReceiver Received To: null
+2010-11-26 01:39:43,271 [-] [HttpClientWorker-1] DEBUG SynapseCallbackReceiver SOAPAction:
+2010-11-26 01:39:43,271 [-] [HttpClientWorker-1] DEBUG SynapseCallbackReceiver WSA-Action:
+2010-11-26 01:39:43,272 [-] [HttpClientWorker-1] DEBUG SynapseCallbackReceiver Body :
+&lt;?xml version='1.0' encoding='utf-8'?&gt;&lt;soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"&gt;&lt;soapenv:Body&gt;&lt;ns:getQuoteResponse xmlns:ns="http://services.samples"&gt;&lt;ns:return xmlns:ax21="http://services.samples/xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ax21:GetQuoteResponse"&gt;&lt;ax21:change&gt;-2.533440547346707&lt;/ax21:change&gt;&lt;ax21:earnings&gt;12.865664096815566&lt;/ax21:earnings&gt;&lt;ax21:high&gt;-62.37116432061533&lt;/ax21:high&gt;&lt;ax21:last&gt;63.140427676860845&lt;/ax21:last&gt;&lt;ax21:lastTradeTimestamp&gt;Fri Nov 26 01:39:43 IST 2010&lt;/ax21:lastTradeTimestamp&gt;&lt;ax21:low&gt;65.32586424659065&lt;/ax21:low&gt;&lt;ax21:marketCap&gt;3.6215661345786005E7&lt;/ax21:marketCap&gt;&lt;ax21:name&gt;IBM Company&lt;/ax21:name&gt;&lt;ax21:open&gt;64.94029146457328&lt;/ax21:open&gt;&lt;ax21:peRatio&gt;23.84144924463005&lt;/ax21:peRatio&gt;&lt;ax21:percentageChange&gt;-3.6037604984655096&lt;/ax21:percentageChange&gt;&lt;ax21:prevClose&gt;70.29991444840613&lt;/ax21:prevClose&gt;&lt;ax21:symbol&gt;IBM&lt;/ax21:symbol&gt;&lt;ax21:volume&gt;9723&lt;/ax21:volume&gt;&lt;/ns:return&gt;&lt;/ns:getQuoteResponse&gt;&lt;/soapenv:Body&gt;&lt;/soapenv:Envelope&gt;
+2010-11-26 01:39:43,274 [-] [HttpClientWorker-1] DEBUG Axis2SynapseEnvironment Injecting MessageContext
+2010-11-26 01:39:43,274 [-] [HttpClientWorker-1] DEBUG Axis2SynapseEnvironment Using Main Sequence for injected message
+2010-11-26 01:39:43,274 [-] [HttpClientWorker-1] DEBUG SequenceMediator Start : Sequence &lt;main&gt;
+2010-11-26 01:39:43,275 [-] [HttpClientWorker-1] DEBUG SequenceMediator Sequence &lt;SequenceMediator&gt; :: mediate()
+2010-11-26 01:39:43,275 [-] [HttpClientWorker-1] DEBUG LogMediator Start : Log mediator
+2010-11-26 01:39:43,275 [-] [HttpClientWorker-1]  INFO LogMediator To: http://www.w3.org/2005/08/addressing/anonymous, WSAction: , SOAPAction: , ReplyTo: http://www.w3.org/2005/08/addressing/anonymous, MessageID: urn:uuid:5e919190-98a9-4441-8bb0-d09271c2758a, Direction: response, Envelope: &lt;?xml version='1.0' encoding='utf-8'?&gt;&lt;soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"&gt;&lt;soapenv:Body&gt;&lt;ns:getQuoteResponse xmlns:ns="http://services.samples"&gt;&lt;ns:return xmlns:ax21="http://services.samples/xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ax21:GetQuoteResponse"&gt;&lt;ax21:change&gt;-2.533440547346707&lt;/ax21:change&gt;&lt;ax21:earnings&gt;12.865664096815566&lt;/ax21:earnings&gt;&lt;ax21:high&gt;-62.37116432061533&lt;/ax21:high&gt;&lt;ax21:last&gt;63.140427676860845&lt;/ax21:last&gt;&lt;ax21:lastTradeTimestamp&gt;Fri Nov 26 01:39:43 IST 2010&lt;/ax21:lastTradeTimestamp&gt;&lt;ax21:low&gt;65.32586424659065&lt;/ax21:low&gt;&lt;ax21:marketCap&gt;3.6215661345786005E7&lt;/ax21:marketCap&gt;&lt;ax21:name&gt;IBM Company&lt;/ax21:name&gt;&lt;ax21:open&gt;64.94029146457328&lt;/ax21:open&gt;&lt;ax21:peRatio&gt;23.84144924463005&lt;/ax21:peRatio&gt;&lt;ax21:percentageChange&gt;-3.6037604984655096&lt;/ax21:percentageChange&gt;&lt;ax21:prevClose&gt;70.29991444840613&lt;/ax21:prevClose&gt;&lt;ax21:symbol&gt;IBM&lt;/ax21:symbol&gt;&lt;ax21:volume&gt;9723&lt;/ax21:volume&gt;&lt;/ns:return&gt;&lt;/ns:getQuoteResponse&gt;&lt;/soapenv:Body&gt;&lt;/soapenv:Envelope&gt;
+2010-11-26 01:39:43,275 [-] [HttpClientWorker-1] DEBUG LogMediator End : Log mediator
+2010-11-26 01:39:43,275 [-] [HttpClientWorker-1] DEBUG SendMediator Start : Send mediator
+2010-11-26 01:39:43,275 [-] [HttpClientWorker-1] DEBUG SendMediator Sending response message using implicit message properties..
+Sending To: http://www.w3.org/2005/08/addressing/anonymous
+SOAPAction:
+2010-11-26 01:39:43,282 [-] [HttpClientWorker-1] DEBUG SendMediator End : Send mediator
+2010-11-26 01:39:43,282 [-] [HttpClientWorker-1] DEBUG SequenceMediator End : Sequence &lt;main&gt;</div>
+                <p>
+                    And with that you have successfully completed the first part of this guide. Now let's
+                    look at the next scenario, service mediation with proxy services.
+                </p>
+            </subsection>
+        </section>
+        <section name="Service Mediation (Proxy Services)">
+            <p>
+                As the name implies, a proxy service acts as an intermediary service hosted in
+                Synapse, and typically fronts an existing service endpoint. A proxy service can be
+                created and exposed on a different transport, schema, WSDL, or QoS setup (such
+                as WS-Security, WS-Reliable Messaging) than the real service. Proxy services
+                are capable of mediating requests before they are delivered to the actual
+                endpoint. Similarly responses from the actual service can be mediated before
+                they are sent back to the client.
+            </p>
+            <p>
+                Clients can send proxy service requests directly to Synapse. From the client's
+                perspective, proxy services are simply Web Services hosted on Synapse. They can
+                append the '?wsdl' suffix to the proxy service endpoints to get the WSDLs of these
+                virtual services. But in the Synapse configuration, service requests can be handled
+                in anyway you like. Most obvious thing would be to do some processing on the
+                message and send it to the actual service, which could be running on a different host.
+                But it is not necessary to always send the messages to an actual service. You may
+                list any combination of tasks to be performed on the messages received by
+                the proxy service and terminate the flow or send some response back to the
+                client even without sending it to any service.
+            </p>
+            <p>
+                Let's explore a simple proxy services scenario step-by-step to get a better feeling.
+                As you have downloaded and installed Synapse in the previous section, now you
+                just run the scenario straightaway. This scenario also requires the same stock
+                quote service we used in the previous example. So have it deployed in Axis2 and make
+                sure Axis2 server is up and running.
+            </p>
+            <p>
+                We are going to start Synapse with a configuration which contains a proxy service.
+                The configuration in synapse_sample_150.xml file in repository/conf/sample directory
+                matches well with the scope of this tutorial.
+            </p>
+            <div class="xmlConf">&lt;definitions xmlns="http://synapse.apache.org/ns/2010/04/configuraiton"&gt;
+    &lt;proxy name="StockQuoteProxy"&gt;
+        &lt;target&gt;
+            &lt;endpoint&gt;
+                &lt;address uri="http://localhost:9000/services/SimpleStockQuoteService"/&gt;
+            &lt;/endpoint&gt;
+            &lt;outSequence&gt;
+                &lt;send/&gt;
+            &lt;/outSequence&gt;
+        &lt;/target&gt;
+        &lt;publishWSDL uri="file:repository/conf/sample/resources/proxy/sample_proxy_1.wsdl"/&gt;
+    &lt;/proxy&gt;
+&lt;/definitions&gt;</div>
+            <p>
+                The above configuration exposes a proxy service named StockQuoteProxy
+                and specifies an endpoint
+                (http://localhost:9000/services/SimpleStockQuoteService) as the target for the
+                proxy service. Therefore, messages coming to the proxy service will be
+                directed to the address http://localhost:9000/services/SimpleStockQuoteService
+                specified in the endpoint. There is also an out sequence for the proxy
+                service, which will be executed for response messages. In the out sequence,
+                we just send the messages back to the client. The publishWSDL tag
+                specifies an WSDL to be published for this proxy service. Let's start
+                Synapse with this sample configuration by running the below command from
+                the {SYNAPSE_HOME}/bin directory.
+            </p>
+            <div class="command">
+                Linux / Unix: . synapse.sh -sample 150<br/>
+                Windows: synapse.bat -sample 150                
+            </div>
+            <p>
+                Synapse will display a set of messages as it boots up just like in the previous
+                section describing the start-up procedure. Before running the client, it
+                is time to observe another feature of proxy services. That is displaying
+                the published WSDL. Just open a web browser and point it to the URL
+                http://localhost:8280/services/StockQuoteProxy?wsdl. You will see the
+                sample_proxy_1.wsdl specified in the configuration but containing the
+                correct EPRs for the service over HTTP/S.
+            </p>
+            <subsection name="Executing the Sample Client">
+                <p>
+                    Now we can invoke the proxy service by sending a request from our sample Axis2
+                    client. Go to the {SYNAPSE_HOME}/samples/axis2Client directory and run the
+                    following command.
+                </p>
+                <div class="command">ant stockquote -Dtrpurl=http://localhost:8280/services/StockQuoteProxy -Dmode=quote -Dsymbol=IBM</div>
+                <p>
+                    The above command sends a stock quote request directly to the provided
+                    transport endpoint at http://localhost:8280/services/StockQuoteProxy. The
+                    proxy service will forward the message to the Axis2 server and route the
+                    response from Axis2 back to the client. You will see the response from the
+                    server displayed on the console as follows:
+                </p>
+                <div class="consoleOutput">Standard :: Stock price = $165.32687331383468</div>
+            </subsection>
+            <subsection name="More on Proxy Services">
+                <p>
+                    Proxy services are among the most powerful functional components of Apache
+                    Synapse. They can be used to perform transport switching, message format
+                    switching and lot more. This quick start tutorial only covers the simple
+                    usecases of proxy services. Please refer samples #150 and above in the
+                    Synapse samples catalog, for in depth coverage on more advanced use cases.
+                </p>                
+            </subsection>
+        </section>
+        <section name="Conclusion">
+            <p>
+                This brings the Synapse quick start guide to an end. Now it is time to go
+                deeper and discover the advanced features of Synapse. You can browse through
+                the array of samples for your interested areas. If you have any issue regarding
+                Synapse as a user, feel free write to the Synapse user mailing list
+                (<a href="http://synapse.apache.org/mail-lists.html">http://synapse.apache.org/mail-lists.html</a>).
+            </p>
+        </section>
+    </body>
+</document>
\ No newline at end of file
diff --git a/src/site/xdoc/userguide/samples.xml b/src/site/xdoc/userguide/samples.xml
new file mode 100644
index 0000000..f43232e
--- /dev/null
+++ b/src/site/xdoc/userguide/samples.xml
@@ -0,0 +1,263 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+  ~  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.
+  -->
+
+<document>
+    <properties>
+        <title>Apache Synapse - Samples Catalog</title>
+    </properties>
+    <body>
+        <section name="Apache Synapse Samples Catalog">
+            <p>
+                Apache Synapse comes preloaded with a horde of sample configurations that
+                demonstrate various features of the service bus. This catalog lists out all
+                these sample configurations and provides detailed information on how to run
+                them. These samples require an Apache ANT installation for you to be able to
+                try them out. If you are new to Synapse and have no experience running Synapse,
+                the Quick Start Guide may be a better starting point. If you are comfortable
+                with running Synapse samples, please go ahead and pick the samples you are
+                interested in.
+            </p>
+            <subsection name="Message Mediation">
+                <p>
+                    <ul>
+                        <li><a href="samples/sample0.html">Sample 0: Introduction to Synapse</a></li>
+                        <li><a href="samples/sample1.html">Sample 1: Simple content based routing (CBR) of messages</a></li>
+                        <li><a href="samples/sample2.html">Sample 2: CBR with the Switch-case mediator, using message properties</a></li>
+                        <li><a href="samples/sample3.html">Sample 3: Local Registry entry definitions, reusable endpoints and sequences</a></li>
+                        <li><a href="samples/sample4.html">Sample 4: Introduction to error handling</a></li>
+                        <li><a href="samples/sample5.html">Sample 5: Creating SOAP fault messages and changing the direction of a message</a></li>
+                        <li><a href="samples/sample6.html">Sample 6: Manipulating SOAP headers, and filtering incoming and outgoing messages</a></li>
+                        <li><a href="samples/sample7.html">Sample 7: Introduction to local registry entries and using schema validation</a></li>
+                        <li><a href="samples/sample8.html">Sample 8: Introduction to static and dynamic registry resources, and using XSLT transformations</a></li>
+                        <li><a href="samples/sample9.html">Sample 9: Introduction to dynamic sequences with registry</a></li>
+                        <li><a href="samples/sample10.html">Sample 10: Introduction to dynamic endpoints with registry</a></li>
+                        <li><a href="samples/sample11.html">Sample 11: A full registry based configuration, and sharing a configuration between multiple instances</a></li>
+                        <li><a href="samples/sample12.html">Sample 12: One-way messaging / fire-and-forget through Synapse</a></li>
+                        <li><a href="samples/sample13.html">Sample 13: Dual channel invocation through Synapse</a></li>
+                    </ul>
+                </p>
+            </subsection>
+            <subsection name="Endpoints">
+                <p>
+                    <ul>
+                        <li><a href="samples/sample50.html">Sample 50: POX to SOAP conversion</a></li>
+                        <li><a href="samples/sample51.html">Sample 51: MTOM and SwA optimizations and request/response correlation</a></li>
+                        <li><a href="samples/sample52.html">Sample 52: Session less load balancing between 3 endpoints</a></li>
+                        <li><a href="samples/sample53.html">Sample 53: Fail-over routing among 3 endpoints</a></li>
+                        <li><a href="samples/sample54.html">Sample 54: Session affinity load balancing between 3 endpoints</a></li>
+                        <li><a href="samples/sample55.html">Sample 55: Session affinity load balancing between fail-over endpoints</a></li>
+                        <li><a href="samples/sample56.html">Sample 56: WSDL endpoint</a></li>
+                        <li><a href="samples/sample57.html">Sample 57: Dynamic load balancing between 3 nodes</a></li>
+                        <li><a href="samples/sample58.html">Sample 58: Static load balancing between 3 nodes</a></li>
+                    </ul>
+                </p>
+            </subsection>
+            <subsection name="QoS Addition/Removal with Message Mediation">
+                <p>
+                    <ul>
+                        <li><a href="samples/sample100.html">Sample 100: Using WS-Security for outgoing messages</a></li>
+                        <li><a href="samples/sample101.html">Sample 101: Using WS-ReliableMessaging for outgoing messages</a></li>
+                    </ul>
+                </p>
+            </subsection>
+            <subsection name="Proxy Services">
+                <p>
+                    <ul>
+                        <li><a href="samples/sample150.html">Sample 150: Introduction to proxy services</a></li>
+                        <li><a href="samples/sample151.html">Sample 151: Custom sequences and endpoints with proxy services</a></li>
+                        <li><a href="samples/sample152.html">Sample 152: Switching transports and message format from SOAP to REST/POX</a></li>
+                        <li><a href="samples/sample153.html">Sample 153: Routing the messages without processing the security headers</a></li>
+                        <li><a href="samples/sample154.html">Sample 154: Load Balancing with proxy services</a></li>
+                        <li><a href="samples/sample155.html">Sample 155: Dual channel invocation on client side and server side</a></li>
+                        <li><a href="samples/sample156.html">Sample 156: Service integration with specifying the receiving sequence</a></li>
+                        <li><a href="samples/sample157.html">Sample 157: Conditional router mediator for implementing complex routing scenarios</a></li>
+                        <li><a href="samples/sample158.html">Sample 158: Exposing a SOAP service over JSON</a></li>
+                    </ul>
+                </p>
+            </subsection>
+            <subsection name="QoS Addition/Removal with Proxy Services">
+                <p>
+                    <ul>
+                        <li><a href="samples/sample200.html">Sample 200: Engaging WS-Security on proxy services</a></li>
+                        <li><a href="samples/sample201.html">Sample 201: Reliable communication between the client and proxy services using WS-ReliableMessaging</a></li>
+                    </ul>
+                </p>
+            </subsection>
+            <subsection name="Transports">
+                <p>
+                    <ul>
+                        <li><a href="samples/sample250.html">Sample 250: Introduction to transport switching - JMS to HTTP/S</a></li>
+                        <li><a href="samples/sample251.html">Sample 251: Switching from http/s to JMS</a></li>
+                        <li><a href="samples/sample252.html">Sample 252: Pure text, binary and POX message support with JMS</a></li>
+                        <li><a href="samples/sample253.html">Sample 253: One way bridging from JMS to http and replying with a 202 Accepted response</a></li>
+                        <li><a href="samples/sample254.html">Sample 254: Using file system as the transport medium (reading/writing files)</a></li>
+                        <li><a href="samples/sample255.html">Sample 255: Switching from file transport (ftp) to the mail transport</a></li>
+                        <li><a href="samples/sample256.html">Sample 256: Proxy services with the mail transport</a></li>
+                        <li><a href="samples/sample257.html">Sample 257: Proxy services with the FIX transport</a></li>
+                        <li><a href="samples/sample258.html">Sample 258: Switching from HTTP to FIX </a></li>
+                        <li><a href="samples/sample259.html">Sample 259: Switching from FIX to HTTP </a></li>
+                        <li><a href="samples/sample260.html">Sample 260: Switching from FIX to AMQP </a></li>
+                        <li><a href="samples/sample261.html">Sample 261: Switch between different FIX versions </a></li>
+                        <li><a href="samples/sample262.html">Sample 262: Content Based Routing of FIX messages </a></li>
+                        <li><a href="samples/sample263.html">Sample 263: Transport switching - JMS to http/s using JBoss Messaging (JBM)</a></li>
+                        <li><a href="samples/sample264.html">Sample 264: Request-response invocations with the JMS transport</a></li>
+                        <li><a href="samples/sample265.html">Sample 265: Switching from TCP to HTTP/S</a></li>
+                        <li><a href="samples/sample266.html">Sample 266: Switching from UDP to HTTP/S</a></li>
+                    </ul>
+                </p>
+            </subsection>
+            <subsection name="Scheduled Tasks">
+                <p>
+                    <ul>
+                        <li><a href="#Sample300">Sample 300: Introduction to tasks with simple trigger</a></li>
+                    </ul>
+                </p>
+            </subsection>
+            <subsection name="Advanced Mediators">
+                <h4>Script Mediator (Writing Mediation Logic in Scripting Languages)</h4>
+                <p>
+                    <ul>
+                        <li><a href="samples/sample350.html">Sample 350: Introduction to the script mediator using js scripts</a></li>
+                        <li><a href="samples/sample351.html">Sample 351: Inline scripts with the script mediator</a></li>
+                        <li><a href="samples/sample352.html">Sample 352: Accessing Synapse MessageContext API through scripts</a></li>
+                        <li><a href="samples/sample353.html">Sample 353: Using Ruby scripts for mediation</a></li>
+                        <li><a href="samples/sample354.html">Sample 354: Using In-lined Ruby scripts for mediation</a></li>
+                    </ul>
+                </p>
+                <h4>Database Mediators (Interacting with Databases)</h4>
+                <p>
+                    <ul>
+                        <li><a href="samples/sample360.html">Sample 360: Introduction to dblookup mediator</a></li>
+                        <li><a href="samples/sample361.html">Sample 361: Introduction to dbreport mediator</a></li>
+                        <li><a href="samples/sample362.html">Sample 362: Perform database lookups and updates in the same mediation sequence</a></li>
+                        <li><a href="samples/sample363.html">Sample 363: Reusable database connection pools</a></li>
+                        <li><a href="samples/sample364.html">Sample 364: Executing database Stored Procedures</a></li>
+                    </ul>
+                </p>
+                <h4>Throttle Mediator</h4>
+                <p>
+                    <ul>
+                        <li><a href="samples/sample370.html">Sample 370: Introduction to throttle mediator and concurrency throttling</a></li>
+                        <li><a href="samples/sample371.html">Sample 371: Restricting requests based on policies</a></li>
+                        <li><a href="samples/sample372.html">Sample 372: Use of both concurrency throttling and request rate based throttling </a></li>
+                    </ul>
+                </p>
+                <h4>Class Mediator (Writing Mediation Logic in Java)</h4>
+                <p>
+                    <ul>
+                        <li><a href="samples/sample380.html">Sample 380: Writing custom mediation logic in Java</a></li>
+                        <li><a href="samples/sample381.html">Sample 381: Class mediator for CBR of binary messages</a></li>
+                    </ul>
+                </p>
+                <h4>XQuery Mediator</h4>
+                <p>
+                    <ul>
+                        <li><a href="samples/sample390.html">Sample 390: Introduction to the XQuery mediator</a></li>
+                        <li><a href="samples/sample391.html">Sample 391: Using external XML documents in the XQuery mediator</a></li>
+                    </ul>
+                </p>
+                <h4>Iterate Mediator and Aggregate Mediator</h4>
+                <p>
+                    <ul>
+                        <li><a href="samples/sample400.html">Sample 400: Message splitting and aggregation</a></li>
+                    </ul>
+                </p>
+                <h4>Transaction Mediator</h4>
+                <p>
+                    <ul>
+                        <li><a href="samples/sample410.html">Sample 410: Distributed transactions management with the transaction mediator</a></li>
+                    </ul>
+                </p>
+                <h4>Cache Mediator</h4>
+                <p>
+                    <ul>
+                        <li><a href="samples/sample420.html">Sample 420: Simple response caching scenario</a></li>
+                    </ul>
+                </p>
+                <h4>Callout Mediator</h4>
+                <p>
+                    <ul>
+                        <li><a href="samples/sample430.html">Sample 430: Callout mediator for synchronous web service invocations</a></li>
+                    </ul>
+                </p>
+                <h4>URL Rewrite Mediator</h4>
+                <p>
+                    <ul>
+                        <li><a href="samples/sample450.html">Sample 450: Introduction to the URL Rewrite mediator</a></li>
+                        <li><a href="samples/sample451.html">Sample 451: Conditional URL rewriting</a></li>
+                        <li><a href="samples/sample452.html">Sample 452: Conditional URL rewriting with multiple rules</a></li>                        
+                    </ul>
+                </p>
+                <h4>Spring Mediator</h4>
+                <p>
+                    <ul>
+                        <li><a href="samples/sample460.html">Sample 460: Introduction to the Spring mediator</a></li>
+                    </ul>
+                </p>
+            </subsection>
+            <subsection name="Eventing">
+                <p>
+                    <ul>
+                        <li><a href="samples/sample500.html">Sample 500: Introduction to Eventing</a></li>
+                        <li><a href="samples/sample501.html">Sample 501: Event source with static subscriptions</a></li>
+                        <li><a href="samples/sample502.html">Sample 502: Transforming events before publish</a></li>
+                    </ul>
+                </p>
+            </subsection>
+            <subsection name="Synapse Configuration Model">
+                <p>
+                    <ul>
+                        <li><a href="samples/sample600.html">Sample 600: File hierarchy based configuration builder</a></li>
+                        <li><a href="samples/sample601.html">Sample 601: Using Synapse Observers</a></li>
+                    </ul>
+                </p>
+            </subsection>
+            <subsection name="Priority Based Mediation">
+                <p>
+                    <ul>
+                        <li><a href="samples/sample650.html">Sample 650: Introduction to priority based mediation</a></li>
+                        <li><a href="samples/sample651.html">Sample 651: Priority based dispatching at transport level</a></li>
+                    </ul>
+                </p>
+            </subsection>
+            <subsection name="Message Store and Dead Letter Channel">
+                <p>
+                    <ul>
+                        <li><a href="samples/sample700.html">Sample 700: Introduction to Synapse message stores</a></li>
+                    </ul>
+                </p>
+            </subsection>
+            <subsection name="Templates">
+                <p>
+                    <ul>
+                        <li><a href="samples/sample750.html">Sample 750: Introduction to Synapse Templates</a></li>
+                    </ul>
+                </p>
+            </subsection>
+            <subsection name="REST API">
+                <p>
+                    <ul>
+                        <li><a href="samples/sample800.html">Sample 800: Introduction to REST APIs</a></li>
+                    </ul>
+                </p>
+            </subsection>
+        </section>
+    </body>
+</document>
\ No newline at end of file
diff --git a/src/site/xdoc/userguide/samples/sample0.xml b/src/site/xdoc/userguide/samples/sample0.xml
new file mode 100644
index 0000000..32f2e18
--- /dev/null
+++ b/src/site/xdoc/userguide/samples/sample0.xml
@@ -0,0 +1,102 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+  ~  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.
+  -->
+
+<document>
+    <properties>
+        <title>Apache Synapse - Sample 0</title>
+    </properties>
+    <body>
+        <section name="Sample 0: Introduction to Synapse">
+            <div class="xmlConf">&lt;definitions xmlns=&quot;http://ws.apache.org/ns/synapse&quot;&gt;
+
+    &lt;sequence name="main"&gt;
+        &lt;!-- log all attributes of messages passing through --&gt;
+        &lt;log level=&quot;full&quot;/&gt;
+
+        &lt;!-- Send the message to implicit destination --&gt;
+        &lt;send/&gt;
+    &lt;sequence/&gt;
+
+&lt;/definitions&gt;</div>
+            <subsection name="Objective">
+                <p>
+                    Introduction to Synapse - Shows how Synape can be configured to log and pass
+                    messages through.
+                </p>
+            </subsection>
+            <subsection name="Pre-requisites">
+                <p>
+                    <ul>
+                        <li>Deploy the SimpleStockQuoteService in the sample Axis2 server and start Axis2</li>
+                        <li>
+                            Start Synapse using the configuration numbered 0 (repository/conf/sample/synapse_sample_0.xml)
+                            <div class="command">
+                                Unix/Linux: sh synapse.sh -sample 0<br/>
+                                Windows: synapse.bat -sample 0
+                            </div>
+                        </li>
+                    </ul>
+                </p>
+            </subsection>
+            <subsection name="Executing the Client">
+                <h4>Smart Client Mode</h4>
+                <p>
+                    Execute the client in the smart client mode using the following command.
+                </p>
+                <div class="command">ant stockquote -Daddurl=http://localhost:9000/services/SimpleStockQuoteService -Dtrpurl=http://localhost:8280/</div>
+                <p>
+                    By tracing the execution of Synapse with the log output level set to DEBUG,
+                    you will see that the client request is arriving at Synapse with a WS-Addressing 'To'
+                    header set to EPR http://localhost:9000/services/SimpleStockQuoteService. The
+                    Synapse engine logs the message at the 'full' log level (i.e. all the
+                    message headers and the body) and then sends it to its explicit 'To'
+                    address which is http://localhost:9000/services/SimpleStockQuoteService.
+                    You will see a log entry in the Axis2 server console confirming that the message
+                    got routed to the sample server and the service hosted at the server generated
+                    a stock quote for the requested symbol.
+                </p>
+                <div class="consoleOutput">Sat Nov 18 21:01:23 IST 2006 SimpleStockQuoteService :: Generating quote for : IBM</div>
+                <p>
+                    The response message generated by the service is received by Synapse,
+                    and flows through the same mediation rules, which log the response and
+                    send back to the client. On the client console you should see an output
+                    similar to the following based on the message received by the client.
+                </p>
+                <div class="consoleOutput">Standard :: Stock price = $95.26454380258552</div>
+
+                <h4>Proxy Client Mode</h4>
+                <p>
+                    Execute the sample Axis2 client as follows to run it in the proxy mode.
+                </p>
+                <div class="command">ant stockquote -Daddurl=http://localhost:9000/services/SimpleStockQuoteService -Dprxurl=http://localhost:8280/</div>
+                <p>
+                    You will see the exact same behaviour as per the previous example when you run
+                    this scenario. However this time the client sends the message to the Axis2 server
+                    using Synapse as a HTTP proxy.
+                </p>
+                <p>
+                    The Axis2 client supports another mode of operation known as the 'dumb client
+                    mode'. This will be addressed in <a href="sample1.html">sample 1</a>.
+                </p>
+            </subsection>
+        </section>
+        <p><a href="../samples.html">Back to Catalog</a></p>        
+    </body>
+</document>
\ No newline at end of file
diff --git a/src/site/xdoc/userguide/samples/sample1.xml b/src/site/xdoc/userguide/samples/sample1.xml
new file mode 100644
index 0000000..7a22c74
--- /dev/null
+++ b/src/site/xdoc/userguide/samples/sample1.xml
@@ -0,0 +1,96 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+  ~  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.
+  -->
+
+<document>
+    <properties>
+        <title>Apache Synapse - Sample 1</title>
+    </properties>
+    <body>
+        <section name="Sample 1: Simple Content Based Routing (CBR) of Messages">
+            <div class="xmlConf">&lt;definitions xmlns="http://ws.apache.org/ns/synapse"&gt;
+
+    &lt;sequence name="main"&gt;
+        &lt;!-- filtering of messages with XPath and regex matches --&gt;
+        &lt;filter source="get-property('To')" regex=".*/StockQuote.*"&gt;
+            &lt;then&gt;
+                &lt;send&gt;
+                    &lt;endpoint&gt;
+                        &lt;address uri="http://localhost:9000/services/SimpleStockQuoteService"/&gt;
+                    &lt;/endpoint&gt;
+                &lt;/send&gt;
+                &lt;drop/&gt;
+            &lt;/then&gt;
+        &lt;/filter&gt;
+        &lt;send/&gt;
+    &lt;/sequence&gt;
+
+&lt;/definitions&gt;</div>
+            <subsection name="Objective">
+                <p>
+                    Introduction to simple content based routing - Shows how a message could be
+                    made to pass through Synapse using the dumb client mode, where Synapse acts as
+                    a gateway to accept all messages and then perform mediation and routing based
+                    on message properties or content.
+                </p>
+            </subsection>
+            <subsection name="Pre-requisites">
+                <p>
+                    <ul>
+                        <li>
+                            Deploy the SimpleStockQuoteService in the sample Axis2 server and start Axis2
+                        </li>
+                        <li>
+                            Start Synapse using the configuration numbered 1 (repository/conf/sample/synapse_sample_1.xml)
+                            <div class="command">
+                                Unix/Linux: sh synapse.sh -sample 1<br/>
+                                Windows: synapse.bat -sample 1
+                            </div>
+                        </li>
+                    </ul>
+                </p>
+            </subsection>
+            <subsection name="Executing the Client">
+                <p>Execute the sample client in the dumb client mode using the following command.</p>
+                <div class="command">ant stockquote -Dtrpurl=http://localhost:8280/services/StockQuote</div>
+
+                <p>
+                    This time you will see Synapse receiving a message for which Synapse was set
+                    as the ultimate receiver. The filter mediator in the main sequence performs
+                    a regular expression match on the 'To' header (http://localhost:8280/services/StockQuote)
+                    to check whether it matches the expression ".*/StockQuote.*". Since the 'To' header
+                    matches this expression the child mediators of the filter mediator get executed.
+                    As a result, the message is sent to the Axis2 server. The drop mediator after
+                    the send mediator terminates the flow of the sequence. Axis2 server will print
+                    the following log when it receives the stock quote request from Synapse.
+                </p>
+                <div class="consoleOutput">Sat Nov 18 21:01:23 IST 2006 SimpleStockQuoteService :: Generating quote for : IBM</div>
+                <p>
+                    During response processing, the filter condition fails, and thus the child mediators
+                    of the filter are skipped. The 'send' mediator at the end of the sequence
+                    forwards the response back to the client using the implicit 'To' address.
+                    The client will print a message similar to the following when it receives the
+                    response.
+                </p>
+                <div class="consoleOutput">Standard :: Stock price = $95.26454380258552</div>
+            </subsection>
+        </section>
+        <p><a href="../samples.html">Back to Catalog</a></p>        
+    </body>
+</document>
\ No newline at end of file
diff --git a/src/site/xdoc/userguide/samples/sample10.xml b/src/site/xdoc/userguide/samples/sample10.xml
new file mode 100644
index 0000000..1448391
--- /dev/null
+++ b/src/site/xdoc/userguide/samples/sample10.xml
@@ -0,0 +1,98 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+  ~  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.
+  -->
+
+<document>
+    <properties>
+        <title>Apache Synapse - Sample 10</title>
+    </properties>
+    <body>
+        <section name="Sample 10: Introduction to Dynamic Endpoints with Registry">
+            <div class="xmlConf">&lt;definitions xmlns="http://ws.apache.org/ns/synapse"&gt;
+
+    &lt;registry provider="org.apache.synapse.registry.url.SimpleURLRegistry"&gt;
+        &lt;parameter name="root"&gt;file:repository/conf/sample/resources/&lt;/parameter&gt;
+        &lt;parameter name="cachableDuration"&gt;15000&lt;/parameter&gt;
+    &lt;/registry&gt;
+
+    &lt;sequence name="main"&gt;
+        &lt;in&gt;
+            &lt;send&gt;
+                &lt;endpoint key="endpoint/dynamic_endpt_1.xml"/&gt;
+            &lt;/send&gt;
+        &lt;/in&gt;
+        &lt;out&gt;
+            &lt;send/&gt;
+        &lt;/out&gt;
+    &lt;/sequence&gt;
+
+&lt;/definitions&gt;</div>
+            <subsection name="Objective">
+                <p>
+                    Demonstrating the ability to load endpoint definitions dynamically from the
+                    remote registry.
+                </p>
+            </subsection>
+            <subsection name="Pre-requisites">
+                <p>
+                    <ul>
+                        <li>
+                            Deploy the SimpleStockQuoteService in the sample Axis2 server and start Axis2
+                        </li>
+                        <li>
+                            Start another Axis2 server instance on different ports (use the following command)
+                            <div class="command" >
+                                Unix/Linux: sh axis2server.sh -http 9001 -https 9003<br/>
+                                Windows: axis2server.bat  -http 9001 -https 9003
+                            </div>
+                        </li>
+                        <li>
+                            Start Synapse using the configuration numbered 10 (repository/conf/sample/synapse_sample_10.xml)
+                            <div class="command">
+                                Unix/Linux: sh synapse.sh -sample 10<br/>
+                                Windows: synapse.bat -sample 10
+                            </div>
+                        </li>
+                    </ul>
+                </p>
+            </subsection>
+            <subsection name="Executing the Client">
+                <p>
+                    This example introduces dynamic endpoints, where the definition of the endpoint
+                    is stored in the registry. To follow this example execute the stock quote client
+                    as 'ant stockquote..' and see that the message is routed to the SimpleStockQuoteService
+                    on the default Axis2 instance on HTTP port 9000.
+                </p>
+                <div class="command">ant stockquote -Dtrpurl=http://localhost:8280/</div>
+                <p>
+                    Repeat the above command immediately again, and notice that the endpoint is
+                    cached and reused by Synapse - similarly to <a href="sample8.html">sample 8</a>.
+                </p>
+                <p>
+                    Now edit the repository/conf/sample/resources/endpoint/dynamic_endpt_1.xml file
+                    and update the address to 'http://localhost:9001/services/SimpleStockQuoteService'.
+                    After the cached value expires, the Registry loads the new definition of the
+                    endpoint, and then the messages are routed to the second sample Axis2 server on
+                    HTTP port 9001.
+                </p>
+            </subsection>
+        </section>
+        <p><a href="../samples.html">Back to Catalog</a></p>        
+    </body>
+</document>
\ No newline at end of file
diff --git a/src/site/xdoc/userguide/samples/sample100.xml b/src/site/xdoc/userguide/samples/sample100.xml
new file mode 100644
index 0000000..4532859
--- /dev/null
+++ b/src/site/xdoc/userguide/samples/sample100.xml
@@ -0,0 +1,139 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+  ~  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.
+  -->
+
+<document>
+    <properties>
+        <title>Apache Synapse - Sample 100</title>
+    </properties>
+    <body>
+        <section name="Sample 100: Using WS-Security for Outgoing Messages">
+            <div class="xmlConf">&lt;definitions xmlns="http://ws.apache.org/ns/synapse"&gt;
+
+    &lt;localEntry key="sec_policy" src="file:repository/conf/sample/resources/policy/policy_3.xml"/&gt;
+
+    &lt;sequence name="main"&gt;
+        &lt;in&gt;
+            &lt;send&gt;
+                &lt;endpoint name="secure"&gt;
+                    &lt;address uri="http://localhost:9000/services/SecureStockQuoteService"&gt;
+                        &lt;enableSec policy="sec_policy"/&gt;
+                    &lt;/address&gt;
+                &lt;/endpoint&gt;
+            &lt;/send&gt;
+        &lt;/in&gt;
+        &lt;out&gt;
+            &lt;send/&gt;
+        &lt;/out&gt;
+    &lt;/sequence&gt;
+
+&lt;/definitions&gt;</div>
+            <subsection name="Objective">
+                <p>
+                    Showcase the ability of Synapse to connect to secured endpoints using WS-Security
+                    standards
+                </p>
+            </subsection>
+            <subsection name="Pre-requisites">
+                <p>
+                    <ul>
+                        <li>
+                            Download and install the Java Cryptography Extension (JCE) unlimited
+                            strength policy files for your JDK
+                        </li>
+                        <li>
+                            Deploy the SecureStockQuoteService in the sample Axis2 server and start Axis2
+                        </li>
+                        <li>
+                            Start Synapse using the configuration numbered 100 (repository/conf/sample/synapse_sample_100.xml)
+                            <div class="command">
+                                Unix/Linux: sh synapse.sh -sample 100<br/>
+                                Windows: synapse.bat -sample 100
+                            </div>
+                        </li>
+                    </ul>
+                </p>
+            </subsection>
+            <subsection name="Executing the Client">
+                <p>
+                    Use the stock quote client to send a request without WS-Security. Synapse is
+                    configured to enable WS-Security as per the policy specified by 'policy_3.xml'
+                    for the outgoing messages to the SecureStockQuoteService endpoint.
+                    The debug log messages on Synapse shows the encrypted message flowing to the
+                    service and the encrypted response being received by Synapse. The wsse:Security
+                    header is then removed from the decrypted message and the response is delivered
+                    back to the client, as expected. You may execute the client as follows:
+                </p>
+                <div class="command">ant stockquote -Dtrpurl=http://localhost:8280/</div>
+                <p>
+                    The message sent by Synapse to the secure service can be seen as follows, when
+                    TCPMon is used.
+                </p>
+                <div class="consoleOutput">POST http://localhost:9001/services/SecureStockQuoteService HTTP/1.1
+Host: 127.0.0.1
+SOAPAction: urn:getQuote
+Content-Type: text/xml; charset=UTF-8
+Transfer-Encoding: chunked
+Connection: Keep-Alive
+User-Agent: Synapse-HttpComponents-NIO
+
+800
+&lt;?xml version='1.0' encoding='UTF-8'?&gt;
+&lt;soapenv:Envelope xmlns:xenc=&quot;http://www.w3.org/2001/04/xmlenc#&quot; xmlns:wsa=&quot;http://www.w3.org/2005/08/addressing&quot; ..&gt;
+  &lt;soapenv:Header&gt;
+     &lt;wsse:Security ..&gt;
+        &lt;wsu:Timestamp ..&gt;
+           ...
+        &lt;/wsu:Timestamp&gt;
+        &lt;xenc:EncryptedKey..&gt;
+           ...
+        &lt;/xenc:EncryptedKey&gt;
+        &lt;wsse:BinarySecurityToken ...&gt;
+           &lt;ds:SignedInfo&gt;
+           ...
+           &lt;/ds:SignedInfo&gt;
+           &lt;ds:SignatureValue&gt;
+           ...
+           &lt;/ds:SignatureValue&gt;
+           &lt;ds:KeyInfo Id=&quot;KeyId-29551621&quot;&gt;
+              ...
+           &lt;/ds:KeyInfo&gt;
+        &lt;/ds:Signature&gt;
+     &lt;/wsse:Security&gt;
+     &lt;wsa:To&gt;http://localhost:9001/services/SecureStockQuoteService&lt;/wsa:To&gt;
+     &lt;wsa:MessageID&gt;urn:uuid:1C4CE88B8A1A9C09D91177500753443&lt;/wsa:MessageID&gt;
+     &lt;wsa:Action&gt;urn:getQuote&lt;/wsa:Action&gt;
+  &lt;/soapenv:Header&gt;
+  &lt;soapenv:Body xmlns:wsu=&quot;http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd&quot; wsu:Id=&quot;Id-3789605&quot;&gt;
+     &lt;xenc:EncryptedData Id=&quot;EncDataId-3789605&quot; Type=&quot;http://www.w3.org/2001/04/xmlenc#Content&quot;&gt;
+        &lt;xenc:EncryptionMethod Algorithm=&quot;http://www.w3.org/2001/04/xmlenc#aes256-cbc&quot; /&gt;
+        &lt;xenc:CipherData&gt;
+            &lt;xenc:CipherValue&gt;Layg0xQcnH....6UKm5nKU6Qqr&lt;/xenc:CipherValue&gt;
+        &lt;/xenc:CipherData&gt;
+     &lt;/xenc:EncryptedData&gt;
+  &lt;/soapenv:Body&gt;
+&lt;/soapenv:Envelope&gt;0</div>
+                <p>
+                    Note the WS-Security headers and the encrypted payload added by Synapse.
+                </p>
+            </subsection>
+        </section>
+        <p><a href="../samples.html">Back to Catalog</a></p>        
+    </body>
+</document>
\ No newline at end of file
diff --git a/src/site/xdoc/userguide/samples/sample101.xml b/src/site/xdoc/userguide/samples/sample101.xml
new file mode 100644
index 0000000..ed43acc
--- /dev/null
+++ b/src/site/xdoc/userguide/samples/sample101.xml
@@ -0,0 +1,228 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+  ~  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.
+  -->
+
+<document>
+    <properties>
+        <title>Apache Synapse - Sample 101</title>
+    </properties>
+    <body>
+        <section name="Sample 101: Using WS-ReliableMessaging for Outgoing Messages">
+            <div class="xmlConf">&lt;definitions xmlns="http://ws.apache.org/ns/synapse"&gt;
+
+    &lt;sequence name="main"&gt;
+        &lt;in&gt;
+            &lt;RMSequence single="true" version="1.0"/&gt;
+            &lt;send&gt;
+                &lt;endpoint name="reliable"&gt;
+                    &lt;address uri="http://localhost:9000/services/ReliableStockQuoteService"&gt;
+                        &lt;enableRM/&gt;
+                        &lt;enableAddressing/&gt;
+                    &lt;/address&gt;
+                &lt;/endpoint&gt;
+            &lt;/send&gt;
+        &lt;/in&gt;
+        &lt;out&gt;
+            &lt;send/&gt;
+        &lt;/out&gt;
+    &lt;/sequence&gt;
+
+&lt;/definitions&gt;</div>
+            <subsection name="Objective">
+                <p>
+                    Demonstrate the ability of Synapse to exchange messages with an endpoint
+                    reliably, using WS-ReliableMessaging
+                </p>
+            </subsection>
+            <subsection name="Pre-requisites">
+                <p>
+                    <ul>
+                        <li>
+                            Deploy the ReliableStockQuoteService in the sample Axis2 server and start Axis2
+                        </li>
+                        <li>
+                            Start Synapse using the configuration numbered 101 (repository/conf/sample/synapse_sample_101.xml)
+                            <div class="command">
+                                Unix/Linux: sh synapse.sh -sample 101<br/>
+                                Windows: synapse.bat -sample 101
+                            </div>
+                        </li>
+                    </ul>
+                </p>
+            </subsection>
+            <subsection name="Executing the Client">
+                <p>
+                    In the above configuration, WS-RM is engaged on the endpoint using the
+                    &lt;enableRM/&gt; tag. It is possible to engage WS-RM to both Address and WSDL
+                    endpoints using this tag. In addition to the RM enabled endpoint, RMSequence
+                    mediator is specified before the send mediator. This mediator is used to specify
+                    the set of messages to be sent using a single RM sequence. In this sample it is
+                    specified as single message per sequence. It also specifies the version of the
+                    WS-RM to be used. Refer to the Synapse configuration language documentation for
+                    more information about the RMSequence mediator. RM related SOAP headers are
+                    removed form the message in the out mediator as WS-RM message exchange takes
+                    place only between the Synapse and the server. Now run the sample client using
+                    the following command.
+                </p>
+                <div class="command">ant stockquote -Dsymbol=IBM -Dmode=quote -Daddurl=http://localhost:8280</div>
+                <p>
+                    You can observe the client output displaying the quote price for IBM as follows:
+                </p>
+                <div class="consoleOutput">Standard :: Stock price = $95.26454380258552</div>
+                <p>
+                    There is no difference to be observed between the normal message exchange and
+                    WS-RM enabled message exchange as far as client and server outputs are considered.
+                    But if you look at the wire level messages, you would observe additional WS-RM
+                    messages and WS-RM headers. Synapse, the initiator of the RM sequence, first try
+                    to create a sequence by sending a message with CreateSequence element.
+                </p>
+                <div class="consoleOutput">...
+&lt;soapenv:Body&gt;
+   &lt;wsrm:CreateSequence xmlns:wsrm=&quot;http://schemas.xmlsoap.org/ws/2005/02/rm&quot;&gt;
+      &lt;wsrm:AcksTo&gt;
+         &lt;wsa:Address&gt;http://www.w3.org/2005/08/addressing/anonymous&lt;/wsa:Address&gt;
+      &lt;/wsrm:AcksTo&gt;
+      &lt;wsrm:Offer&gt;
+         &lt;wsrm:Identifier&gt;urn:uuid:546F6F33FB7D8BBE351179807372769&lt;/wsrm:Identifier&gt;
+      &lt;/wsrm:Offer&gt;
+   &lt;/wsrm:CreateSequence&gt;
+&lt;/soapenv:Body&gt;
+...</div>
+                <p>
+                    Sample Axis2 server responds to CreateSequence request with the following
+                    message:
+                </p>
+                <div class="consoleOutput">...
+&lt;soapenv:Body&gt;
+   &lt;wsrm:CreateSequenceResponse xmlns:wsrm=&quot;http://schemas.xmlsoap.org/ws/2005/02/rm&quot;&gt;
+      &lt;wsrm:Identifier&gt;urn:uuid:879853A6871A66641C1179807373270&lt;/wsrm:Identifier&gt;
+      &lt;wsrm:Accept&gt;
+         &lt;wsrm:AcksTo&gt;
+            &lt;wsa:Address&gt;http://localhost:9000/services/ReliableStockQuoteService&lt;/wsa:Address&gt;
+         &lt;/wsrm:AcksTo&gt;
+      &lt;/wsrm:Accept&gt;
+   &lt;/wsrm:CreateSequenceResponse&gt;
+&lt;/soapenv:Body&gt;
+...</div>
+                <p>
+                    Once the sequence is established, Synapse sends the request to the server with
+                    the pre-negotiated sequence ID.
+                </p>
+                <div class="consoleOutput">&lt;soapenv:Envelope xmlns:wsa=&quot;http://www.w3.org/2005/08/addressing&quot;
+                  xmlns:soapenv=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot;&gt;
+    &lt;soapenv:Header&gt;
+        &lt;wsa:To&gt;http://localhost:9000/services/ReliableStockQuoteService&lt;/wsa:To&gt;
+        &lt;wsa:MessageID&gt;urn:uuid:DB9A5257B637DDA38B1179807372560712002-1515891720&lt;/wsa:MessageID&gt;
+        &lt;wsa:Action&gt;urn:getQuote&lt;/wsa:Action&gt;
+        &lt;wsrm:Sequence xmlns:wsrm=&quot;http://schemas.xmlsoap.org/ws/2005/02/rm&quot;
+                       soapenv:mustUnderstand=&quot;1&quot;&gt;
+            &lt;wsrm:Identifier&gt;urn:uuid:879853A6871A66641C1179807373270&lt;/wsrm:Identifier&gt;
+            &lt;wsrm:MessageNumber&gt;1&lt;/wsrm:MessageNumber&gt;
+            &lt;wsrm:LastMessage/&gt;
+        &lt;/wsrm:Sequence&gt;
+    &lt;/soapenv:Header&gt;
+    &lt;soapenv:Body&gt;
+        &lt;m0:getQuote xmlns:m0=&quot;http://services.samples&quot;&gt;
+            &lt;m0:request&gt;
+                &lt;m0:symbol&gt;IBM&lt;/m0:symbol&gt;
+            &lt;/m0:request&gt;
+        &lt;/m0:getQuote&gt;
+    &lt;/soapenv:Body&gt;
+&lt;/soapenv:Envelope&gt;</div>
+                <p>
+                    Synapse keeps on sending the above message till the server responds with a valid
+                    response message with 200 OK HTTP header. If the server is not ready with a
+                    response, it will respond with 202 Accepted HTTP header for all requests. Once
+                    the server is ready with a response it will send the response message with
+                    sequence ID as follows.
+                </p>
+                <div class="consoleOutput">&lt;soapenv:Envelope xmlns:wsa=&quot;http://www.w3.org/2005/08/addressing&quot;
+                  xmlns:soapenv=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot;&gt;
+    &lt;soapenv:Header&gt;
+        &lt;wsa:MessageID&gt;urn:uuid:879853A6871A66641C1179807373804&lt;/wsa:MessageID&gt;
+        &lt;wsa:Action&gt;http://services.samples/ReliableStockQuoteServicePortType/getQuoteResponse
+        &lt;/wsa:Action&gt;
+        &lt;wsa:RelatesTo&gt;urn:uuid:DB9A5257B637DDA38B1179807372560712002-1515891720&lt;/wsa:RelatesTo&gt;
+        &lt;wsrm:Sequence xmlns:wsrm=&quot;http://schemas.xmlsoap.org/ws/2005/02/rm&quot;
+                       soapenv:mustUnderstand=&quot;1&quot;&gt;
+            &lt;wsrm:Identifier&gt;urn:uuid:546F6F33FB7D8BBE351179807372769&lt;/wsrm:Identifier&gt;
+            &lt;wsrm:MessageNumber&gt;1&lt;/wsrm:MessageNumber&gt;
+            &lt;wsrm:LastMessage/&gt;
+        &lt;/wsrm:Sequence&gt;
+        &lt;wsrm:SequenceAcknowledgement xmlns:wsrm=&quot;http://schemas.xmlsoap.org/ws/2005/02/rm&quot;
+                                      soapenv:mustUnderstand=&quot;1&quot;&gt;
+            &lt;wsrm:Identifier&gt;urn:uuid:879853A6871A66641C1179807373270&lt;/wsrm:Identifier&gt;
+            &lt;wsrm:AcknowledgementRange Lower=&quot;1&quot; Upper=&quot;1&quot;/&gt;
+        &lt;/wsrm:SequenceAcknowledgement&gt;
+    &lt;/soapenv:Header&gt;
+    &lt;soapenv:Body&gt;
+        &lt;ns:getQuoteResponse xmlns:ns=&quot;http://services.samples/xsd&quot;&gt;
+...</div>
+                <p>
+                    Now both Synapse and the server are done with the actual message exchange. Then
+                    Synapse sends a request to terminate the sequence as follows:
+                </p>
+                <div class="consoleOutput">&lt;soapenv:Envelope xmlns:wsa=&quot;http://www.w3.org/2005/08/addressing&quot;
+                  xmlns:soapenv=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot;&gt;
+    &lt;soapenv:Header&gt;
+        &lt;wsa:To&gt;http://localhost:9000/services/ReliableStockQuoteService&lt;/wsa:To&gt;
+        &lt;wsa:MessageID&gt;urn:uuid:546F6F33FB7D8BBE351179807379591&lt;/wsa:MessageID&gt;
+        &lt;wsa:Action&gt;http://schemas.xmlsoap.org/ws/2005/02/rm/TerminateSequence&lt;/wsa:Action&gt;
+        &lt;wsrm:SequenceAcknowledgement xmlns:wsrm=&quot;http://schemas.xmlsoap.org/ws/2005/02/rm&quot;
+                                      soapenv:mustUnderstand=&quot;1&quot;&gt;
+            &lt;wsrm:Identifier&gt;urn:uuid:546F6F33FB7D8BBE351179807372769&lt;/wsrm:Identifier&gt;
+            &lt;wsrm:AcknowledgementRange Lower=&quot;1&quot; Upper=&quot;1&quot;/&gt;
+        &lt;/wsrm:SequenceAcknowledgement&gt;
+    &lt;/soapenv:Header&gt;
+    &lt;soapenv:Body&gt;
+        &lt;wsrm:TerminateSequence xmlns:wsrm=&quot;http://schemas.xmlsoap.org/ws/2005/02/rm&quot;&gt;
+            &lt;wsrm:Identifier&gt;urn:uuid:879853A6871A66641C1179807373270&lt;/wsrm:Identifier&gt;
+        &lt;/wsrm:TerminateSequence&gt;
+    &lt;/soapenv:Body&gt;
+&lt;/soapenv:Envelope&gt;</div>
+                <p>
+                    Server responds to the sequence termination message, accepting to terminate the
+                    sequence as follows.
+                </p>
+                <div class="consoleOutput">&lt;soapenv:Envelope xmlns:wsa=&quot;http://www.w3.org/2005/08/addressing&quot;
+                  xmlns:soapenv=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot;&gt;
+    &lt;soapenv:Header&gt;
+        &lt;wsa:ReplyTo&gt;
+            &lt;wsa:Address&gt;http://localhost:9000/services/ReliableStockQuoteService&lt;/wsa:Address&gt;
+        &lt;/wsa:ReplyTo&gt;
+        &lt;wsa:MessageID&gt;urn:uuid:879853A6871A66641C1179807380190&lt;/wsa:MessageID&gt;
+        &lt;wsa:Action&gt;http://schemas.xmlsoap.org/ws/2005/02/rm/TerminateSequence&lt;/wsa:Action&gt;
+    &lt;/soapenv:Header&gt;
+    &lt;soapenv:Body&gt;
+        &lt;wsrm:TerminateSequence xmlns:wsrm=&quot;http://schemas.xmlsoap.org/ws/2005/02/rm&quot;&gt;
+            &lt;wsrm:Identifier&gt;urn:uuid:546F6F33FB7D8BBE351179807372769&lt;/wsrm:Identifier&gt;
+        &lt;/wsrm:TerminateSequence&gt;
+    &lt;/soapenv:Body&gt;
+&lt;/soapenv:Envelope&gt;</div>
+                <p>
+                    Note that although each of above messages are separate SOAP messages, in most
+                    cases they will be exchanged in a single socket connection as HTTP Keep-Alive
+                    header is being used.
+                </p>
+
+            </subsection>
+        </section>
+        <p><a href="../samples.html">Back to Catalog</a></p>        
+    </body>
+</document>
\ No newline at end of file
diff --git a/src/site/xdoc/userguide/samples/sample102.xml b/src/site/xdoc/userguide/samples/sample102.xml
new file mode 100644
index 0000000..686ff88
--- /dev/null
+++ b/src/site/xdoc/userguide/samples/sample102.xml
@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+  ~  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.
+  -->
+
+<document>
+    <properties>
+        <title>Apache Synapse - Sample 102</title>
+    </properties>
+    <body>
+        <section name="Sample 102:Reliable message exchange between Synapse and the back-end server using WS-ReliableMessaging 1.1 ">
+            <div class="xmlConf">&lt;definitions xmlns="http://ws.apache.org/ns/synapse"&gt;
+
+    &lt;sequence name="main"&gt;
+        &lt;in&gt;
+            &lt;RMSequence single="true" version="1.1"/&gt;
+            &lt;send&gt;
+                &lt;endpoint name="reliable"&gt;
+                    &lt;address uri="http://localhost:9000/services/ReliableStockQuoteService"&gt;
+                        &lt;enableRM/&gt;
+                        &lt;enableAddressing/&gt;
+                    &lt;/address&gt;
+                &lt;/endpoint&gt;
+            &lt;/send&gt;
+        &lt;/in&gt;
+        &lt;out&gt;
+            &lt;send/&gt;
+        &lt;/out&gt;
+    &lt;/sequence&gt;
+
+&lt;/definitions&gt;</div>
+            <subsection name="Objective">
+                <p>
+               	 	Demonstrate the message exchange between Synapse and the server using WS-ReliableMessaging (WS-RM) - 1.1
+			    </p>
+            </subsection>
+            <subsection name="Pre-requisites">
+                <p>
+                    <ul>
+                        <li>
+                            Deploy the SimpleStockQuoteService in the sample Axis2 server and start Axis2
+                        </li>
+                        <li>
+                            Start Synapse using the configuration numbered 102 (repository/conf/sample/synapse_sample_102.xml)
+                            <div class="command">
+                                Unix/Linux: sh synapse.sh -sample 102<br/>
+                                Windows: synapse.bat -sample 102
+                            </div>
+                        </li>
+                    </ul>
+                </p>
+            </subsection>
+            <subsection name="Executing the Client">
+             	<p>This sample is as same as the previous one except it uses WS-RM 1.1 version where as the previous sample is using the RM version 1.0</p>
+             </subsection>
+        </section>
+        <p><a href="../samples.html">Back to Catalog</a></p>        
+    </body>
+</document>
\ No newline at end of file
diff --git a/src/site/xdoc/userguide/samples/sample11.xml b/src/site/xdoc/userguide/samples/sample11.xml
new file mode 100644
index 0000000..28d1538
--- /dev/null
+++ b/src/site/xdoc/userguide/samples/sample11.xml
@@ -0,0 +1,90 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+  ~  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.
+  -->
+
+<document>
+    <properties>
+        <title>Apache Synapse - Sample 11</title>
+    </properties>
+    <body>
+        <section name="Sample 11: A Full Registry based Configuration, and Sharing Configuration Between Multiple Instances">
+            <div class="xmlConf">&lt;definitions xmlns="http://ws.apache.org/ns/synapse"&gt;
+
+    &lt;registry provider="org.apache.synapse.registry.url.SimpleURLRegistry"&gt;
+        &lt;parameter name="root"&gt;file:./repository/conf/sample/resources/&lt;/parameter&gt;
+        &lt;parameter name="cachableDuration"&gt;15000&lt;/parameter&gt;
+    &lt;/registry&gt;
+
+&lt;/definitions&gt;</div>
+            <subsection name="Objective">
+                <p>
+                    Demonstrating the ability of Synapse to load the entire configuration from
+                    a remote registry. This approach can also be used to share a single configuration
+                    between multiple Synapse instances by pointing all the Synapse instances to the
+                    same URL registry.
+                </p>
+            </subsection>
+            <subsection name="Pre-requisites">
+                <p>
+                    <ul>
+                        <li>
+                            Deploy the SimpleStockQuoteService in the sample Axis2 server and start Axis2
+                        </li>
+                        <li>
+                            Start Synapse using the configuration numbered 11 (repository/conf/sample/synapse_sample_11.xml)
+                            <div class="command">
+                                Unix/Linux: sh synapse.sh -sample 11<br/>
+                                Windows: synapse.bat -sample 11
+                            </div>
+                        </li>
+                    </ul>
+                </p>
+            </subsection>
+            <subsection name="Executing the Client">
+                <p>
+                    This example shows a full registry based Synapse configuration. This makes it
+                    possible to easily start multiple instances of Synapse sharing a single configuration
+                    in a clustered environment. The Synapse configuration of a given node hosting
+                    Synapse simply points to the registry and looks up the actual configuration by
+                    requesting the key 'synapse.xml'. 
+                </p>
+                <p>(Note: Full registry based configuration is not dynamic atleast for the moment -
+                    i.e. it is not reloading itself)</p>
+                <p>
+                    Invoke the client as follows.
+                </p>
+                <div class="command">ant stockquote -Daddurl=http://localhost:9000/services/SimpleStockQuoteService -Dtrpurl=http://localhost:8280/</div>
+                <p>
+                    Synapse will generate the following log output.
+                </p>
+                <div class="consoleOutput">[HttpServerWorker-1] INFO LogMediator - message = This is a dynamic Synapse configuration</div>
+                <p>The actual synapse.xml loaded from the registry is: </p>
+                <div class="xmlConf">&lt;!-- a registry based Synapse configuration --&gt;
+&lt;definitions xmlns=&quot;http://synapse.apache.org/ns/2010/04/configuraiton&quot;&gt;
+    &lt;log level=&quot;custom&quot;&gt;
+        &lt;property name=&quot;message&quot; value=&quot;This is a dynamic Synapse configuration $$$&quot;/&gt;
+    &lt;/log&gt;
+    &lt;send/&gt;
+&lt;/definitions&gt;</div>
+
+            </subsection>
+        </section>
+        <p><a href="../samples.html">Back to Catalog</a></p>        
+    </body>
+</document>
\ No newline at end of file
diff --git a/src/site/xdoc/userguide/samples/sample12.xml b/src/site/xdoc/userguide/samples/sample12.xml
new file mode 100644
index 0000000..b072a58
--- /dev/null
+++ b/src/site/xdoc/userguide/samples/sample12.xml
@@ -0,0 +1,92 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+  ~  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.
+  -->
+
+<document>
+    <properties>
+        <title>Apache Synapse - Sample 12</title>
+    </properties>
+    <body>
+        <section name="Sample 12: One-way Messaging / Fire-and-Forget Through Synapse">
+            <div class="xmlConf">&lt;definitions xmlns="http://ws.apache.org/ns/synapse"&gt;
+
+    &lt;sequence name="main"&gt;
+        &lt;!-- filtering of messages with XPath and regex matches --&gt;
+        &lt;filter source="get-property('To')" regex=".*/StockQuote.*"&gt;
+            &lt;then&gt;
+                &lt;send&gt;
+                    &lt;endpoint&gt;
+                        &lt;address uri="http://localhost:9000/services/SimpleStockQuoteService"/&gt;
+                    &lt;/endpoint&gt;
+                &lt;/send&gt;
+                &lt;drop/&gt;
+            &lt;/then&gt;
+        &lt;/filter&gt;
+        &lt;send/&gt;
+    &lt;/sequence&gt;
+
+&lt;/definitions&gt;</div>
+            <subsection name="Objective">
+                <p>
+                    Demonstrate the ability to perform one-way invocations (out-only) through
+                    Synapse.
+                </p>
+            </subsection>
+            <subsection name="Pre-requisites">
+                <p>
+                    <ul>
+                        <li>
+                            Deploy the SimpleStockQuoteService in the sample Axis2 server and start Axis2
+                        </li>
+                        <li>
+                            This sample makes use of the configuration used in <a href="sample1.html">sample 1</a>.
+                            So start Synapse using the configuration numbered 1 (repository/conf/sample/synapse_sample_1.xml)
+                            <div class="command">
+                                Unix/Linux: sh synapse.sh -sample 1<br/>
+                                Windows: synapse.bat -sample 1
+                            </div>
+                        </li>
+                    </ul>
+                </p>
+            </subsection>
+            <subsection name="Executing the Client">
+                <p>
+                    In this example we will invoke the one-way 'placeOrder' operation on the
+                    SimpleStockQuoteService using the sample client which uses the Axis2
+                    ServiceClient.fireAndForget() API. To send a placeOrder request from the sample
+                    client, execute the following command.
+                </p>
+                <div class="command">ant stockquote -Daddurl=http://localhost:9000/services/SimpleStockQuoteService -Dtrpurl=http://localhost:8280/ -Dmode=placeorder</div>
+
+                <p>
+                    Going through the Axis2 server logs, you will notice the following entry, which
+                    confirms that Axis2 accepted the in-only request.
+                </p>
+                <div class="consoleOutput">SimpleStockQuoteService :: Accepted order for : 7482 stocks of IBM at $ 169.27205579038733</div>
+
+                <p>
+                    If you send your client request through TCPmon, you will notice that the
+                    SimpleStockQuoteService replies to Synapse with a HTTP 202 reply, and that Synapse
+                    in turns replies to the client with a HTTP 202 acknowledgment.
+                </p>
+            </subsection>
+        </section>
+        <p><a href="../samples.html">Back to Catalog</a></p>        
+    </body>
+</document>
\ No newline at end of file
diff --git a/src/site/xdoc/userguide/samples/sample13.xml b/src/site/xdoc/userguide/samples/sample13.xml
new file mode 100644
index 0000000..b6725a2
--- /dev/null
+++ b/src/site/xdoc/userguide/samples/sample13.xml
@@ -0,0 +1,93 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+  ~  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.
+  -->
+
+<document>
+    <properties>
+        <title>Apache Synapse - Sample 13</title>
+    </properties>
+    <body>
+        <section name="Sample 13: Dual Channel Invocations Through Synapse">
+            <div class="xmlConf">&lt;definitions xmlns=&quot;http://ws.apache.org/ns/synapse&quot;&gt;
+
+    &lt;sequence name="main"&gt;
+        &lt;!-- log all attributes of messages passing through --&gt;
+        &lt;log level=&quot;full&quot;/&gt;
+
+        &lt;!-- Send the message to implicit destination --&gt;
+        &lt;send/&gt;
+    &lt;sequence/&gt;
+
+&lt;/definitions&gt;</div>
+            <subsection name="Objective">
+                <p>
+                    Demonstrate the ability to perform dual channel invocations through
+                    Synapse (asynchronous notification).
+                </p>
+            </subsection>
+            <subsection name="Pre-requisites">
+                <p>
+                    <ul>
+                        <li>
+                            Deploy the SimpleStockQuoteService in the sample Axis2 server and start Axis2
+                        </li>
+                        <li>
+                            This sample makes use of the configuration used in <a href="sample0.html">sample 0</a>.
+                            So start Synapse using the configuration numbered 0 (repository/conf/sample/synapse_sample_0.xml)
+                            <div class="command">
+                                Unix/Linux: sh synapse.sh -sample 0<br/>
+                                Windows: synapse.bat -sample 0
+                            </div>
+                        </li>
+                    </ul>
+                </p>
+            </subsection>
+            <subsection name="Executing the Client">
+                <p>
+                    Execute the client as follows.
+                </p>
+                <div class="command">ant stockquote -Daddurl=http://localhost:9000/services/SimpleStockQuoteService -Dtrpurl=http://localhost:8280/</div>
+                <p>
+                    This example invokes the same 'getQuote' operation on the SimpleStockQuoteService
+                    using the custom client which uses the Axis2 ServiceClient API with useSeparateListener
+                    set to 'true', so that the response is coming through a different channel than
+                    the one which is used to send the request. Note the following log thrown out
+                    by the sample client.
+                </p>
+                <div class="consoleOutput">Response received to the callback
+Standard dual channel :: Stock price = $57.16686934968289</div>
+                <p>
+                    If you send your client request through TCPmon, you will notice that Synapse replies
+                    to the client with a HTTP 202 acknowledgment when you send the request and the
+                    communication between Synapse and the server happens on a single channel and then
+                    you get the response back from Synapse to the client callback in a different channel
+                    (which cannot be observed through TCPmon).
+                </p>
+                <p>
+                    Also you could see the wsa:Reply-To header being something like
+                    http://localhost:8200/axis2/services/anonService2 which implies that the reply
+                    is gpoing on a different channel listening on the port 8200. Please note that it
+                    is required to engage addressing when using the dual channel invocation because
+                    it requires the wsa:Reply-To header.
+                </p>                
+            </subsection>
+        </section>
+        <p><a href="../samples.html">Back to Catalog</a></p>
+    </body>
+</document>
\ No newline at end of file
diff --git a/src/site/xdoc/userguide/samples/sample14.xml b/src/site/xdoc/userguide/samples/sample14.xml
new file mode 100644
index 0000000..920c851
--- /dev/null
+++ b/src/site/xdoc/userguide/samples/sample14.xml
@@ -0,0 +1,89 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!-- ~ 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. -->
+
+<document>
+	<properties>
+		<title>Apache Synapse - Sample 14</title>
+	</properties>
+	<body>
+		<section name="Sample 14: Sequences and Endpoints as local registry items">
+			<div class="xmlConf"><pre xml:space="preserve">&lt;definitions xmlns=&quot;http://ws.apache.org/ns/synapse&quot;
+             xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
+             xsi:schemaLocation=&quot;http://ws.apache.org/ns/synapse http://synapse.apache.org/ns/2010/04/configuration/synapse_config.xsd&quot;&gt;
+
+    &lt;localEntry key=&quot;local-enrty-ep-key&quot;
+                src=&quot;file:repository/conf/sample/resources/endpoint/dynamic_endpt_1.xml&quot;/&gt;
+
+    &lt;localEntry key=&quot;local-enrty-sequence-key&quot;&gt;
+        &lt;sequence name=&quot;dynamic_sequence&quot;&gt;
+            &lt;log level=&quot;custom&quot;&gt;
+                &lt;property name=&quot;message&quot; value=&quot;*** Test Message 1 ***&quot;/&gt;
+            &lt;/log&gt;
+        &lt;/sequence&gt;
+    &lt;/localEntry&gt;
+
+    &lt;sequence name=&quot;main&quot;&gt;
+        &lt;in&gt;
+            &lt;sequence key=&quot;local-enrty-sequence-key&quot;/&gt;
+            &lt;send&gt;
+                &lt;endpoint key=&quot;local-enrty-ep-key&quot;/&gt;
+            &lt;/send&gt;
+        &lt;/in&gt;
+        &lt;out&gt;
+            &lt;send/&gt;
+        &lt;/out&gt;
+    &lt;/sequence&gt;
+
+&lt;/definitions&gt;</pre></div>
+			<subsection name="Objective">
+				<p>
+					Objective: Sequence and Endpoints as local registry entries
+				</p>
+			</subsection>
+
+			<subsection name="Pre-requisites">
+				<p>
+					<ul>
+						<li>
+							Start the Synapse configuration numbered 14: i.e. synapse
+							-sample 14
+						</li>
+						<li>
+							Start the Axis2 server and deploy the SimpleStockQuoteService if
+							not already done
+						</li>
+					</ul>
+				</p>
+			</subsection>
+			<subsection name="Executing the Client">
+				<p>
+                    Execute the client as follows.
+                </p>
+                <div class="command">ant stockquote -Dtrpurl=http://localhost:8280/</div>
+             	<p>This example shows sequences and endpoints fetched from local
+				   registry. Thus it is possible to have endpoints sequences as
+				   local registry entries including file entries.Execute the
+				   following command to see the sample working, where you will be
+				   able to see the log statement from the fetched sequence from the
+				   local entry and the endpoint will be fetched from the specified
+				   file at runtime and be cached in the system
+				</p>
+                
+            </subsection>
+
+		</section>
+		<p>
+			<a href="../samples.html">Back to Catalog</a>
+		</p>
+	</body>
+</document>
\ No newline at end of file
diff --git a/src/site/xdoc/userguide/samples/sample150.xml b/src/site/xdoc/userguide/samples/sample150.xml
new file mode 100644
index 0000000..9037c91
--- /dev/null
+++ b/src/site/xdoc/userguide/samples/sample150.xml
@@ -0,0 +1,88 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+  ~  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.
+  -->
+
+<document>
+    <properties>
+        <title>Apache Synapse - Sample 150</title>
+    </properties>
+    <body>
+        <section name="Sample 150: Introduction to Proxy Services">
+            <div class="xmlConf">&lt;definitions xmlns="http://ws.apache.org/ns/synapse"&gt;
+
+    &lt;proxy name="StockQuoteProxy"&gt;
+        &lt;target&gt;
+            &lt;endpoint&gt;
+                &lt;address uri="http://localhost:9000/services/SimpleStockQuoteService"/&gt;
+            &lt;/endpoint&gt;
+            &lt;outSequence&gt;
+                &lt;send/&gt;
+            &lt;/outSequence&gt;
+        &lt;/target&gt;
+        &lt;publishWSDL uri="file:repository/conf/sample/resources/proxy/sample_proxy_1.wsdl"/&gt;
+    &lt;/proxy&gt;
+
+&lt;/definitions&gt;</div>
+            <subsection name="Objective">
+                <p>
+                    Introduce the concept of proxy services in Synapse
+                </p>
+            </subsection>
+            <subsection name="Pre-requisites">
+                <p>
+                    <ul>
+                        <li>
+                            Deploy the SimpleStockQuoteService in the sample Axis2 server and start Axis2
+                        </li>
+                        <li>
+                            Start Synapse using the configuration numbered 150 (repository/conf/sample/synapse_sample_150.xml)
+                            <div class="command">
+                                Unix/Linux: sh synapse.sh -sample 150<br/>
+                                Windows: synapse.bat -sample 150
+                            </div>
+                        </li>
+                    </ul>
+                </p>
+            </subsection>
+            <subsection name="Executing the Client">
+                <p>
+                    Execute the stock quote client as follows and invoke the proxy service:
+                </p>
+                <div class="command">ant stockquote -Daddurl=http://localhost:8280/services/StockQuoteProxy</div>
+
+                <p>
+                    The 'inSequence' or 'endpoint' or both of these would decide how the message
+                    would be handled after the proxy service receives the message. In the above
+                    example, the request received is forwarded to the sample service hosted on Axis2.
+                    The 'outSequence' defines how the response is handled before it is sent back to
+                    the client. By default, a proxy service is exposed over all transportss
+                    configured for Synapse, unless these are specifically mentioned through the
+                    'transports' attribute.
+                </p>
+                <p>
+                    You can also view the WSDL of the proxy service by launching a web browser and
+                    navigating to the following URL:
+                </p>
+                <div class="command">http://localhost:8280/services/StockQuoteProxy?wsdl</div>
+                
+            </subsection>
+        </section>
+        <p><a href="../samples.html">Back to Catalog</a></p>        
+    </body>
+</document>
\ No newline at end of file
diff --git a/src/site/xdoc/userguide/samples/sample151.xml b/src/site/xdoc/userguide/samples/sample151.xml
new file mode 100644
index 0000000..0c203d3
--- /dev/null
+++ b/src/site/xdoc/userguide/samples/sample151.xml
@@ -0,0 +1,98 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+  ~  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.
+  -->
+
+<document>
+    <properties>
+        <title>Apache Synapse - Sample 151</title>
+    </properties>
+    <body>
+        <section name="Sample 151: Custom Sequences and Endpoints with Proxy Services">
+            <div class="xmlConf">&lt;definitions xmlns="http://ws.apache.org/ns/synapse"&gt;
+
+    &lt;localEntry key="proxy_wsdl"
+                src="file:repository/conf/sample/resources/proxy/sample_proxy_1.wsdl"/&gt;
+
+    &lt;endpoint name="proxy_2_endpoint"&gt;
+        &lt;address uri="http://localhost:9000/services/SimpleStockQuoteService"/&gt;
+    &lt;/endpoint&gt;
+
+    &lt;sequence name="proxy_1"&gt;
+        &lt;send&gt;
+            &lt;endpoint&gt;
+                &lt;address uri="http://localhost:9000/services/SimpleStockQuoteService"/&gt;
+            &lt;/endpoint&gt;
+        &lt;/send&gt;
+    &lt;/sequence&gt;
+
+    &lt;sequence name="out"&gt;
+        &lt;send/&gt;
+    &lt;/sequence&gt;
+
+    &lt;proxy name="StockQuoteProxy1"&gt;
+        &lt;target inSequence="proxy_1" outSequence="out"/&gt;
+        &lt;publishWSDL key="proxy_wsdl"/&gt;
+    &lt;/proxy&gt;
+
+    &lt;proxy name="StockQuoteProxy2"&gt;
+        &lt;target endpoint="proxy_2_endpoint" outSequence="out"/&gt;
+        &lt;publishWSDL key="proxy_wsdl"/&gt;
+    &lt;/proxy&gt;
+
+&lt;/definitions&gt;</div>
+            <subsection name="Objective">
+                <p>
+                    Demonstrate how to use predefined endpoints and sequences in a proxy service
+                </p>
+            </subsection>
+            <subsection name="Pre-requisites">
+                <p>
+                    <ul>
+                        <li>
+                            Deploy the SimpleStockQuoteService in the sample Axis2 server and start Axis2
+                        </li>
+                        <li>
+                            Start Synapse using the configuration numbered 151 (repository/conf/sample/synapse_sample_151.xml)
+                            <div class="command">
+                                Unix/Linux: sh synapse.sh -sample 151<br/>
+                                Windows: synapse.bat -sample 151
+                            </div>
+                        </li>
+                    </ul>
+                </p>
+            </subsection>
+            <subsection name="Executing the Client">
+                <p>
+                    This configuration creates two proxy services. The first proxy service
+                    'StockQuoteProxy1' uses the sequence named 'proxy_1' to process incoming
+                    messages and the sequence named 'out' to process outgoing responses. The second
+                    proxy service, 'StockQuoteProxy2' is set to directly forward messages to the
+                    endpoint named 'proxy_2_endpoint' without any mediation.
+                </p>
+                <p>
+                    You can send a stock quote request to each of these proxy services and receive
+                    the reply generated by the actual service hosted on the Axis2 server instance.
+                </p>
+                <div class="command">ant stockquote -Daddurl=http://localhost:8280/services/StockQuoteProxy1
+<br/>ant stockquote -Daddurl=http://localhost:8280/services/StockQuoteProxy2</div>
+            </subsection>
+        </section>
+        <p><a href="../samples.html">Back to Catalog</a></p>        
+    </body>
+</document>
\ No newline at end of file
diff --git a/src/site/xdoc/userguide/samples/sample152.xml b/src/site/xdoc/userguide/samples/sample152.xml
new file mode 100644
index 0000000..4e62fc5
--- /dev/null
+++ b/src/site/xdoc/userguide/samples/sample152.xml
@@ -0,0 +1,132 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+  ~  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.
+  -->
+
+<document>
+    <properties>
+        <title>Apache Synapse - Sample 152</title>
+    </properties>
+    <body>
+        <section name="Sample 152: Switching Transports and Message Format from SOAP to REST/POX">
+            <div class="xmlConf">&lt;definitions xmlns="http://ws.apache.org/ns/synapse"&gt;
+
+    &lt;proxy name="StockQuoteProxy" transports="https"&gt;
+        &lt;target&gt;
+            &lt;endpoint&gt;
+                &lt;address uri="http://localhost:9000/services/SimpleStockQuoteService" format="pox"/&gt;
+            &lt;/endpoint&gt;
+            &lt;outSequence&gt;
+                &lt;send/&gt;
+            &lt;/outSequence&gt;
+        &lt;/target&gt;
+        &lt;publishWSDL uri="file:repository/conf/sample/resources/proxy/sample_proxy_1.wsdl"/&gt;
+    &lt;/proxy&gt;
+
+&lt;/definitions&gt;</div>
+            <subsection name="Objective">
+                <p>
+                    Demonstrate implementing simple transport switching and message format switching
+                    scenarios using proxy services
+                </p>
+            </subsection>
+            <subsection name="Pre-requisites">
+                <p>
+                    <ul>
+                        <li>
+                            Deploy the SimpleStockQuoteService in the sample Axis2 server and start Axis2
+                        </li>
+                        <li>
+                            Start Synapse using the configuration numbered 152 (repository/conf/sample/synapse_sample_152.xml)
+                            <div class="command">
+                                Unix/Linux: sh synapse.sh -sample 152<br/>
+                                Windows: synapse.bat -sample 152
+                            </div>
+                        </li>
+                    </ul>
+                </p>
+            </subsection>
+            <subsection name="Executing the Client">
+                <p>
+                    This configuration demonstrates how a proxy service can be exposed on a subset
+                    of available transports, and how it could switch from one transport to another.
+                    This example exposes the created proxy service only on HTTPS, and thus if the
+                    user tries to access it over HTTP, it would result in a fault.
+                </p>
+                <div class="consoleOutput">ant stockquote -Dtrpurl=http://localhost:8280/services/StockQuoteProxy
+...
+ [java] org.apache.axis2.AxisFault: The service cannot be found for the endpoint reference (EPR) /soap/StockQuoteProxy</div>
+
+                <p>
+                    Accessing this over HTTPS causes the proxy service to access the SimpleStockQuoteService
+                    on the sample Axis2 server using REST/POX.
+                </p>
+                <div class="command">ant stockquote -Dtrpurl=https://localhost:8243/services/StockQuoteProxy</div>
+
+                <p>
+                    TCPMon can be used to trace the actual REST/POX messages exchanged between Synapse
+                    and the sample Axis2 server. Synapse converts the POX response back to SOAP before
+                    sending it back to the client.
+                </p>
+                <div class="consoleOutput">POST /services/SimpleStockQuoteService HTTP/1.1
+Host: 127.0.0.1
+SOAPAction: urn:getQuote
+Content-Type: application/xml; charset=UTF-8;action=&quot;urn:getQuote&quot;;
+Transfer-Encoding: chunked
+Connection: Keep-Alive
+User-Agent: Synapse-HttpComponents-NIO
+
+75
+&lt;m0:getQuote xmlns:m0=&quot;http://services.samples&quot;&gt;
+   &lt;m0:request&gt;
+      &lt;m0:symbol&gt;IBM&lt;/m0:symbol&gt;
+   &lt;/m0:request&gt;
+&lt;/m0:getQuote&gt;</div>
+                
+                <div class="consoleOutput">HTTP/1.1 200 OK
+Content-Type: application/xml; charset=UTF-8;action=&quot;http://services.samples/SimpleStockQuoteServicePortType/getQuoteResponse&quot;;
+Date: Tue, 24 Apr 2007 14:42:11 GMT
+Server: Synapse-HttpComponents-NIO
+Transfer-Encoding: chunked
+Connection: Keep-Alive
+
+2b3
+&lt;ns:getQuoteResponse xmlns:ns=&quot;http://services.samples/xsd&quot;&gt;
+   &lt;ns:return&gt;
+      &lt;ns:change&gt;3.7730036841862384&lt;/ns:change&gt;
+      &lt;ns:earnings&gt;-9.950236235550818&lt;/ns:earnings&gt;
+      &lt;ns:high&gt;-80.23868444613285&lt;/ns:high&gt;
+      &lt;ns:last&gt;80.50750970812187&lt;/ns:last&gt;
+      &lt;ns:lastTradeTimestamp&gt;Tue Apr 24 20:42:11 LKT 2007&lt;/ns:lastTradeTimestamp&gt;
+      &lt;ns:low&gt;-79.67368355714606&lt;/ns:low&gt;
+      &lt;ns:marketCap&gt;4.502043663670823E7&lt;/ns:marketCap&gt;
+      &lt;ns:name&gt;IBM Company&lt;/ns:name&gt;
+      &lt;ns:open&gt;-80.02229531286982&lt;/ns:open&gt;
+      &lt;ns:peRatio&gt;25.089295161182022&lt;/ns:peRatio&gt;
+      &lt;ns:percentageChange&gt;4.28842665653824&lt;/ns:percentageChange&gt;
+      &lt;ns:prevClose&gt;87.98107059692451&lt;/ns:prevClose&gt;
+      &lt;ns:symbol&gt;IBM&lt;/ns:symbol&gt;
+      &lt;ns:volume&gt;19941&lt;/ns:volume&gt;
+   &lt;/ns:return&gt;
+&lt;/ns:getQuoteResponse&gt;</div>
+
+            </subsection>
+        </section>
+        <p><a href="../samples.html">Back to Catalog</a></p>        
+    </body>
+</document>
\ No newline at end of file
diff --git a/src/site/xdoc/userguide/samples/sample153.xml b/src/site/xdoc/userguide/samples/sample153.xml
new file mode 100644
index 0000000..cda798b
--- /dev/null
+++ b/src/site/xdoc/userguide/samples/sample153.xml
@@ -0,0 +1,104 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+  ~  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.
+  -->
+
+<document>
+    <properties>
+        <title>Apache Synapse - Sample 153</title>
+    </properties>
+    <body>
+        <section name="Sample 153: Routing the Messages without Processing the Security Headers">
+            <div class="xmlConf">&lt;definitions xmlns="http://ws.apache.org/ns/synapse"&gt;
+
+    &lt;proxy name="StockQuoteProxy"&gt;
+        &lt;target&gt;
+            &lt;inSequence&gt;
+                &lt;property name="preserveProcessedHeaders" value="true"/&gt;
+                &lt;send&gt;
+                    &lt;endpoint&gt;
+                        &lt;address uri="http://localhost:9000/services/SecureStockQuoteService"/&gt;
+                    &lt;/endpoint&gt;
+                &lt;/send&gt;
+            &lt;/inSequence&gt;
+            &lt;outSequence&gt;
+                &lt;send/&gt;
+            &lt;/outSequence&gt;
+        &lt;/target&gt;
+        &lt;publishWSDL uri="file:repository/conf/sample/resources/proxy/sample_proxy_1.wsdl"/&gt;
+    &lt;/proxy&gt;
+
+&lt;/definitions&gt;</div>
+            <subsection name="Objective">
+                <p>
+                    Demonstrate the ability of Synapse to pass SOAP messages through without removing
+                    already processed headers
+                </p>
+            </subsection>
+            <subsection name="Pre-requisites">
+                <p>
+                    <ul>
+                        <li>
+                            Download and install the Java Cryptography Extension (JCE) unlimited
+                            strength policy files for your JDK
+                        </li>
+                        <li>
+                            Deploy the SecureStockQuoteService in the sample Axis2 server and start Axis2
+                        </li>
+                        <li>
+                            Start Synapse using the configuration numbered 153 (repository/conf/sample/synapse_sample_153.xml)
+                            <div class="command">
+                                Unix/Linux: sh synapse.sh -sample 153<br/>
+                                Windows: synapse.bat -sample 153
+                            </div>
+                        </li>
+                    </ul>
+                </p>
+            </subsection>
+            <subsection name="Executing the Client">
+                <p>
+                    In this sample the proxy service will receive secured messages with security
+                    headers which are flagged 'MustUnderstand'. But since the element 'enableSec'
+                    is not present in the proxy configuration, Synapse will not engage Apache Rampart
+                    on this proxy service. It is expected that a MustUnderstand failure exception
+                    on the AxisEngine would occur before the message arrives at mediation engine.
+                    But Synapse handles this message and gets it through by setting all the
+                    MustUnderstand headers which are not processed as processed. This will enable
+                    Synapse to route the messages without reading the Security headers (just routing
+                    the messages from client to service, both of which are secured). To execute the 
+                    client, send a stock quote request to the proxy service, and sign and encrypt
+                    the request by specifying the client side security policy as follows:
+                </p>
+                <div class="command">ant stockquote -Dtrpurl=http://localhost:8280/services/StockQuoteProxy -Dpolicy=./../../repository/conf/sample/resources/policy/client_policy_3.xml</div>
+                <p>
+                    By following through the debug logs or TCPMon output, you can see that the
+                    request received by the proxy service was signed and encrypted. Also, looking
+                    up the WSDL of the proxy service by requesting the URL http://localhost:8280/services/StockQuoteProxy?wsdl
+                    reveals that the security policy attachments are not there and security is not engaged.
+                    When sending the message to the backend service, you can verify that the security 
+                    headers were there as in the original message to Synapse from client, and that
+                    the response received does use WS-Security, and forwarded back to the client
+                    without any modification. You should note that this won't be a security hole
+                    because the message inside Synapse is signed and encrypted and can only be
+                    forwarded to a secure service.
+                </p>
+            </subsection>
+        </section>
+        <p><a href="../samples.html">Back to Catalog</a></p>        
+    </body>
+</document>
\ No newline at end of file
diff --git a/src/site/xdoc/userguide/samples/sample154.xml b/src/site/xdoc/userguide/samples/sample154.xml
new file mode 100644
index 0000000..e03f89b
--- /dev/null
+++ b/src/site/xdoc/userguide/samples/sample154.xml
@@ -0,0 +1,135 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+  ~  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.
+  -->
+
+<document>
+    <properties>
+        <title>Apache Synapse - Sample 154</title>
+    </properties>
+    <body>
+        <section name="Sample 154: Load Balancing with Proxy Services">
+            <div class="xmlConf">&lt;definitions xmlns="http://ws.apache.org/ns/synapse"&gt;
+
+    &lt;proxy name="LBProxy" transports="http" startOnLoad="true"&gt;
+        &lt;target faultSequence="errorHandler"&gt;
+            &lt;inSequence&gt;
+                &lt;send&gt;
+                    &lt;endpoint&gt;
+                        &lt;session type="simpleClientSession"/&gt;
+                        &lt;loadbalance algorithm="org.apache.synapse.endpoints.algorithms.RoundRobin"&gt;
+                            &lt;endpoint&gt;
+                                &lt;address uri="http://localhost:9001/services/LBService1"&gt;
+                                    &lt;enableAddressing/&gt;
+                                    &lt;suspendDurationOnFailure&gt;20&lt;/suspendDurationOnFailure&gt;
+                                &lt;/address&gt;
+                            &lt;/endpoint&gt;
+                            &lt;endpoint&gt;
+                                &lt;address uri="http://localhost:9002/services/LBService1"&gt;
+                                    &lt;enableAddressing/&gt;
+                                    &lt;suspendDurationOnFailure&gt;20&lt;/suspendDurationOnFailure&gt;
+                                &lt;/address&gt;
+                            &lt;/endpoint&gt;
+                            &lt;endpoint&gt;
+                                &lt;address uri="http://localhost:9003/services/LBService1"&gt;
+                                    &lt;enableAddressing/&gt;
+                                    &lt;suspendDurationOnFailure&gt;20&lt;/suspendDurationOnFailure&gt;
+                                &lt;/address&gt;
+                            &lt;/endpoint&gt;
+                        &lt;/loadbalance&gt;
+                    &lt;/endpoint&gt;
+                &lt;/send&gt;
+                &lt;drop/&gt;
+            &lt;/inSequence&gt;
+            &lt;outSequence&gt;
+                &lt;send/&gt;
+            &lt;/outSequence&gt;
+        &lt;/target&gt;
+        &lt;publishWSDL uri="file:repository/conf/sample/resources/proxy/sample_proxy_2.wsdl"/&gt;
+    &lt;/proxy&gt;
+
+    &lt;sequence name="errorHandler"&gt;
+        &lt;makefault response="true"&gt;
+            &lt;code xmlns:tns="http://www.w3.org/2003/05/soap-envelope" value="tns:Receiver"/&gt;
+            &lt;reason value="COULDN'T SEND THE MESSAGE TO THE SERVER."/&gt;
+        &lt;/makefault&gt;
+        &lt;send/&gt;
+    &lt;/sequence&gt;
+
+&lt;/definitions&gt;</div>
+            <subsection name="Objective">
+                <p>
+                    Demonstrate how to use a proxy service as a load balancer
+                </p>
+            </subsection>
+            <subsection name="Pre-requisites">
+                <p>
+                    <ul>
+                        <li>
+                            Deploy the LoadbalanceFailoverService in the sample Axis2 server (go to
+                            samples/axis2Server/src/LoadbalanceFailoverService and run 'ant')
+                        </li>
+                        <li>
+                            Start 3 instances of the Axis2 server on different ports as follows
+                            <div class="command">./axis2server.sh -http 9001 -https 9005 -name MyServer1<br/>
+./axis2server.sh -http 9002 -https 9006 -name MyServer2<br/>
+./axis2server.sh -http 9003 -https 9007 -name MyServer3</div>
+                        </li>
+                        <li>
+                            Start Synapse using the configuration numbered 154 (repository/conf/sample/synapse_sample_154.xml)
+                            <div class="command">
+                                Unix/Linux: sh synapse.sh -sample 154<br/>
+                                Windows: synapse.bat -sample 154
+                            </div>
+                        </li>
+                    </ul>
+                </p>
+            </subsection>
+            <subsection name="Executing the Client">
+                <p>
+                    This sample is similar to <a href="sample54.html">sample 54</a>. The only
+                    notable difference is the use of a proxy service.
+                </p>
+                <p>
+                    Execute the client as follows.
+                </p>
+                <div class="command">ant loadbalancefailover -Dmode=session -Dtrpurl=http://localhost:8280/services/LBProxy</div>
+                <p>
+                    You will get an output similar to the following.
+                </p>
+                <div class="consoleOutput">[java] Request: 1 Session number: 1 Response from server: MyServer3
+[java] Request: 2 Session number: 2 Response from server: MyServer2
+[java] Request: 3 Session number: 0 Response from server: MyServer1
+[java] Request: 4 Session number: 2 Response from server: MyServer2
+[java] Request: 5 Session number: 1 Response from server: MyServer3
+[java] Request: 6 Session number: 2 Response from server: MyServer2
+[java] Request: 7 Session number: 2 Response from server: MyServer2
+[java] Request: 8 Session number: 1 Response from server: MyServer3
+[java] Request: 9 Session number: 0 Response from server: MyServer1
+[java] Request: 10 Session number: 0 Response from server: MyServer1
+... </div>
+                <p>
+                    You can see that session ID 0 is always directed to the server named MyServer1.
+                    That means session ID 0 is bound to MyServer1. Similarly session 1 and 2 are bound
+                    to MyServer3 and MyServer2 respectively.
+                </p>
+            </subsection>
+        </section>
+        <p><a href="../samples.html">Back to Catalog</a></p>        
+    </body>
+</document>
\ No newline at end of file
diff --git a/src/site/xdoc/userguide/samples/sample155.xml b/src/site/xdoc/userguide/samples/sample155.xml
new file mode 100644
index 0000000..ea58873
--- /dev/null
+++ b/src/site/xdoc/userguide/samples/sample155.xml
@@ -0,0 +1,97 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+  ~  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.
+  -->
+
+<document>
+    <properties>
+        <title>Apache Synapse - Sample 155</title>
+    </properties>
+    <body>
+        <section name="Sample 155: Dual Channel Invocation on Client Side and Server Side">
+            <div class="xmlConf">&lt;definitions xmlns="http://ws.apache.org/ns/synapse"&gt;
+
+    &lt;proxy name="StockQuoteProxy"&gt;
+        &lt;target&gt;
+            &lt;endpoint&gt;
+                &lt;address uri="http://localhost:9000/services/SimpleStockQuoteService"&gt;
+                    &lt;enableAddressing separateListener="true"/&gt;
+                &lt;/address&gt;
+            &lt;/endpoint&gt;
+            &lt;outSequence&gt;
+                &lt;send/&gt;
+            &lt;/outSequence&gt;
+        &lt;/target&gt;
+        &lt;publishWSDL uri="file:repository/conf/sample/resources/proxy/sample_proxy_1.wsdl"/&gt;
+    &lt;/proxy&gt;
+
+&lt;/definitions&gt;</div>
+            <subsection name="Objective">
+                <p>
+                    <a href="sample13.html">Sample 13</a> show cased how to perform dual channel
+                    invocations on the client side. This sample demonstrates how to perform dual
+                    channel invocations on both client side and server side, using proxy services.
+                </p>
+            </subsection>
+            <subsection name="Pre-requisites">
+                <p>
+                    <ul>
+                        <li>
+                            Deploy the SimpleStockQuoteService in the sample Axis2 server and start Axis2
+                        </li>
+                        <li>
+                            Start Synapse using the configuration numbered 155 (repository/conf/sample/synapse_sample_155.xml)
+                            <div class="command">
+                                Unix/Linux: sh synapse.sh -sample 155<br/>
+                                Windows: synapse.bat -sample 155
+                            </div>
+                        </li>
+                    </ul>
+                </p>
+            </subsection>
+            <subsection name="Executing the Client">
+                <p>
+                    This sample will show the action of the dual channel invocation between client
+                    and Synapse as well as between Synapse and the Axis2 server. Note that if you
+                    want to enable dual channel invocation you need to set the separateListener
+                    attribute to true on the enableAddressing element of the endpoint.
+                </p>
+                <p>
+                    Execute the stock quote client in the dual channel mode as follows:
+                </p>
+                <div class="command">ant stockquote -Daddurl=http://localhost:8280/services/StockQuoteProxy -Dmode=dualquote</div>
+                <p>
+                    In the above example, the request received is forwarded to the sample service
+                    hosted on Axis2 and the endpoint specifies to enable addressing and do the
+                    invocation in dual channel mode. If you observe the message flow using TCPmon,
+                    you will see that on the channel you send the request to Synapse, the response has 
+                    been written as HTTP 202 Accepted, where as the real response from Synapse
+                    comes over a different channel which cannot be obsesrved unless you use tcpdump
+                    to dump all the TCP level messages.
+                </p>
+                <p>
+                    At the same time you can observe the behaviour of the invocation between Synapse
+                    and the actual Axis2 service, where you can see a 202 Accepted message being
+                    delivered to Synapse as the response to the request. The actual response will be
+                    delivered to Synapse over a different channel.
+                </p>                
+            </subsection>
+        </section>
+        <p><a href="../samples.html">Back to Catalog</a></p>        
+    </body>
+</document>
\ No newline at end of file
diff --git a/src/site/xdoc/userguide/samples/sample156.xml b/src/site/xdoc/userguide/samples/sample156.xml
new file mode 100644
index 0000000..cc0efcf
--- /dev/null
+++ b/src/site/xdoc/userguide/samples/sample156.xml
@@ -0,0 +1,163 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+  ~  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.
+  -->
+
+<document>
+    <properties>
+        <title>Apache Synapse - Sample 156</title>
+    </properties>
+    <body>
+        <section name="Sample 156: Service Integration with Specifying the Receiving Sequence">
+            <div class="xmlConf">&lt;definitions xmlns=&quot;http://ws.apache.org/ns/synapse&quot;&gt;
+    &lt;localEntry key=&quot;sec_policy&quot; src=&quot;file:repository/conf/sample/resources/policy/policy_3.xml&quot;/&gt;
+    &lt;proxy name=&quot;StockQuoteProxy&quot;&gt;
+        &lt;target&gt;
+            &lt;inSequence&gt;
+                &lt;enrich&gt;
+                    &lt;source type=&quot;body&quot;/&gt;
+                    &lt;target type=&quot;property&quot; property=&quot;REQUEST&quot;/&gt;
+                &lt;/enrich&gt;
+
+                &lt;send receive=&quot;SimpleServiceSeq&quot;&gt;
+                    &lt;endpoint name=&quot;secure&quot;&gt;
+                        &lt;address uri=&quot;http://localhost:9000/services/SecureStockQuoteService&quot;&gt;
+                            &lt;enableSec policy=&quot;sec_policy&quot;/&gt;
+                        &lt;/address&gt;
+                    &lt;/endpoint&gt;
+                &lt;/send&gt;
+            &lt;/inSequence&gt;
+            &lt;outSequence&gt;
+                &lt;drop/&gt;
+            &lt;/outSequence&gt;
+        &lt;/target&gt;
+    &lt;/proxy&gt;
+
+    &lt;sequence name=&quot;SimpleServiceSeq&quot;&gt;
+        &lt;property name=&quot;SECURE_SER_AMT&quot; expression=&quot;//ns:getQuoteResponse/ns:return/ax21:last&quot;
+                  xmlns:ns=&quot;http://services.samples&quot; xmlns:ax21=&quot;http://services.samples/xsd&quot;/&gt;
+        &lt;log level=&quot;custom&quot;&gt;
+            &lt;property name=&quot;SecureStockQuoteService-Amount&quot; expression=&quot;get-property(&#39;SECURE_SER_AMT&#39;)&quot;/&gt;
+        &lt;/log&gt;
+        &lt;enrich&gt;
+            &lt;source type=&quot;body&quot;/&gt;
+            &lt;target type=&quot;property&quot; property=&quot;SecureService_Res&quot;/&gt;
+        &lt;/enrich&gt;
+        &lt;enrich&gt;
+            &lt;source type=&quot;property&quot; property=&quot;REQUEST&quot;/&gt;
+            &lt;target type=&quot;body&quot;/&gt;
+        &lt;/enrich&gt;
+        &lt;send receive=&quot;ClientOutSeq&quot;&gt;
+            &lt;endpoint name=&quot;SimpleStockQuoteService&quot;&gt;
+                &lt;address uri=&quot;http://localhost:9000/services/SimpleStockQuoteService&quot;/&gt;
+            &lt;/endpoint&gt;
+        &lt;/send&gt;
+    &lt;/sequence&gt;
+
+    &lt;sequence name=&quot;ClientOutSeq&quot;&gt;
+        &lt;property name=&quot;SIMPLE_SER_AMT&quot; expression=&quot;//ns:getQuoteResponse/ns:return/ax21:last&quot;
+                  xmlns:ns=&quot;http://services.samples&quot; xmlns:ax21=&quot;http://services.samples/xsd&quot;/&gt;
+        &lt;log level=&quot;custom&quot;&gt;
+            &lt;property name=&quot;SimpleStockQuoteService-Amount&quot; expression=&quot;get-property(&#39;SIMPLE_SER_AMT&#39;)&quot;/&gt;
+        &lt;/log&gt;
+        &lt;enrich&gt;
+            &lt;source type=&quot;body&quot;/&gt;
+            &lt;target type=&quot;property&quot; property=&quot;SimpleService_Res&quot;/&gt;
+        &lt;/enrich&gt;
+
+        &lt;filter xpath=&quot;fn:number(get-property(&#39;SIMPLE_SER_AMT&#39;)) &gt; fn:number(get-property(&#39;SECURE_SER_AMT&#39;))&quot;&gt;
+            &lt;then&gt;
+                &lt;log&gt;
+                    &lt;property name=&quot;StockQuote&quot; value=&quot;SecureStockQuoteService&quot;/&gt;
+                &lt;/log&gt;
+                &lt;enrich&gt;
+                    &lt;source type=&quot;property&quot; property=&quot;SecureService_Res&quot;/&gt;
+                    &lt;target type=&quot;body&quot;/&gt;
+                &lt;/enrich&gt;
+            &lt;/then&gt;
+            &lt;else&gt;
+                &lt;log&gt;
+                    &lt;property name=&quot;StockQuote&quot; value=&quot;SimpleStockQuoteService&quot;/&gt;
+                &lt;/log&gt;
+            &lt;/else&gt;
+        &lt;/filter&gt;
+        &lt;send/&gt;
+    &lt;/sequence&gt;
+&lt;/definitions&gt;</div>
+            <subsection name="Objective">
+                <p>
+                    Synapse is capable of mediating requests among multiple services and managing
+                    complex message flows thereby acting as a lightweight orchestration engine. This
+                    sample demonstrates how to easily integrate multiple services with Synapse using
+                    the 'receiving sequence' feature of Synapse.
+                </p>
+            </subsection>
+            <subsection name="Pre-requisites">
+                <p>
+                    <ul>
+                        <li>
+                            Deploy the SimpleStockQuoteService in the sample Axis2 server
+                        </li>
+                        <li>
+                            Deploy the SecureStockQuoteService in the sample Axis2 server and start Axis2
+                        </li>
+                        <li>
+                            Start Synapse using the configuration numbered 156 (repository/conf/sample/synapse_sample_156.xml)
+                            <div class="command">
+                                Unix/Linux: sh synapse.sh -sample 156<br/>
+                                Windows: synapse.bat -sample 156
+                            </div>
+                        </li>
+                    </ul>
+                </p>
+            </subsection>
+            <subsection name="Executing the Client">
+                <p>
+                    This sample includes a proxy service which first forwards the client request to
+                    the SecureStockQuoteService. Once a response has been received from this service,
+                    Synapse will turn around and invoke the SimpleStockQuoteService. To do this proxy
+                    service must hold on to the original request in memory. This is done using an
+                    enrich mediator. Once Synapse has received a response from the SimpleStockQuoteService
+                    it will compare the two responses received from the two services and select the
+                    one with the lower stock quote value. This response will be then sent to the
+                    client.
+                </p>
+                <p>
+                    The important feature to note here is the 'receive' attribute set on the 'send'
+                    mediators. This tells Synapse that responses of those send operations should be
+                    directed to the sequences referred by the 'receive' attribute. Therefore the
+                    response from the SecureStockQuoteService is directed to the sequence named
+                    'SimpleServiceSeq'. Similarly the response from the SimpleStockQuoteService will
+                    be handled by the sequence named 'ClientOutSeq'.
+                </p>
+                <p>
+                    To try this out, execute the stock quote client as follows:
+                </p>
+                <div class="command">ant stockquote -Daddurl=http://localhost:8280/services/StockQuoteProxy</div>
+                <p>
+                    You can confirm that Synapse invokes both services by going through the console
+                    output of the Axis2 server. However Axis2 client will receive only one response
+                    back. As far as  the client is concerned, only one HTTP transaction is taking place.
+                    But Synapse does multiple service invocations with the back-end to make the whole
+                    integration scenario tick.
+                </p>
+            </subsection>
+        </section>
+        <p><a href="../samples.html">Back to Catalog</a></p>
+    </body>
+</document>
\ No newline at end of file
diff --git a/src/site/xdoc/userguide/samples/sample157.xml b/src/site/xdoc/userguide/samples/sample157.xml
new file mode 100644
index 0000000..f3145d8
--- /dev/null
+++ b/src/site/xdoc/userguide/samples/sample157.xml
@@ -0,0 +1,173 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+  ~  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.
+  -->
+
+<document>
+    <properties>
+        <title>Apache Synapse - Sample 157</title>
+    </properties>
+    <body>
+        <section name="Sample 157: Conditional Router Mediator for Implementing Complex Routing Scenarios">
+            <div class="xmlConf">&lt;definitions xmlns=&quot;http://ws.apache.org/ns/synapse&quot;&gt;
+    &lt;proxy name=&quot;StockQuoteProxy&quot; transports=&quot;https http&quot; startOnLoad=&quot;true&quot; trace=&quot;disable&quot;&gt;
+        &lt;target&gt;
+            &lt;inSequence&gt;
+                &lt;conditionalRouter continueAfter=&quot;false&quot;&gt;
+                    &lt;conditionalRoute breakRoute=&quot;false&quot;&gt;
+                        &lt;condition&gt;
+                            &lt;match xmlns=&quot;&quot; type=&quot;header&quot; source=&quot;foo&quot; regex=&quot;bar.*&quot;/&gt;
+                        &lt;/condition&gt;
+                        &lt;target sequence=&quot;cnd1_seq&quot;/&gt;
+                    &lt;/conditionalRoute&gt;
+
+                    &lt;conditionalRoute breakRoute=&quot;false&quot;&gt;
+                        &lt;condition&gt;
+                            &lt;and xmlns=&quot;&quot;&gt;
+                                &lt;match type=&quot;header&quot; source=&quot;my_custom_header1&quot; regex=&quot;foo.*&quot;/&gt;
+                                &lt;match type=&quot;url&quot; regex=&quot;/services/StockQuoteProxy.*&quot;/&gt;
+                            &lt;/and&gt;
+                        &lt;/condition&gt;
+                        &lt;target sequence=&quot;cnd2_seq&quot;/&gt;
+                    &lt;/conditionalRoute&gt;
+
+                    &lt;conditionalRoute breakRoute=&quot;false&quot;&gt;
+                        &lt;condition&gt;
+                            &lt;and xmlns=&quot;&quot;&gt;
+                                &lt;match type=&quot;header&quot; source=&quot;my_custom_header2&quot; regex=&quot;bar.*&quot;/&gt;
+                                &lt;equal type=&quot;param&quot; source=&quot;qparam1&quot; value=&quot;qpv_foo&quot;/&gt;
+                                &lt;or&gt;
+                                    &lt;match type=&quot;url&quot; regex=&quot;/services/StockQuoteProxy.*&quot;/&gt;
+                                    &lt;match type=&quot;header&quot; source=&quot;my_custom_header3&quot; regex=&quot;foo.*&quot;/&gt;
+                                &lt;/or&gt;
+                                &lt;not&gt;
+                                    &lt;equal type=&quot;param&quot; source=&quot;qparam2&quot; value=&quot;qpv_bar&quot;/&gt;
+                                &lt;/not&gt;
+                            &lt;/and&gt;
+                        &lt;/condition&gt;
+                        &lt;target sequence=&quot;cnd3_seq&quot;/&gt;
+                    &lt;/conditionalRoute&gt;
+                &lt;/conditionalRouter&gt;
+            &lt;/inSequence&gt;
+            &lt;outSequence&gt;
+                &lt;send/&gt;
+            &lt;/outSequence&gt;
+        &lt;/target&gt;
+    &lt;/proxy&gt;
+
+    &lt;sequence name=&quot;cnd1_seq&quot;&gt;
+        &lt;log level=&quot;custom&quot;&gt;
+            &lt;property name=&quot;MSG_FLOW&quot; value=&quot;Condition (I) Satisfied&quot;/&gt;
+        &lt;/log&gt;
+        &lt;sequence key=&quot;send_seq&quot;/&gt;
+    &lt;/sequence&gt;
+    &lt;sequence name=&quot;cnd2_seq&quot;&gt;
+        &lt;log level=&quot;custom&quot;&gt;
+            &lt;property name=&quot;MSG_FLOW&quot; value=&quot;Condition (II) Satisfied&quot;/&gt;
+        &lt;/log&gt;
+        &lt;sequence key=&quot;send_seq&quot;/&gt;
+    &lt;/sequence&gt;
+    &lt;sequence name=&quot;cnd3_seq&quot;&gt;
+        &lt;log level=&quot;custom&quot;&gt;
+            &lt;property name=&quot;MSG_FLOW&quot; value=&quot;Condition (III) Satisfied&quot;/&gt;
+        &lt;/log&gt;
+        &lt;sequence key=&quot;send_seq&quot;/&gt;
+    &lt;/sequence&gt;
+
+    &lt;sequence name=&quot;send_seq&quot;&gt;
+        &lt;log level=&quot;custom&quot;&gt;
+            &lt;property name=&quot;DEBUG&quot; value=&quot;Condition Satisfied&quot;/&gt;
+        &lt;/log&gt;
+        &lt;send&gt;
+            &lt;endpoint name=&quot;simple&quot;&gt;
+                &lt;address uri=&quot;http://localhost:9000/services/SimpleStockQuoteService&quot;/&gt;
+            &lt;/endpoint&gt;
+        &lt;/send&gt;
+    &lt;/sequence&gt;
+&lt;/definitions&gt;</div>
+            <subsection name="Objective">
+                <p>
+                    Conditional router mediator can be used to implement complex routing rules in
+                    Synapse. It can route messages to various endpoints based on URLs, query parameters
+                    and transport headers. This sample demonstrates how to use the conditional router
+                    mediator within a proxy service to build a smart routing proxy.
+                </p>
+            </subsection>
+            <subsection name="Pre-requisites">
+                <p>
+                    <ul>
+                        <li>
+                            Deploy the SimpleStockQuoteService in the sample Axis2 server a d start
+                            Axis2 server.
+                        </li>
+                        <li>
+                            Start Synapse using the configuration numbered 157 (repository/conf/sample/synapse_sample_157.xml)
+                            <div class="command">
+                                Unix/Linux: sh synapse.sh -sample 157<br/>
+                                Windows: synapse.bat -sample 157
+                            </div>
+                        </li>
+                    </ul>
+                </p>
+            </subsection>
+            <subsection name="Executing the Client">
+                <p>
+                    We will be using 'curl' as the client in this scenario. <a href="http://curl.haxx.se/">Curl</a>
+                    is a neat little command line tool that can be used to generate various types
+                    of HTTP requests (among other things).
+                </p>
+                <p>
+                    First create a sample input file named stockQuoteReq.xml with the following
+                    content.
+                </p>
+                <div class="xmlConf">&lt;soap:Envelope xmlns:soap=&quot;http://www.w3.org/2003/05/soap-envelope&quot; xmlns:ser=&quot;http://services.samples&quot; xmlns:xsd=&quot;http://services.samples/xsd&quot;&gt;
+   &lt;soap:Header/&gt;
+   &lt;soap:Body&gt;
+      &lt;ser:getQuote&gt;
+         &lt;ser:request&gt;
+            &lt;xsd:symbol&gt;IBM&lt;/xsd:symbol&gt;
+         &lt;/ser:request&gt;
+      &lt;/ser:getQuote&gt;
+   &lt;/soap:Body&gt;
+&lt;/soap:Envelope&gt;</div>
+                <p>
+                    Invoke curl as follows to see header based routing feature in action.
+                </p>
+                <div class="command">curl -d @stockQuoteReq.xml -H "Content-Type: application/soap+xml;charset=UTF-8" -H "foo:bar" "http://localhost:8280/services/StockQuoteProxy"</div>
+                <p>
+                    This sends a HTTP request with a custom header named 'foo'. Proxy service will
+                    detect this header and print a custom log message confirming the receipt of the
+                    request.
+                </p>
+                <p>
+                    Now invoke curl as follows to test a combination header and URL based routing.
+                </p>
+                <div class="command">curl -d @stockQuoteReq.xml -H "Content-Type: application/soap+xml;charset=UTF-8" -H "my_custom_header1:foo1" "http://localhost:8280/services/StockQuoteProxy"</div>
+                <p>
+                    Finally invoke curl as follows to test routing based on complex conditions.
+                </p>
+                <div class="command">curl -d @stockQuoteReq.xml -H "Content-Type: application/soap+xml;charset=UTF-8" -H "my_custom_header2:bar" -H "my_custom_header3:foo" "http://localhost:8280/services/StockQuoteProxy?qparam1=qpv_foo&amp;qparam2=qpv_foo2"</div>
+                <p>
+                    In each case Synapse will log a different log entry because the conditional router
+                    mediator uses different sequences to process the three messages.
+                </p>
+            </subsection>
+        </section>
+        <p><a href="../samples.html">Back to Catalog</a></p>
+    </body>
+</document>
\ No newline at end of file
diff --git a/src/site/xdoc/userguide/samples/sample158.xml b/src/site/xdoc/userguide/samples/sample158.xml
new file mode 100644
index 0000000..2e1b360
--- /dev/null
+++ b/src/site/xdoc/userguide/samples/sample158.xml
@@ -0,0 +1,115 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+  ~  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.
+  -->
+
+<document>
+    <properties>
+        <title>Apache Synapse - Sample 158</title>
+    </properties>
+    <body>
+        <section name="Sample 156: Exposing a SOAP service over JSON">
+            <div class="xmlConf">&lt;definitions xmlns="http://ws.apache.org/ns/synapse"&gt;
+
+    &lt;proxy name="JSONProxy" transports="http https"&gt;
+        &lt;target&gt;
+            &lt;endpoint&gt;
+                &lt;address uri="http://localhost:9000/services/SimpleStockQuoteService"/&gt;
+            &lt;/endpoint&gt;
+            &lt;inSequence&gt;
+                &lt;log level="full"/&gt;
+                &lt;xslt key="in_transform"/&gt;
+                &lt;property name="messageType" scope="axis2" value="text/xml"/&gt;
+            &lt;/inSequence&gt;
+            &lt;outSequence&gt;
+                &lt;log level="full"/&gt;
+                &lt;xslt key="out_transform"/&gt;
+                &lt;property name="messageType" scope="axis2" value="application/json"/&gt;
+                &lt;send/&gt;
+            &lt;/outSequence&gt;
+        &lt;/target&gt;
+    &lt;/proxy&gt;
+
+    &lt;localEntry key="in_transform"&gt;
+        &lt;xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                        xmlns:fn="http://www.w3.org/2005/02/xpath-functions"
+                        xmlns:m0="http://services.samples" version="2.0" exclude-result-prefixes="m0 fn"&gt;
+            &lt;xsl:output method="xml" omit-xml-declaration="yes" indent="yes"/&gt;
+            &lt;xsl:template match="*"&gt;
+                &lt;xsl:element name="{local-name()}" namespace="http://services.samples"&gt;
+                    &lt;xsl:copy-of select="attribute::*"/&gt;
+                    &lt;xsl:apply-templates/&gt;
+                &lt;/xsl:element&gt;
+            &lt;/xsl:template&gt;
+        &lt;/xsl:stylesheet&gt;
+    &lt;/localEntry&gt;
+
+    &lt;localEntry key="out_transform"&gt;
+        &lt;xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"&gt;
+            &lt;xsl:output method="xml" version="1.0" encoding="UTF-8"/&gt;
+            &lt;xsl:template match="*"&gt;
+                &lt;xsl:element name="{local-name()}"&gt;
+                    &lt;xsl:apply-templates/&gt;
+                &lt;/xsl:element&gt;
+            &lt;/xsl:template&gt;
+        &lt;/xsl:stylesheet&gt;
+    &lt;/localEntry&gt;
+
+&lt;/definitions&gt;</div>
+            <subsection name="Objective">
+                <p>
+ 					Demonstrate the ability to switch between JSON and XML/SOAP content interchange formats
+                </p>
+            </subsection>
+            <subsection name="Pre-requisites">
+                <p>
+                    <ul>
+                        <li>
+                            Setup Synapse and the sample Axis2 client for JSON  (Refer  Synapse <a href="setup/script.html#json">Samples Setup Guide</a> for details)
+                        </li>
+                        <li>
+                            Deploy the SimpleStockQuoteService in the sample Axis2 server and start Axis2
+                        </li>
+                        <li>
+                            Start Synapse using the configuration numbered 158 (repository/conf/sample/synapse_sample_158.xml)
+                            <div class="command">
+                                Unix/Linux: sh synapse.sh -sample 158<br/>
+                                Windows: synapse.bat -sample 158
+                            </div>
+                        </li>
+                    </ul>
+                </p>
+            </subsection>
+            <subsection name="Executing the Client">
+                <div class="command">ant jsonclient -Daddurl=http://localhost:9000/services/SimpleStockQuoteService -Dtrpurl=http://localhost:8280/services/JSONProxy</div>
+ 				<p>JSON client will send a stockquote request to Synapse using the
+					JSON content interchange format. Synapse will trnasform it into a SOAP
+					request and forward to the Axis2 server. The SOAP response from the
+					Axis2 server will be converted into a JSON message and sent back to the
+					JSON client.</p>
+				<p>You may use a tool like TCPMon to monitor the JSON requests sent
+						over the wire. A sample JSON request and response is shown below:</p>
+
+                <div class="consoleOutput">{"getQuote":{"request":{"symbol":"IBM"}}}</div>
+
+                <div class="consoleOutput">{"getQuoteResponse":{"return":{"change":3.853593376681722,"earnings":12.802850763714854,"high":67.92488310190126,"last":66.14619264746406,"lastTradeTimestamp":"Mon Aug 23 16:48:40 IST 2010","low":-66.04000424423522,"marketCap":-9334516.42324327,"name":"IBM Company","open":-64.61950137150009,"peRatio":-19.78600441437058,"percentageChange":5.411779328273005,"prevClose":71.2075112994578,"symbol":"IBM","volume":16842}}}</div>
+            </subsection>
+        </section>
+        <p><a href="../samples.html">Back to Catalog</a></p>        
+    </body>
+</document>
\ No newline at end of file
diff --git a/src/site/xdoc/userguide/samples/sample2.xml b/src/site/xdoc/userguide/samples/sample2.xml
new file mode 100644
index 0000000..bf8d9c9
--- /dev/null
+++ b/src/site/xdoc/userguide/samples/sample2.xml
@@ -0,0 +1,104 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+  ~  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.
+  -->
+
+<document>
+    <properties>
+        <title>Apache Synapse - Sample 2</title>
+    </properties>
+    <body>
+        <section name="Sample 2: CBR with Switch Case Mediator">
+            <div class="xmlConf">&lt;definitions xmlns="http://ws.apache.org/ns/synapse"&gt;
+
+    &lt;sequence name="main"&gt;
+        &lt;switch source="//m0:getQuote/m0:request/m0:symbol" xmlns:m0="http://services.samples"&gt;
+            &lt;case regex="IBM"&gt;
+                &lt;!-- the property mediator sets a local property on the *current* message --&gt;
+                &lt;property name="symbol" value="Great stock - IBM"/&gt;
+            &lt;/case&gt;
+            &lt;case regex="MSFT"&gt;
+                &lt;property name="symbol" value="Are you sure? - MSFT"/&gt;
+            &lt;/case&gt;
+            &lt;default&gt;
+                &lt;!-- it is possible to assign the result of an XPath expression as well --&gt;
+                &lt;property name="symbol" expression="fn:concat('Normal Stock - ', //m0:getQuote/m0:request/m0:symbol)"/&gt;
+            &lt;/default&gt;
+        &lt;/switch&gt;
+        &lt;log level="custom"&gt;
+            &lt;!-- the get-property() XPath extension function allows the lookup of local message properties
+                        as well as properties from the Axis2 or Transport contexts (i.e. transport headers) --&gt;
+            &lt;property name="symbol" expression="get-property('symbol')"/&gt;
+            &lt;!-- the get-property() function supports the implicit message headers To/From/Action/FaultTo/ReplyTo --&gt;
+            &lt;property name="epr" expression="get-property('To')"/&gt;
+        &lt;/log&gt;
+        &lt;!-- Send the messages where they are destined to (i.e. the 'To' EPR of the message) --&gt;
+        &lt;send/&gt;
+    &lt;/sequence&gt;
+
+&lt;/definitions&gt;</div>
+            <subsection name="Objective">
+                <p>
+                    Introduction to the switch-case mediator and manipulating properties set on the
+                    messages.
+                </p>
+            </subsection>
+            <subsection name="Pre-requisites">
+                <p>
+                    <ul>
+                        <li>
+                            Deploy the SimpleStockQuoteService in the sample Axis2 server and start Axis2
+                        </li>
+                        <li>
+                            Start Synapse using the configuration numbered 2 (repository/conf/sample/synapse_sample_2.xml)
+                            <div class="command">
+                                Unix/Linux: sh synapse.sh -sample 2<br/>
+                                Windows: synapse.bat -sample 2
+                            </div>
+                        </li>
+                    </ul>
+                </p>
+            </subsection>
+            <subsection name="Executing the Client">
+                <p>
+                    Execute the sample Axis2 client in the smart client using different symbols
+                    such as IBM, MSFT and SUN.
+                </p>
+                <div class="command">ant stockquote -Daddurl=http://localhost:9000/services/SimpleStockQuoteService -Dtrpurl=http://localhost:8280/ -Dsymbol=IBM</div>
+                <div class="command">ant stockquote -Daddurl=http://localhost:9000/services/SimpleStockQuoteService -Dtrpurl=http://localhost:8280/ -Dsymbol=MSFT</div>
+                <div class="command">ant stockquote -Daddurl=http://localhost:9000/services/SimpleStockQuoteService -Dtrpurl=http://localhost:8280/ -Dsymbol=SUN</div>
+
+                <p>
+                    When the symbol IBM is requested, viewing the mediation logs you will see that
+                    the switch mediator's first case for 'IBM' is executed and a local property named
+                    'symbol' is set to 'Great stock - IBM'. Subsequently this local property value
+                    is looked up by the log mediator and logged using the 'get-property()' XPath
+                    extension function.
+                </p>
+                <div class="consoleOutput">INFO LogMediator - symbol = Great stock - IBM, epr = http://localhost:9000/axis2/services/SimpleStockQuoteService</div>
+
+                <p>
+                    Similarly for the symbol 'MSFT' the second case statement in the switch mediator
+                    will be executed which will result in the following log.
+                </p>
+                <div class="consoleOutput">INFO LogMediator - symbol = Are you sure? - MSFT, epr = http://localhost:9000/axis2/services/SimpleStockQuoteService</div>                
+            </subsection>
+        </section>
+        <p><a href="../samples.html">Back to Catalog</a></p>
+    </body>
+</document>
\ No newline at end of file
diff --git a/src/site/xdoc/userguide/samples/sample200.xml b/src/site/xdoc/userguide/samples/sample200.xml
new file mode 100644
index 0000000..c0c0c32
--- /dev/null
+++ b/src/site/xdoc/userguide/samples/sample200.xml
@@ -0,0 +1,102 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+  ~  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.
+  -->
+
+<document>
+    <properties>
+        <title>Apache Synapse - Sample 200</title>
+    </properties>
+    <body>
+        <section name="Sample 200: Engaging WS-Security on Proxy Services">
+            <div class="xmlConf">&lt;definitions xmlns="http://ws.apache.org/ns/synapse"&gt;
+
+    &lt;localEntry key="sec_policy" src="file:repository/conf/sample/resources/policy/policy_3.xml"/&gt;
+
+    &lt;proxy name="StockQuoteProxy"&gt;
+        &lt;target&gt;
+            &lt;inSequence&gt;
+                &lt;send&gt;
+                    &lt;endpoint&gt;
+                        &lt;address uri="http://localhost:9000/services/SimpleStockQuoteService"/&gt;
+                    &lt;/endpoint&gt;
+                &lt;/send&gt;
+            &lt;/inSequence&gt;
+            &lt;outSequence&gt;
+                &lt;send/&gt;
+            &lt;/outSequence&gt;
+        &lt;/target&gt;
+        &lt;publishWSDL uri="file:repository/conf/sample/resources/proxy/sample_proxy_1.wsdl"/&gt;
+        &lt;enableSec/&gt;
+        &lt;policy key="sec_policy"/&gt;
+    &lt;/proxy&gt;
+
+&lt;/definitions&gt;</div>
+            <subsection name="Objective">
+                <p>
+                    Demonstrates how to secure a proxy service using WS-Security and WS-Policy
+                    standards
+                </p>
+            </subsection>
+            <subsection name="Pre-requisites">
+                <p>
+                    <ul>
+                        <li>
+                            Download and install the Java Cryptography Extension (JCE) unlimited
+                            strength policy files for your JDK
+                        </li>
+                        <li>
+                            Deploy the SimpleStockQuoteService in the sample Axis2 server and start Axis2
+                        </li>
+                        <li>
+                            Start Synapse using the configuration numbered 200 (repository/conf/sample/synapse_sample_200.xml)
+                            <div class="command">
+                                Unix/Linux: sh synapse.sh -sample 200<br/>
+                                Windows: synapse.bat -sample 200
+                            </div>
+                        </li>
+                    </ul>
+                </p>
+            </subsection>
+            <subsection name="Executing the Client">
+                <p>
+                    The proxy service expects to receive a signed and encrypted message as specified
+                    by the security policy. Please see Apache Rampart and Axis2 documentation on the
+                    format of the policy file. The element 'enableSec' specifies that Apache Rampart
+                    should be engaged on this proxy service. Hence if Rampart rejects any request
+                    messages that does not conform to the specified policy, those messages will
+                    never reach the 'inSequence' to be processed. To execute the client, send a stock
+                    quote request to the proxy service, and sign and encrypt the request by specifying
+                    the client side security policy as follows:
+                </p>
+                <div class="command">ant stockquote -Dtrpurl=http://localhost:8280/services/StockQuoteProxy -Dpolicy=./../../repository/conf/sample/resources/policy/client_policy_3.xml</div>
+                <p>
+                    By following through the debug logs or TCPMon output, you can see that the
+                    request received by the proxy service is signed and encrypted. Also, looking up
+                    the WSDL of the proxy service by requesting the URL http://localhost:8280/services/StockQuoteProxy?wsdl
+                    reveals that the security policy is attached to the provided base WSDL. When
+                    sending the message to the backend service, you can verify that the security
+                    headers are removed. The response received from Axis2 does not use WS-Security,
+                    but the response forwarded back to the client is signed and encrypted as 
+                    expected by the client.
+                </p>
+            </subsection>
+        </section>
+        <p><a href="../samples.html">Back to Catalog</a></p>        
+    </body>
+</document>
\ No newline at end of file
diff --git a/src/site/xdoc/userguide/samples/sample201.xml b/src/site/xdoc/userguide/samples/sample201.xml
new file mode 100644
index 0000000..acd2ba6
--- /dev/null
+++ b/src/site/xdoc/userguide/samples/sample201.xml
@@ -0,0 +1,89 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+  ~  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.
+  -->
+
+<document>
+    <properties>
+        <title>Apache Synapse - Sample 201</title>
+    </properties>
+    <body>
+        <section name="Sample 201: Reliable Communication Between the Client and Proxy Services Using WS-ReliableMessaging">
+            <div class="xmlConf">&lt;definitions xmlns="http://ws.apache.org/ns/synapse"&gt;
+
+    &lt;proxy name="StockQuoteProxy"&gt;
+        &lt;target&gt;
+            &lt;inSequence&gt;
+                &lt;send&gt;
+                    &lt;endpoint&gt;
+                        &lt;address uri="http://localhost:9000/services/SimpleStockQuoteService"/&gt;
+                    &lt;/endpoint&gt;
+                &lt;/send&gt;
+            &lt;/inSequence&gt;
+            &lt;outSequence&gt;
+                &lt;send/&gt;
+            &lt;/outSequence&gt;
+        &lt;/target&gt;
+        &lt;publishWSDL uri="file:repository/conf/sample/resources/proxy/sample_proxy_1.wsdl"/&gt;
+        &lt;enableRM/&gt;
+    &lt;/proxy&gt;
+
+&lt;/definitions&gt;</div>
+            <subsection name="Objective">
+                <p>
+                    Show case how to engage WS-ReliableMessaging on proxy services so that the
+                    communication between client and the proxy service is reliable
+                </p>
+            </subsection>
+            <subsection name="Pre-requisites">
+                <p>
+                    <ul>
+                        <li>
+                            Deploy the SimpleStockQuoteService in the sample Axis2 server and start Axis2
+                        </li>
+                        <li>
+                            Start Synapse using the configuration numbered 201 (repository/conf/sample/synapse_sample_201.xml)
+                            <div class="command">
+                                Unix/Linux: sh synapse.sh -sample 201<br/>
+                                Windows: synapse.bat -sample 201
+                            </div>
+                        </li>
+                    </ul>
+                </p>
+            </subsection>
+            <subsection name="Executing the Client">
+                <p>
+                    In the above configuration, a proxy service is created with WS-RM enabled using
+                    the &lt;enableRM/&gt; tag. Therefore, this proxy service is capable of
+                    communicating with a WS-RM client. It also removes the WS-RM headers in the
+                    inSequence before the message is sent to the backend server. This is required as
+                    the reliable messaging is applicable only between the client and Synapse. Now
+                    start the client with WS-RM as follows:
+                </p>
+                <div class="command">ant stockquote -Dsymbol=IBM -Dmode=quote -Daddurl=http://localhost:8280/services/StockQuoteProxy -Dwsrm=true</div>
+                <p>
+                    In this case, client sends a WS-RM enabled request to Synapse where Synapse sends
+                    normal requests to the server. This can be observed by examining the wire level
+                    messages between the client and Synapse. These messages would be similar to the
+                    wire level messages shown in <a href="sample101.html">sample 101</a>.
+                </p>                
+            </subsection>
+        </section>
+        <p><a href="../samples.html">Back to Catalog</a></p>        
+    </body>
+</document>
\ No newline at end of file
diff --git a/src/site/xdoc/userguide/samples/sample202.xml b/src/site/xdoc/userguide/samples/sample202.xml
new file mode 100644
index 0000000..25376c7
--- /dev/null
+++ b/src/site/xdoc/userguide/samples/sample202.xml
@@ -0,0 +1,78 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+  ~  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.
+  -->
+
+<document>
+    <properties>
+        <title>Apache Synapse - Sample 202</title>
+    </properties>
+    <body>
+        <section name="Sample 202: ">
+            <div class="xmlConf">&lt;definitions xmlns="http://ws.apache.org/ns/synapse"&gt;
+
+    &lt;proxy name="StockQuoteProxy"&gt;
+        &lt;target&gt;
+            &lt;inSequence&gt;
+                &lt;send&gt;
+                    &lt;endpoint&gt;
+                        &lt;address uri="http://localhost:9000/services/SimpleStockQuoteService"/&gt;
+                    &lt;/endpoint&gt;
+                &lt;/send&gt;
+            &lt;/inSequence&gt;
+            &lt;outSequence&gt;
+                &lt;send/&gt;
+            &lt;/outSequence&gt;
+        &lt;/target&gt;
+        &lt;publishWSDL uri="file:repository/conf/sample/resources/proxy/sample_proxy_1.wsdl"/&gt;
+        &lt;enableRM/&gt;
+    &lt;/proxy&gt;
+
+&lt;/definitions&gt;</div>
+            <subsection name="Objective">
+                <p>
+
+                </p>
+            </subsection>
+            <subsection name="Pre-requisites">
+                <p>
+                    <ul>
+                        <li>
+                            Deploy the SimpleStockQuoteService in the sample Axis2 server and start Axis2
+                        </li>
+                        <li>
+                            Start Synapse using the configuration numbered 202 (repository/conf/sample/synapse_sample_202.xml)
+                            <div class="command">
+                                Unix/Linux: sh synapse.sh -sample 202<br/>
+                                Windows: synapse.bat -sample 202
+                            </div>
+                        </li>
+                    </ul>
+                </p>
+            </subsection>
+            <subsection name="Executing the Client">
+                <div class="command">ant stockquote -Daddurl=http://localhost:9000/services/SimpleStockQuoteService -Dtrpurl=http://localhost:8280/</div>
+
+                <div class="consoleOutput">Sat Nov 18 21:01:23 IST 2006 SimpleStockQuoteService :: Generating quote for : IBM</div>
+
+                <div class="consoleOutput">Standard :: Stock price = $95.26454380258552</div>
+            </subsection>
+        </section>
+        <p><a href="../samples.html">Back to Catalog</a></p>        
+    </body>
+</document>
\ No newline at end of file
diff --git a/src/site/xdoc/userguide/samples/sample250.xml b/src/site/xdoc/userguide/samples/sample250.xml
new file mode 100644
index 0000000..1039433
--- /dev/null
+++ b/src/site/xdoc/userguide/samples/sample250.xml
@@ -0,0 +1,133 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+  ~  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.
+  -->
+
+<document>
+    <properties>
+        <title>Apache Synapse - Sample 250</title>
+    </properties>
+    <body>
+        <section name="Sample 250:Introduction to Transport Switching - JMS to HTTP/S ">
+            <div class="xmlConf">&lt;definitions xmlns="http://ws.apache.org/ns/synapse"&gt;
+
+    &lt;proxy name="StockQuoteProxy" transports="jms"&gt;
+        &lt;target&gt;
+            &lt;inSequence&gt;
+                &lt;property action="set" name="OUT_ONLY" value="true"/&gt;
+            &lt;/inSequence&gt;
+            &lt;endpoint&gt;
+                &lt;address uri="http://localhost:9000/services/SimpleStockQuoteService"/&gt;
+            &lt;/endpoint&gt;
+            &lt;outSequence&gt;
+                &lt;send/&gt;
+            &lt;/outSequence&gt;
+        &lt;/target&gt;
+        &lt;publishWSDL uri="file:repository/conf/sample/resources/proxy/sample_proxy_1.wsdl"/&gt;
+        &lt;parameter name="transport.jms.ContentType"&gt;
+            &lt;rules&gt;
+                &lt;jmsProperty&gt;contentType&lt;/jmsProperty&gt;
+                &lt;default&gt;application/xml&lt;/default&gt;
+            &lt;/rules&gt;
+        &lt;/parameter&gt;
+    &lt;/proxy&gt;
+
+&lt;/definitions&gt;</div>
+            <subsection name="Objective">
+                <p>
+                    Demonstrate the ability of Synapse to perform transport switching (i.e. receiving
+                    messages over one transport and forwarding them over a different transport)
+                </p>
+            </subsection>
+            <subsection name="Pre-requisites">
+                <p>
+                    <ul>
+                        <li>
+                            Deploy the SimpleStockQuoteService in the sample Axis2 server and start Axis2
+                        </li>
+                        <li>
+                            Setup and start a JMS broker (Apache ActiveMQ can be used as the
+                            JMS broker for this scenario. Refer <a href="setup/jms.html#pre">JMS setup guide</a>
+                            for information on how to run ActiveMQ.)
+                        </li>
+                        <li>
+                            Enable the JMS transport receiver of Synapse (Refer
+                            <a href="setup/jms.html#listener">JMS setup guide</a> for more details)
+                        </li>
+                        <li>
+                            Start Synapse using the configuration numbered 250 (repository/conf/sample/synapse_sample_250.xml)
+                            <div class="command">
+                                Unix/Linux: sh synapse.sh -sample 250<br/>
+                                Windows: synapse.bat -sample 250
+                            </div>
+                        </li>
+                    </ul>
+                </p>
+            </subsection>
+            <subsection name="Executing the Client">
+                <p>
+                    In this sample we are using a proxy service exposed over JMS (note the transports=jms
+                    attribute). If you check the WSDL of the proxy service using a web browser you
+                    will notice that it only has JMS endpoints.
+                </p>
+                <p>
+                    Run the sample JMS client by switching to the samples/axis2Client directory and
+                    executing the following command.
+                </p>
+                <div class="command">ant jmsclient -Djms_type=pox -Djms_dest=dynamicQueues/StockQuoteProxy -Djms_payload=MSFT</div>
+                <p>
+                    This will send a plain XML formatted place order request to a JMS queue named
+                    'StockQuoteProxy'. Synapse will be polling on this queue for any incoming messages
+                    so it will pick up the request. If you run Synapse in the DEBUG mode, following
+                    entry will be printed on the console.
+                </p>
+                <div class="consoleOutput">[JMSWorker-1] DEBUG ProxyServiceMessageReceiver -Proxy Service StockQuoteProxy received a new message...</div>
+                <p>
+                    Then Synapse will mediate the request through the service bus and forward it to
+                    the sample Axis2 server over HTTP. Axis2 server will print the following entry
+                    on the console when it receives the request.
+                </p>
+                <div class="consoleOutput">Accepted order for : 16517 stocks of MSFT at $ 169.14622538721846</div>
+                <p>
+                    Note that the operation is out-only and no response is sent back to the client. 
+                    The transport.jms.ContentType property is necessary to allow the JMS transport
+                    to determine the content type of incoming messages. With the given configuration
+                    it will first try to read the content type from the 'contentType' message property
+                    and fall back to 'application/xml' (i.e. POX) if this property is not set. Note
+                    that the JMS client used in this example doesn't send any content type
+                    information.
+                </p>
+                <p>
+                    It is also important to note that the name of the source JMS queue is same as the
+                    name of the proxy service (StockQuoteProxy). This is the default behavior of
+                    Synapse. Each proxy service by default listens on a JMS queue which has the same
+                    name as the service. It is possible to instruct a JMS proxy service to listen to
+                    an already existing destination without creating a new one. To do this, use the
+                    parameter elements on the proxy service definition to specify the destination
+                    and connection factory information. An example is given below.
+                </p>
+                <div class="xmlConf">&lt;parameter name=&quot;transport.jms.Destination&quot;&gt;dynamicTopics/something.TestTopic&lt;/parameter&gt;</div>
+                <p>
+                    With the above parameter in the proxy configuration, proxy service will listen
+                    on a JMS topic named 'something.TestTopic' for incoming requests.
+                </p>
+            </subsection>
+        </section>
+        <p><a href="../samples.html">Back to Catalog</a></p>        
+    </body>
+</document>
\ No newline at end of file
diff --git a/src/site/xdoc/userguide/samples/sample251.xml b/src/site/xdoc/userguide/samples/sample251.xml
new file mode 100644
index 0000000..fc0f0d9
--- /dev/null
+++ b/src/site/xdoc/userguide/samples/sample251.xml
@@ -0,0 +1,101 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+  ~  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.
+  -->
+
+<document>
+    <properties>
+        <title>Apache Synapse - Sample 251</title>
+    </properties>
+    <body>
+        <section name="Sample 251: Switching from HTTP/S to JMS">
+            <div class="xmlConf">&lt;definitions xmlns="http://ws.apache.org/ns/synapse"&gt;
+
+    &lt;proxy name="StockQuoteProxy" transports="http"&gt;
+        &lt;target&gt;
+            &lt;endpoint&gt;
+                &lt;address
+                        uri="jms:/SimpleStockQuoteService?transport.jms.ConnectionFactoryJNDIName=QueueConnectionFactory&amp;java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory&amp;java.naming.provider.url=tcp://localhost:61616&amp;transport.jms.DestinationType=queue"/&gt;
+            &lt;/endpoint&gt;
+            &lt;inSequence&gt;
+                &lt;property action="set" name="OUT_ONLY" value="true"/&gt;
+            &lt;/inSequence&gt;
+            &lt;outSequence&gt;
+                &lt;send/&gt;
+            &lt;/outSequence&gt;
+        &lt;/target&gt;
+        &lt;publishWSDL uri="file:repository/conf/sample/resources/proxy/sample_proxy_1.wsdl"/&gt;
+    &lt;/proxy&gt;
+
+&lt;/definitions&gt;</div>
+            <subsection name="Objective">
+                <p>
+                    This sample demonstrates receiving messages over HTTP/S and forwarding them to
+                    a JMS queue
+                </p>
+            </subsection>
+            <subsection name="Pre-requisites">
+                <p>
+                    <ul>
+                        <li>
+                            Setup and start a JMS broker (Apache ActiveMQ can be used as the
+                            JMS broker for this scenario. Refer <a href="setup/jms.html#pre">JMS setup guide</a>
+                            for information on how to run ActiveMQ.)
+                        </li>
+                        <li>
+                            Enable the JMS transport receiver of the sample Axis2 server (Refer
+                            <a href="setup/jms.html#server">JMS setup guide</a> for details)
+                        </li>
+                        <li>
+                            Deploy the SimpleStockQuoteService in the sample Axis2 server and start Axis2 (Since
+                            the JMS receiver is enabled, Axis2 will start polling on a JMS queue)
+                        </li>
+                        <li>
+                            Start Synapse using the configuration numbered 251 (repository/conf/sample/synapse_sample_251.xml)
+                            <div class="command">
+                                Unix/Linux: sh synapse.sh -sample 251<br/>
+                                Windows: synapse.bat -sample 251
+                            </div>
+                        </li>
+                    </ul>
+                </p>
+            </subsection>
+            <subsection name="Executing the Client">
+                <p>
+                    This Synapse configuration creates a proxy service over HTTP and forwards
+                    received messages to a JMS queue. To test this functionality, send a place order
+                    request to Synapse over HTTP as follows.
+                </p>
+                <div class="command">ant stockquote -Daddurl=http://localhost:8280/services/StockQuoteProxy -Dmode=placeorder -Dsymbol=MSFT</div>
+                <p>
+                    Note that the target endpoint of the proxy service points to a JMS queue in the
+                    ActiveMQ broker.
+                </p>
+                <div class="consoleOutput">jms:/SimpleStockQuoteService?transport.jms.ConnectionFactoryJNDIName=
+QueueConnectionFactory&amp;java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory&amp;
+java.naming.provider.url=tcp://localhost:61616</div>
+                <p>
+                    The sample Axis2 server will pick up the message from the JMS queue and print the
+                    following log entry.
+                </p>
+                <div class="consoleOutput">Accepted order for : 18406 stocks of MSFT at $ 83.58806051152119</div>
+            </subsection>
+        </section>
+        <p><a href="../samples.html">Back to Catalog</a></p>        
+    </body>
+</document>
\ No newline at end of file
diff --git a/src/site/xdoc/userguide/samples/sample252.xml b/src/site/xdoc/userguide/samples/sample252.xml
new file mode 100644
index 0000000..c0bbc33
--- /dev/null
+++ b/src/site/xdoc/userguide/samples/sample252.xml
@@ -0,0 +1,243 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+  ~  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.
+  -->
+
+<document>
+    <properties>
+        <title>Apache Synapse - Sample 252</title>
+    </properties>
+    <body>
+        <section name="Sample 252: Pure Text, Binary and POX Message Support with JMS">
+            <div class="xmlConf">&lt;definitions xmlns="http://ws.apache.org/ns/synapse"&gt;
+
+    &lt;sequence name="text_proxy"&gt;
+        &lt;log level="full"/&gt;
+        &lt;header name="Action" value="urn:placeOrder"/&gt;
+        &lt;script language="js"&gt;
+            var args = mc.getPayloadXML().toString().split(" ");
+            mc.setPayloadXML(
+            &lt;placeOrder xmlns="http://services.samples"&gt;
+            &lt;order xmlns="http://services.samples/xsd"&gt;
+            &lt;price&gt;{args[0]}&lt;/price&gt;
+            &lt;quantity&gt;{args[1]}&lt;/quantity&gt;
+            &lt;symbol&gt;{args[2]}&lt;/symbol&gt;
+            &lt;/order&gt;
+            &lt;/placeOrder&gt;);
+        &lt;/script&gt;
+        &lt;property action="set" name="OUT_ONLY" value="true"/&gt;
+        &lt;log level="full"/&gt;
+        &lt;send&gt;
+            &lt;endpoint&gt;
+                &lt;address uri="http://localhost:9000/services/SimpleStockQuoteService"/&gt;
+            &lt;/endpoint&gt;
+        &lt;/send&gt;
+    &lt;/sequence&gt;
+
+    &lt;sequence name="mtom_proxy"&gt;
+        &lt;log level="full"/&gt;
+        &lt;property action="set" name="OUT_ONLY" value="true"/&gt;
+        &lt;header name="Action" value="urn:oneWayUploadUsingMTOM"/&gt;
+        &lt;send&gt;
+            &lt;endpoint&gt;
+                &lt;address uri="http://localhost:9000/services/MTOMSwASampleService" optimize="mtom"/&gt;
+            &lt;/endpoint&gt;
+        &lt;/send&gt;
+    &lt;/sequence&gt;
+
+    &lt;sequence name="pox_proxy"&gt;
+        &lt;property action="set" name="OUT_ONLY" value="true"/&gt;
+        &lt;header name="Action" value="urn:placeOrder"/&gt;
+        &lt;send&gt;
+            &lt;endpoint&gt;
+                &lt;address uri="http://localhost:9000/services/SimpleStockQuoteService"
+                         format="soap11"/&gt;
+            &lt;/endpoint&gt;
+        &lt;/send&gt;
+    &lt;/sequence&gt;
+
+    &lt;sequence name="out"&gt;
+        &lt;send/&gt;
+    &lt;/sequence&gt;
+
+    &lt;proxy name="JMSFileUploadProxy" transports="jms"&gt;
+        &lt;target inSequence="mtom_proxy" outSequence="out"/&gt;
+        &lt;parameter name="transport.jms.ContentType"&gt;
+            &lt;rules&gt;
+                &lt;bytesMessage&gt;application/octet-stream&lt;/bytesMessage&gt;
+            &lt;/rules&gt;
+        &lt;/parameter&gt;
+        &lt;parameter name="Wrapper"&gt;{http://services.samples/xsd}element&lt;/parameter&gt;
+    &lt;/proxy&gt;
+
+    &lt;proxy name="JMSTextProxy" transports="jms"&gt;
+        &lt;target inSequence="text_proxy" outSequence="out"/&gt;
+        &lt;parameter name="transport.jms.ContentType"&gt;
+            &lt;rules&gt;
+                &lt;textMessage&gt;text/plain&lt;/textMessage&gt;
+            &lt;/rules&gt;
+        &lt;/parameter&gt;
+        &lt;parameter name="Wrapper"&gt;{http://services.samples/xsd}text&lt;/parameter&gt;
+    &lt;/proxy&gt;
+
+    &lt;proxy name="JMSPoxProxy" transports="jms"&gt;
+        &lt;target inSequence="pox_proxy" outSequence="out"/&gt;
+        &lt;parameter name="transport.jms.ContentType"&gt;application/xml&lt;/parameter&gt;
+    &lt;/proxy&gt;
+
+&lt;/definitions&gt;</div>
+            <subsection name="Objective">
+                <p>
+                    Demonstrate the ability of Synapse to receive and mediate plain text, binary and
+                    POX (Plain Old XML) messages over JMS. 
+                </p>
+            </subsection>
+            <subsection name="Pre-requisites">
+                <p>
+                    <ul>
+                        <li>
+                            Deploy the SimpleStockQuoteService in the sample Axis2 server and start Axis2
+                        </li>
+                        <li>
+                            Setup and start a JMS broker (Apache ActiveMQ can be used as the
+                            JMS broker for this scenario. Refer <a href="setup/jms.html#pre">JMS setup guide</a>
+                            for information on how to run ActiveMQ.)
+                        </li>
+                        <li>
+                            Enable the JMS transport receiver of Synapse (Refer
+                            <a href="setup/jms.html#listener">JMS setup guide</a> for more details)
+                        </li>
+                        <li>
+                            Start Synapse using the configuration numbered 252 (repository/conf/sample/synapse_sample_252.xml)
+                            <div class="command">
+                                Unix/Linux: sh synapse.sh -sample 252<br/>
+                                Windows: synapse.bat -sample 252
+                            </div>
+                        </li>
+                    </ul>
+                </p>
+            </subsection>
+            <subsection name="Executing the Client">
+                <p>
+                    This configuration creates 3 JMS proxy services named JMSFileUploadProxy,
+                    JMSTextProxy and JMSPoxProxy exposed over JMS queues with the same names as the
+                    services. The first part of this example demonstrates the pure text message
+                    support with JMS, where a user sends a space separated text message over JMS of
+                    the form '&lt;price&gt; &lt;qty&gt; &lt;symbol&gt;'. Synapse converts this message
+                    into a SOAP message and sends this to the placeOrder operation of the SimpleStockQuoteService.
+                    Synapse uses the script mediator to transform the text message into a XML payload
+                    using the JavaScript support available to tokenize the string. The proxy service
+                    property named 'Wrapper' defines a custom wrapper element QName, to be used when
+                    wrapping text/binary content into a SOAP envelope.
+                </p>
+                <p>
+                    Execute JMS client as follows. This will post a pure text JMS message with the
+                    content defined (e.g. '12.33 1000 ACP') to the specified JMS destination -
+                    dynamicQueues/JMSTextProxy.
+                </p>
+                <div class="command">ant jmsclient -Djms_type=text -Djms_payload=&quot;12.33 1000 ACP&quot; -Djms_dest=dynamicQueues/JMSTextProxy</div>
+                <p>
+                    Following the logs, you will notice that Synapse received the JMS text message
+                    and transformed it into a SOAP payload as follows. Notice that the wrapper element
+                    '{http://services.samples/xsd}text' has been used to wrap the text message 
+                    content.
+                </p>
+                <div class="consoleOutput">[jms-Worker-1] INFO LogMediator To: , WSAction: urn:mediate, SOAPAction: urn:mediate, MessageID: ID:orcus.veithen.net-50631-1225235276233-1:0:1:1:1, Direction: request,
+Envelope:
+&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
+&lt;soapenv:Envelope xmlns:soapenv=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot;&gt;
+  &lt;soapenv:Body&gt;
+    &lt;axis2ns1:text xmlns:axis2ns1=&quot;http://services.samples/xsd&quot;&gt;12.33 1000 ACP&lt;/axis2ns1:text&gt;
+  &lt;/soapenv:Body&gt;
+&lt;/soapenv:Envelope&gt;</div>
+                <p>
+                    Then you can see how the script mediator creates a stock quote request by tokenizing
+                    the text as follows.
+                </p>
+                <div class="consoleOutput">[jms-Worker-1] INFO LogMediator To: , WSAction: urn:placeOrder, SOAPAction: urn:placeOrder, MessageID: ID:orcus.veithen.net-50631-1225235276233-1:0:1:1:1, Direction: request,
+Envelope:
+&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
+&lt;soapenv:Envelope xmlns:soapenv=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot;&gt;
+  &lt;soapenv:Body&gt;
+    &lt;placeOrder xmlns=&quot;http://services.samples&quot;&gt;
+      &lt;order xmlns=&quot;http://services.samples/xsd&quot;&gt;
+        &lt;price&gt;12.33&lt;/price&gt;
+        &lt;quantity&gt;1000&lt;/quantity&gt;
+        &lt;symbol&gt;ACP&lt;/symbol&gt;
+      &lt;/order&gt;
+    &lt;/placeOrder&gt;
+  &lt;/soapenv:Body&gt;
+&lt;/soapenv:Envelope&gt;</div>
+                <p>
+                    This SOAP message is then sent to the SimpleStockQuoteService on the sample
+                    Axis2 server. The sample Axis2 server will accept the one-way message and print
+                    the following log:
+                </p>
+                <div class="consoleOutput">samples.services.SimpleStockQuoteService :: Accepted order for : 1000 stocks of ACP at $ 12.33</div>
+                <p>
+                    The next section of this example demonstrates how a pure binary JMS message can
+                    be received and processed through Synapse. The configuration creates a proxy
+                    service named 'JMSFileUploadProxy' that accepts binary messages and wraps them
+                    into a custom element '{http://services.samples/xsd}element'. The received
+                    message is then forwarded to the MTOMSwASampleService using the SOAP action
+                    'urn:oneWayUploadUsingMTOM' while optimizing binary content using MTOM. To execute
+                    this sample, use the JMS client to publish a pure binary JMS message containing
+                    the file './../../repository/conf/sample/resources/mtom/asf-logo.gif' to the JMS
+                    destination 'dynamicQueues/JMSFileUploadProxy' as follows:
+                </p>
+                <div class="command">ant jmsclient -Djms_type=binary -Djms_dest=dynamicQueues/JMSFileUploadProxy \
+              -Djms_payload=./../../repository/conf/sample/resources/mtom/asf-logo.gif</div>
+                <p>
+                    Examining the Synapse logs will reveal that the binary content was received
+                    over JMS and wrapped with the specified element into a SOAP infoset as follows:
+                </p>
+                <div class="consoleOutput">[jms-Worker-1] INFO LogMediator To: , WSAction: urn:mediate, SOAPAction: urn:mediate, MessageID: ID:orcus.veithen.net-50702-1225236039556-1:0:1:1:1, Direction: request,
+Envelope:
+&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
+&lt;soapenv:Envelope xmlns:soapenv=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot;&gt;
+  &lt;soapenv:Body&gt;
+    &lt;axis2ns1:element xmlns:axis2ns1=&quot;http://services.samples/xsd&quot;&gt;R0lGODlhgw...AAOw==&lt;/axis2ns1:element&gt;
+  &lt;/soapenv:Body&gt;
+&lt;/soapenv:Envelope&gt;</div>
+                <p>
+                    Thereafter the message is sent as a MTOM optimized message as specified by the
+                    'format=mtom' attribute of the endpoint, to the MTOMSwASampleService using the
+                    SOAP action 'urn:oneWayUploadUsingMTOM'. Once received by the sample service,
+                    it is saved into a temporary file and could be verified for correctness.
+                </p>
+                <div class="consoleOutput">Wrote to file : ./../../work/temp/sampleServer/mtom-4417.gif</div>
+                <p>
+                    The final section of this example shows how a POX JMS message is received by Synapse
+                    and sent to the SimpleStockQuoteService as a SOAP message. Use the JMS client as
+                    follows to create a POX (Plain Old XML) message with a stock quote request payload
+                    (without a SOAP envelope), and send it to the JMS destination 'dynamicQueues/JMSPoxProxy'
+                    as follows:
+                </p>
+                <div class="command">ant jmsclient -Djms_type=pox -Djms_dest=dynamicQueues/JMSPoxProxy -Djms_payload=MSFT</div>
+                <p>
+                    Synapse converts the POX message into a SOAP payload and sends to the
+                    SimpleStockQuoteService after setting the SOAP action as 'urn:placeOrder'.
+                    The sample Axis2 server displays a successful message on the receipt of the
+                    message as:
+                </p>
+                <div class="consoleOutput">samples.services.SimpleStockQuoteService :: Accepted order for : 19211 stocks of MSFT at $ 172.39703010684752</div>
+            </subsection>
+        </section>
+        <p><a href="../samples.html">Back to Catalog</a></p>        
+    </body>
+</document>
\ No newline at end of file
diff --git a/src/site/xdoc/userguide/samples/sample253.xml b/src/site/xdoc/userguide/samples/sample253.xml
new file mode 100644
index 0000000..82589e4
--- /dev/null
+++ b/src/site/xdoc/userguide/samples/sample253.xml
@@ -0,0 +1,129 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+  ~  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.
+  -->
+
+<document>
+    <properties>
+        <title>Apache Synapse - Sample 253</title>
+    </properties>
+    <body>
+        <section name="Sample 253: One-way Bridging from JMS to HTTP and Replying with a 202 Accepted Response">
+            <div class="xmlConf">&lt;definitions xmlns="http://ws.apache.org/ns/synapse"&gt;
+
+    &lt;proxy name="JMStoHTTPStockQuoteProxy" transports="jms"&gt;
+        &lt;target&gt;
+            &lt;inSequence&gt;
+                &lt;property action="set" name="OUT_ONLY" value="true"/&gt;
+            &lt;/inSequence&gt;
+            &lt;endpoint&gt;
+                &lt;address uri="http://localhost:9000/services/SimpleStockQuoteService"/&gt;
+            &lt;/endpoint&gt;
+            &lt;outSequence&gt;
+                &lt;send/&gt;
+            &lt;/outSequence&gt;
+        &lt;/target&gt;
+        &lt;publishWSDL uri="file:repository/conf/sample/resources/proxy/sample_proxy_1.wsdl"/&gt;
+    &lt;/proxy&gt;
+
+    &lt;proxy name="OneWayProxy" transports="http"&gt;
+        &lt;target&gt;
+            &lt;inSequence&gt;
+                &lt;log level="full"/&gt;
+            &lt;/inSequence&gt;
+            &lt;endpoint&gt;
+                &lt;address uri="http://localhost:9000/services/SimpleStockQuoteService"/&gt;
+            &lt;/endpoint&gt;
+            &lt;outSequence&gt;
+                &lt;send/&gt;
+            &lt;/outSequence&gt;
+        &lt;/target&gt;
+        &lt;publishWSDL uri="file:repository/conf/sample/resources/proxy/sample_proxy_1.wsdl"/&gt;
+    &lt;/proxy&gt;
+
+&lt;/definitions&gt;</div>
+            <subsection name="Objective">
+                <p>
+                    This sample demonstrates the ability of Synapse to perform transport switching
+                    between JMS and HTTP. It also shows how to configure a one-way HTTP proxy in
+                    Synapse.
+                </p>
+            </subsection>
+            <subsection name="Pre-requisites">
+                <p>
+                    <ul>
+                        <li>
+                            Deploy the SimpleStockQuoteService in the sample Axis2 server and start Axis2
+                        </li>
+                        <li>
+                            Setup and start a JMS broker (Apache ActiveMQ can be used as the
+                            JMS broker for this scenario. Refer <a href="setup/jms.html#pre">JMS setup guide</a>
+                            for information on how to run ActiveMQ.)
+                        </li>
+                        <li>
+                            Enable the JMS transport receiver of Synapse (Refer
+                            <a href="setup/jms.html#listener">JMS setup guide</a> for more details)
+                        </li>
+                        <li>
+                            Start Synapse using the configuration numbered 253 (repository/conf/sample/synapse_sample_253.xml)
+                            <div class="command">
+                                Unix/Linux: sh synapse.sh -sample 253<br/>
+                                Windows: synapse.bat -sample 253
+                            </div>
+                        </li>
+                    </ul>
+                </p>
+            </subsection>
+            <subsection name="Executing the Client">
+                <p>
+                    This example invokes the one-way 'placeOrder' operation on the SimpleStockQuoteService
+                    using the Axis2 ServiceClient.fireAndForget() API at the client. To test this,
+                    run the sample client as follows and you will notice the one-way JMS message
+                    flowing through Synapse into the sample Axis2 server instance over HTTP, and Axis2
+                    acknowledging it with a HTTP 202 Accepted response.
+                </p>
+                <div class="command">ant stockquote -Dmode=placeorder -Dtrpurl=&quot;jms:/JMStoHTTPStockQuoteProxy?\
+transport.jms.ConnectionFactoryJNDIName=QueueConnectionFactory\
+&amp;java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory\
+&amp;java.naming.provider.url=tcp://localhost:61616\
+&amp;transport.jms.ContentTypeProperty=Content-Type&amp;transport.jms.DestinationType=queue&quot;</div>
+                <p>
+                    The second example shows how Synapse could be made to respond with a HTTP 202
+                    Accepted response to a request received. The proxy service simply logs the message
+                    received and acknowledges it. To try this out, run the sample client as follows.
+                </p>
+                <div class="command">ant stockquote -Dmode=placeorder -Dtrpurl=http://localhost:8280/services/OneWayProxy</div>
+                <p>
+                    On the Synapse console you could see the logged message, and if TCPMon was used
+                    at the client, you would see the 202 Accepted response sent back to the client
+                    from Synapse.
+                </p>
+                <div class="consoleOutput">HTTP/1.1 202 Accepted
+Content-Type: text/xml; charset=UTF-8
+Host: 127.0.0.1
+SOAPAction: &quot;urn:placeOrder&quot;
+Date: Sun, 06 May 2007 17:20:19 GMT
+Server: Synapse-HttpComponents-NIO
+Transfer-Encoding: chunked
+
+0</div>
+            </subsection>
+        </section>
+        <p><a href="../samples.html">Back to Catalog</a></p>        
+    </body>
+</document>
\ No newline at end of file
diff --git a/src/site/xdoc/userguide/samples/sample254.xml b/src/site/xdoc/userguide/samples/sample254.xml
new file mode 100644
index 0000000..1536d88
--- /dev/null
+++ b/src/site/xdoc/userguide/samples/sample254.xml
@@ -0,0 +1,128 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+  ~  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.
+  -->
+
+<document>
+    <properties>
+        <title>Apache Synapse - Sample 254</title>
+    </properties>
+    <body>
+        <section name="Sample 254: Using File System as the Transport Medium (Reading/Writing Files)">
+            <div class="xmlConf">&lt;definitions xmlns="http://ws.apache.org/ns/synapse"&gt;
+
+    &lt;proxy name="StockQuoteProxy" transports="vfs"&gt;
+        &lt;parameter name="transport.vfs.FileURI"&gt;file:///home/user/test/in&lt;/parameter&gt; &lt;!--CHANGE--&gt;
+        &lt;parameter name="transport.vfs.ContentType"&gt;text/xml&lt;/parameter&gt;
+        &lt;parameter name="transport.vfs.FileNamePattern"&gt;.*\.xml&lt;/parameter&gt;
+        &lt;parameter name="transport.PollInterval"&gt;15&lt;/parameter&gt;
+        &lt;parameter name="transport.vfs.MoveAfterProcess"&gt;file:///home/user/test/original&lt;/parameter&gt; &lt;!--CHANGE--&gt;
+        &lt;parameter name="transport.vfs.MoveAfterFailure"&gt;file:///home/user/test/original&lt;/parameter&gt; &lt;!--CHANGE--&gt;
+        &lt;parameter name="transport.vfs.ActionAfterProcess"&gt;MOVE&lt;/parameter&gt;
+        &lt;parameter name="transport.vfs.ActionAfterFailure"&gt;MOVE&lt;/parameter&gt;
+
+        &lt;target&gt;
+            &lt;endpoint&gt;
+                &lt;address format="soap12"
+                         uri="http://localhost:9000/services/SimpleStockQuoteService"/&gt;
+            &lt;/endpoint&gt;
+            &lt;outSequence&gt;
+                &lt;property name="transport.vfs.ReplyFileName"
+                          expression="fn:concat(fn:substring-after(get-property('MessageID'), 'urn:uuid:'), '.xml')"
+                          scope="transport"/&gt;
+                &lt;property action="set" name="OUT_ONLY" value="true"/&gt;
+                &lt;send&gt;
+                    &lt;endpoint&gt;
+                        &lt;address uri="vfs:file:///home/user/test/out"/&gt; &lt;!--CHANGE--&gt;
+                    &lt;/endpoint&gt;
+                &lt;/send&gt;
+            &lt;/outSequence&gt;
+        &lt;/target&gt;
+        &lt;publishWSDL uri="file:repository/conf/sample/resources/proxy/sample_proxy_1.wsdl"/&gt;
+    &lt;/proxy&gt;
+
+&lt;/definitions&gt;</div>
+            <subsection name="Objective">
+                <p>
+                    Synapse can access the local file system using its VFS (Virtual File System)
+                    transport receiver and sender. This way Synapse can read files in the local file
+                    system as well as write to the local file system. This sample show cases the
+                    Synapse VFS transport in action.
+                </p>
+            </subsection>
+            <subsection name="Pre-requisites">
+                <p>
+                    <ul>
+                        <li>
+                            Deploy the SimpleStockQuoteService in the sample Axis2 server and start Axis2
+                        </li>
+                        <li>
+                            Create 3 new directories (folders) named 'in', 'out' and 'original' in a
+                            suitable location in the local file system (eg: /home/user/test). 
+                        </li>
+                        <li>
+                            Open the repository/conf/sample/synapse_sample_254.xml file in a text
+                            editor and. Then change the transport.vfs.FileURI, transport.vfs.MoveAfterProcess,
+                            transport.vfs.MoveAfterFailure parameter values to the above in, original
+                            and original directories respectively. Note that both 2nd and 3rd parameters
+                            are pointed to the 'original' directory.
+                        </li>
+                        <li>
+                            Change the endpoint in the out-sequence to point to the 'out' directory.
+                            The prefix 'vfs' in the endpoint URL must not be removed or changed.
+                        </li>
+                        <li>
+                            Enable the VFS transport receiver and sender for Synapse (refer VFS
+                            setup guide for more information)
+                        </li>
+                        <li>
+                            Start Synapse using the configuration numbered 254 (repository/conf/sample/synapse_sample_254.xml)
+                            <div class="command">
+                                Unix/Linux: sh synapse.sh -sample 254<br/>
+                                Windows: synapse.bat -sample 254
+                            </div>
+                        </li>
+                    </ul>
+                </p>
+            </subsection>
+            <subsection name="Executing the Client">
+                <p>
+                    Copy the test.xml file in the repository/conf/sample/resources/vfs directory to
+                    the directory given in transport.vfs.FileURI above (i.e the 'in' directory). This
+                    file contains a simple stock quote request in XML/SOAP format.
+                </p>
+                <div class="consoleOutput">&lt;?xml version='1.0' encoding='UTF-8'?&gt;
+    &lt;soapenv:Envelope xmlns:soapenv=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot; xmlns:wsa=&quot;http://www.w3.org/2005/08/addressing&quot;&gt;
+    &lt;soapenv:Body&gt;
+            &lt;m0:getQuote xmlns:m0=&quot;http://services.samples&quot;&gt;
+                    &lt;m0:request&gt;
+                            &lt;m0:symbol&gt;IBM&lt;/m0:symbol&gt;
+                    &lt;/m0:request&gt;
+            &lt;/m0:getQuote&gt;
+    &lt;/soapenv:Body&gt;
+&lt;/soapenv:Envelope&gt;</div>
+                <p>
+                    VFS transport listener will pick the file from 'in' directory and send it to the
+                    Axis2 service over HTTP. The request XML file will be backed up in the 'original'
+                    directory. The response from the Axis2 server will be saved to the 'out' directory.
+                </p>
+            </subsection>
+        </section>
+        <p><a href="../samples.html">Back to Catalog</a></p>        
+    </body>
+</document>
\ No newline at end of file
diff --git a/src/site/xdoc/userguide/samples/sample255.xml b/src/site/xdoc/userguide/samples/sample255.xml
new file mode 100644
index 0000000..080fd0c
--- /dev/null
+++ b/src/site/xdoc/userguide/samples/sample255.xml
@@ -0,0 +1,131 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+  ~  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.
+  -->
+
+<document>
+    <properties>
+        <title>Apache Synapse - Sample 255</title>
+    </properties>
+    <body>
+        <section name="Sample 255: Switching from File Transport (FTP) to the Mail Transport">
+            <div class="xmlConf">&lt;definitions xmlns="http://ws.apache.org/ns/synapse"&gt;
+
+    &lt;proxy name="StockQuoteProxy" transports="vfs"&gt;
+
+        &lt;target&gt;
+            &lt;inSequence&gt;
+                &lt;header name="Action" value="urn:getQuote"/&gt;
+            &lt;/inSequence&gt;
+            &lt;endpoint&gt;
+                &lt;address uri="http://localhost:9000/services/SimpleStockQuoteService"/&gt;
+            &lt;/endpoint&gt;
+            &lt;outSequence&gt;
+                &lt;property action="set" name="OUT_ONLY" value="true"/&gt;
+                &lt;send&gt;
+                    &lt;endpoint&gt;
+                        &lt;address uri="mailto:user@host"/&gt; &lt;!--CHANGE--&gt;
+                    &lt;/endpoint&gt;
+                &lt;/send&gt;
+            &lt;/outSequence&gt;
+        &lt;/target&gt;
+        &lt;publishWSDL uri="file:repository/conf/sample/resources/proxy/sample_proxy_1.wsdl"/&gt;
+
+        &lt;parameter name="transport.vfs.FileURI"&gt;vfs:ftp://guest:guest@localhost/test?vfs.passive=true&lt;/parameter&gt; &lt;!--CHANGE--&gt;
+        &lt;parameter name="transport.vfs.ContentType"&gt;text/xml&lt;/parameter&gt;
+        &lt;parameter name="transport.vfs.FileNamePattern"&gt;.*\.xml&lt;/parameter&gt;
+        &lt;parameter name="transport.PollInterval"&gt;15&lt;/parameter&gt;
+    &lt;/proxy&gt;
+
+&lt;/definitions&gt;</div>
+            <subsection name="Objective">
+                <p>
+                    In <a href="sample254.html">sample 254</a> we looked at how the VFS transport
+                    can be used to read files from the local file system. VFS transport can also be
+                    used to read files from FTP, SFTP and CIFS sites. This sample illustrates how to
+                    read from a remote FTP site and send the content to a remote client as an e-mail.                    
+                </p>
+            </subsection>
+            <subsection name="Pre-requisites">
+                <p>
+                    <ul>
+                       <div class="command">ant stockquote -Daddurl=http://localhost:9000/services/SimpleStockQuoteService -Dtrpurl=http://localhost:8280/</div>
+
+                <div class="consoleOutput">Sat Nov 18 21:01:23 IST 2006 SimpleStockQuoteService :: Generating quote for : IBM</div>
+
+                <div class="consoleOutput">Standard :: Stock price = $95.26454380258552</div> <li>
+                            This sample requires access to a FTP site and an e-mail account.
+                        </li>
+                        <li>
+                            Deploy the SimpleStockQuoteService in the sample Axis2 server and start Axis2
+                        </li>
+                        <li>
+                            Enable the VFS transport listener for Synapse (refer VFS setup guide for
+                            more details).
+                        </li>
+                        <li>
+                            Enable the mail transport sender for Synapse
+                            (refer <a href="setup/mail.html#mailTransportSender"> Mail transport setup</a>
+                            guide for more details).
+                        </li>
+                        <li>
+                            Create a new test directory in the FTP site.
+                        </li>
+                        <li>
+                            Open the repository/conf/sample/synapse_sample_255.xml and edit the
+                            transport.vfs.FileURI parameter to point to the test directory in the FTP
+                            server. Also change the endpoint in the out sequence to point to your
+                            e-mail account.
+                        </li>
+                        <li>
+                            Start Synapse using the configuration numbered 255 (repository/conf/sample/synapse_sample_255.xml)
+                            <div class="command">
+                                Unix/Linux: sh synapse.sh -sample 255<br/>
+                                Windows: synapse.bat -sample 255
+                            </div>
+                        </li>
+                    </ul>
+                </p>
+            </subsection>
+            <subsection name="Executing the Client">
+                <p>
+                    Copy the test.xml file in the repository/conf/sample/resources/vfs directory to
+                    the directory given in transport.vfs.FileURI above (i.e the test directory in
+                    FTP server). This file contains a simple stock quote request in XML/SOAP format.
+                </p>
+                <div class="consoleOutput">&lt;?xml version='1.0' encoding='UTF-8'?&gt;
+&lt;soapenv:Envelope xmlns:soapenv=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot; xmlns:wsa=&quot;http://www.w3.org/2005/08/addressing&quot;&gt;
+    &lt;soapenv:Body&gt;
+            &lt;m0:getQuote xmlns:m0=&quot;http://services.samples&quot;&gt;
+                    &lt;m0:request&gt;
+                            &lt;m0:symbol&gt;IBM&lt;/m0:symbol&gt;
+                    &lt;/m0:request&gt;
+            &lt;/m0:getQuote&gt;
+    &lt;/soapenv:Body&gt;
+&lt;/soapenv:Envelope&gt;</div>
+                <p>
+                    VFS transport will pick up the file from the FTP site and send the content to
+                    the stock quote service in Axis2 over HTTP. Response from Axis2 will be sent to
+                    the mail endpoint as an e-mail. It should show up in the configured e-mail account
+                    after a few seconds.
+                </p>
+            </subsection>
+        </section>
+        <p><a href="../samples.html">Back to Catalog</a></p>        
+    </body>
+</document>
\ No newline at end of file
diff --git a/src/site/xdoc/userguide/samples/sample256.xml b/src/site/xdoc/userguide/samples/sample256.xml
new file mode 100644
index 0000000..c5e3f53
--- /dev/null
+++ b/src/site/xdoc/userguide/samples/sample256.xml
@@ -0,0 +1,133 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+  ~  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.
+  -->
+
+<document>
+    <properties>
+        <title>Apache Synapse - Sample 256</title>
+    </properties>
+    <body>
+        <section name="Sample 256: Proxy Services with the Mail Transport">
+            <div class="xmlConf">&lt;definitions xmlns="http://ws.apache.org/ns/synapse"&gt;
+
+    &lt;proxy name="StockQuoteProxy" transports="mailto"&gt;
+
+        &lt;target&gt;
+            &lt;inSequence&gt;
+                &lt;property name="senderAddress" expression="get-property('transport', 'From')"/&gt;
+                &lt;log level="full"&gt;
+                    &lt;property name="Sender Address" expression="get-property('senderAddress')"/&gt;
+                &lt;/log&gt;
+                &lt;send&gt;
+                    &lt;endpoint&gt;
+                        &lt;address uri="http://localhost:9000/services/SimpleStockQuoteService"/&gt;
+                    &lt;/endpoint&gt;
+                &lt;/send&gt;
+            &lt;/inSequence&gt;
+            &lt;outSequence&gt;
+                &lt;property name="Subject" value="Custom Subject for Response" scope="transport"/&gt;
+                &lt;header name="To" expression="fn:concat('mailto:', get-property('senderAddress'))"/&gt;
+                &lt;log level="full"&gt;
+                    &lt;property name="message" value="Response message"/&gt;
+                    &lt;property name="Sender Address" expression="get-property('senderAddress')"/&gt;
+                &lt;/log&gt;
+                &lt;send/&gt;
+            &lt;/outSequence&gt;
+        &lt;/target&gt;
+        &lt;publishWSDL uri="file:repository/conf/sample/resources/proxy/sample_proxy_1.wsdl"/&gt;
+
+        &lt;parameter name="transport.mail.Address"&gt;synapse.demo.1@gmail.com&lt;/parameter&gt;
+        &lt;parameter name="transport.mail.Protocol"&gt;pop3&lt;/parameter&gt;
+        &lt;parameter name="transport.PollInterval"&gt;5&lt;/parameter&gt;
+        &lt;parameter name="mail.pop3.host"&gt;pop.gmail.com&lt;/parameter&gt;
+        &lt;parameter name="mail.pop3.port"&gt;995&lt;/parameter&gt;
+        &lt;parameter name="mail.pop3.user"&gt;synapse.demo.1&lt;/parameter&gt;
+        &lt;parameter name="mail.pop3.password"&gt;mailpassword&lt;/parameter&gt;
+        &lt;parameter name="mail.pop3.socketFactory.class"&gt;javax.net.ssl.SSLSocketFactory&lt;/parameter&gt;
+        &lt;parameter name="mail.pop3.socketFactory.fallback"&gt;false&lt;/parameter&gt;
+        &lt;parameter name="mail.pop3.socketFactory.port"&gt;995&lt;/parameter&gt;
+        &lt;parameter name="transport.mail.ContentType"&gt;application/xml&lt;/parameter&gt;
+
+    &lt;/proxy&gt;
+
+&lt;/definitions&gt;</div>
+            <subsection name="Objective">
+                <p>
+                    This sample show cases the mail transport of Synapse. The mail transport allows
+                    Synapse to receive and send e-mails using common protocols like POP, IMAP and
+                    SMTP.
+                </p>
+            </subsection>
+            <subsection name="Pre-requisites">
+                <p>
+                    <ul>
+                        <li>
+                            You need access to an e-mail account to try out this sample
+                        </li>
+                        <li>
+                            Deploy the SimpleStockQuoteService in the sample Axis2 server and start Axis2
+                        </li>
+                        <li>
+                            Enable the mail transport listener and mail transport sender for Synapse
+                            (refer  <a href="setup/mail.html#mailTransportSender">Mail transport setup</a>
+                            guide for more details)
+                        </li>
+                        <li>
+                            Start Synapse using the configuration numbered 256 (repository/conf/sample/synapse_sample_256.xml)
+                            <div class="command">
+                                Unix/Linux: sh synapse.sh -sample 256<br/>
+                                Windows: synapse.bat -sample 256
+                            </div>
+                        </li>
+                    </ul>
+                </p>
+            </subsection>
+            <subsection name="Executing the Client">
+                <p>
+                    Send an e-mail to <a href="mailto:synapse.demo.1@gmail.com">synapse.demo.1@gmail.com</a>
+                    with the following payload.
+                </p>
+                <div class="xmlConf">&lt;getQuote xmlns=&quot;http://services.samples&quot;&gt;
+   &lt;request xmlns=&quot;http://services.samples/xsd&quot;&gt;
+       &lt;symbol&gt;IBM&lt;/symbol&gt;
+   &lt;/request&gt;
+&lt;/getQuote&gt;</div>
+                <p>
+                    Synapse will be polling on the above e-mail account for any incoming requests. When
+                    your mail arrives at this account, Synapse will pick it up and send the payload to
+                    Axis2 over HTTP. The response will be mailed back to your e-mail account. Synapse
+                    retrieves the sender information from the original request to determine the recipient
+                    of the response mail.
+                </p>
+                <p>
+                    Note that in this sample we used the transport.mail.ContentType property to make
+                    sure that the transport parses the request message as POX. If you remove this
+                    property, you may still be able to send requests using a standard mail client if
+                    instead of writing the XML in the body of the message, you add it as an attachment.
+                    In that case, you should use .xml as a suffix for the attachment and format the
+                    request as a SOAP 1.1 message. Indeed, for a file with suffix .xml the mail client
+                    will most likely use text/xml as the content type, exactly as required for SOAP 1.1.
+                    Sending a POX message using this approach will be a lot trickier, because most
+                    standard mail clients don't allow the user to explicitly set the content type.
+                </p>
+            </subsection>
+        </section>
+        <p><a href="../samples.html">Back to Catalog</a></p>        
+    </body>
+</document>
\ No newline at end of file
diff --git a/src/site/xdoc/userguide/samples/sample257.xml b/src/site/xdoc/userguide/samples/sample257.xml
new file mode 100644
index 0000000..d81408c
--- /dev/null
+++ b/src/site/xdoc/userguide/samples/sample257.xml
@@ -0,0 +1,117 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+  ~  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.
+  -->
+
+<document>
+    <properties>
+        <title>Apache Synapse - Sample 257</title>
+    </properties>
+    <body>
+        <section name="Sample 257: Proxy Services with the FIX Transport">
+            <div class="xmlConf">&lt;definitions xmlns="http://ws.apache.org/ns/synapse"&gt;
+
+    &lt;proxy name="OrderProcesserProxy40" transports="fix"&gt;
+        &lt;target&gt;
+            &lt;endpoint&gt;
+                &lt;address
+                        uri="fix://localhost:19876?BeginString=FIX.4.0&amp;SenderCompID=SYNAPSE&amp;TargetCompID=EXEC"/&gt;
+            &lt;/endpoint&gt;
+            &lt;inSequence&gt;
+                &lt;log level="full"/&gt;
+            &lt;/inSequence&gt;
+            &lt;outSequence&gt;
+                &lt;log level="full"/&gt;
+                &lt;send/&gt;
+            &lt;/outSequence&gt;
+        &lt;/target&gt;
+
+        &lt;parameter name="transport.fix.AcceptorConfigURL"&gt;
+            file:repository/conf/sample/resources/fix/fix-synapse.cfg
+        &lt;/parameter&gt;
+        &lt;parameter name="transport.fix.AcceptorMessageStore"&gt;file&lt;/parameter&gt;
+        &lt;parameter name="transport.fix.InitiatorConfigURL"&gt;
+            file:repository/conf/sample/resources/fix/synapse-sender.cfg
+        &lt;/parameter&gt;
+        &lt;parameter name="transport.fix.InitiatorMessageStore"&gt;file&lt;/parameter&gt;
+    &lt;/proxy&gt;
+
+&lt;/definitions&gt;</div>
+            <subsection name="Objective">
+                <p>
+                    This sample demonstrates the FIX (Financial Information eXchange) transport of
+                    Synapse. FIX transport allows Synapse to connect to remote FIX acceptors and
+                    initiators and exchange finance data.
+                </p>
+            </subsection>
+            <subsection name="Pre-requisites">
+                <p>
+                    <ul>
+                        <li>
+                            You need a <a href="http://www.quickfixj.org">Quickfix/J</a> installation
+                            to try out FIX samples. Please download and extract a Quickfix/J distribution
+                            into your local machine.
+                        </li>
+                        <li>
+                            Configure the Executor sample FIX application (shipped with Quickfix/J)
+                            to receive messages from Synapse and start it (refer
+                            <a href="setup/fix.html#exec">FIX setup guide</a> for more details).
+                        </li>
+                        <li>
+                            Enable the FIX transport listener and sender for Synapse (refer
+                            <a href="setup/fix.html#synapse">FIX setup guide</a> for details).
+                        </li>
+                        <li>
+                            Start Synapse using the configuration numbered 257 (repository/conf/sample/synapse_sample_257.xml)
+                            <div class="command">
+                                Unix/Linux: sh synapse.sh -sample 257<br/>
+                                Windows: synapse.bat -sample 257
+                            </div>
+                            If Executor is properly configured, Synapse should establish a FIX session
+                            with the Executor upon startup. You should see some log entries confirming
+                            the session logon event on Synapse console as well as Executor console.
+                        </li>
+                        <li>
+                            Configure Banzai sample FIX application (shipped with Quickfix/J) to send
+                            messages to Synapse and start it (refer <a href="setup/fix.html#banzai">FIX setup guide</a>
+                            for more details). If Banzai was properly configured, it should establish
+                            a FIX session with Synapse upon startup. You should see some session
+                            logon messages on Synapse console and Banzai console.
+                        </li>
+                    </ul>
+                </p>
+            </subsection>
+            <subsection name="Executing the Client">
+                <p>
+                    Send some FIX messages from Banzai to Synapse. Synapse will forward all requests
+                    to Executor and get them processes. Responses from Executor will be routed back
+                    to Banzai.
+                </p>
+                <p>
+                    Synapse converts all received FIX messages into SOAP format. You can view these
+                    SOAP messages from the Synapse log. When SOAP messages are sent to FIX endpoints,
+                    Synapse converts them back into valid FIX messages. While FIX messages are flowing
+                    through the service bus, you can perform various transformations and content based
+                    routing on the FIX messages using the existing mediators like XSLT, XQuery, Filter
+                    and Switch.
+                </p>
+            </subsection>
+        </section>
+        <p><a href="../samples.html">Back to Catalog</a></p>        
+    </body>
+</document>
\ No newline at end of file
diff --git a/src/site/xdoc/userguide/samples/sample258.xml b/src/site/xdoc/userguide/samples/sample258.xml
new file mode 100644
index 0000000..91b9c35
--- /dev/null
+++ b/src/site/xdoc/userguide/samples/sample258.xml
@@ -0,0 +1,107 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+  ~  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.
+  -->
+
+<document>
+    <properties>
+        <title>Apache Synapse - Sample 258</title>
+    </properties>
+    <body>
+        <section name="Sample 258: Switching from HTTP to FIX">
+            <div class="xmlConf">&lt;definitions xmlns="http://ws.apache.org/ns/synapse"&gt;
+
+    &lt;proxy name="FIXProxy" transports="http"&gt;
+        &lt;target&gt;
+            &lt;endpoint&gt;
+                &lt;address
+                        uri="fix://localhost:19876?BeginString=FIX.4.0&amp;SenderCompID=SYNAPSE&amp;TargetCompID=EXEC"/&gt;
+            &lt;/endpoint&gt;
+
+            &lt;inSequence&gt;
+                &lt;property name="transport.fix.ServiceName" value="FIXProxy" scope="axis2-client"/&gt;
+                &lt;log level="full"/&gt;
+            &lt;/inSequence&gt;
+
+            &lt;outSequence&gt;
+                &lt;log level="full"/&gt;
+                &lt;send/&gt;
+            &lt;/outSequence&gt;
+        &lt;/target&gt;
+
+        &lt;parameter name="transport.fix.InitiatorConfigURL"&gt;
+            file:repository/conf/sample/resources/fix/synapse-sender.cfg
+        &lt;/parameter&gt;
+        &lt;parameter name="transport.fix.InitiatorMessageStore"&gt;file&lt;/parameter&gt;
+        &lt;parameter name="transport.fix.SendAllToInSequence"&gt;false&lt;/parameter&gt;
+        &lt;parameter name="transport.fix.DropExtraResponses"&gt;true&lt;/parameter&gt;
+    &lt;/proxy&gt;
+
+&lt;/definitions&gt;</div>
+            <subsection name="Objective">
+                <p>
+                    Demonstrates how to use the FIX transport in a transport switching scenario with
+                    HTTP.
+                </p>
+            </subsection>
+            <subsection name="Pre-requisites">
+                <p>
+                    <ul>
+                        <li>
+                            You need a <a href="http://www.quickfixj.org">Quickfix/J</a> installation
+                            to try out FIX samples. Please download and extract a Quickfix/J distribution
+                            into your local machine.
+                        </li>
+                        <li>
+                            Configure the Executor sample FIX application (shipped with Quickfix/J)
+                            to receive messages from Synapse and start it (refer
+                            <a href="setup/fix.html#exec">FIX setup guide</a> for more details).
+                        </li>
+                        <li>
+                            Enable the FIX transport sender for Synapse (refer
+                            <a href="setup/fix.html#synapse">FIX setup guide</a> for details).
+                        </li>
+                        <li>
+                            Start Synapse using the configuration numbered 258 (repository/conf/sample/synapse_sample_258.xml)
+                            <div class="command">
+                                Unix/Linux: sh synapse.sh -sample 258<br/>
+                                Windows: synapse.bat -sample 258
+                            </div>
+                        </li>
+                    </ul>
+                </p>
+            </subsection>
+            <subsection name="Executing the Client">
+                <p>
+                    Go to the samples/axis2Client directory and invoke the sample FIX/HTTP client as
+                    follows.
+                </p>
+                <div class="command">ant fixclient -Dsymbol=IBM -Dqty=5 -Dmode=buy -Daddurl=http://localhost:8280/services/FIXProxy</div>
+                <p>
+                    This command sends a HTTP request to the FIXProxy on Synapse. The message is
+                    converted into a FIX message and sent to the Executor sample application. Executor
+                    will send two responses for this request (receive ack and the execution report) and
+                    Synapse will send the first response back to the HTTP client. (Synapse can't send
+                    both responses back, since HTTP does not allow sending two responses to the same
+                    request)
+                </p>
+            </subsection>
+        </section>
+        <p><a href="../samples.html">Back to Catalog</a></p>        
+    </body>
+</document>
\ No newline at end of file
diff --git a/src/site/xdoc/userguide/samples/sample259.xml b/src/site/xdoc/userguide/samples/sample259.xml
new file mode 100644
index 0000000..b466818
--- /dev/null
+++ b/src/site/xdoc/userguide/samples/sample259.xml
@@ -0,0 +1,112 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+  ~  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.
+  -->
+
+<document>
+    <properties>
+        <title>Apache Synapse - Sample 259</title>
+    </properties>
+    <body>
+        <section name="Sample 259: Switch from FIX to HTTP">
+            <div class="xmlConf">&lt;definitions xmlns="http://ws.apache.org/ns/synapse"&gt;
+
+    &lt;localEntry key="xslt-key-req"
+                src="file:repository/conf/sample/resources/transform/transform_fix_to_http.xslt"/&gt;
+
+    &lt;proxy name="FIXProxy" transports="fix"&gt;
+        &lt;target&gt;
+            &lt;endpoint&gt;
+                &lt;address uri="http://localhost:9000/services/SimpleStockQuoteService"/&gt;
+            &lt;/endpoint&gt;
+            &lt;inSequence&gt;
+                &lt;log level="full"/&gt;
+                &lt;xslt key="xslt-key-req"/&gt;
+                &lt;log level="full"/&gt;
+            &lt;/inSequence&gt;
+            &lt;outSequence&gt;
+                &lt;log level="full"/&gt;
+            &lt;/outSequence&gt;
+        &lt;/target&gt;
+        &lt;parameter name="transport.fix.AcceptorConfigURL"&gt;
+            file:repository/conf/sample/resources/fix/fix-synapse.cfg
+        &lt;/parameter&gt;
+        &lt;parameter name="transport.fix.AcceptorMessageStore"&gt;file&lt;/parameter&gt;
+    &lt;/proxy&gt;
+
+&lt;/definitions&gt;</div>
+            <subsection name="Objective">
+                <p>
+                    In <a href="sample258.html">sample 258</a> we looked at how to forward HTTP
+                    requests over a FIX session. This sample demonstrates how to send a FIX message
+                    to an HTTP endpoint.
+                </p>
+            </subsection>
+            <subsection name="Pre-requisites">
+                <p>
+                    <ul>
+                        <li>
+                            You need a <a href="http://www.quickfixj.org">Quickfix/J</a> installation
+                            to try out FIX samples. Please download and extract a Quickfix/J distribution
+                            into your local machine.
+                        </li>
+                        <li>
+                            Deploy the SimpleStockQuoteService in the sample Axis2 server and start Axis2
+                        </li>
+                        <li>
+                            Enable the FIX transport receiver for Synapse (refer
+                            <a href="setup/fix.html#synapse">FIX setup guide</a> for details)
+                        </li>
+                        <li>
+                            Start Synapse using the configuration numbered 259 (repository/conf/sample/synapse_sample_259.xml)
+                            <div class="command">
+                                Unix/Linux: sh synapse.sh -sample 259<br/>
+                                Windows: synapse.bat -sample 259
+                            </div>
+                        </li>
+                        <li>
+                            Configure Banzai sample FIX application (shipped with Quickfix/J) to send
+                            messages to Synapse and start it (refer <a href="setup/fix.html#banzai">FIX setup guide</a>
+                            for more details). If Banzai was properly configured, it should establish
+                            a FIX session with Synapse upon startup. You should see some session logon
+                            messages on Synapse console and Banzai console.
+                        </li>
+                    </ul>
+                </p>
+            </subsection>
+            <subsection name="Executing the Client">
+                <p>
+                    This sample expects a Limit order from Banzai to be received by Synapse and
+                    transformed into a place order request in SOAP format. To try it out send a
+                    'Limit' order request from Banzai to Synapse. Synapse will convert it into a
+                    place order request and send to the Axis2 server over HTTP. The stock quote
+                    service in Axis2 will print the following log when it receives the in-only
+                    place order request.
+                </p>
+                <div class="consoleOutput">Accepted order for : 18406 stocks of MSFT at $ 83.58806051152119</div>
+                <p>
+                    Note that the request sent from Banzai must be of type 'Limit'. Otherwise the
+                    XSLT transformation will not work as expected and Axis2 will receive an invalid
+                    request. Also since the place order requests are one-way messages, Banzai is not
+                    supposed to receive any response in this case.
+                </p>
+            </subsection>
+        </section>
+        <p><a href="../samples.html">Back to Catalog</a></p>        
+    </body>
+</document>
\ No newline at end of file
diff --git a/src/site/xdoc/userguide/samples/sample260.xml b/src/site/xdoc/userguide/samples/sample260.xml
new file mode 100644
index 0000000..d4009d3
--- /dev/null
+++ b/src/site/xdoc/userguide/samples/sample260.xml
@@ -0,0 +1,94 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+  ~  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.
+  -->
+
+<document>
+    <properties>
+        <title>Apache Synapse - Sample 260</title>
+    </properties>
+    <body>
+        <section name="Sample 260:Switch from FIX to AMQP">
+    <div class="xmlConf">&lt;definitions xmlns="http://ws.apache.org/ns/synapse"&gt;
+    &lt;proxy name="FIXProxy" transports="fix"&gt;
+        &lt;target&gt;
+            &lt;endpoint&gt;
+                &lt;address
+                        uri="jms:/QpidStockQuoteService?transport.jms.ConnectionFactoryJNDIName=qpidConnectionfactory&amp;java.naming.factory.initial=org.apache.qpid.jndi.PropertiesFileInitialContextFactory&amp;java.naming.provider.url=repository/conf/sample/resources/fix/conn.properties&amp;transport.jms.ReplyDestination=replyQueue"/&gt;
+            &lt;/endpoint&gt;
+            &lt;inSequence&gt;
+                &lt;log level="full"/&gt;
+            &lt;/inSequence&gt;
+            &lt;outSequence&gt;
+                &lt;property name="transport.fix.ServiceName" value="FIXProxy" scope="axis2-client"/&gt;
+                &lt;log level="full"/&gt;
+                &lt;send/&gt;
+            &lt;/outSequence&gt;
+        &lt;/target&gt;
+        &lt;parameter name="transport.fix.AcceptorConfigURL"&gt;
+            file:repository/conf/sample/resources/fix/fix-synapse.cfg
+        &lt;/parameter&gt;
+        &lt;parameter name="transport.fix.AcceptorMessageStore"&gt;
+            file
+        &lt;/parameter&gt;
+    &lt;/proxy&gt;
+&lt;/definitions&gt;</div>
+            <subsection name="Objective">
+                <p>
+					Demonstrate the capability of switching between FIX and AMQP protocols
+                </p>
+            </subsection>
+            <subsection name="Pre-requisites">
+                <p>
+                    <ul>
+                        <li>
+                           You will need the sample FIX blotter that comes with Quickfix/J (Banzai). Configure the blotter to establish sessions with Synapse. (refer
+                            <a href="setup/fix.html#synapse">FIX setup guide</a> for details)
+                        </li>
+                         <li>
+                           Configure the AMQP transport for Synapse. See Configure Synapse for  <a href="setup/jms.html#amqp"> AMQP Transport setup</a> for detail
+                        </li>
+                        <li>
+                           To get an idea about the various transport parameters being used in this sample see FIX Transport Parameters .
+                        </li>
+                    </ul>
+                </p>
+            </subsection>
+            <subsection name="Executing the Client">
+            	<p>
+            	   Start the AMQP consumer, by switching to samples/axis2Client directory and running the consumer using the following command. Consumer will listen to the queue 'QpidStockQuoteService', accept the orders and reply to the queue 'replyQueue'.
+            	</p>
+                <div class="command">ant amqpconsumer -Dpropfile=$SYNAPSE_HOME/repository/conf/sample/resources/fix/direct.properties</div>
+				<p>
+				  Open up the SYNAPSE_HOME/repository/conf/sample/synapse_sample_260.xml file
+				  and make sure that the transport.fix.AcceptorConfigURL property points
+				  to the fix-synapse.cfg file you created. Once done you can start the
+				  Synapse configuration numbered 260: i.e. synapse -sample 260. Note that
+				  Synapse creates a new FIX session with Banzai at this point.
+				</p>
+				<p>
+				  Send an order request from Banzai to Synapse. e.g. Buy DELL 1000 @ MKT.
+				</p>
+				<p>
+				  Synapse will forward the order request by binding it to a JMS message payload and sending it to the AMQP consumer. AMQP consumer will send a execution back to Banzai.
+				</p>
+            </subsection>
+        </section>
+        <p><a href="../samples.html">Back to Catalog</a></p>        
+    </body>
+</document>
\ No newline at end of file
diff --git a/src/site/xdoc/userguide/samples/sample261.xml b/src/site/xdoc/userguide/samples/sample261.xml
new file mode 100644
index 0000000..b8108f5
--- /dev/null
+++ b/src/site/xdoc/userguide/samples/sample261.xml
@@ -0,0 +1,122 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+  ~  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.
+  -->
+
+<document>
+    <properties>
+        <title>Apache Synapse - Sample 261</title>
+    </properties>
+    <body>
+        <section name="Sample 261: Switch Between Different FIX Versions">
+            <div class="xmlConf">&lt;definitions xmlns="http://ws.apache.org/ns/synapse"&gt;
+
+    &lt;proxy name="OrderProcesserProxy41" transports="fix"&gt;
+        &lt;target&gt;
+            &lt;endpoint&gt;
+                &lt;address
+                        uri="fix://localhost:19877?BeginString=FIX.4.1&amp;SenderCompID=SYNAPSE&amp;TargetCompID=EXEC"/&gt;
+            &lt;/endpoint&gt;
+            &lt;inSequence&gt;
+                &lt;log level="full"/&gt;
+            &lt;/inSequence&gt;
+            &lt;outSequence&gt;
+                &lt;log level="full"/&gt;
+                &lt;send/&gt;
+            &lt;/outSequence&gt;
+        &lt;/target&gt;
+        &lt;parameter name="transport.fix.AcceptorConfigURL"&gt;
+            file:repository/conf/sample/resources/fix/fix-synapse-m40.cfg
+        &lt;/parameter&gt;
+        &lt;parameter name="transport.fix.AcceptorMessageStore"&gt;file&lt;/parameter&gt;
+        &lt;parameter name="transport.fix.InitiatorConfigURL"&gt;
+            file:repository/conf/sample/resources/fix/synapse-sender-m.cfg
+        &lt;/parameter&gt;
+        &lt;parameter name="transport.fix.InitiatorMessageStore"&gt;file&lt;/parameter&gt;
+    &lt;/proxy&gt;
+
+&lt;/definitions&gt;</div>
+            <subsection name="Objective">
+                <p>
+                    Demonstrate the ability of Synapse to switch between FIX versions (eg: FIX 4.0
+                    to FIX 4.1)
+                </p>
+            </subsection>
+            <subsection name="Pre-requisites">
+                <p>
+                    <ul>
+                        <li>
+                            You need a <a href="http://www.quickfixj.org">Quickfix/J</a> installation
+                            to try out FIX samples. Please download and extract a Quickfix/J distribution
+                            into your local machine.
+                        </li>
+                        <li>
+                            Enable the FIX transport listener and sender for Synapse (refer
+                            <a href="setup/fix.html#synapse">FIX setup guide</a> for details).
+                        </li>
+                        <li>
+                            Configure the Executor sample FIX application (shipped with Quickfix/J)
+                            to receive messages from Synapse and start it (refer <a href="setup/fix.html#exec">FIX setup guide</a>
+                            for more details). In previous samples we only had a FIX 4.0 session configured
+                            for Executor. For this sample we should configure a FIX 4.1 session for
+                            Executor. Therefore before starting it add the following entries to the
+                            configuration file of Executor (executor.cfg).
+                            <div class="consoleOutput">[session]
+BeginString=FIX.4.1
+SocketAcceptPort=19877</div>
+                        </li>
+                        <li>
+                            Start Synapse using the configuration numbered 261 (repository/conf/sample/synapse_sample_261.xml)
+                            <div class="command">
+                                Unix/Linux: sh synapse.sh -sample 261<br/>
+                                Windows: synapse.bat -sample 261
+                            </div>
+                            If Executor is properly configured, Synapse should establish a FIX 4.1 session
+                            with the Executor upon startup. You should see some log entries confirming
+                            the session logon event on Synapse console as well as Executor console.
+                        </li>
+                        <li>
+                            Configure Banzai sample FIX application (shipped with Quickfix/J) to send
+                            messages to Synapse and start it (refer <a href="setup/fix.html#banzai">FIX setup guide</a>
+                            for more details). You should also add the following entry to the Banzai
+                            configuration file before starting it (replace $SYNAPSE_HOME with the
+                            actual path to Synapse home).
+                            <div class="consoleOutput">DataDictionary=$SYNAPSE_HOME/repository/conf/sample/resources/fix/FIX40-synapse.xml</div>
+                            If Banzai was properly configured, it should establish a FIX 4.0 session with
+                            Synapse upon startup. You should see some session logon messages on Synapse
+                            console and Banzai console.
+                        </li>
+                    </ul>
+                </p>
+            </subsection>
+            <subsection name="Executing the Client">
+                <p>
+                    Send some FIX messages from Banzai to Synapse. Synapse will forward all requests
+                    to Executor and get them processes. Responses from Executor will be routed back
+                    to Banzai.
+                </p>
+                <p>
+                    Note that the session between Banzai and Synapse is a FIX 4.0 session whereas
+                    the session between Synapse and Execurot is a FIX 4.1 session. Synapse receives
+                    FIX 4.0 messages and simply forwards them to the FIX 4.1 endpoint.
+                </p>                
+            </subsection>
+        </section>
+        <p><a href="../samples.html">Back to Catalog</a></p>        
+    </body>
+</document>
\ No newline at end of file
diff --git a/src/site/xdoc/userguide/samples/sample262.xml b/src/site/xdoc/userguide/samples/sample262.xml
new file mode 100644
index 0000000..11d64f5
--- /dev/null
+++ b/src/site/xdoc/userguide/samples/sample262.xml
@@ -0,0 +1,138 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+  ~  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.
+  -->
+
+<document>
+    <properties>
+        <title>Apache Synapse - Sample 262</title>
+    </properties>
+    <body>
+        <section name="Sample 262: Content Based Routing of FIX Messages">
+            <div class="xmlConf">&lt;definitions xmlns="http://ws.apache.org/ns/synapse"&gt;
+
+    &lt;sequence name="CBR_SEQ"&gt;
+        &lt;in&gt;
+            &lt;switch source="//message/body/field[@id='55']"&gt;
+                &lt;case regex="GOOG"&gt;
+                    &lt;send&gt;
+                        &lt;endpoint&gt;
+                            &lt;address
+                                    uri="fix://localhost:19876?BeginString=FIX.4.0&amp;SenderCompID=SYNAPSE&amp;TargetCompID=EXEC"/&gt;
+                        &lt;/endpoint&gt;
+                    &lt;/send&gt;
+                &lt;/case&gt;
+                &lt;case regex="MSFT"&gt;
+                    &lt;send&gt;
+                        &lt;endpoint&gt;
+                            &lt;address
+                                    uri="fix://localhost:19877?BeginString=FIX.4.1&amp;SenderCompID=SYNAPSE&amp;TargetCompID=EXEC"/&gt;
+                        &lt;/endpoint&gt;
+                    &lt;/send&gt;
+                &lt;/case&gt;
+                &lt;default/&gt;
+            &lt;/switch&gt;
+        &lt;/in&gt;
+        &lt;out&gt;
+            &lt;send/&gt;
+        &lt;/out&gt;
+    &lt;/sequence&gt;
+
+    &lt;proxy name="FIXProxy" transports="fix"&gt;
+        &lt;target inSequence="CBR_SEQ"/&gt;
+        &lt;parameter name="transport.fix.AcceptorConfigURL"&gt;
+            file:repository/conf/sample/resources/fix/fix-synapse.cfg
+        &lt;/parameter&gt;
+        &lt;parameter name="transport.fix.AcceptorMessageStore"&gt;
+            file
+        &lt;/parameter&gt;
+        &lt;parameter name="transport.fix.InitiatorConfigURL"&gt;
+            file:repository/conf/sample/resources/fix/synapse-sender.cfg
+        &lt;/parameter&gt;
+        &lt;parameter name="transport.fix.InitiatorMessageStore"&gt;
+            file
+        &lt;/parameter&gt;
+    &lt;/proxy&gt;
+
+&lt;/definitions&gt;</div>
+            <subsection name="Objective">
+                <p>
+                    Show case the ability of Synapse to route FIX messages based on the content they
+                    carry.
+                </p>
+            </subsection>
+            <subsection name="Pre-requisites">
+                <p>
+                    <ul>
+                        <li>
+                            You need a <a href="http://www.quickfixj.org">Quickfix/J</a> installation
+                            to try out FIX samples. Please download and extract a Quickfix/J distribution
+                            into your local machine.
+                        </li>
+                        <li>
+                            Configure the Executor sample FIX application (shipped with Quickfix/J)
+                            to receive messages from Synapse and start it (refer <a href="setup/fix.html#exec">FIX setup guide</a>
+                            for more details). In previous samples we only had a FIX 4.0 session configured
+                            for Executor. For this sample we should also configure a FIX 4.1 session for
+                            Executor. Therefore before starting it add the following entries to the
+                            configuration file of Executor. (Do not remove or change the FIX 4.0
+                            configuration already available in this file)
+                            <div class="consoleOutput">[session]
+BeginString=FIX.4.1
+SocketAcceptPort=19877</div>
+                        </li>
+                        <li>
+                            Enable the FIX transport listener and sender for Synapse (refer
+                            <a href="setup/fix.html#synapse">FIX setup guide</a> for details).
+                        </li>
+                        <li>
+                            Start Synapse using the configuration numbered 262 (repository/conf/sample/synapse_sample_262.xml)
+                            <div class="command">
+                                Unix/Linux: sh synapse.sh -sample 262<br/>
+                                Windows: synapse.bat -sample 262
+                            </div>
+                            If the Executor was configured properly Synapse should establish 2 sessions
+                            with Executor upon startup (FIX 4.0 session and FIX 4.1 session)
+                        </li>
+                        <li>
+                            Configure Banzai sample FIX application (shipped with Quickfix/J) to send
+                            messages to Synapse and start it (refer <a href="setup/fix.html#banzai">FIX setup guide</a>
+                            for more details). You should also add the following entry to the Banzai
+                            configuration file before starting it (replace $SYNAPSE_HOME with the actual
+                            path to Synapse home).
+                            <div class="consoleOutput">DataDictionary=$SYNAPSE_HOME/repository/conf/sample/resources/fix/FIX40-synapse.xml</div>
+                            If Banzai was properly configured, it should establish a FIX 4.0 session with
+                            Synapse upon startup. You should see some session logon messages on Synapse
+                            console and Banzai console.
+                        </li>
+                    </ul>
+                </p>
+            </subsection>
+            <subsection name="Executing the Client">
+                <p>
+                    Send some order requests from Banzai to Synapse containing the synbols 'GOOG' and
+                    'MSFT'. Synapse will forward the messages with the symbol 'GOOG' to the FIX 4.0
+                    session. Messages containing the symbol 'MSFT' will be sent to the FIX 4.1 session.
+                    Any other messages will be simply dropped by the service bus since the default case
+                    of the switch mediator has been kept empty.
+                </p>                
+            </subsection>
+        </section>
+        <p><a href="../samples.html">Back to Catalog</a></p>        
+    </body>
+</document>
\ No newline at end of file
diff --git a/src/site/xdoc/userguide/samples/sample263.xml b/src/site/xdoc/userguide/samples/sample263.xml
new file mode 100644
index 0000000..b5b0e5e
--- /dev/null
+++ b/src/site/xdoc/userguide/samples/sample263.xml
@@ -0,0 +1,180 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!-- ~ 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. -->
+
+<document>
+	<properties>
+		<title>Apache Synapse - Sample 262</title>
+	</properties>
+	<body>
+		<section
+			name="Sample 263: Transport switching - JMS to http/s using JBoss Messaging(JBM)">
+			<div class="xmlConf">
+&lt;definitions xmlns=&quot;http://ws.apache.org/ns/synapse&quot;
+             xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
+             xsi:schemaLocation=&quot;http://ws.apache.org/ns/synapse http://synapse.apache.org/ns/2010/04/configuration/synapse_config.xsd&quot;&gt;
+
+    &lt;proxy name=&quot;StockQuoteProxy&quot; transports=&quot;jms&quot;&gt;
+        &lt;target&gt;
+            &lt;inSequence&gt;
+                &lt;property action=&quot;set&quot; name=&quot;OUT_ONLY&quot; value=&quot;true&quot;/&gt;
+            &lt;/inSequence&gt;
+            &lt;endpoint&gt;
+                &lt;address uri=&quot;http://localhost:9000/services/SimpleStockQuoteService&quot;/&gt;
+            &lt;/endpoint&gt;
+            &lt;outSequence&gt;
+                &lt;send/&gt;
+            &lt;/outSequence&gt;
+        &lt;/target&gt;
+        &lt;publishWSDL uri=&quot;file:repository/conf/sample/resources/proxy/sample_proxy_1.wsdl&quot;/&gt;
+        &lt;parameter name=&quot;transport.jms.ContentType&quot;&gt;
+            &lt;rules&gt;
+                &lt;jmsProperty&gt;contentType&lt;/jmsProperty&gt;
+                &lt;default&gt;application/xml&lt;/default&gt;
+            &lt;/rules&gt;
+        &lt;/parameter&gt;
+    &lt;/proxy&gt;
+&lt;/definitions&gt;
+			</div>
+			<subsection name="Objective">
+				<p>
+					Objective: Introduction to switching transports with proxy
+					services.
+					The JMS provider will be								
+					<a class="externalLink" href="http://jboss.org/jbossmessaging/">JBoss Messaging(JBM).</a>
+				</p>
+			</subsection>
+			<subsection name="Pre-requisites">
+				<p>
+					<ul>
+						<li>
+							Start the Axis2 server and deploy the SimpleStockQuoteService
+							(Refer
+							steps above)
+						</li>
+						<li>
+							<a class="externalLink" href="http://jboss.org/jbossmessaging/">Download</a>
+							, install and start JBM server, and configure Synapse to listen
+							on JBM (refer notes below)
+							<br />
+						</li>
+						<li>
+							Start the Synapse configuration numbered 263
+							<div class="command">
+								Unix/Linux: sh synapse.sh -sample 263
+								<br />
+								Windows: synapse.bat -sample 23
+							</div>
+						</li>
+						<li>
+							We need to configure the required queues in JBM. Add the
+							following entry to JBM jms configuration inside
+							file-config/stand-alone/non-clustered/jbm-jms.xml.
+							Once JBM is
+							installed and started you should get a message as
+							follows:
+							<div class="xmlConf">
+&lt;queue name=&quot;StockQuoteProxy&quot;&gt;
+    &lt;entry name=&quot;StockQuoteProxy&quot;/&gt;
+&lt;/queue&gt;
+							</div>
+						</li>
+						<li>
+							Once you started the JBM server with the above changes you'll be
+							able to see the following on STDOUT
+							<div class="consoleOutput">
+10:18:02,673 INFO [org.jboss.messaging.core.server.impl.MessagingServerImpl] JBoss Messaging Server version 2.0.0.BETA3 (maggot, 104) started
+							</div>
+						</li>
+						<li>
+							<p>You will now need to configure the Axis2 instance used by
+								Synapse
+								(not the sample Axis2 server) to enable JMS support using
+								the
+								above provider. Refer Axis2 documentation on setting up JMS
+								in
+								detail (http://ws.apache.org/axis2/1_1/jms-transport.html).
+								You
+								will also need to copy the jbm-core-client.jar,
+								jbm-jms-client.jar, jnp-client.jar(these jars are inside client
+								folder ) and jbm-transports.jar, netty.jar(these jars are from
+								lib folder) jars from JBM into the lib directory to allow
+								Synapse
+								to connect to the JBM JMS provider. This was tested with
+								JBM
+								2.0.0.BETA3
+							</p>
+						</li>
+						<li>
+							<p>You need to add the following configuration for Axis2 JMS transport listener in axis2.xml found at repository/conf/axis2.xml.
+							</p>
+							<div class="consoleOutput">
+&lt;transportReceiver name=&quot;jms&quot; class=&quot;org.apache.axis2.transport.jms.JMSListener&quot;&gt;
+   &lt;parameter name=&quot;java.naming.factory.initial&quot;&gt;org.jnp.interfaces.NamingContextFactory&lt;/parameter&gt;
+   &lt;parameter name=&quot;java.naming.provider.url&quot;&gt;jnp://localhost:1099&lt;/parameter&gt;
+   &lt;parameter name=&quot;java.naming.factory.url.pkgs&quot;&gt;org.jboss.naming:org.jnp.interfaces&lt;/parameter&gt;
+&lt;parameter name=&quot;transport.jms.ConnectionFactoryJNDIName&quot;&gt;ConnectionFactory&lt;/parameter&gt;
+							</div>
+						</li>
+						<li>
+							On the Synapse debug log you will notice that the JMS listener
+							received the request message as:
+							<div class="consoleOutput">
+[JMSWorker-1] DEBUG ProxyServiceMessageReceiver -Proxy Service StockQuoteProxy received a new message...
+							</div>
+						</li>
+						
+						<li>
+							<p>In this sample, the client sends the request message to the
+								proxy service exposed over JMS in Synsape. Synapse forwards this
+								message to the HTTP EPR of the simple stock quote service hosted
+								on the sample Axis2 server. Note that the operation is out-only
+								and no response is sent back to the client. The
+								transport.jms.ContentType property is necessary to allow the JMS
+								transport to determine the content type of incoming messages.
+								With the given configuration it will first try to read the
+								content type from the 'contentType' message property and fall
+								back to 'application/xml' (i.e. POX) if this property is not
+								set.
+								Note that the JMS client used in this example doesn't send any
+								content type information.
+							</p>
+						</li>
+
+					</ul>
+				</p>
+			</subsection>
+			  <subsection name="Executing the Client">
+                <p>
+                    Once you start the Synapse configuration 250 and request for the WSDL of the 
+                    proxy service (http://localhost:8280/services/StockQuoteProxy?wsdl) you will 
+                    notice that its exposed only on the JMS transport. This is because the configuration specified this 
+                    requirement in the proxy service definition.
+                </p>         
+                <div class="command">
+ant jmsclient -Djms_type=pox -Djms_dest=StockQuoteProxy -Djms_payload=MSFT -Djava.naming.provider.url=jnp://localhost:1099 -Djava.naming.factory.initial=org.jnp.interfaces.NamingContextFactory -D=java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
+				</div>     
+				   
+				   <p>Now if you examine the console running the sample Axis2 server,
+							you will see a message indicating that the server has accepted an
+							order as follows: </p>
+							<div class="consoleOutput">
+Accepted order for : 16517 stocks of MSFT at $169.14622538721846
+							</div> 
+            </subsection>
+
+		</section>
+		<p>
+			<a href="../samples.html">Back to Catalog</a>
+		</p>
+	</body>
+</document>
\ No newline at end of file
diff --git a/src/site/xdoc/userguide/samples/sample264.xml b/src/site/xdoc/userguide/samples/sample264.xml
new file mode 100644
index 0000000..07e5710
--- /dev/null
+++ b/src/site/xdoc/userguide/samples/sample264.xml
@@ -0,0 +1,98 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+  ~  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.
+  -->
+
+<document>
+    <properties>
+        <title>Apache Synapse - Sample 264</title>
+    </properties>
+    <body>
+        <section name="Sample 264: Request-Response Invocations with the JMS Transport">
+            <div class="xmlConf">&lt;definitions xmlns="http://ws.apache.org/ns/synapse"&gt;
+
+    &lt;proxy name="StockQuoteProxy" transports="http"&gt;
+        &lt;target&gt;
+            &lt;endpoint&gt;
+                &lt;address
+                        uri="jms:/SimpleStockQuoteService?transport.jms.ConnectionFactoryJNDIName=QueueConnectionFactory&amp;java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory&amp;java.naming.provider.url=tcp://localhost:61616&amp;transport.jms.DestinationType=queue"/&gt;
+            &lt;/endpoint&gt;
+            &lt;inSequence&gt;
+                &lt;property action="set" name="transport.jms.ContentTypeProperty" value="Content-Type"
+                          scope="axis2"/&gt;
+            &lt;/inSequence&gt;
+            &lt;outSequence&gt;
+                &lt;property action="remove" name="TRANSPORT_HEADERS" scope="axis2"/&gt;
+                &lt;send/&gt;
+            &lt;/outSequence&gt;
+        &lt;/target&gt;
+        &lt;publishWSDL uri="file:repository/conf/sample/resources/proxy/sample_proxy_1.wsdl"/&gt;
+    &lt;/proxy&gt;
+
+&lt;/definitions&gt;</div>
+            <subsection name="Objective">
+                <p>
+                    In <a href="sample251.html">sample 251</a> we saw how to perform transport switching
+                    between HTTP and JMS using a one-way invocation. Here we will do HTTP to JMS switching
+                    with a two-way, request-response invocation.
+                </p>
+            </subsection>
+            <subsection name="Pre-requisites">
+                <p>
+                    <ul>
+                        <li>
+                            Setup and start a JMS broker (Apache ActiveMQ can be used as the
+                            JMS broker for this scenario. Refer <a href="setup/jms.html#pre">JMS setup guide</a>
+                            for information on how to run ActiveMQ.)
+                        </li>
+                        <li>
+                            Enable the JMS transport receiver of the sample Axis2 server (Refer
+                            <a href="setup/jms.html#server">JMS setup guide</a> for details)
+                        </li>
+                        <li>
+                            Deploy the SimpleStockQuoteService in the sample Axis2 server and start Axis2 (Since
+                            the JMS receiver is enabled, Axis2 will start polling on a JMS queue)
+                        </li>
+                        <li>
+                            Start Synapse using the configuration numbered 264 (repository/conf/sample/synapse_sample_264.xml)
+                            <div class="command">
+                                Unix/Linux: sh synapse.sh -sample 264<br/>
+                                Windows: synapse.bat -sample 264
+                            </div>
+                        </li>
+                    </ul>
+                </p>
+            </subsection>
+            <subsection name="Executing the Client">
+                <p>
+                    Send a stock quote request to Synapse over HTTP using the following command.
+                </p>
+                <div class="command">ant stockquote -Daddurl=http://localhost:8280/services/StockQuoteProxy -Dsymbol=MSFT</div>
+                <p>
+                    The proxy service will send the message to the JMS queue named SimpleStockQuoteService
+                    and wait for a response to arrive. In fact the JMS sender in Synapse will create a temporary
+                    queue to start polling on that queue for the response. The address of this queue will
+                    be sent on the request as a JMS header. Axis2 server will consumer the request from the
+                    queue and place a response on the temporary queue created by Synapse. At this point
+                    Synapse will pick up the response and forward it back to the Axis2 client over HTTP.
+                </p>                
+            </subsection>
+        </section>
+        <p><a href="../samples.html">Back to Catalog</a></p>        
+    </body>
+</document>
\ No newline at end of file
diff --git a/src/site/xdoc/userguide/samples/sample265.xml b/src/site/xdoc/userguide/samples/sample265.xml
new file mode 100644
index 0000000..fecab19
--- /dev/null
+++ b/src/site/xdoc/userguide/samples/sample265.xml
@@ -0,0 +1,106 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+  ~  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.
+  -->
+
+<document>
+    <properties>
+        <title>Apache Synapse - Sample 265</title>
+    </properties>
+    <body>
+        <section name="Sample 265: Switching from TCP to HTTP/S">
+            <div class="xmlConf">&lt;definitions xmlns="http://ws.apache.org/ns/synapse"&gt;
+
+    &lt;proxy name="StockQuoteProxy" transports="tcp"&gt;
+        &lt;target&gt;
+            &lt;endpoint&gt;
+                &lt;address uri="http://localhost:9000/services/SimpleStockQuoteService"/&gt;
+            &lt;/endpoint&gt;
+            &lt;inSequence&gt;
+                &lt;log level="full"/&gt;
+                &lt;property name="OUT_ONLY" value="true"/&gt;
+            &lt;/inSequence&gt;
+        &lt;/target&gt;
+    &lt;/proxy&gt;
+
+&lt;/definitions&gt;</div>
+            <subsection name="Objective">
+                <p>
+                    Demonstrate the ability of Synapse to receive raw TCP messages and send them to
+                    HTTP endpoints
+                </p>
+            </subsection>
+            <subsection name="Pre-requisites">
+                <p>
+                    <ul>
+                        <li>
+                            Deploy the SimpleStockQuoteService in the sample Axis2 server and start Axis2
+                        </li>
+                        <li>
+                            Enable the TCP transport receiver for Synapse (refer
+                            <a href="setup/tcp_udp.html#tcp">TCP transport setup guide</a>).
+                        </li>
+                        <li>
+                            Start Synapse using the configuration numbered 265 (repository/conf/sample/synapse_sample_265.xml)
+                            <div class="command">
+                                Unix/Linux: sh synapse.sh -sample 265<br/>
+                                Windows: synapse.bat -sample 265
+                            </div>
+                        </li>
+                        <li>
+                            Enable the TCP transport sender for the sample Axis2 client (refer
+                            <a href="setup/tcp_udp.html#tcp">TCP transport setup guide</a> for
+                            details).
+                        </li>
+                    </ul>
+                </p>
+            </subsection>
+            <subsection name="Executing the Client">
+                <p>
+                    This sample is similar to <a href="sample250.html">Sample 250</a>. Only difference
+                    is instead of the JMS transport we will be using the TCP transport to receive
+                    messages. TCP is not an application layer protocol. Hence there are no application
+                    level headers available in the requests. Synapse has to simply read the XML content
+                    coming through the socket and dispatch it to the right proxy service based on the
+                    information available in the message payload itself. The TCP transport is capable
+                    of dispatching requests based on addressing headers or the first element in the
+                    SOAP body. In this sample, we will get the sample client to send WS-Addressing
+                    headers in the request. Therefore the dispatching will take place based on the
+                    addressing header values.
+                </p>
+                <p>
+                    Invoke the stockquote client using the following command. Note the TCP URL in the
+                    command.
+                </p>
+                <div class="command">ant stockquote -Daddurl=tcp://localhost:6060/services/StockQuoteProxy -Dmode=placeorder</div>
+                <p>
+                    The TCP transport will receive the message and hand it over to the mediation engine.
+                    Synapse will dispatch the request to the StockQuoteProxy service based on the
+                    addressing header values.
+                </p>
+                <p>
+                    When the proxy service forwards the message to the sample Axis2 server over HTTP,
+                    sample server will print the following entry to confirm that the request has
+                    been received.
+                </p>
+                <div class="consoleOutput">Thu May 20 12:25:01 IST 2010 samples.services.SimpleStockQuoteService  :: Accepted order #1 for : 17621 stocks of IBM at $ 73.48068475255796</div>
+            </subsection>
+        </section>
+        <p><a href="../samples.html">Back to Catalog</a></p>        
+    </body>
+</document>
\ No newline at end of file
diff --git a/src/site/xdoc/userguide/samples/sample266.xml b/src/site/xdoc/userguide/samples/sample266.xml
new file mode 100644
index 0000000..f688963
--- /dev/null
+++ b/src/site/xdoc/userguide/samples/sample266.xml
@@ -0,0 +1,100 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+  ~  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.
+  -->
+
+<document>
+    <properties>
+        <title>Apache Synapse - Sample 266</title>
+    </properties>
+    <body>
+        <section name="Sample 266: Switching from UDP to HTTP/S">
+            <div class="xmlConf">&lt;definitions xmlns="http://ws.apache.org/ns/synapse"&gt;
+
+    &lt;proxy name="StockQuoteProxy" transports="udp"&gt;
+        &lt;target&gt;
+            &lt;endpoint&gt;
+                &lt;address uri="http://localhost:9000/services/SimpleStockQuoteService"/&gt;
+            &lt;/endpoint&gt;
+            &lt;inSequence&gt;
+                &lt;log level="full"/&gt;
+                &lt;property name="OUT_ONLY" value="true"/&gt;
+            &lt;/inSequence&gt;
+        &lt;/target&gt;
+        &lt;parameter name="transport.udp.port"&gt;9999&lt;/parameter&gt;
+        &lt;parameter name="transport.udp.contentType"&gt;text/xml&lt;/parameter&gt;
+        &lt;publishWSDL uri="file:repository/conf/sample/resources/proxy/sample_proxy_1.wsdl"/&gt;
+    &lt;/proxy&gt;
+
+&lt;/definitions&gt;</div>
+            <subsection name="Objective">
+                <p>
+                    Showcase the ability of Synapse to receive and process raw UDP messages
+                </p>
+            </subsection>
+            <subsection name="Pre-requisites">
+                <p>
+                    <ul>
+                        <li>
+                            Deploy the SimpleStockQuoteService in the sample Axis2 server and start Axis2
+                        </li>
+                        <li>
+                            Enable the UDP transport receiver for Synapse (refer
+                            <a href="setup/tcp_udp.html#udp">UDP transport setup guide</a>).
+                        </li>
+                        <li>
+                            Start Synapse using the configuration numbered 266 (repository/conf/sample/synapse_sample_266.xml)
+                            <div class="command">
+                                Unix/Linux: sh synapse.sh -sample 266<br/>
+                                Windows: synapse.bat -sample 266
+                            </div>
+                        </li>
+                        <li>
+                            Enable the UDP transport sender for the sample Axis2 client (refer
+                            <a href="setup/tcp_udp.html#udp">UDP transport setup guide</a> for
+                            details).
+                        </li>
+                    </ul>
+                </p>
+            </subsection>
+            <subsection name="Executing the Client">
+                <p>
+                    This sample is similar to <a href="sample265.html">Sample 265</a>. Only difference
+                    is instead of the TCP transport we will be using the UDP transport to receive
+                    messages.
+                </p>
+                <p>
+                    Invoke the stockquote client using the following command. Note the UDP URL in the
+                    command.
+                </p>
+                <div class="command">ant stockquote -Daddurl=udp://localhost:9999?contentType=text/xml -Dmode=placeorder</div>
+                <p>
+                    Since we have configured the content type as text/xml for the proxy service,
+                    incoming messages will be processed as SOAP 1.1 messages.
+                </p>
+                <p>
+                    When the proxy service forwards the message to the sample Axis2 server over HTTP,
+                    sample server will print the following entry to confirm that the request has
+                    been received.
+                </p>
+                <div class="consoleOutput">Thu May 20 12:25:01 IST 2010 samples.services.SimpleStockQuoteService  :: Accepted order #1 for : 17621 stocks of IBM at $ 73.48068475255796</div>
+            </subsection>
+        </section>
+        <p><a href="../samples.html">Back to Catalog</a></p>        
+    </body>
+</document>
\ No newline at end of file
diff --git a/src/site/xdoc/userguide/samples/sample3.xml b/src/site/xdoc/userguide/samples/sample3.xml
new file mode 100644
index 0000000..4b7d803
--- /dev/null
+++ b/src/site/xdoc/userguide/samples/sample3.xml
@@ -0,0 +1,121 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+  ~  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.
+  -->
+
+<document>
+    <properties>
+        <title>Apache Synapse - Sample 3</title>
+    </properties>
+    <body>
+        <section name="Sample 3: Local Registry Entries, Reusable Endpoints and Sequences">
+            <div class="xmlConf">&lt;definitions xmlns="http://ws.apache.org/ns/synapse"&gt;
+    &lt;!-- define a string resource entry to the local registry --&gt;
+    &lt;localEntry key="version"&gt;0.1&lt;/localEntry&gt;
+    &lt;!-- define a reuseable endpoint definition --&gt;
+    &lt;endpoint name="simple"&gt;
+        &lt;address uri="http://localhost:9000/services/SimpleStockQuoteService"/&gt;
+    &lt;/endpoint&gt;
+
+    &lt;!-- define a reusable sequence --&gt;
+    &lt;sequence name="stockquote"&gt;
+        &lt;!-- log the message using the custom log level. illustrates custom properties for log --&gt;
+        &lt;log level="custom"&gt;
+            &lt;property name="Text" value="Sending quote request"/&gt;
+            &lt;property name="version" expression="get-property('version')"/&gt;
+            &lt;property name="direction" expression="get-property('direction')"/&gt;
+        &lt;/log&gt;
+        &lt;!-- send message to real endpoint referenced by key "simple" endpoint definition --&gt;
+        &lt;send&gt;
+            &lt;endpoint key="simple"/&gt;
+        &lt;/send&gt;
+    &lt;/sequence&gt;
+
+    &lt;sequence name="main"&gt;
+        &lt;in&gt;
+            &lt;property name="direction" value="incoming"/&gt;
+            &lt;sequence key="stockquote"/&gt;
+        &lt;/in&gt;
+        &lt;out&gt;
+            &lt;send/&gt;
+        &lt;/out&gt;
+    &lt;/sequence&gt;
+&lt;/definitions&gt;</div>
+            <subsection name="Objective">
+                <p>
+                    Demonstrates how to define local registry entries, sequences and endpoints in a
+                    reusable manner so that they can be used for mediation by referencing them by
+                    names.
+                </p>
+            </subsection>
+            <subsection name="Pre-requisites">
+                <p>
+                    <ul>
+                        <li>
+                            Deploy the SimpleStockQuoteService in the sample Axis2 server and start Axis2
+                        </li>
+                        <li>
+                            Start Synapse using the configuration numbered 3 (repository/conf/sample/synapse_sample_3.xml)
+                            <div class="command">
+                                Unix/Linux: sh synapse.sh -sample 3<br/>
+                                Windows: synapse.bat -sample 3
+                            </div>
+                        </li>
+                    </ul>
+                </p>
+            </subsection>
+            <subsection name="Executing the Client">
+                <p>
+                    Execute the sample client as follows.
+                </p>
+                <div class="command">ant stockquote -Daddurl=http://localhost:9000/services/SimpleStockQuoteService -Dtrpurl=http://localhost:8280/</div>
+                <p>
+                    This example uses a sequence named  'main' that specifies the main mediation
+                    rules to be executed. Following through the mediation logs you will notice
+                    that the sequence named 'main' is executed on receiving the requests (The main 
+                    sequence acts as the default entry point for messages received by Synapse). Then
+                    for the incoming message flow the 'in' mediator executes, and it calls the sequence
+                    named 'stockquote'.
+                </p>
+                <div class="consoleOutput">DEBUG SequenceMediator - Sequence mediator &lt;main&gt; :: mediate()
+DEBUG InMediator - In mediator mediate()
+DEBUG SequenceMediator - Sequence mediator &lt;stockquote&gt; :: mediate()</div>
+                <p>
+                    As the 'stockquote' sequence executes, the log mediator dumps a simple text/string
+                    property, result of an XPath evaluation, that picks up the key named 'version',
+                    and a second result of an XPath evaluation that picks up a local message property
+                    set previously by the property mediator. The get-property() XPath extension
+                    function is able to read message properties local to the current message, local
+                    or remote registry entries, Axis2 message context properties as well as transport
+                    headers. The local entry definition for 'version' defines a simple text/string
+                    registry entry which is visible to all messages that pass through Synapse.
+                </p>
+                <div class="consoleOutput">[HttpServerWorker-1] INFO  LogMediator - Text = Sending quote request, version = 0.1, direction = incoming
+[HttpServerWorker-1] DEBUG SendMediator - Send mediator :: mediate()
+[HttpServerWorker-1] DEBUG AddressEndpoint - Sending To: http://localhost:9000/services/SimpleStockQuoteService </div>
+                <p>
+                    Responses from the Axis2 server will also get dispatched to the main sequence.
+                    But because they are responses the in mediator will not be executed on them.
+                    Only the out mediator will execute on these messages which simply sends them
+                    back to the client using a send mediator.
+                </p>
+            </subsection>
+        </section>
+        <p><a href="../samples.html">Back to Catalog</a></p>        
+    </body>
+</document>
\ No newline at end of file
diff --git a/src/site/xdoc/userguide/samples/sample300.xml b/src/site/xdoc/userguide/samples/sample300.xml
new file mode 100644
index 0000000..d939bae
--- /dev/null
+++ b/src/site/xdoc/userguide/samples/sample300.xml
@@ -0,0 +1,105 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+  ~  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.
+  -->
+
+<document>
+    <properties>
+        <title>Apache Synapse - Sample 300</title>
+    </properties>
+    <body>
+        <section name="Sample 300: Introduction to Synapse Tasks">
+            <div class="xmlConf">&lt;definitions xmlns="http://ws.apache.org/ns/synapse"&gt;
+
+    &lt;task class="org.apache.synapse.startup.tasks.MessageInjector" name="CheckPrice"&gt;
+        &lt;property name="to" value="http://localhost:9000/services/SimpleStockQuoteService"/&gt;
+        &lt;property name="soapAction" value="urn:getQuote"/&gt;
+        &lt;property name="message"&gt;
+            &lt;m0:getQuote xmlns:m0="http://services.samples"&gt;
+                &lt;m0:request&gt;
+                    &lt;m0:symbol&gt;IBM&lt;/m0:symbol&gt;
+                &lt;/m0:request&gt;
+            &lt;/m0:getQuote&gt;
+        &lt;/property&gt;
+        &lt;trigger interval="5"/&gt;
+    &lt;/task&gt;
+
+    &lt;sequence name="main"&gt;
+        &lt;in&gt;
+            &lt;send/&gt;
+        &lt;/in&gt;
+        &lt;out&gt;
+            &lt;log level="custom"&gt;
+                &lt;property xmlns:ax21="http://services.samples/xsd"
+                          xmlns:ns="http://services.samples" name="Stock_Quote_on"
+                          expression="//ns:return/ax21:lastTradeTimestamp/child::text()"/&gt;
+                &lt;property xmlns:ax21="http://services.samples/xsd"
+                          xmlns:ns="http://services.samples" name="For_the_organization"
+                          expression="//ns:return/ax21:name/child::text()"/&gt;
+                &lt;property xmlns:ax21="http://services.samples/xsd"
+                          xmlns:ns="http://services.samples" name="Last_Value"
+                          expression="//ns:return/ax21:last/child::text()"/&gt;
+            &lt;/log&gt;
+        &lt;/out&gt;
+    &lt;/sequence&gt;
+
+&lt;/definitions&gt;</div>
+            <subsection name="Objective">
+                <p>
+                    Demonstrate how to schedule tasks in the Synapse runtime for periodic execution
+                </p>
+            </subsection>
+            <subsection name="Pre-requisites">
+                <p>
+                    <ul>
+                        <li>
+                            Deploy the SimpleStockQuoteService in the sample Axis2 server and start Axis2
+                        </li>
+                        <li>
+                            Start Synapse using the configuration numbered 300 (repository/conf/sample/synapse_sample_300.xml)
+                            <div class="command">
+                                Unix/Linux: sh synapse.sh -sample 300<br/>
+                                Windows: synapse.bat -sample 300
+                            </div>
+                        </li>
+                    </ul>
+                </p>
+            </subsection>
+            <subsection name="Executing the Client">
+                <p>
+                    The above configuration adds a scheduled task to the Synapse runtime. The task
+                    is configured to run every 5 seconds (note the 'interval' attribute on the 'trigger'
+                    element).
+                </p>
+                <p>
+                    One can write his/her own tasks implementing the org.apache.synapse.task.Task
+                    interface and programming the 'execute' method to run the necessary logic. For
+                    this particular sample we have used the MessageInjector class which just injects
+                    a message into Synapse environment. In the configuration we have set the message
+                    payload to be the stock quote request payload.
+                </p>
+                <p>
+                    In this sample, injected messages will be sent to the sample Axis2 server which
+                    will send back a response to Synapse. So every 5 seconds you will notice that Axis2
+                    is generating a quote and Synapse is receiving the stock quote response.
+                </p>
+            </subsection>
+        </section>
+        <p><a href="../samples.html">Back to Catalog</a></p>        
+    </body>
+</document>
\ No newline at end of file
diff --git a/src/site/xdoc/userguide/samples/sample350.xml b/src/site/xdoc/userguide/samples/sample350.xml
new file mode 100644
index 0000000..ffb6865
--- /dev/null
+++ b/src/site/xdoc/userguide/samples/sample350.xml
@@ -0,0 +1,124 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+  ~  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.
+  -->
+
+<document>
+    <properties>
+        <title>Apache Synapse - Sample 350</title>
+    </properties>
+    <body>
+        <section name="Sample 350: Introduction to the Script Mediator using JavaScript">
+            <div class="xmlConf">&lt;definitions xmlns="http://ws.apache.org/ns/synapse"&gt;
+
+    &lt;registry provider="org.apache.synapse.registry.url.SimpleURLRegistry"&gt;
+        &lt;!-- the root property of the simple URL registry helps resolve a resource URL as root + key --&gt;
+        &lt;parameter name="root"&gt;file:repository/conf/sample/resources/&lt;/parameter&gt;
+        &lt;!-- all resources loaded from the URL registry would be cached for this number of milli seconds --&gt;
+        &lt;parameter name="cachableDuration"&gt;15000&lt;/parameter&gt;
+    &lt;/registry&gt;
+
+    &lt;localEntry key="stockquoteScript"
+                src="file:repository/conf/sample/resources/script/stockquoteTransformRequest.js"/&gt;
+
+    &lt;sequence name="main"&gt;
+        &lt;in&gt;
+            &lt;!-- transform the custom quote request into a standard quote request expected by the service --&gt;
+            &lt;script language="js" key="stockquoteScript" function="transformRequest"/&gt;
+            &lt;send&gt;
+                &lt;endpoint&gt;
+                    &lt;address uri="http://localhost:9000/services/SimpleStockQuoteService"/&gt;
+                &lt;/endpoint&gt;
+            &lt;/send&gt;
+        &lt;/in&gt;
+        &lt;out&gt;
+            &lt;!-- transform the standard response back into the custom format the client expects --&gt;
+            &lt;script language="js" key="script/stockquoteTransformResponse.js"
+                    function="transformResponse"/&gt;
+            &lt;send/&gt;
+        &lt;/out&gt;
+    &lt;/sequence&gt;
+
+&lt;/definitions&gt;</div>
+            <p>
+                The JavaScript resource file referenced by the configuration looks like this.
+            </p>
+            <div class="xmlConf">&lt;x&gt;&lt;![CDATA[
+  function transformRequest(mc) {
+     var symbol = mc.getPayloadXML()..*::Code.toString();
+     mc.setPayloadXML(
+        &lt;m:getQuote xmlns:m=&quot;http://services.samples&quot;&gt;
+           &lt;m:request&gt;
+              &lt;m:symbol&gt;{symbol}&lt;/m:symbol&gt;
+           &lt;/m:request&gt;
+        &lt;/m:getQuote&gt;);
+  }
+
+  function transformResponse(mc) {
+     var symbol = mc.getPayloadXML()..*::symbol.toString();
+     var price = mc.getPayloadXML()..*::last.toString();
+     mc.setPayloadXML(
+        &lt;m:CheckPriceResponse xmlns:m=&quot;http://www.apache-synapse.org/test&quot;&gt;
+           &lt;m:Code&gt;{symbol}&lt;/m:Code&gt;
+           &lt;m:Price&gt;{price}&lt;/m:Price&gt;
+        &lt;/m:CheckPriceResponse&gt;);
+  }
+]]&gt;&lt;/x&gt;</div>
+            <subsection name="Objective">
+                <p>
+                    Showcase the ability to configure the Synapse runtime using common scripting
+                    languages such as JavaScript
+                </p>
+            </subsection>
+            <subsection name="Pre-requisites">
+                <p>
+                    <ul>
+                        <li>
+                            Deploy the SimpleStockQuoteService in the sample Axis2 server and start Axis2
+                        </li>
+                        <li>
+                            Start Synapse using the configuration numbered 350 (repository/conf/sample/synapse_sample_350.xml)
+                            <div class="command">
+                                Unix/Linux: sh synapse.sh -sample 350<br/>
+                                Windows: synapse.bat -sample 350
+                            </div>
+                        </li>
+                    </ul>
+                </p>
+            </subsection>
+            <subsection name="Executing the Client">
+                <p>
+                    This sample is similar to <a href="sample8.html">sample 8</a> but instead of using
+                    XSLT, the transformation is done using JavaScript and E4X. Note that the script
+                    source is loaded from a resource in the file system which must be wrapped in
+                    CDATA tags within an XML element. The script used in this example has two functions, 
+                    'transformRequest' and 'transformResponse'. The Synapse configuration uses the
+                    'function' attribute to specify which function should be invoked. Use the stock
+                    quote client to send a custom quote request as follows.
+                </p>
+                <div class="command">ant stockquote -Daddurl=http://localhost:9000/services/SimpleStockQuoteService -Dtrpurl=http://localhost:8280/ -Dmode=customquote</div>
+                <p>
+                    Synapse uses the script mediator and the specified JavaScript function to convert
+                    the custom request to a standard quote request. Subsequently the response received
+                    is transformed and sent back to the client.
+                </p>
+            </subsection>
+        </section>
+        <p><a href="../samples.html">Back to Catalog</a></p>        
+    </body>
+</document>
\ No newline at end of file
diff --git a/src/site/xdoc/userguide/samples/sample351.xml b/src/site/xdoc/userguide/samples/sample351.xml
new file mode 100644
index 0000000..495595c
--- /dev/null
+++ b/src/site/xdoc/userguide/samples/sample351.xml
@@ -0,0 +1,99 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+  ~  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.
+  -->
+
+<document>
+    <properties>
+        <title>Apache Synapse - Sample 351</title>
+    </properties>
+    <body>
+        <section name="Sample 351: Inline Scripts with the Script Mediator">
+            <div class="xmlConf">&lt;definitions xmlns="http://ws.apache.org/ns/synapse"&gt;
+
+    &lt;sequence name="main"&gt;
+        &lt;in&gt;
+            &lt;!-- transform the custom quote request into a standard quote requst expected by the service --&gt;
+            &lt;script language="js"&gt;
+                var symbol = mc.getPayloadXML()..*::Code.toString();
+                mc.setPayloadXML(
+                &lt;m:getQuote xmlns:m="http://services.samples"&gt;
+                    &lt;m:request&gt;
+                        &lt;m:symbol&gt;{symbol}&lt;/m:symbol&gt;
+                    &lt;/m:request&gt;
+                &lt;/m:getQuote&gt;);
+            &lt;/script&gt;
+            &lt;send&gt;
+                &lt;endpoint&gt;
+                    &lt;address uri="http://localhost:9000/services/SimpleStockQuoteService"/&gt;
+                &lt;/endpoint&gt;
+            &lt;/send&gt;
+        &lt;/in&gt;
+        &lt;out&gt;
+            &lt;!-- transform the standard response back into the custom format the client expects --&gt;
+            &lt;script language="js"&gt;
+                var symbol = mc.getPayloadXML()..*::symbol.toString();
+                var price = mc.getPayloadXML()..*::last.toString();
+                mc.setPayloadXML(
+                &lt;m:CheckPriceResponse xmlns:m="http://services.samples/xsd"&gt;
+                    &lt;m:Code&gt;{symbol}&lt;/m:Code&gt;
+                    &lt;m:Price&gt;{price}&lt;/m:Price&gt;
+                &lt;/m:CheckPriceResponse&gt;);
+            &lt;/script&gt;
+            &lt;send/&gt;
+        &lt;/out&gt;
+    &lt;/sequence&gt;
+
+&lt;/definitions&gt;</div>
+            <subsection name="Objective">
+                <p>
+                    <a href="sample350.html">Sample 350</a> shows how to use scripts stored as
+                    external resources for mediation. This sample demonstrates how small scriplets
+                    can be specified inline with the Synapse configuration thus avoiding the requirement
+                    to have an external registry.
+                </p>
+            </subsection>
+            <subsection name="Pre-requisites">
+                <p>
+                    <ul>
+                        <li>
+                            Deploy the SimpleStockQuoteService in the sample Axis2 server and start Axis2
+                        </li>
+                        <li>
+                            Start Synapse using the configuration numbered 351 (repository/conf/sample/synapse_sample_351.xml)
+                            <div class="command">
+                                Unix/Linux: sh synapse.sh -sample 351<br/>
+                                Windows: synapse.bat -sample 351
+                            </div>
+                        </li>
+                    </ul>
+                </p>
+            </subsection>
+            <subsection name="Executing the Client">
+                <p>
+                    The functionality and the behavior of this sample is identical to
+                    <a href="sample350.html">sample 350</a>. Only difference is that, the 2 JS functions
+                    are embedded in the Synapse configuration. To try this out run the following
+                    command on the sample client.
+                </p>
+                <div class="command">ant stockquote -Daddurl=http://localhost:9000/services/SimpleStockQuoteService -Dtrpurl=http://localhost:8280/ -Dmode=customquote</div>
+            </subsection>
+        </section>
+        <p><a href="../samples.html">Back to Catalog</a></p>        
+    </body>
+</document>
\ No newline at end of file
diff --git a/src/site/xdoc/userguide/samples/sample352.xml b/src/site/xdoc/userguide/samples/sample352.xml
new file mode 100644
index 0000000..f02fb7e
--- /dev/null
+++ b/src/site/xdoc/userguide/samples/sample352.xml
@@ -0,0 +1,83 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+  ~  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.
+  -->
+
+<document>
+    <properties>
+        <title>Apache Synapse - Sample 352</title>
+    </properties>
+    <body>
+        <section name="Sample 352: Accessing the Synapse MessageContext API Through Scripts">
+            <div class="xmlConf">&lt;definitions xmlns="http://ws.apache.org/ns/synapse"&gt;
+
+    &lt;sequence name="main"&gt;
+        &lt;in&gt;
+            &lt;!-- change the MessageContext into a response and set a response payload --&gt;
+            &lt;script language="js"&gt;
+                mc.setTo(mc.getReplyTo());
+                mc.setProperty("RESPONSE", "true");
+                mc.setPayloadXML(
+                &lt;ns:getQuoteResponse xmlns:ns="http://services.samples/xsd"&gt;
+                    &lt;ns:return&gt;
+                        &lt;ns:last&gt;99.9&lt;/ns:last&gt;
+                    &lt;/ns:return&gt;
+                &lt;/ns:getQuoteResponse&gt;);
+            &lt;/script&gt;
+        &lt;/in&gt;
+        &lt;send/&gt;
+    &lt;/sequence&gt;
+
+&lt;/definitions&gt;</div>
+            <subsection name="Objective">
+                <p>
+                    Demonstrate how to access various methods on the Synapse MessageContext API
+                    using the script mediator
+                </p>
+            </subsection>
+            <subsection name="Pre-requisites">
+                <p>
+                    <ul>
+                        <li>
+                            Start Synapse using the configuration numbered 352 (repository/conf/sample/synapse_sample_352.xml)
+                            <div class="command">
+                                Unix/Linux: sh synapse.sh -sample 352<br/>
+                                Windows: synapse.bat -sample 352
+                            </div>
+                        </li>
+                    </ul>
+                </p>
+            </subsection>
+            <subsection name="Executing the Client">
+                <p>
+                    This example shows how an inline JavaScript can access the Synapse message context
+                    API to set its 'To' EPR and to set a custom property to mark it as a response. Execute
+                    the stock quote client, and you will receive the response '99.9' as the last sale
+                    price as per the above script. 
+                </p>
+                <div class="command">ant stockquote -Daddurl=http://localhost:9000/services/SimpleStockQuoteService -Dtrpurl=http://localhost:8280/</div>
+                <p>
+                    Note that the symbol 'mc' is bound to the Synapse MessageContext object by the
+                    script mediator. Then the user can invoke various methods on the message context
+                    using common JavaScript syntax such as mc.getProperty('name') and mc.setTo('epr').
+                </p>
+            </subsection>
+        </section>
+        <p><a href="../samples.html">Back to Catalog</a></p>        
+    </body>
+</document>
\ No newline at end of file
diff --git a/src/site/xdoc/userguide/samples/sample353.xml b/src/site/xdoc/userguide/samples/sample353.xml
new file mode 100644
index 0000000..62b4073
--- /dev/null
+++ b/src/site/xdoc/userguide/samples/sample353.xml
@@ -0,0 +1,124 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+  ~  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.
+  -->
+
+<document>
+    <properties>
+        <title>Apache Synapse - Sample 353</title>
+    </properties>
+    <body>
+        <section name="Sample 353: Using Ruby Scripts for Mediation">
+            <div class="xmlConf">&lt;definitions xmlns="http://ws.apache.org/ns/synapse"&gt;
+
+    &lt;localEntry key="stockquoteScript"
+                src="file:repository/conf/sample/resources/script/stockquoteTransform.rb"/&gt;
+
+    &lt;sequence name="main"&gt;
+        &lt;in&gt;
+            &lt;!-- transform the custom quote request into a standard quote request expected by the service --&gt;
+            &lt;script language="rb" key="stockquoteScript" function="transformRequest"/&gt;
+
+            &lt;!-- send message to real endpoint referenced by name "stockquote" and stop --&gt;
+            &lt;send&gt;
+                &lt;endpoint name="stockquote"&gt;
+                    &lt;address uri="http://localhost:9000/services/SimpleStockQuoteService"/&gt;
+                &lt;/endpoint&gt;
+            &lt;/send&gt;
+        &lt;/in&gt;
+        &lt;out&gt;
+            &lt;!-- transform the standard response back into the custom format the client expects --&gt;
+            &lt;script language="rb" key="stockquoteScript" function="transformResponse"/&gt;
+            &lt;send/&gt;
+        &lt;/out&gt;
+    &lt;/sequence&gt;
+
+&lt;/definitions&gt;</div>
+            <p>
+                The external script referenced by the configuration contains the following Ruby
+                scriplet.
+            </p>
+            <div class="xmlConf">&lt;x&gt;&lt;![CDATA[
+require 'rexml/document'
+include REXML
+
+def transformRequest(mc)
+   newRequest= Document.new '&lt;m:getQuote xmlns:m=&quot;http://services.samples&quot;&gt;'&lt;&lt;
+      '&lt;m:request&gt;&lt;m:symbol&gt;&lt;/m:symbol&gt;&lt;/m:request&gt;&lt;/m:getQuote&gt;'
+   newRequest.root.elements[1].elements[1].text = mc.getPayloadXML().root.elements[1].get_text
+   mc.setPayloadXML(newRequest)
+end
+
+def transformResponse(mc)
+   newResponse = Document.new '&lt;m:CheckPriceResponse xmlns:m=&quot;http://www.apache-synapse.org/test&quot;&gt;&lt;m:Code&gt;' &lt;&lt;
+      '&lt;/m:Code&gt;&lt;m:Price&gt;&lt;/m:Price&gt;&lt;/m:CheckPriceResponse&gt;'
+   newResponse.root.elements[1].text = mc.getPayloadXML().root.elements[1].elements[1].get_text
+   newResponse.root.elements[2].text = mc.getPayloadXML().root.elements[1].elements[2].get_text
+   mc.setPayloadXML(newResponse)
+end
+]]&gt;&lt;/x&gt;</div>
+            <subsection name="Objective">
+                <p>
+                    The script mediator of Synapse can be programmed using any BSF compatible
+                    programming language. <a href="sample250.html">Sample 250</a> shows how to
+                    configure it using JavaScript. This sample shows how to configure the script
+                    mediator with Ruby.
+                </p>
+            </subsection>
+            <subsection name="Pre-requisites">
+                <p>
+                    <ul>
+                         <li>
+                           This sample uses Ruby so first setup support for this in Synapse as described at
+							<a href="setup/script.html#ruby">Configuring JRuby</a>
+							<br />
+                        </li>
+                        <li>
+                            Deploy the SimpleStockQuoteService in the sample Axis2 server and start Axis2
+                        </li>
+                        <li>
+                            Synapse does not ship with a Ruby engine by default. Therefore you should
+                            download the Ruby engine from JRuby site and copy the downloaded jar file
+                            to the 'lib' directory of Synapse.
+                        </li>
+                        <li>
+                            Start Synapse using the configuration numbered 353 (repository/conf/sample/synapse_sample_353.xml)
+                            <div class="command">
+                                Unix/Linux: sh synapse.sh -sample 353<br/>
+                                Windows: synapse.bat -sample 353
+                            </div>
+                        </li>
+                    </ul>
+                </p>
+            </subsection>
+            <subsection name="Executing the Client">
+                <p>
+                    This sample is identical to <a href="sample350.html">sample 350</a> with the
+                    only difference being the use of Ruby instead of JavaScript. Use the stock
+                    quote client to send a custom quote request as follows.
+                </p>
+                <div class="command">ant stockquote -Daddurl=http://localhost:9000/services/SimpleStockQuoteService -Dtrpurl=http://localhost:8280/ -Dmode=customquote</div>
+                <p>
+                    The Ruby scriplets will transform the requests and responses as they flow through
+                    the service bus.
+                </p>
+            </subsection>
+        </section>
+        <p><a href="../samples.html">Back to Catalog</a></p>        
+    </body>
+</document>
\ No newline at end of file
diff --git a/src/site/xdoc/userguide/samples/sample354.xml b/src/site/xdoc/userguide/samples/sample354.xml
new file mode 100644
index 0000000..767a19d
--- /dev/null
+++ b/src/site/xdoc/userguide/samples/sample354.xml
@@ -0,0 +1,108 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+  ~  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.
+  -->
+
+<document>
+    <properties>
+        <title>Apache Synapse - Sample 354</title>
+    </properties>
+    <body>
+        <section name="Sample 354: Using Inline Ruby Scripts for Mediation">
+            <div class="xmlConf">&lt;definitions xmlns="http://ws.apache.org/ns/synapse"&gt;
+
+    &lt;sequence name="main"&gt;
+        &lt;in&gt;
+            &lt;script language="rb"&gt;
+
+                require 'rexml/document'
+                include REXML
+                newRequest= Document.new '&lt;m:getQuote xmlns:m="http://services.samples"&gt;&lt;m:request&gt;&lt;m:symbol&gt;...test...&lt;/m:symbol&gt;&lt;/m:request&gt;&lt;/m:getQuote&gt;'
+                newRequest.root.elements[1].elements[1].text =
+                $mc.getPayloadXML().root.elements[1].get_text
+                $mc.setPayloadXML(newRequest)
+
+            &lt;/script&gt;
+            &lt;send&gt;
+                &lt;endpoint&gt;
+                    &lt;address uri="http://localhost:9000/services/SimpleStockQuoteService"/&gt;
+                &lt;/endpoint&gt;
+            &lt;/send&gt;
+        &lt;/in&gt;
+        &lt;out&gt;
+            &lt;script language="rb"&gt;
+
+                require 'rexml/document'
+                include REXML
+                newResponse = Document.new '&lt;m:CheckPriceResponse
+                xmlns:m="http://services.samples/xsd"&gt;&lt;m:Code&gt;&lt;/m:Code&gt;&lt;m:Price&gt;&lt;/m:Price&gt;&lt;/m:CheckPriceResponse&gt;'
+                newResponse.root.elements[1].text =
+                $mc.getPayloadXML().root.elements[1].elements[1].get_text
+                newResponse.root.elements[2].text =
+                $mc.getPayloadXML().root.elements[1].elements[2].get_text
+                $mc.setPayloadXML(newResponse)
+
+            &lt;/script&gt;
+            &lt;send/&gt;
+        &lt;/out&gt;
+    &lt;/sequence&gt;
+
+&lt;/definitions&gt;</div>
+            <subsection name="Objective">
+                <p>
+                    Shows how to embed Ruby scripts in the Synapse configuration itself.
+                </p>
+            </subsection>
+            <subsection name="Pre-requisites">
+                <p>
+                    <ul>
+                     	<li>
+                           This sample uses Ruby, so first setup support for this in Synapse as described at
+							<a href="setup/script.html#ruby">Configuring JRuby</a>
+                        </li>
+                        <li>
+                            Deploy the SimpleStockQuoteService in the sample Axis2 server and start Axis2
+                        </li>
+                        <li>
+                            Synapse does not ship with a Ruby engine by default. Therefore you should
+                            download the Ruby engine from JRuby site and copy the downloaded jar file
+                            to the 'lib' directory of Synapse.
+                        </li>
+                        <li>
+                            Start Synapse using the configuration numbered 354 (repository/conf/sample/synapse_sample_354.xml)
+                            <div class="command">
+                                Unix/Linux: sh synapse.sh -sample 354<br/>
+                                Windows: synapse.bat -sample 354
+                            </div>
+                        </li>
+                    </ul>
+                </p>
+            </subsection>
+            <subsection name="Executing the Client">
+                <p>
+                    Run the sample client as follows.
+                </p>
+                <div class="command">ant stockquote -Daddurl=http://localhost:9000/services/SimpleStockQuoteService -Dtrpurl=http://localhost:8280/ -Dmode=customquote</div>
+                <p>
+                    The inline Ruby scripts will transform the requests and responses.
+                </p>                
+            </subsection>
+        </section>
+        <p><a href="../samples.html">Back to Catalog</a></p>        
+    </body>
+</document>
\ No newline at end of file
diff --git a/src/site/xdoc/userguide/samples/sample360.xml b/src/site/xdoc/userguide/samples/sample360.xml
new file mode 100644
index 0000000..518ba92
--- /dev/null
+++ b/src/site/xdoc/userguide/samples/sample360.xml
@@ -0,0 +1,191 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+  ~  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.
+  -->
+
+<document>
+    <properties>
+        <title>Apache Synapse - Sample 360</title>
+    </properties>
+    <body>
+        <section name="Sample 360: Introduction to DBLookup Mediator">
+            <div class="xmlConf">&lt;definitions xmlns="http://ws.apache.org/ns/synapse"&gt;
+
+    &lt;sequence name="myFaultHandler"&gt;
+        &lt;makefault response="true"&gt;
+            &lt;code xmlns:tns="http://www.w3.org/2003/05/soap-envelope" value="tns:Receiver"/&gt;
+            &lt;reason expression="get-property('ERROR_MESSAGE')"/&gt;
+        &lt;/makefault&gt;
+        &lt;send/&gt;
+        &lt;drop/&gt;
+    &lt;/sequence&gt;
+
+    &lt;sequence name="main" onError="myFaultHandler"&gt;
+        &lt;in&gt;
+            &lt;log level="custom"&gt;
+                &lt;property name="text" value="** Looking up from the Database **"/&gt;
+            &lt;/log&gt;
+            &lt;dblookup&gt;
+                &lt;connection&gt;
+                    &lt;pool&gt;
+                        &lt;driver&gt;org.apache.derby.jdbc.ClientDriver&lt;/driver&gt;
+                        &lt;url&gt;jdbc:derby://localhost:1527/synapsedb;create=false&lt;/url&gt;
+                        &lt;user&gt;synapse&lt;/user&gt;
+                        &lt;password&gt;synapse&lt;/password&gt;
+                    &lt;/pool&gt;
+                &lt;/connection&gt;
+                &lt;statement&gt;
+                    &lt;sql&gt;select * from company where name =?&lt;/sql&gt;
+                    &lt;parameter xmlns:m0="http://services.samples"
+                               expression="//m0:getQuote/m0:request/m0:symbol" type="VARCHAR"/&gt;
+                    &lt;result name="company_id" column="id"/&gt;
+                &lt;/statement&gt;
+            &lt;/dblookup&gt;
+
+            &lt;switch source="get-property('company_id')"&gt;
+                &lt;case regex="c1"&gt;
+                    &lt;log level="custom"&gt;
+                        &lt;property name="text"
+                                  expression="fn:concat('Company ID - ',get-property('company_id'))"/&gt;
+                    &lt;/log&gt;
+                    &lt;send&gt;
+                        &lt;endpoint&gt;
+                            &lt;address uri="http://localhost:9000/services/SimpleStockQuoteService"/&gt;
+                        &lt;/endpoint&gt;
+                    &lt;/send&gt;
+                &lt;/case&gt;
+                &lt;case regex="c2"&gt;
+                    &lt;log level="custom"&gt;
+                        &lt;property name="text"
+                                  expression="fn:concat('Company ID - ',get-property('company_id'))"/&gt;
+                    &lt;/log&gt;
+                    &lt;send&gt;
+                        &lt;endpoint&gt;
+                            &lt;address uri="http://localhost:9000/services/SimpleStockQuoteService"/&gt;
+                        &lt;/endpoint&gt;
+                    &lt;/send&gt;
+                &lt;/case&gt;
+                &lt;case regex="c3"&gt;
+                    &lt;log level="custom"&gt;
+                        &lt;property name="text"
+                                  expression="fn:concat('Company ID - ',get-property('company_id'))"/&gt;
+                    &lt;/log&gt;
+                    &lt;send&gt;
+                        &lt;endpoint&gt;
+                            &lt;address uri="http://localhost:9000/services/SimpleStockQuoteService"/&gt;
+                        &lt;/endpoint&gt;
+                    &lt;/send&gt;
+                &lt;/case&gt;
+                &lt;default&gt;
+                    &lt;log level="custom"&gt;
+                        &lt;property name="text" value="** Unrecognized Company ID **"/&gt;
+                    &lt;/log&gt;
+                    &lt;makefault response="true"&gt;
+                        &lt;code xmlns:tns="http://www.w3.org/2003/05/soap-envelope"
+                              value="tns:Receiver"/&gt;
+                        &lt;reason value="** Unrecognized Company ID **"/&gt;
+                    &lt;/makefault&gt;
+                    &lt;send/&gt;
+                    &lt;drop/&gt;
+                &lt;/default&gt;
+            &lt;/switch&gt;
+            &lt;drop/&gt;
+        &lt;/in&gt;
+
+        &lt;out&gt;
+            &lt;send/&gt;
+        &lt;/out&gt;
+
+    &lt;/sequence&gt;
+
+&lt;/definitions&gt;</div>
+            <subsection name="Objective">
+                <p>
+                    Demonstrating how to perform database lookups during mediation using the dblookup
+                    mediator
+                </p>
+            </subsection>
+            <subsection name="Pre-requisites">
+                <p>
+                    <ul>
+                        <li>
+                            Setup a Derby database as described in the <a href="setup/db.html">database setup guide</a>
+                        </li>
+                        <li>
+                            Deploy the SimpleStockQuoteService in the sample Axis2 server and start Axis2
+                        </li>
+                        <li>
+                            Start Synapse using the configuration numbered 360 (repository/conf/sample/synapse_sample_360.xml)
+                            <div class="command">
+                                Unix/Linux: sh synapse.sh -sample 360<br/>
+                                Windows: synapse.bat -sample 360
+                            </div>
+                        </li>
+                    </ul>
+                </p>
+            </subsection>
+            <subsection name="Executing the Client">
+                <p>
+                    This sample demonstrates simple database read operations through Synapse. When a
+                    message arrives at dblookup mediator, it opens a connection to the database and
+                    executes the given SQL query. The SQL query uses '?' character for attributes that
+                    will be filled at runtime. The parameters define how to calculate the value of
+                    those attributes at runtime. In this sample a dblookup mediator has been used to
+                    extract 'id' of the company from the company database using the symbol which is
+                    extracted from the SOAP envelope by evaluating an XPath. Then 'id' bases switching
+                    will be done by a switch mediator.
+                </p>
+                <p>
+                    To try this out, first request a stock quote for the symbol 'IBM' as follows.
+                </p>
+                <div class="command">ant stockquote -Daddurl=http://localhost:9000/services/SimpleStockQuoteService -Dtrpurl=http://localhost:8280/ -Dsymbol=IBM</div>
+                <p>
+                    Synapse console will display the following message.
+                </p>
+                <div class="consoleOutput">INFO LogMediator text = ** Looking up from the Database **
+    INFO LogMediator text = Company ID &#x2013; c1</div>
+                <p>
+                    Now request a quote for the symbol 'SUN'.
+                </p>
+                <div class="command">ant stockquote -Daddurl=http://localhost:9000/services/SimpleStockQuoteService -Dtrpurl=http://localhost:8280/ -Dsymbol=SUN</div>
+                <p>
+                    Synapse will display the following output.
+                </p>
+                <div class="consoleOutput">INFO LogMediator text = ** Looking up from the Database **
+INFO LogMediator text = Company ID &#x2013; c2</div>
+                <p>
+                    Finally send a stock quote request for the symbol 'MSFT'.
+                </p>
+                <div class="command">ant stockquote -Daddurl=http://localhost:9000/services/SimpleStockQuoteService -Dtrpurl=http://localhost:8280/ -Dsymbol=MSFT</div>
+                <p>
+                    In this case Synapse will display the following output.
+                </p>
+                <div class="consoleOutput">INFO LogMediator text = ** Looking up from the Database **
+INFO LogMediator text = Company ID &#x2013; c2</div>
+                <p>
+                    If you send any requests with different symbols, dblookup mediator will return
+                    an empty result set, since those symbols are not stored in the Derby database.
+                    So as a result Synapse will not be able to determine the company ID, which will
+                    result in the following log entry (from the default case in the switch mediator).
+                </p>
+                <div class="consoleOutput">INFO LogMediator text = ** Unrecognized Company ID **</div>
+            </subsection>
+        </section>
+        <p><a href="../samples.html">Back to Catalog</a></p>        
+    </body>
+</document>
\ No newline at end of file
diff --git a/src/site/xdoc/userguide/samples/sample361.xml b/src/site/xdoc/userguide/samples/sample361.xml
new file mode 100644
index 0000000..b4e265e
--- /dev/null
+++ b/src/site/xdoc/userguide/samples/sample361.xml
@@ -0,0 +1,121 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+  ~  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.
+  -->
+
+<document>
+    <properties>
+        <title>Apache Synapse - Sample 361</title>
+    </properties>
+    <body>
+        <section name="Sample 361: Introduction to DBReport Mediator">
+            <div class="xmlConf">&lt;definitions xmlns="http://ws.apache.org/ns/synapse"&gt;
+
+    &lt;sequence name="main"&gt;
+        &lt;in&gt;
+            &lt;send&gt;
+                &lt;endpoint&gt;
+                    &lt;address uri="http://localhost:9000/services/SimpleStockQuoteService"/&gt;
+                &lt;/endpoint&gt;
+            &lt;/send&gt;
+        &lt;/in&gt;
+
+        &lt;out&gt;
+            &lt;log level="custom"&gt;
+                &lt;property name="text" value="** Reporting to the Database **"/&gt;
+            &lt;/log&gt;
+            &lt;dbreport&gt;
+                &lt;connection&gt;
+                    &lt;pool&gt;
+                        &lt;driver&gt;org.apache.derby.jdbc.ClientDriver&lt;/driver&gt;
+                        &lt;url&gt;jdbc:derby://localhost:1527/synapsedb;create=false&lt;/url&gt;
+                        &lt;user&gt;synapse&lt;/user&gt;
+                        &lt;password&gt;synapse&lt;/password&gt;
+                    &lt;/pool&gt;
+                &lt;/connection&gt;
+                &lt;statement&gt;
+                    &lt;sql&gt;update company set price=? where name =?&lt;/sql&gt;
+                    &lt;parameter xmlns:m1="http://services.samples/xsd"
+                               xmlns:m0="http://services.samples"
+                               expression="//m0:return/m1:last/child::text()" type="DOUBLE"/&gt;
+                    &lt;parameter xmlns:m1="http://services.samples/xsd"
+                               xmlns:m0="http://services.samples"
+                               expression="//m0:return/m1:symbol/child::text()" type="VARCHAR"/&gt;
+                &lt;/statement&gt;
+            &lt;/dbreport&gt;
+            &lt;send/&gt;
+        &lt;/out&gt;
+    &lt;/sequence&gt;
+
+&lt;/definitions&gt;</div>
+            <subsection name="Objective">
+                <p>
+                    <a href="sample360.html">Sample 360</a> shows how to perform database lookups
+                    in Synapse. This sample illustrates how to write to a given database from
+                    Synapse using the dbreport mediator.
+                </p>
+            </subsection>
+            <subsection name="Pre-requisites">
+                <p>
+                    <ul>
+                        <li>
+                            Setup a Derby database as described in the <a href="setup/db.html">database setup guide</a>
+                        </li>
+                        <li>
+                            Deploy the SimpleStockQuoteService in the sample Axis2 server and start Axis2
+                        </li>
+                        <li>
+                            Start Synapse using the configuration numbered 361 (repository/conf/sample/synapse_sample_361.xml)
+                            <div class="command">
+                                Unix/Linux: sh synapse.sh -sample 361<br/>
+                                Windows: synapse.bat -sample 361
+                            </div>
+                        </li>
+                    </ul>
+                </p>
+            </subsection>
+            <subsection name="Executing the Client">
+                <p>
+                    This sample demonstrates how to perform simple database write operations in
+                    Synapse. The dbreport mediator writes (i.e. inserts one row) to a table using the
+                    details available in messages. It works the same way as the dblookup mediator.
+                    In this sample, dbreport mediator is used for updating the stock price of the
+                    company using the last quote value which is calculated by evaluating an XPath
+                    against the response message. After running this sample, user can check the
+                    company table using the Derby client tool. It will show the value inserted by the 
+                    dbreport mediator.
+                </p>
+                <p>
+                    To try this out run the sample client as follows.
+                </p>
+                <div class="command">ant stockquote -Daddurl=http://localhost:9000/services/SimpleStockQuoteService -Dtrpurl=http://localhost:8280/ -Dsymbol=IBM</div>
+                <p>
+                    Now execute the following SQL query against the Derby database using the Derby
+                    client tool.
+                </p>
+                <div class="command">select price from company where name='IBM';</div>
+                <p>
+                    This operation will return the stock quote value returned earlier by Axis2. You
+                    can compare the output of the sample Axis2 client with the output of the Derby
+                    client tool for confirmation.
+                </p>
+            </subsection>
+        </section>
+        <p><a href="../samples.html">Back to Catalog</a></p>        
+    </body>
+</document>
\ No newline at end of file
diff --git a/src/site/xdoc/userguide/samples/sample362.xml b/src/site/xdoc/userguide/samples/sample362.xml
new file mode 100644
index 0000000..bbc6d92
--- /dev/null
+++ b/src/site/xdoc/userguide/samples/sample362.xml
@@ -0,0 +1,143 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+  ~  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.
+  -->
+
+<document>
+    <properties>
+        <title>Apache Synapse - Sample 362</title>
+    </properties>
+    <body>
+        <section name="Sample 362: Perform Database Lookups and Updates in the Same Mediation Sequence">
+            <div class="xmlConf">&lt;definitions xmlns="http://ws.apache.org/ns/synapse"&gt;
+
+    &lt;sequence name="main"&gt;
+        &lt;in&gt;
+            &lt;send&gt;
+                &lt;endpoint&gt;
+                    &lt;address uri="http://localhost:9000/services/SimpleStockQuoteService"/&gt;
+                &lt;/endpoint&gt;
+            &lt;/send&gt;
+        &lt;/in&gt;
+
+        &lt;out&gt;
+            &lt;log level="custom"&gt;
+                &lt;property name="text" value="** Reporting to the Database **"/&gt;
+            &lt;/log&gt;
+
+            &lt;dbreport&gt;
+                &lt;connection&gt;
+                    &lt;pool&gt;
+                        &lt;driver&gt;org.apache.derby.jdbc.ClientDriver&lt;/driver&gt;
+                        &lt;url&gt;jdbc:derby://localhost:1527/synapsedb;create=false&lt;/url&gt;
+                        &lt;user&gt;synapse&lt;/user&gt;
+                        &lt;password&gt;synapse&lt;/password&gt;
+                    &lt;/pool&gt;
+                &lt;/connection&gt;
+                &lt;statement&gt;
+                    &lt;sql&gt;update company set price=? where name =?&lt;/sql&gt;
+                    &lt;parameter xmlns:m1="http://services.samples/xsd"
+                               xmlns:m0="http://services.samples"
+                               expression="//m0:return/m1:last/child::text()" type="DOUBLE"/&gt;
+                    &lt;parameter xmlns:m1="http://services.samples/xsd"
+                               xmlns:m0="http://services.samples"
+                               expression="//m0:return/m1:symbol/child::text()" type="VARCHAR"/&gt;
+                &lt;/statement&gt;
+            &lt;/dbreport&gt;
+            &lt;log level="custom"&gt;
+                &lt;property name="text" value="** Looking up from the Database **"/&gt;
+            &lt;/log&gt;
+            &lt;dblookup&gt;
+                &lt;connection&gt;
+                    &lt;pool&gt;
+                        &lt;driver&gt;org.apache.derby.jdbc.ClientDriver&lt;/driver&gt;
+                        &lt;url&gt;jdbc:derby://localhost:1527/synapsedb;create=false&lt;/url&gt;
+                        &lt;user&gt;synapse&lt;/user&gt;
+                        &lt;password&gt;synapse&lt;/password&gt;
+                    &lt;/pool&gt;
+                &lt;/connection&gt;
+                &lt;statement&gt;
+                    &lt;sql&gt;select * from company where name =?&lt;/sql&gt;
+                    &lt;parameter xmlns:m1="http://services.samples/xsd"
+                               xmlns:m0="http://services.samples"
+                               expression="//m0:return/m1:symbol/child::text()" type="VARCHAR"/&gt;
+                    &lt;result name="stock_price" column="price"/&gt;
+                &lt;/statement&gt;
+            &lt;/dblookup&gt;
+            &lt;log level="custom"&gt;
+                &lt;property name="text"
+                          expression="fn:concat('Stock price - ',get-property('stock_price'))"/&gt;
+            &lt;/log&gt;
+            &lt;send/&gt;
+        &lt;/out&gt;
+    &lt;/sequence&gt;
+
+&lt;/definitions&gt;</div>
+            <subsection name="Objective">
+                <p>
+                    <a href="sample360.html">Sample 360</a> and <a href="sample361.html">sample 361</a>
+                    shows how to use the dblookup mediator and dbreport mediator separately. This sample
+                    combines them in a single mediation sequence to perform both database lookup and
+                    update operations.
+                </p>
+            </subsection>
+            <subsection name="Pre-requisites">
+                <p>
+                    <ul>
+                        <li>
+                            Setup a Derby database as described in the <a href="setup/db.html">database setup guide</a>
+                        </li>
+                        <li>
+                            Deploy the SimpleStockQuoteService in the sample Axis2 server and start Axis2
+                        </li>
+                        <li>
+                            Start Synapse using the configuration numbered 362 (repository/conf/sample/synapse_sample_362.xml)
+                            <div class="command">
+                                Unix/Linux: sh synapse.sh -sample 362<br/>
+                                Windows: synapse.bat -sample 362
+                            </div>
+                        </li>
+                    </ul>
+                </p>
+            </subsection>
+            <subsection name="Executing the Client">
+                <p>
+                    In this sample, the dbreport mediator works the same way as in
+                    <a href="sample361.html">sample 361</a>. It updates the price for the given company
+                    using the response messages content. Then the dblookup mediator reads the last
+                    updated value from the company database and logs it to the console.
+                </p>
+                <p>
+                    Run the sample client as follows.
+                </p>
+                <div class="command">ant stockquote -Daddurl=http://localhost:9000/services/SimpleStockQuoteService -Dtrpurl=http://localhost:8280/ -Dsymbol=IBM</div>
+                <p>
+                    Synapse will update the database using the stock quote value available in the
+                    response sent by Axis2. Then the same value will be retrieved from the database
+                    and logged as follows.
+                </p>
+                <div class="consoleOutput">INFO LogMediator text = ** Reporting to the Database **
+...
+INFO LogMediator text = ** Looking up from the Database **
+...
+INFO LogMediator text = Stock price - 153.47886496064808</div>                
+            </subsection>
+        </section>
+        <p><a href="../samples.html">Back to Catalog</a></p>        
+    </body>
+</document>
\ No newline at end of file
diff --git a/src/site/xdoc/userguide/samples/sample363.xml b/src/site/xdoc/userguide/samples/sample363.xml
new file mode 100644
index 0000000..a93a14e
--- /dev/null
+++ b/src/site/xdoc/userguide/samples/sample363.xml
@@ -0,0 +1,205 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+  ~  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.
+  -->
+
+<document>
+    <properties>
+        <title>Apache Synapse - Sample 363</title>
+    </properties>
+    <body>
+        <section name="Sample 363: Reusable Database Connection Pools">
+            <div class="xmlConf">&lt;definitions xmlns="http://ws.apache.org/ns/synapse"&gt;
+
+    &lt;sequence name="myFaultHandler"&gt;
+        &lt;makefault response="true"&gt;
+            &lt;code xmlns:tns="http://www.w3.org/2003/05/soap-envelope" value="tns:Receiver"/&gt;
+            &lt;reason expression="get-property('ERROR_MESSAGE')"/&gt;
+        &lt;/makefault&gt;
+        &lt;send/&gt;
+        &lt;drop/&gt;
+    &lt;/sequence&gt;
+
+    &lt;sequence name="main" onError="myFaultHandler"&gt;
+        &lt;in&gt;
+            &lt;log level="custom"&gt;
+                &lt;property name="text" value="** Looking up from the Database **"/&gt;
+            &lt;/log&gt;
+            &lt;dblookup&gt;
+                &lt;connection&gt;
+                    &lt;pool&gt;
+                        &lt;dsName&gt;lookupdb&lt;/dsName&gt;
+                    &lt;/pool&gt;
+                &lt;/connection&gt;
+                &lt;statement&gt;
+                    &lt;sql&gt;select * from company where name =?&lt;/sql&gt;
+                    &lt;parameter xmlns:m0="http://services.samples"
+                               expression="//m0:getQuote/m0:request/m0:symbol" type="VARCHAR"/&gt;
+                    &lt;result name="company_id" column="id"/&gt;
+                &lt;/statement&gt;
+            &lt;/dblookup&gt;
+
+            &lt;switch source="get-property('company_id')"&gt;
+                &lt;case regex="c1"&gt;
+                    &lt;log level="custom"&gt;
+                        &lt;property name="text"
+                                  expression="fn:concat('Company ID - ',get-property('company_id'))"/&gt;
+                    &lt;/log&gt;
+                    &lt;send&gt;
+                        &lt;endpoint&gt;
+                            &lt;address uri="http://localhost:9000/services/SimpleStockQuoteService"/&gt;
+                        &lt;/endpoint&gt;
+                    &lt;/send&gt;
+                &lt;/case&gt;
+                &lt;case regex="c2"&gt;
+                    &lt;log level="custom"&gt;
+                        &lt;property name="text"
+                                  expression="fn:concat('Company ID - ',get-property('company_id'))"/&gt;
+                    &lt;/log&gt;
+                    &lt;send&gt;
+                        &lt;endpoint&gt;
+                            &lt;address uri="http://localhost:9000/services/SimpleStockQuoteService"/&gt;
+                        &lt;/endpoint&gt;
+                    &lt;/send&gt;
+                &lt;/case&gt;
+                &lt;case regex="c3"&gt;
+                    &lt;log level="custom"&gt;
+                        &lt;property name="text"
+                                  expression="fn:concat('Company ID - ',get-property('company_id'))"/&gt;
+                    &lt;/log&gt;
+                    &lt;send&gt;
+                        &lt;endpoint&gt;
+                            &lt;address uri="http://localhost:9000/services/SimpleStockQuoteService"/&gt;
+                        &lt;/endpoint&gt;
+                    &lt;/send&gt;
+                &lt;/case&gt;
+                &lt;default&gt;
+                    &lt;log level="custom"&gt;
+                        &lt;property name="text" value="** Unrecognized Company ID **"/&gt;
+                    &lt;/log&gt;
+                    &lt;makefault response="true"&gt;
+                        &lt;code xmlns:tns="http://www.w3.org/2003/05/soap-envelope"
+                              value="tns:Receiver"/&gt;
+                        &lt;reason value="** Unrecognized Company ID **"/&gt;
+                    &lt;/makefault&gt;
+                    &lt;send/&gt;
+                    &lt;drop/&gt;
+                &lt;/default&gt;
+            &lt;/switch&gt;
+            &lt;drop/&gt;
+        &lt;/in&gt;
+
+        &lt;out&gt;
+            &lt;log level="custom"&gt;
+                &lt;property name="text" value="** Reporting to the Database **"/&gt;
+            &lt;/log&gt;
+            &lt;dbreport&gt;
+                &lt;connection&gt;
+                    &lt;pool&gt;
+                        &lt;dsName&gt;reportdb&lt;/dsName&gt;
+                    &lt;/pool&gt;
+                &lt;/connection&gt;
+                &lt;statement&gt;
+                    &lt;sql&gt;update company set price=? where name =?&lt;/sql&gt;
+                    &lt;parameter xmlns:m0="http://services.samples"
+                               xmlns:m1="http://services.samples/xsd"
+                               expression="//m0:return/m1:last/child::text()" type="DOUBLE"/&gt;
+                    &lt;parameter xmlns:m0="http://services.samples"
+                               xmlns:m1="http://services.samples/xsd"
+                               expression="//m0:return/m1:symbol/child::text()" type="VARCHAR"/&gt;
+                &lt;/statement&gt;
+            &lt;/dbreport&gt;
+            &lt;log level="custom"&gt;
+                &lt;property name="text" value="** Looking up from the Database **"/&gt;
+            &lt;/log&gt;
+            &lt;dblookup&gt;
+                &lt;connection&gt;
+                    &lt;pool&gt;
+                        &lt;dsName&gt;reportdb&lt;/dsName&gt;
+                    &lt;/pool&gt;
+                &lt;/connection&gt;
+                &lt;statement&gt;
+                    &lt;sql&gt;select * from company where name =?&lt;/sql&gt;
+                    &lt;parameter xmlns:m0="http://services.samples"
+                               xmlns:m1="http://services.samples/xsd"
+                               expression="//m0:return/m1:symbol/child::text()" type="VARCHAR"/&gt;
+                    &lt;result name="stock_price" column="price"/&gt;
+                &lt;/statement&gt;
+            &lt;/dblookup&gt;
+            &lt;log level="custom"&gt;
+                &lt;property name="text"
+                          expression="fn:concat('Stock price - ',get-property('stock_price'))"/&gt;
+            &lt;/log&gt;
+            &lt;send/&gt;
+
+        &lt;/out&gt;
+
+    &lt;/sequence&gt;
+
+&lt;/definitions&gt;</div>
+            <subsection name="Objective">
+                <p>
+                    Demonstrate how to setup reusable connection pools for the dblookup and dbreport
+                    mediators
+                </p>
+            </subsection>
+            <subsection name="Pre-requisites">
+                <p>
+                    <ul>
+                        <li>
+                            Setup a Derby database and the Synapse data sources as described in the
+                            <a href="setup/db.html">database setup guide</a>
+                        </li>
+                        <li>
+                            Deploy the SimpleStockQuoteService in the sample Axis2 server and start Axis2
+                        </li>
+                        <li>
+                            Start Synapse using the configuration numbered 363 (repository/conf/sample/synapse_sample_363.xml)
+                            <div class="command">
+                                Unix/Linux: sh synapse.sh -sample 363<br/>
+                                Windows: synapse.bat -sample 363
+                            </div>
+                        </li>
+                    </ul>
+                </p>
+            </subsection>
+            <subsection name="Executing the Client">
+                <p>
+                    This sample employs two instances of the dblookup mediator and a single instance
+                    of the dbreport mediator. The two dblookup mediators are sharing the same database
+                    connection pool named 'lookupdb'. The dbreport mediator makes use of a different
+                    connection pool named 'dbreport'. Synapse uses Apache DBCP to create and manage
+                    the corresponding data sources and connection pools.
+                </p>
+                <p>
+                    Run this sample by invoking the client as follows.
+                </p>
+                <div class="command">ant stockquote -Daddurl=http://localhost:9000/services/SimpleStockQuoteService -Dtrpurl=http://localhost:8280/ -Dsymbol=IBM</div>
+                <p>
+                    Synapse will log the following output as it reads from and writes to the database.
+                </p>
+                <div class="consoleOutput">INFO LogMediator text = ** Looking up from the Database ** ...
+INFO LogMediator text = Company ID - c1 ...
+INFO LogMediator text = ** Reporting to the Database ** ...
+INFO LogMediator text = ** Looking up from the Database ** ...
+INFO LogMediator text = Stock price - 183.3635460215262</div>
+            </subsection>
+        </section>
+        <p><a href="../samples.html">Back to Catalog</a></p>        
+    </body>
+</document>
\ No newline at end of file
diff --git a/src/site/xdoc/userguide/samples/sample364.xml b/src/site/xdoc/userguide/samples/sample364.xml
new file mode 100644
index 0000000..6221f3f
--- /dev/null
+++ b/src/site/xdoc/userguide/samples/sample364.xml
@@ -0,0 +1,142 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+  ~  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.
+  -->
+
+<document>
+    <properties>
+        <title>Apache Synapse - Sample 364</title>
+    </properties>
+    <body>
+        <section name="Sample 364: Executing Database Stored Procedures">
+            <div class="xmlConf">&lt;definitions xmlns="http://ws.apache.org/ns/synapse"&gt;
+
+    &lt;sequence name="main"&gt;
+        &lt;in&gt;
+            &lt;send&gt;
+                &lt;endpoint&gt;
+                    &lt;address uri="http://localhost:9000/services/SimpleStockQuoteService"/&gt;
+                &lt;/endpoint&gt;
+            &lt;/send&gt;
+        &lt;/in&gt;
+
+        &lt;out&gt;
+            &lt;log level="custom"&gt;
+                &lt;property name="text" value="** Reporting to the Database **"/&gt;
+            &lt;/log&gt;
+
+            &lt;dbreport&gt;
+                &lt;connection&gt;
+                    &lt;pool&gt;
+                        &lt;driver&gt;com.mysql.jdbc.Driver&lt;/driver&gt;
+                        &lt;url&gt;jdbc:mysql://localhost:3306/synapsedb&lt;/url&gt;
+                        &lt;user&gt;user&lt;/user&gt;
+                        &lt;password&gt;password&lt;/password&gt;
+                    &lt;/pool&gt;
+                &lt;/connection&gt;
+                &lt;statement&gt;
+                    &lt;sql&gt;call updateCompany(?,?)&lt;/sql&gt;
+                    &lt;parameter xmlns:m0="http://services.samples"
+                               xmlns:m1="http://services.samples/xsd"
+                               expression="//m0:return/m1:last/child::text()" type="DOUBLE"/&gt;
+                    &lt;parameter xmlns:m0="http://services.samples"
+                               xmlns:m1="http://services.samples/xsd"
+                               expression="//m0:return/m1:symbol/child::text()" type="VARCHAR"/&gt;
+                &lt;/statement&gt;
+            &lt;/dbreport&gt;
+            &lt;log level="custom"&gt;
+                &lt;property name="text" value="** Looking up from the Database **"/&gt;
+            &lt;/log&gt;
+            &lt;dblookup&gt;
+                &lt;connection&gt;
+                    &lt;pool&gt;
+                        &lt;driver&gt;com.mysql.jdbc.Driver&lt;/driver&gt;
+                        &lt;url&gt;jdbc:mysql://localhost:3306/synapsedb&lt;/url&gt;
+                        &lt;user&gt;user&lt;/user&gt;
+                        &lt;password&gt;password&lt;/password&gt;
+                    &lt;/pool&gt;
+                &lt;/connection&gt;
+                &lt;statement&gt;
+                    &lt;sql&gt;call getCompany(?)&lt;/sql&gt;
+                    &lt;parameter xmlns:m0="http://services.samples"
+                               xmlns:m1="http://services.samples/xsd"
+                               expression="//m0:return/m1:symbol/child::text()" type="VARCHAR"/&gt;
+                    &lt;result name="stock_prize" column="price"/&gt;
+                &lt;/statement&gt;
+            &lt;/dblookup&gt;
+            &lt;log level="custom"&gt;
+                &lt;property name="text"
+                          expression="fn:concat('Stock Prize - ',get-property('stock_prize'))"/&gt;
+            &lt;/log&gt;
+            &lt;send/&gt;
+        &lt;/out&gt;
+    &lt;/sequence&gt;
+
+&lt;/definitions&gt;</div>
+            <subsection name="Objective">
+                <p>
+                    Demonstrate how to invoke a database stored procedure from Synapse
+                </p>
+            </subsection>
+            <subsection name="Pre-requisites">
+                <p>
+                    <ul>
+                        <li>
+                            Setup a MySQL database as described in the <a href="setup/db.html#mysql">database setup guide</a>
+                        </li>
+                        <li>
+                            Deploy the SimpleStockQuoteService in the sample Axis2 server and start Axis2
+                        </li>
+                        <li>
+                            Open the repository/conf/sample/synapse_sample_364.xml file and change the
+                            database username, password credentials accordingly
+                        </li>
+                        <li>
+                            Start Synapse using the configuration numbered 364 (repository/conf/sample/synapse_sample_364.xml)
+                            <div class="command">
+                                Unix/Linux: sh synapse.sh -sample 364<br/>
+                                Windows: synapse.bat -sample 364
+                            </div>
+                        </li>
+                    </ul>
+                </p>
+            </subsection>
+            <subsection name="Executing the Client">
+                <p>
+                    This scenario is very similar to <a href="sample363.html">sample 363</a>, but makes
+                    use of stored procedures to lookup and update the database instead of simple
+                    SQL queries. Note that we are still using the dblookup and dbreport mediators
+                    to access the database but the statements are simply calling a stored procedure in
+                    MySQL (the syntax to call a stored procedue is database engine specific).
+                </p>
+                <p>
+                    To try this sample out, invoke the sample client as follows.
+                </p>
+                <div class="command">ant stockquote -Daddurl=http://localhost:9000/services/SimpleStockQuoteService -Dtrpurl=http://localhost:8280/ -Dsymbol=IBM</div>
+                <p>
+                    Synapse will invoke the two stored procedures as the response is mediated back
+                    to the client. You will see the following output on the Synapse console.
+                </p>
+                <div class="consoleOutput">INFO LogMediator text = ** Looking up from the Database ** ...
+INFO LogMediator text = Company ID - c1 ...
+INFO LogMediator text = Stock price - 183.3635460215262</div>
+            </subsection>
+        </section>
+        <p><a href="../samples.html">Back to Catalog</a></p>        
+    </body>
+</document>
\ No newline at end of file
diff --git a/src/site/xdoc/userguide/samples/sample370.xml b/src/site/xdoc/userguide/samples/sample370.xml
new file mode 100644
index 0000000..3537693
--- /dev/null
+++ b/src/site/xdoc/userguide/samples/sample370.xml
@@ -0,0 +1,116 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+  ~  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.
+  -->
+
+<document>
+    <properties>
+        <title>Apache Synapse - Sample 370</title>
+    </properties>
+    <body>
+        <section name="Sample 370: Introduction to Throttle Mediator and Concurrency Throttling">
+            <div class="xmlConf">&lt;definitions xmlns="http://ws.apache.org/ns/synapse"&gt;
+
+    &lt;sequence name="main"&gt;
+        &lt;in&gt;
+            &lt;throttle id="A"&gt;
+                &lt;policy&gt;
+                    &lt;!-- define throttle policy --&gt;
+                    &lt;wsp:Policy xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"
+                                xmlns:throttle="http://www.wso2.org/products/wso2commons/throttle"&gt;
+                        &lt;throttle:ThrottleAssertion&gt;
+                            &lt;throttle:MaximumConcurrentAccess&gt;10&lt;/throttle:MaximumConcurrentAccess&gt;
+                        &lt;/throttle:ThrottleAssertion&gt;
+                    &lt;/wsp:Policy&gt;
+                &lt;/policy&gt;
+                &lt;onAccept&gt;
+                    &lt;log level="custom"&gt;
+                        &lt;property name="text" value="**Access Accept**"/&gt;
+                    &lt;/log&gt;
+                    &lt;send&gt;
+                        &lt;endpoint&gt;
+                            &lt;address uri="http://localhost:9000/services/SimpleStockQuoteService"/&gt;
+                        &lt;/endpoint&gt;
+                    &lt;/send&gt;
+                &lt;/onAccept&gt;
+                &lt;onReject&gt;
+                    &lt;log level="custom"&gt;
+                        &lt;property name="text" value="**Access Denied**"/&gt;
+                    &lt;/log&gt;
+                    &lt;makefault response="true"&gt;
+                        &lt;code xmlns:tns="http://www.w3.org/2003/05/soap-envelope"
+                              value="tns:Receiver"/&gt;
+                        &lt;reason value="**Access Denied**"/&gt;
+                    &lt;/makefault&gt;
+                    &lt;send/&gt;
+                    &lt;drop/&gt;
+                &lt;/onReject&gt;
+            &lt;/throttle&gt;
+        &lt;/in&gt;
+        &lt;out&gt;
+            &lt;throttle id="A"/&gt;
+            &lt;send/&gt;
+        &lt;/out&gt;
+    &lt;/sequence&gt;
+
+&lt;/definitions&gt;</div>
+            <subsection name="Objective">
+                <p>
+                    Showcase the ability of Synapse to throttle incoming requests based on the
+                    concurrency level
+                </p>
+            </subsection>
+            <subsection name="Pre-requisites">
+                <p>
+                    <ul>
+                        <li>
+                            Deploy the SimpleStockQuoteService in the sample Axis2 server and start Axis2
+                        </li>
+                        <li>
+                            Start Synapse using the configuration numbered 370 (repository/conf/sample/synapse_sample_370.xml)
+                            <div class="command">
+                                Unix/Linux: sh synapse.sh -sample 370<br/>
+                                Windows: synapse.bat -sample 370
+                            </div>
+                        </li>
+                    </ul>
+                </p>
+            </subsection>
+            <subsection name="Executing the Client">
+                <p>
+                    Above configuration specifies a throttle mediator inside the in mediator.
+                    Therefore, all request messages directed to the main sequence will be subjected
+                    to throttling. Throttle mediator has 'policy', 'onAccept' and 'onReject' tags at
+                    top level. The 'policy' tag specifies the throttling policy for throttling messages.
+                    This sample policy only contains a component called 'MaximumConcurrentAccess'.
+                    This indicates the maximum number of concurrent requests that can pass through
+                    Synapse on a single unit of time. To test concurrency throttling, it is required
+                    to send concurrent requests to Synapse. With this configuration if Synapse receives
+                    20 requests concurrently from clients, then approximately half of those will succeed
+                    while the others being throttled. The client command to try this is as follows.
+                </p>
+                <div class="command">ant stockquote -Dsymbol=IBM -Dmode=quote -Daddurl=http://localhost:8280/</div>
+                <p>
+                    It's not that easy to try this sample out using the sample Axis2 client. For
+                    better results, consider using a load testing tool like Apache Bench or Java Bench.
+                </p>
+            </subsection>
+        </section>
+        <p><a href="../samples.html">Back to Catalog</a></p>        
+    </body>
+</document>
\ No newline at end of file
diff --git a/src/site/xdoc/userguide/samples/sample371.xml b/src/site/xdoc/userguide/samples/sample371.xml
new file mode 100644
index 0000000..3cc892b
--- /dev/null
+++ b/src/site/xdoc/userguide/samples/sample371.xml
@@ -0,0 +1,176 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+  ~  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.
+  -->
+
+<document>
+    <properties>
+        <title>Apache Synapse - Sample 371</title>
+    </properties>
+    <body>
+        <section name="Sample 371: Restricting Requests Based on Policies">
+            <div class="xmlConf">&lt;definitions xmlns="http://ws.apache.org/ns/synapse"&gt;
+
+    &lt;sequence name="main"&gt;
+        &lt;in&gt;
+            &lt;throttle id="A"&gt;
+                &lt;policy&gt;
+                    &lt;!-- define throttle policy --&gt;
+                    &lt;wsp:Policy xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"
+                                xmlns:throttle="http://www.wso2.org/products/wso2commons/throttle"&gt;
+                        &lt;throttle:ThrottleAssertion&gt;
+                            &lt;wsp:All&gt;
+                                &lt;throttle:ID throttle:type="IP"&gt;other&lt;/throttle:ID&gt;
+                                &lt;wsp:ExactlyOne&gt;
+                                    &lt;wsp:All&gt;
+                                        &lt;throttle:MaximumCount&gt;4&lt;/throttle:MaximumCount&gt;
+                                        &lt;throttle:UnitTime&gt;800000&lt;/throttle:UnitTime&gt;
+                                        &lt;throttle:ProhibitTimePeriod wsp:Optional="true"&gt;10000
+                                        &lt;/throttle:ProhibitTimePeriod&gt;
+                                    &lt;/wsp:All&gt;
+                                    &lt;throttle:IsAllow&gt;true&lt;/throttle:IsAllow&gt;
+                                &lt;/wsp:ExactlyOne&gt;
+                            &lt;/wsp:All&gt;
+                            &lt;wsp:All&gt;
+                                &lt;throttle:ID throttle:type="IP"&gt;192.168.8.200-192.168.8.222
+                                &lt;/throttle:ID&gt;
+                                &lt;wsp:ExactlyOne&gt;
+                                    &lt;wsp:All&gt;
+                                        &lt;throttle:MaximumCount&gt;8&lt;/throttle:MaximumCount&gt;
+                                        &lt;throttle:UnitTime&gt;800000&lt;/throttle:UnitTime&gt;
+                                        &lt;throttle:ProhibitTimePeriod wsp:Optional="true"&gt;10
+                                        &lt;/throttle:ProhibitTimePeriod&gt;
+                                    &lt;/wsp:All&gt;
+                                    &lt;throttle:IsAllow&gt;true&lt;/throttle:IsAllow&gt;
+                                &lt;/wsp:ExactlyOne&gt;
+                            &lt;/wsp:All&gt;
+                            &lt;wsp:All&gt;
+                                &lt;throttle:ID throttle:type="IP"&gt;192.168.8.201&lt;/throttle:ID&gt;
+                                &lt;wsp:ExactlyOne&gt;
+                                    &lt;wsp:All&gt;
+                                        &lt;throttle:MaximumCount&gt;200&lt;/throttle:MaximumCount&gt;
+                                        &lt;throttle:UnitTime&gt;600000&lt;/throttle:UnitTime&gt;
+                                        &lt;throttle:ProhibitTimePeriod wsp:Optional="true"/&gt;
+                                    &lt;/wsp:All&gt;
+                                    &lt;throttle:IsAllow&gt;true&lt;/throttle:IsAllow&gt;
+                                &lt;/wsp:ExactlyOne&gt;
+                            &lt;/wsp:All&gt;
+                            &lt;wsp:All&gt;
+                                &lt;throttle:ID throttle:type="IP"&gt;192.168.8.198&lt;/throttle:ID&gt;
+                                &lt;wsp:ExactlyOne&gt;
+                                    &lt;wsp:All&gt;
+                                        &lt;throttle:MaximumCount&gt;50&lt;/throttle:MaximumCount&gt;
+                                        &lt;throttle:UnitTime&gt;500000&lt;/throttle:UnitTime&gt;
+                                        &lt;throttle:ProhibitTimePeriod wsp:Optional="true"/&gt;
+                                    &lt;/wsp:All&gt;
+                                    &lt;throttle:IsAllow&gt;true&lt;/throttle:IsAllow&gt;
+                                &lt;/wsp:ExactlyOne&gt;
+                            &lt;/wsp:All&gt;
+                        &lt;/throttle:ThrottleAssertion&gt;
+                    &lt;/wsp:Policy&gt;
+                &lt;/policy&gt;
+                &lt;onAccept&gt;
+                    &lt;log level="custom"&gt;
+                        &lt;property name="text" value="**Access Accept**"/&gt;
+                    &lt;/log&gt;
+                    &lt;send&gt;
+                        &lt;endpoint&gt;
+                            &lt;address uri="http://localhost:9000/services/SimpleStockQuoteService"/&gt;
+                        &lt;/endpoint&gt;
+                    &lt;/send&gt;
+                &lt;/onAccept&gt;
+                &lt;onReject&gt;
+                    &lt;log level="custom"&gt;
+                        &lt;property name="text" value="**Access Denied**"/&gt;
+                    &lt;/log&gt;
+                    &lt;makefault response="true"&gt;
+                        &lt;code xmlns:tns="http://www.w3.org/2003/05/soap-envelope"
+                              value="tns:Receiver"/&gt;
+                        &lt;reason value="**Access Denied**"/&gt;
+                    &lt;/makefault&gt;
+                    &lt;send/&gt;
+                    &lt;drop/&gt;
+                &lt;/onReject&gt;
+            &lt;/throttle&gt;
+        &lt;/in&gt;
+        &lt;out&gt;
+            &lt;throttle id="A"/&gt;
+            &lt;send/&gt;
+        &lt;/out&gt;
+    &lt;/sequence&gt;
+
+&lt;/definitions&gt;</div>
+            <subsection name="Objective">
+                <p>
+                    Demonstrate how to throttle incoming requests based on complex policies
+                </p>
+            </subsection>
+            <subsection name="Pre-requisites">
+                <p>
+                    <ul>
+                        <li>
+                            Deploy the SimpleStockQuoteService in the sample Axis2 server and start Axis2
+                        </li>
+                        <li>
+                            Start Synapse using the configuration numbered 371 (repository/conf/sample/synapse_sample_371.xml)
+                            <div class="command">
+                                Unix/Linux: sh synapse.sh -sample 371<br/>
+                                Windows: synapse.bat -sample 371
+                            </div>
+                        </li>
+                    </ul>
+                </p>
+            </subsection>
+            <subsection name="Executing the Client">
+                <p>
+                    Above configuration specifies a throttle mediator inside the in mediator.
+                    Therefore, all request messages directed to the main sequence will be subjected
+                    to throttling. Throttle mediator has policy, onAccept and onReject tags at the
+                    top level. Policy tag specifies the throttling policy against which all messages
+                    will be evaluated. It contains some IP address ranges and the maximum number of
+                    messages to be allowed for those ranges within a time period given in 'UnitTime'
+                    tag. 'ProhibitTimePeriod' tag specifies the time period to prohibit further
+                    requests after the received request count exceeds the specified time. Now run the
+                    client 5 times repetitively using the following command to see how throttling works.
+                </p>
+                <div class="command">ant stockquote -Dsymbol=IBM -Dmode=quote -Daddurl=http://localhost:8280/</div>
+                <p>
+                    For the first four requests you will get the quote prices for IBM as follows.
+                </p>
+                <div class="consoleOutput">[java] Standard :: Stock price = $177.20143371883802</div>
+                <p>
+                    Fifth request will not be sent to the Axis2 server and the client will receive
+                    the following fault.
+                </p>
+                <div class="consoleOutput">[java] org.apache.axis2.AxisFault: **Access Denied**</div>
+                <p>
+                    Maximum number of requests within 800000 milliseconds is specified as 4 for any
+                    server (including localhost) other than the explicitly specified ones. Therefore,
+                    our fifth request is denied by the throttle mediator. You can verify this by looking
+                    at the Synapse console.
+                </p>
+                <div class="consoleOutput">[HttpServerWorker-1] INFO  LogMediator - text = **Access Accept**
+[HttpServerWorker-2] INFO  LogMediator - text = **Access Accept**
+[HttpServerWorker-3] INFO  LogMediator - text = **Access Accept**
+[HttpServerWorker-4] INFO  LogMediator - text = **Access Accept**
+[HttpServerWorker-5] INFO  LogMediator - text = **Access Denied**</div>
+            </subsection>
+        </section>
+        <p><a href="../samples.html">Back to Catalog</a></p>        
+    </body>
+</document>
\ No newline at end of file
diff --git a/src/site/xdoc/userguide/samples/sample372.xml b/src/site/xdoc/userguide/samples/sample372.xml
new file mode 100644
index 0000000..488c127
--- /dev/null
+++ b/src/site/xdoc/userguide/samples/sample372.xml
@@ -0,0 +1,119 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+  ~  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.
+  -->
+
+<document>
+    <properties>
+        <title>Apache Synapse - Sample 372</title>
+    </properties>
+    <body>
+        <section name="Sample 372: Use of Concurrency Throttling and Request Rate Based Throttling">
+            <div class="xmlConf">&lt;definitions xmlns="http://ws.apache.org/ns/synapse"&gt;
+
+    &lt;registry provider="org.apache.synapse.registry.url.SimpleURLRegistry"&gt;
+        &lt;!-- the root property of the simple URL registry helps resolve a resource URL as root + key --&gt;
+        &lt;parameter name="root"&gt;file:repository/&lt;/parameter&gt;
+        &lt;!-- all resources loaded from the URL registry would be cached for this number of milli seconds --&gt;
+        &lt;parameter name="cachableDuration"&gt;150000&lt;/parameter&gt;
+    &lt;/registry&gt;
+
+    &lt;sequence name="onAcceptSequence"&gt;
+        &lt;log level="custom"&gt;
+            &lt;property name="text" value="**Access Accept**"/&gt;
+        &lt;/log&gt;
+        &lt;send&gt;
+            &lt;endpoint&gt;
+                &lt;address uri="http://localhost:9000/services/SimpleStockQuoteService"/&gt;
+            &lt;/endpoint&gt;
+        &lt;/send&gt;
+    &lt;/sequence&gt;
+
+    &lt;sequence name="onRejectSequence" trace="enable"&gt;
+        &lt;log level="custom"&gt;
+            &lt;property name="text" value="**Access Denied**"/&gt;
+        &lt;/log&gt;
+        &lt;makefault response="true"&gt;
+            &lt;code xmlns:tns="http://www.w3.org/2003/05/soap-envelope" value="tns:Receiver"/&gt;
+            &lt;reason value="**Access Denied**"/&gt;
+        &lt;/makefault&gt;
+        &lt;send/&gt;
+        &lt;drop/&gt;
+    &lt;/sequence&gt;
+
+    &lt;proxy name="StockQuoteProxy"&gt;
+        &lt;target&gt;
+            &lt;inSequence&gt;
+                &lt;throttle onReject="onRejectSequence" onAccept="onAcceptSequence" id="A"&gt;
+                    &lt;policy key="conf/sample/resources/policy/throttle_policy.xml"/&gt;
+                &lt;/throttle&gt;
+            &lt;/inSequence&gt;
+            &lt;outSequence&gt;
+                &lt;throttle id="A"/&gt;
+                &lt;send/&gt;
+            &lt;/outSequence&gt;
+        &lt;/target&gt;
+        &lt;publishWSDL uri="file:repository/conf/sample/resources/proxy/sample_proxy_1.wsdl"/&gt;
+    &lt;/proxy&gt;
+
+&lt;/definitions&gt;</div>
+            <subsection name="Objective">
+                <p>
+                    Showcase how to use the concurrency throttling in conjunction with request rate
+                    throttling
+                </p>
+            </subsection>
+            <subsection name="Pre-requisites">
+                <p>
+                    <ul>
+                        <li>
+                            Deploy the SimpleStockQuoteService in the sample Axis2 server and start Axis2
+                        </li>
+                        <li>
+                            Start Synapse using the configuration numbered 372 (repository/conf/sample/synapse_sample_372.xml)
+                            <div class="command">
+                                Unix/Linux: sh synapse.sh -sample 372<br/>
+                                Windows: synapse.bat -sample 372
+                            </div>
+                        </li>
+                    </ul>
+                </p>
+            </subsection>
+            <subsection name="Executing the Client">
+                <p>
+                    This is a combination of <a href="sample370.html">sample 370</a> and
+                    <a href="sample371.html">sample 371</a>. In this case the throttle policy is loaded
+                    from the 'throttle_policy.xml' file which is fetched from the registry. To verify
+                    the functionality, it requires running a load test. The all enabled request from
+                    the concurrency throttling will be controlled by the access rate base throttling
+                    according to the policy.
+                </p>
+                <p>
+                    Run the client as follows.
+                </p>
+                <div class="command">ant stockquote -Daddurl=http://localhost:8280/services/StockQuoteProxy</div>
+                <p>
+                    You will get same results as in <a href="sample371.html">sample 371</a>. If you
+                    run the load test, results will be different due to the effect of concurrency
+                    throttling.
+                </p>                
+            </subsection>
+        </section>
+        <p><a href="../samples.html">Back to Catalog</a></p>        
+    </body>
+</document>
\ No newline at end of file
diff --git a/src/site/xdoc/userguide/samples/sample380.xml b/src/site/xdoc/userguide/samples/sample380.xml
new file mode 100644
index 0000000..3539747
--- /dev/null
+++ b/src/site/xdoc/userguide/samples/sample380.xml
@@ -0,0 +1,204 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+  ~  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.
+  -->
+
+<document>
+    <properties>
+        <title>Apache Synapse - Sample 380</title>
+    </properties>
+    <body>
+        <section name="Sample 380: Writing Custom Mediation Logic in Java">
+            <div class="xmlConf">&lt;definitions xmlns="http://ws.apache.org/ns/synapse"&gt;
+
+    &lt;sequence name="fault"&gt;
+        &lt;makefault&gt;
+            &lt;code xmlns:tns="http://www.w3.org/2003/05/soap-envelope" value="tns:Receiver"/&gt;
+            &lt;reason value="Mediation failed."/&gt;
+        &lt;/makefault&gt;
+        &lt;send/&gt;
+    &lt;/sequence&gt;
+
+    &lt;sequence name="main" onError="fault"&gt;
+        &lt;in&gt;
+            &lt;send&gt;
+                &lt;endpoint name="stockquote"&gt;
+                    &lt;address uri="http://localhost:9000/services/SimpleStockQuoteService"/&gt;
+                &lt;/endpoint&gt;
+            &lt;/send&gt;
+        &lt;/in&gt;
+        &lt;out&gt;
+            &lt;class name="samples.mediators.DiscountQuoteMediator"&gt;
+                &lt;property name="discountFactor" value="10"/&gt;
+                &lt;property name="bonusFor" value="5"/&gt;
+            &lt;/class&gt;
+            &lt;send/&gt;
+        &lt;/out&gt;
+    &lt;/sequence&gt;
+
+&lt;/definitions&gt;</div>
+            <subsection name="Objective">
+                <p>
+                    Demonstrate the use of class mediator to extend the mediation functionality of
+                    Synapse
+                </p>
+            </subsection>
+            <subsection name="Pre-requisites">
+                <p>
+                    <ul>
+                        <li>
+                            Deploy the SimpleStockQuoteService in the sample Axis2 server and start Axis2
+                        </li>
+                        <li>
+                            Start Synapse using the configuration numbered 380 (repository/conf/sample/synapse_sample_380.xml)
+                            <div class="command">
+                                Unix/Linux: sh synapse.sh -sample 380<br/>
+                                Windows: synapse.bat -sample 380
+                            </div>
+                        </li>
+                    </ul>
+                </p>
+            </subsection>
+            <subsection name="Executing the Client">
+                <p>
+                    In this configuration, Synapse hands over the request message to the specified
+                    endpoint, which sends it to the Axis2 server running on port 9000. But the response
+                    message is passed through the class mediator before sending it back to the client.
+                    Class mediator in turns hands over the message to the specified Java class for
+                    further processing. In that regard, the class mediator acts as a delegating
+                    mediator which delegates the message to a custom Java class for processing.
+                    Two parameters named 'discountFactor' and 'bonusFor' are passed to the mediator
+                    implementation class (i.e. samples.mediators.DiscountQuoteMediator) before each
+                    invocation. Source of the mediator implementation class is shown below. 
+                </p>
+                <div class="consoleOutput">package samples.mediators;
+
+import org.apache.synapse.MessageContext;
+import org.apache.synapse.Mediator;
+import org.apache.axiom.om.OMElement;
+import org.apache.axiom.om.OMAbstractFactory;
+import org.apache.axiom.om.OMFactory;
+import org.apache.axiom.soap.SOAPFactory;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+import javax.xml.namespace.QName;
+
+public class DiscountQuoteMediator implements Mediator {
+
+    private static final Log log = LogFactory.getLog(DiscountQuoteMediator.class);
+
+    private String discountFactor=&quot;10&quot;;
+
+    private String bonusFor=&quot;10&quot;;
+
+    private int bonusCount=0;
+
+    public DiscountQuoteMediator(){}
+
+    public boolean mediate(MessageContext mc) {
+
+        String price= mc.getEnvelope().getBody().getFirstElement().getFirstElement().
+                getFirstChildWithName(new QName(&quot;http://services.samples/xsd&quot;,&quot;last&quot;)).getText();
+
+        //converting String properties into integers
+        int discount=Integer.parseInt(discountFactor);
+        int bonusNo=Integer.parseInt(bonusFor);
+        double currentPrice=Double.parseDouble(price);
+
+        //discounting factor is deducted from current price form every response
+        Double lastPrice = new Double(currentPrice - currentPrice * discount / 100);
+
+        //Special discount of 5% offers for the first responses as set in the bonusFor property
+        if (bonusCount &lt;= bonusNo) {
+            lastPrice = new Double(lastPrice.doubleValue() - lastPrice.doubleValue() * 0.05);
+            bonusCount++;
+        }
+
+        String discountedPrice = lastPrice.toString();
+
+        mc.getEnvelope().getBody().getFirstElement().getFirstElement().getFirstChildWithName
+                (new QName(&quot;http://services.samples/xsd&quot;,&quot;last&quot;)).setText(discountedPrice);
+
+        System.out.println(&quot;Quote value discounted.&quot;);
+        System.out.println(&quot;Original price: &quot; + price);
+        System.out.println(&quot;Discounted price: &quot; + discountedPrice);
+
+        return true;
+    }
+
+    public String getType() {
+        return null;
+    }
+
+    public void setTraceState(int traceState) {
+        traceState = 0;
+    }
+
+    public int getTraceState() {
+        return 0;
+    }
+
+    public void setDiscountFactor(String discount) {
+        discountFactor=discount;
+    }
+
+    public String getDiscountFactor() {
+        return discountFactor;
+    }
+
+    public void setBonusFor(String bonus){
+        bonusFor=bonus;
+    }
+
+    public String getBonusFor(){
+        return bonusFor;
+    }
+}</div>
+                <p>
+                    All classes developed for the class mediator should implement the 'Mediator'
+                    interface, which contains the mediate(...) method. The mediate(...) method of the
+                    above class is invoked for each response message mediated through the main
+                    sequence, with the message context of the current message as the parameter. All
+                    details of the message including the SOAP headers, SOAP body and properties of
+                    the context hierarchy can be accessed from the message context. In this sample,
+                    the body of the message is retrieved and the discount percentage is subtracted
+                    from the quote price. If the quote request number is less than the number specified
+                    in the 'bonusFor' property in the configuration, a special discount is given.
+                </p>
+                <p>
+                    To test the custom code and the class mediator, invoke the test client as
+                    follows.
+                </p>
+                <div class="command">ant stockquote -Dsymbol=IBM -Dmode=quote -Daddurl=http://localhost:8280</div>
+                <p>
+                    You will see the below output in the client console with the discounted quote value.
+                </p>
+                <div class="consoleOutput">Standard :: Stock price = $95.26454380258552</div>
+                <p>
+                    If you check the Synapse console, you will notice the messages printed by the
+                    custom mediator during mediation.
+                </p>
+                <div class="consoleOutput">Quote value discounted.
+Original price: 162.30945327447262
+Discounted price: 138.77458254967408</div>
+            </subsection>
+        </section>
+        <p><a href="../samples.html">Back to Catalog</a></p>        
+    </body>
+</document>
\ No newline at end of file
diff --git a/src/site/xdoc/userguide/samples/sample381.xml b/src/site/xdoc/userguide/samples/sample381.xml
new file mode 100644
index 0000000..24aa228
--- /dev/null
+++ b/src/site/xdoc/userguide/samples/sample381.xml
@@ -0,0 +1,134 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+  ~  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.
+  -->
+
+<document>
+    <properties>
+        <title>Apache Synapse - Sample 381</title>
+    </properties>
+    <body>
+        <section name="Sample 381: Class Mediator for CBR of Binary Messages">
+            <div class="xmlConf">&lt;definitions xmlns="http://ws.apache.org/ns/synapse"&gt;
+
+    &lt;proxy name="JMSBinaryProxy" transports="jms"&gt;
+        &lt;target inSequence="BINARY_CBR_SEQ"/&gt;
+    &lt;/proxy&gt;
+
+    &lt;sequence name="BINARY_CBR_SEQ"&gt;
+        &lt;in&gt;
+            &lt;log level="full"/&gt;
+            &lt;property action="set" name="OUT_ONLY" value="true"/&gt;
+            &lt;class name="samples.mediators.BinaryExtractMediator"&gt;
+                &lt;property name="offset" value="11"/&gt;
+                &lt;property name="length" value="4"/&gt;
+                &lt;property name="variableName" value="symbol"/&gt;
+                &lt;property name="binaryEncoding" value="utf-8"/&gt;
+            &lt;/class&gt;
+            &lt;log level="custom"&gt;
+                &lt;property name="symbol" expression="get-property('symbol')"/&gt;
+            &lt;/log&gt;
+            &lt;switch source="get-property('symbol')"&gt;
+                &lt;case regex="GOOG"&gt;
+                    &lt;send&gt;
+                        &lt;endpoint&gt;
+                            &lt;address
+                                    uri="jms:/dynamicTopics/mdd.GOOG?transport.jms.ConnectionFactoryJNDIName=TopicConnectionFactory&amp;java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory&amp;java.naming.provider.url=tcp://localhost:61616&amp;transport.jms.DestinationType=topic"/&gt;
+                        &lt;/endpoint&gt;
+                    &lt;/send&gt;
+                &lt;/case&gt;
+                &lt;case regex="MSFT"&gt;
+                    &lt;send&gt;
+                        &lt;endpoint&gt;
+                            &lt;address
+                                    uri="jms:/dynamicTopics/mdd.MSFT?transport.jms.ConnectionFactoryJNDIName=TopicConnectionFactory&amp;java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory&amp;java.naming.provider.url=tcp://localhost:61616&amp;transport.jms.DestinationType=topic"/&gt;
+                        &lt;/endpoint&gt;
+                    &lt;/send&gt;
+                &lt;/case&gt;
+                &lt;default/&gt;
+            &lt;/switch&gt;
+        &lt;/in&gt;
+    &lt;/sequence&gt;
+
+&lt;/definitions&gt;</div>
+            <subsection name="Objective">
+                <p>
+                    Demonstrate an advanced content based routing (CBR) scenario using a custom mediator
+                </p>
+            </subsection>
+            <subsection name="Pre-requisites">
+                <p>
+                    <ul>                
+                        <li>
+                            Setup and start a JMS broker (Apache ActiveMQ can be used as the
+                            JMS broker for this scenario.Refer <a href="setup/jms.html#intro">JMS setup guide</a> for information on
+                            how to run ActiveMQ.)
+                        </li>
+                        <li>
+                            Enable the JMS transport receiver and sender of Synapse (Refer JMS setup
+                            guide for more details)
+                        </li>
+                        <li>
+                            Start Synapse using the configuration numbered 381 (repository/conf/sample/synapse_sample_381.xml)
+                            <div class="command">
+                                Unix/Linux: sh synapse.sh -sample 381<br/>
+                                Windows: synapse.bat -sample 381
+                            </div>
+                        </li>
+                    </ul>
+                </p>
+            </subsection>
+            <subsection name="Executing the Client">
+                <p>
+                    In this configuration, a proxy service has been defined to accept incoming JMS 
+                    messages. JMS messages contain binary payloads. User configures the offset, length,
+                    and binary encoding of the text literal that Synapse should use for CBR. Configuration
+                    simply routes the messages based on this text to different endpoints.
+                </p>
+                <p>
+                    A JMS producer and two instances of a consumer used to demonstrate the CBR functionality.
+                </p>
+                <p>
+                    Now run the first consumer using the following command.
+                </p>
+                <div class="command">ant mddconsumer -Djms_topic=mdd.MSFT</div>
+                <p>
+                    Now run the second consumer using the following command.
+                </p>
+                <div class="command">ant mddconsumer -Djms_topic=mdd.GOOG</div>
+                <p>
+                    Now run the market data producer to genenrate market data for symbol 'MSFT' using
+                    the following command.
+                </p>
+                <div class="command">ant mddproducer -Dsymbol=MSFT</div>
+                <p>
+                    Now run the market data producer to genenrate market data for symbol 'GOOG' using
+                    the following command.
+                </p>
+                <div class="command">ant mddproducer -Dsymbol=GOOG</div>
+                <p>
+                    You will see the below output in the client console(s) based on the symbol.
+                </p>
+                <div class="consoleOutput">mddconsumer:
+     [java]  Market data recived for symbol : topic://mdd.MSFT
+     [java]  Market data recived for symbol : topic://mdd.MSFT</div>
+            </subsection>
+        </section>
+        <p><a href="../samples.html">Back to Catalog</a></p>        
+    </body>
+</document>
\ No newline at end of file
diff --git a/src/site/xdoc/userguide/samples/sample390.xml b/src/site/xdoc/userguide/samples/sample390.xml
new file mode 100644
index 0000000..a2750a6
--- /dev/null
+++ b/src/site/xdoc/userguide/samples/sample390.xml
@@ -0,0 +1,114 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+  ~  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.
+  -->
+
+<document>
+    <properties>
+        <title>Apache Synapse - Sample 390</title>
+    </properties>
+    <body>
+        <section name="Sample 390: Introduction to the XQuery Mediator">
+            <div class="xmlConf">&lt;definitions xmlns="http://ws.apache.org/ns/synapse"&gt;
+
+    &lt;!-- the SimpleURLRegistry allows access to a URL based registry (e.g. file:/// or http://) --&gt;
+    &lt;registry provider="org.apache.synapse.registry.url.SimpleURLRegistry"&gt;
+        &lt;!-- the root property of the simple URL registry helps resolve a resource URL as root + key --&gt;
+        &lt;parameter name="root"&gt;file:repository/conf/sample/resources/&lt;/parameter&gt;
+        &lt;!-- all resources loaded from the URL registry would be cached for this number of milli seconds --&gt;
+        &lt;parameter name="cachableDuration"&gt;15000&lt;/parameter&gt;
+    &lt;/registry&gt;
+
+    &lt;localEntry key="xquery-key-req"
+                src="file:repository/conf/sample/resources/xquery/xquery_req.xq"/&gt;
+
+    &lt;proxy name="StockQuoteProxy"&gt;
+        &lt;target&gt;
+            &lt;inSequence&gt;
+                &lt;property name="body" expression="$body/child::*[position()=1]"/&gt;
+                &lt;xquery key="xquery-key-req"&gt;
+                    &lt;variable name="payload" type="ELEMENT"/&gt;
+                &lt;/xquery&gt;
+                &lt;send&gt;
+                    &lt;endpoint&gt;
+                        &lt;address uri="http://localhost:9000/services/SimpleStockQuoteService"/&gt;
+                    &lt;/endpoint&gt;
+                &lt;/send&gt;
+            &lt;/inSequence&gt;
+            &lt;outSequence&gt;
+                &lt;out&gt;
+                    &lt;xquery key="xquery/xquery_res.xq"&gt;
+                        &lt;variable name="payload" type="ELEMENT"/&gt;
+                        &lt;variable xmlns:m0="http://services.samples"
+                                  xmlns:ax21="http://services.samples/xsd" name="code" type="STRING"
+                                  expression="self::node()//m0:return/ax21:symbol/child::text()"/&gt;
+                        &lt;variable xmlns:m0="http://services.samples"
+                                  xmlns:ax21="http://services.samples/xsd" name="price"
+                                  type="DOUBLE"
+                                  expression="self::node()//m0:return/ax21:last/child::text()"/&gt;
+                    &lt;/xquery&gt;
+                    &lt;send/&gt;
+                &lt;/out&gt;
+            &lt;/outSequence&gt;
+        &lt;/target&gt;
+        &lt;publishWSDL uri="file:repository/conf/sample/resources/proxy/sample_proxy_1.wsdl"/&gt;
+    &lt;/proxy&gt;
+
+&lt;/definitions&gt;</div>
+            <subsection name="Objective">
+                <p>
+                    Demonstrate how to use the XQuery mediator for message content transformations
+                </p>
+            </subsection>
+            <subsection name="Pre-requisites">
+                <p>
+                    <ul>
+                        <li>
+                            Deploy the SimpleStockQuoteService in the sample Axis2 server and start Axis2
+                        </li>
+                        <li>
+                            Start Synapse using the configuration numbered 390 (repository/conf/sample/synapse_sample_390.xml)
+                            <div class="command">
+                                Unix/Linux: sh synapse.sh -sample 390<br/>
+                                Windows: synapse.bat -sample 390
+                            </div>
+                        </li>
+                    </ul>
+                </p>
+            </subsection>
+            <subsection name="Executing the Client">
+                <p>
+                    This example uses the XQuery mediator to perform transformations. This sample
+                    behaves the same as <a href="sample8.html">sample 8</a> and the only difference
+                    is that this sample uses XQuery instead of XSLT for transformation.
+                </p>
+                <p>
+                    Send a custom quote request to Synapse as follows.
+                </p>
+                <div class="command">ant stockquote -Daddurl=http://localhost:8280/services/StockQuoteProxy -Dmode=customquote</div>
+                <p>
+                    Request is transformed into a standard stock quote request by the XPery mediator.
+                    The XQuery definition is loaded through a local entry. The response from Axis2
+                    is transformed back to a custom quote response. In this case the XQuery definition
+                    is loaded from the registry.
+                </p>
+            </subsection>
+        </section>
+        <p><a href="../samples.html">Back to Catalog</a></p>        
+    </body>
+</document>
\ No newline at end of file
diff --git a/src/site/xdoc/userguide/samples/sample391.xml b/src/site/xdoc/userguide/samples/sample391.xml
new file mode 100644
index 0000000..80ae166
--- /dev/null
+++ b/src/site/xdoc/userguide/samples/sample391.xml
@@ -0,0 +1,96 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+  ~  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.
+  -->
+
+<document>
+    <properties>
+        <title>Apache Synapse - Sample 391</title>
+    </properties>
+    <body>
+        <section name="Sample 391: Using External XML Documents in the XQuery Mediator">
+            <div class="xmlConf">&lt;definitions xmlns="http://ws.apache.org/ns/synapse"&gt;
+
+    &lt;!-- the SimpleURLRegistry allows access to a URL based registry (e.g. file:/// or http://) --&gt;
+    &lt;registry provider="org.apache.synapse.registry.url.SimpleURLRegistry"&gt;
+        &lt;!-- the root property of the simple URL registry helps resolve a resource URL as root + key --&gt;
+        &lt;parameter name="root"&gt;file:repository/conf/sample/resources/&lt;/parameter&gt;
+        &lt;!-- all resources loaded from the URL registry would be cached for this number of milli seconds --&gt;
+        &lt;parameter name="cachableDuration"&gt;15000&lt;/parameter&gt;
+    &lt;/registry&gt;
+
+    &lt;proxy name="StockQuoteProxy"&gt;
+        &lt;target&gt;
+            &lt;inSequence&gt;
+                &lt;send&gt;
+                    &lt;endpoint&gt;
+                        &lt;address uri="http://localhost:9000/services/SimpleStockQuoteService"/&gt;
+                    &lt;/endpoint&gt;
+                &lt;/send&gt;
+            &lt;/inSequence&gt;
+            &lt;outSequence&gt;
+                &lt;out&gt;
+                    &lt;xquery key="xquery/xquery_commisson.xq"&gt;
+                        &lt;variable name="payload" type="ELEMENT"/&gt;
+                        &lt;variable name="commission" type="ELEMENT" key="misc/commission.xml"/&gt;
+                    &lt;/xquery&gt;
+                    &lt;send/&gt;
+                &lt;/out&gt;
+            &lt;/outSequence&gt;
+        &lt;/target&gt;
+        &lt;publishWSDL uri="file:repository/conf/sample/resources/proxy/sample_proxy_1.wsdl"/&gt;
+    &lt;/proxy&gt;
+
+&lt;/definitions&gt;</div>
+            <subsection name="Objective">
+                <p>
+                    Demonstrate how to import external XML documents into the XQuery engine using
+                    the XQuery mediator
+                </p>
+            </subsection>
+            <subsection name="Pre-requisites">
+                <p>
+                    <ul>
+                        <li>
+                            Deploy the SimpleStockQuoteService in the sample Axis2 server and start Axis2
+                        </li>
+                        <li>
+                            Start Synapse using the configuration numbered 391 (repository/conf/sample/synapse_sample_391.xml)
+                            <div class="command">
+                                Unix/Linux: sh synapse.sh -sample 391<br/>
+                                Windows: synapse.bat -sample 391
+                            </div>
+                        </li>
+                    </ul>
+                </p>
+            </subsection>
+            <subsection name="Executing the Client">
+                <p>
+                    In this sample, data from commission.xml file is used inside XQuery. The stock
+                    quote price from the response and commission from the commission.xml document
+                    will be added and given as a new price value.
+                </p>
+                <p>
+                    Try out this sample by invoking the proxy service as follows.
+                </p>
+                <div class="command">ant stockquote -Daddurl=http://localhost:8280/services/StockQuoteProxy</div>
+            </subsection>
+        </section>
+        <p><a href="../samples.html">Back to Catalog</a></p>        
+    </body>
+</document>
\ No newline at end of file
diff --git a/src/site/xdoc/userguide/samples/sample4.xml b/src/site/xdoc/userguide/samples/sample4.xml
new file mode 100644
index 0000000..a95446e
--- /dev/null
+++ b/src/site/xdoc/userguide/samples/sample4.xml
@@ -0,0 +1,156 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+  ~  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.
+  -->
+
+<document>
+    <properties>
+        <title>Apache Synapse - Sample 4</title>
+    </properties>
+    <body>
+        <section name="Sample 4: Introduction to Error Handling">
+            <div class="xmlConf">&lt;definitions xmlns="http://ws.apache.org/ns/synapse"&gt;
+
+    &lt;!-- the default fault handling sequence used by Synapse - named 'fault' --&gt;
+    &lt;sequence name="fault"&gt;
+        &lt;log level="custom"&gt;
+            &lt;property name="text" value="An unexpected error occured"/&gt;
+            &lt;property name="message" expression="get-property('ERROR_MESSAGE')"/&gt;
+        &lt;/log&gt;
+        &lt;drop/&gt;
+    &lt;/sequence&gt;
+
+    &lt;sequence name="sunErrorHandler"&gt;
+        &lt;log level="custom"&gt;
+            &lt;property name="text" value="An unexpected error occured for stock SUN"/&gt;
+            &lt;property name="message" expression="get-property('ERROR_MESSAGE')"/&gt;
+            &lt;!--&lt;property name="detail" expression="get-property('ERROR_DETAIL')"/&gt;--&gt;
+        &lt;/log&gt;
+        &lt;drop/&gt;
+    &lt;/sequence&gt;
+
+    &lt;sequence name="main"&gt;
+        &lt;in&gt;
+            &lt;switch xmlns:m0="http://services.samples" source="//m0:getQuote/m0:request/m0:symbol"&gt;
+                &lt;case regex="IBM"&gt;
+                    &lt;send&gt;
+                        &lt;endpoint&gt;
+                            &lt;address uri="http://localhost:9000/services/SimpleStockQuoteService"/&gt;
+                        &lt;/endpoint&gt;
+                    &lt;/send&gt;
+                &lt;/case&gt;
+                &lt;case regex="MSFT"&gt;
+                    &lt;send&gt;
+                        &lt;endpoint key="bogus"/&gt;
+                    &lt;/send&gt;
+                &lt;/case&gt;
+                &lt;case regex="SUN"&gt;
+                    &lt;sequence key="sunSequence"/&gt;
+                &lt;/case&gt;
+            &lt;/switch&gt;
+            &lt;drop/&gt;
+        &lt;/in&gt;
+
+        &lt;out&gt;
+            &lt;send/&gt;
+        &lt;/out&gt;
+    &lt;/sequence&gt;
+
+    &lt;sequence name="sunSequence" onError="sunErrorHandler"&gt;
+        &lt;send&gt;
+            &lt;endpoint key="sunPort"/&gt;
+        &lt;/send&gt;
+    &lt;/sequence&gt;
+
+&lt;/definitions&gt;</div>
+            <subsection name="Objective">
+                <p>
+                    Introduction to error handling with the 'fault' sequence
+                </p>
+            </subsection>
+            <subsection name="Pre-requisites">
+                <p>
+                    <ul>
+                        <li>
+                            Deploy the SimpleStockQuoteService in the sample Axis2 server and start Axis2
+                        </li>
+                        <li>
+                            Start Synapse using the configuration numbered 4 (repository/conf/sample/synapse_sample_4.xml)
+                            <div class="command">
+                                Unix/Linux: sh synapse.sh -sample 4<br/>
+                                Windows: synapse.bat -sample 4
+                            </div>
+                        </li>
+                    </ul>
+                </p>
+            </subsection>
+            <subsection name="Executing the Client">
+                <p>
+                    First send a stock quote request from the sample client for the symbol 'IBM' as
+                    follows.
+                </p>
+                <div class="command">ant stockquote -Daddurl=http://localhost:9000/services/SimpleStockQuoteService -Dtrpurl=http://localhost:8280/ -Dsymbol=IBM</div>
+                <p>
+                    The request will be routed to the Axis2 server and client will receive a response
+                    as expected.
+                </p>
+                <div class="consoleOutput">Standard :: Stock price = $95.26454380258552</div>
+                <p>
+                    Now send another stock quote request for the symbol 'MSFT' as follows.
+                </p>
+                <div class="command">ant stockquote -Daddurl=http://localhost:9000/services/SimpleStockQuoteService -Dtrpurl=http://localhost:8280/ -Dsymbol=MSFT</div>
+                <p>
+                    For MSFT requests Synapse is instructed to route the messages to an endpoint named
+                    'bogus', which does not exist. Synapse executes the specified error handler
+                    sequence closest to the point where the error was encountered. In this case, the
+                    currently executing sequence is 'main' and it does not specify an 'onError'
+                    attribute. Whenever Synapse cannot find an error handler, it looks for a sequence
+                    named 'fault'. Thus the 'fault' sequence can be seen executing, and writing the
+                    generic error message to the logs.
+                </p>
+                <div class="consoleOutput">[HttpServerWorker-1] DEBUG SendMediator - Send mediator :: mediate()
+[HttpServerWorker-1] ERROR IndirectEndpoint - Reference to non-existent endpoint for key : bogus
+[HttpServerWorker-1] DEBUG MediatorFaultHandler - MediatorFaultHandler :: handleFault
+[HttpServerWorker-1] DEBUG SequenceMediator - Sequence mediator &lt;fault&gt; :: mediate()
+[HttpServerWorker-1] DEBUG LogMediator - Log mediator :: mediate()
+[HttpServerWorker-1] INFO LogMediator text = An unexpected error occured, message = Couldn't find the endpoint with the key : bogus</div>
+                <p>
+                    Now send another stock quote request for the symbol 'SUN'.
+                </p>
+                <div class="command">ant stockquote -Daddurl=http://localhost:9000/services/SimpleStockQuoteService -Dtrpurl=http://localhost:8280/ -Dsymbol=SUN</div>
+                <p>
+                    When the 'SUN' quote is requested, a custom sequence 'sunSequence' is invoked,
+                    and it specifies 'sunErrorHandler' as its error handler. Hence when the send
+                    fails, you could see the proper error handler invocation and the custom error
+                    message printed as follows.
+                </p>
+                <div class="consoleOutput">[HttpServerWorker-1] DEBUG SequenceMediator - Sequence mediator &lt;sunSequence&gt; :: mediate()
+[HttpServerWorker-1] DEBUG SequenceMediator - Setting the onError handler for the sequence
+[HttpServerWorker-1] DEBUG AbstractListMediator - Implicit Sequence &lt;SequenceMediator&gt; :: mediate()
+[HttpServerWorker-1] DEBUG SendMediator - Send mediator :: mediate()
+[HttpServerWorker-1] ERROR IndirectEndpoint - Reference to non-existent endpoint for key : sunPort
+[HttpServerWorker-1] DEBUG MediatorFaultHandler - MediatorFaultHandler :: handleFault
+[HttpServerWorker-1] DEBUG SequenceMediator - Sequence mediator &lt;sunErrorHandler&gt; :: mediate()
+[HttpServerWorker-1] DEBUG AbstractListMediator - Implicit Sequence &lt;SequenceMediator&gt; :: mediate()
+[HttpServerWorker-1] DEBUG LogMediator - Log mediator :: mediate()
+[HttpServerWorker-1] INFO LogMediator text = An unexpected error occured for stock SUN, message = Couldn't find the endpoint with the key : sunPort</div>
+            </subsection>
+        </section>
+        <p><a href="../samples.html">Back to Catalog</a></p>        
+    </body>
+</document>
\ No newline at end of file
diff --git a/src/site/xdoc/userguide/samples/sample400.xml b/src/site/xdoc/userguide/samples/sample400.xml
new file mode 100644
index 0000000..60781b4
--- /dev/null
+++ b/src/site/xdoc/userguide/samples/sample400.xml
@@ -0,0 +1,104 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+  ~  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.
+  -->
+
+<document>
+    <properties>
+        <title>Apache Synapse - Sample 400</title>
+    </properties>
+    <body>
+        <section name="Sample 400: Message Splitting and Aggregation">
+            <div class="xmlConf">&lt;definitions xmlns="http://ws.apache.org/ns/synapse"&gt;
+
+    &lt;proxy name="SplitAggregateProxy"&gt;
+        &lt;target&gt;
+            &lt;inSequence&gt;
+                &lt;iterate xmlns:m0="http://services.samples" expression="//m0:getQuote/m0:request"
+                         preservePayload="true" attachPath="//m0:getQuote"&gt;
+                    &lt;target&gt;
+                        &lt;sequence&gt;
+                            &lt;send&gt;
+                                &lt;endpoint&gt;
+                                    &lt;address
+                                            uri="http://localhost:9000/services/SimpleStockQuoteService"/&gt;
+                                &lt;/endpoint&gt;
+                            &lt;/send&gt;
+                        &lt;/sequence&gt;
+                    &lt;/target&gt;
+                &lt;/iterate&gt;
+            &lt;/inSequence&gt;
+            &lt;outSequence&gt;
+                &lt;aggregate&gt;
+                    &lt;onComplete xmlns:m0="http://services.samples"
+                                expression="//m0:getQuoteResponse"&gt;
+                        &lt;send/&gt;
+                    &lt;/onComplete&gt;
+                &lt;/aggregate&gt;
+            &lt;/outSequence&gt;
+        &lt;/target&gt;
+    &lt;/proxy&gt;
+
+&lt;/definitions&gt;</div>
+            <subsection name="Objective">
+                <p>
+                    Showcase how Synapse can be used to split a message into multiple fragments
+                    using the iterate mediator, and process them separately. The sample also shows
+                    how to use the aggregate mediator to combine multiple messages into one.
+                </p>
+            </subsection>
+            <subsection name="Pre-requisites">
+                <p>
+                    <ul>
+                        <li>
+                            Deploy the SimpleStockQuoteService in the sample Axis2 server and start Axis2
+                        </li>
+                        <li>
+                            Start Synapse using the configuration numbered 400 (repository/conf/sample/synapse_sample_400.xml)
+                            <div class="command">
+                                Unix/Linux: sh synapse.sh -sample 400<br/>
+                                Windows: synapse.bat -sample 400
+                            </div>
+                        </li>
+                    </ul>
+                </p>
+            </subsection>
+            <subsection name="Executing the Client">
+                <p>
+                    In this sample, the message sent to Synapse is comprised of a number of elements
+                    of the same type. When Synapse receives this message it will iterate through those
+                    elements and then will send each of them to the specified endpoint as separate
+                    messages. When all the responses are received by Synapse, those messages will be
+                    aggregated to form the resultant response and will send back to the client.
+                </p>
+                <p>
+                    To try this out invoke the sample client as follows.
+                </p>
+                <div class="command">ant stockquote -Daddurl=http://localhost:8280/services/SplitAggregateProxy -Ditr=4</div>
+                <p>
+                    The above command will send a request containing four fragments in it. The
+                    iterate mediator therefore will break up the message into four. You will notice
+                    that Axis2 server is receiving 4 requests from Synapse. Four responses from Axis2
+                    will be combined into one by the aggregate mediator and sent back to the sample
+                    Axis2 client.
+                </p>
+            </subsection>
+        </section>
+        <p><a href="../samples.html">Back to Catalog</a></p>        
+    </body>
+</document>
\ No newline at end of file
diff --git a/src/site/xdoc/userguide/samples/sample410.xml b/src/site/xdoc/userguide/samples/sample410.xml
new file mode 100644
index 0000000..646ac39
--- /dev/null
+++ b/src/site/xdoc/userguide/samples/sample410.xml
@@ -0,0 +1,141 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+  ~  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.
+  -->
+
+<document>
+    <properties>
+        <title>Apache Synapse - Sample 410</title>
+    </properties>
+    <body>
+        <section name="Sample 410: Distributed Transactions Management with the Transaction Mediator">
+            <div class="xmlConf">&lt;definitions xmlns="http://ws.apache.org/ns/synapse"
+             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+             xsi:schemaLocation="http://ws.apache.org/ns/synapse http://synapse.apache.org/ns/2010/04/configuration/synapse_config.xsd"&gt;
+
+    &lt;sequence name="myFaultHandler"&gt;
+        &lt;log level="custom"&gt;
+            &lt;property name="text" value="** Rollback Transaction**"/&gt;
+        &lt;/log&gt;
+        &lt;transaction action="rollback"/&gt;
+        &lt;send/&gt;
+    &lt;/sequence&gt;
+
+    &lt;sequence name="main" onError="myFaultHandler"&gt;
+        &lt;in&gt;
+            &lt;send&gt;
+                &lt;endpoint&gt;
+                    &lt;address uri="http://localhost:9000/services/SimpleStockQuoteService"/&gt;
+                &lt;/endpoint&gt;
+            &lt;/send&gt;
+        &lt;/in&gt;
+
+        &lt;out&gt;
+            &lt;transaction action="new"/&gt;
+
+            &lt;log level="custom"&gt;
+                &lt;property name="text" value="** Reporting to the Database esbdb**"/&gt;
+            &lt;/log&gt;
+            &lt;dbreport useTransaction="true" xmlns="http://ws.apache.org/ns/synapse"&gt;
+                &lt;connection&gt;
+                    &lt;pool&gt;
+                        &lt;dsName&gt;java:jdbc/XADerbyDS&lt;/dsName&gt;
+                        &lt;icClass&gt;org.jnp.interfaces.NamingContextFactory&lt;/icClass&gt;
+                        &lt;url&gt;localhost:1099&lt;/url&gt;
+                        &lt;user&gt;synapse&lt;/user&gt;
+                        &lt;password&gt;synapse&lt;/password&gt;
+                    &lt;/pool&gt;
+                &lt;/connection&gt;
+                &lt;statement&gt;
+                    &lt;sql&gt;delete from company where name =?&lt;/sql&gt;
+                    &lt;parameter expression="//m0:return/m1:symbol/child::text()"
+                               xmlns:m0="http://services.samples"
+                               xmlns:m1="http://services.samples/xsd"
+                               type="VARCHAR"/&gt;
+                &lt;/statement&gt;
+            &lt;/dbreport&gt;
+
+            &lt;log level="custom"&gt;
+                &lt;property name="text" value="** Reporting to the Database esbdb1**"/&gt;
+            &lt;/log&gt;
+            &lt;dbreport useTransaction="true" xmlns="http://ws.apache.org/ns/synapse"&gt;
+                &lt;connection&gt;
+                    &lt;pool&gt;
+                        &lt;dsName&gt;java:jdbc/XADerbyDS1&lt;/dsName&gt;
+                        &lt;icClass&gt;org.jnp.interfaces.NamingContextFactory&lt;/icClass&gt;
+                        &lt;url&gt;localhost:1099&lt;/url&gt;
+                        &lt;user&gt;synapse&lt;/user&gt;
+                        &lt;password&gt;synapse&lt;/password&gt;
+                    &lt;/pool&gt;
+                &lt;/connection&gt;
+                &lt;statement&gt;
+                    &lt;sql&gt;INSERT into company values ('IBM','c4',12.0)&lt;/sql&gt;
+                &lt;/statement&gt;
+            &lt;/dbreport&gt;
+            &lt;transaction action="commit"/&gt;
+            &lt;send/&gt;
+        &lt;/out&gt;
+    &lt;/sequence&gt;
+
+&lt;/definitions&gt;</div>
+            <subsection name="Objective">
+                <p>
+                    Demonstrate how to manage complex distributed transactions using the transaction
+                    mediator
+                </p>
+            </subsection>
+            <subsection name="Pre-requisites">
+                <p>
+                    <ul>
+                        <li>
+                            To run this sample it is required to deploy Synpase on JBoss application
+                            server(This is only tested with JBoss application sever). You can use the
+                            Synapse war distribution to deploy Synapse on JBoss. Use the synpase_sample_410.xml
+                            as the synapse confiuration file and start JBoss. Also you need to define
+                            two XA datasources for above the two datasources defined in Synapse. You'll
+                            need to refer JBoss documentation to see how to do this.
+                        </li>
+                        <li>
+                            Setup two Derby database instances as described in the database setup guide.
+                            These databases will be used by the XA datasources in JBoss.
+                        </li>
+                        <li>
+                            Deploy the SimpleStockQuoteService in the sample Axis2 server and start Axis2
+                        </li>
+                    </ul>
+                </p>
+            </subsection>
+            <subsection name="Executing the Client">
+                <p>
+                    In this sample a record is deleted from one database and it is added to the
+                    second database. If either of the operations(deleting from the 1st database and
+                    adding to the second database) fails the entire operation will be roll backed.
+                    The records will be left intact.
+                </p>
+                <p>
+                    Invoke the client as follows to try this out.
+                </p>
+                <div class="command">ant stockquote -Daddurl=http://localhost:9000/services/SimpleStockQuoteService -Dtrpurl=http://localhost:8280/ -Dsymbol=SUN</div>
+                <p>
+                    You can force an error by shutting down one of the two database instances.
+                </p>
+            </subsection>
+        </section>
+        <p><a href="../samples.html">Back to Catalog</a></p>
+    </body>
+</document>
\ No newline at end of file
diff --git a/src/site/xdoc/userguide/samples/sample420.xml b/src/site/xdoc/userguide/samples/sample420.xml
new file mode 100644
index 0000000..7a4fbca
--- /dev/null
+++ b/src/site/xdoc/userguide/samples/sample420.xml
@@ -0,0 +1,95 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+  ~  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.
+  -->
+
+<document>
+    <properties>
+        <title>Apache Synapse - Sample 420</title>
+    </properties>
+    <body>
+        <section name="Sample 420: Simple Response Caching Scenario">
+            <div class="xmlConf">&lt;definitions xmlns="http://ws.apache.org/ns/synapse"&gt;
+
+    &lt;sequence name="main"&gt;
+        &lt;in&gt;
+            &lt;cache timeout="20" scope="per-host" collector="false"
+                   hashGenerator="org.wso2.caching.digest.DOMHASHGenerator"&gt;
+                &lt;implementation type="memory" maxSize="100"/&gt;
+            &lt;/cache&gt;
+            &lt;send&gt;
+                &lt;endpoint&gt;
+                    &lt;address uri="http://localhost:9000/services/SimpleStockQuoteService"/&gt;
+                &lt;/endpoint&gt;
+            &lt;/send&gt;
+        &lt;/in&gt;
+        &lt;out&gt;
+            &lt;cache collector="true"/&gt;
+            &lt;send/&gt;
+        &lt;/out&gt;
+    &lt;/sequence&gt;
+
+&lt;/definitions&gt;</div>
+            <subsection name="Objective">
+                <p>
+                    Showcase the caching capabilities of Synapse by implementing a simple response
+                    cache in Synapse for an actual service deployed on Axis2
+                </p>
+            </subsection>
+            <subsection name="Pre-requisites">
+                <p>
+                    <ul>
+                        <li>
+                            Deploy the SimpleStockQuoteService in the sample Axis2 server and start Axis2
+                        </li>
+                        <li>
+                            Start Synapse using the configuration numbered 420 (repository/conf/sample/synapse_sample_420.xml)
+                            <div class="command">
+                                Unix/Linux: sh synapse.sh -sample 420<br/>
+                                Windows: synapse.bat -sample 420
+                            </div>
+                        </li>
+                    </ul>
+                </p>
+            </subsection>
+            <subsection name="Executing the Client">
+                <p>
+                    In this sample, the message sent to Synapse is checked for an existing cached
+                    response by calculating the hash value of the request. If there is a cache hit
+                    in Synapse, then this request will not be forwarded to the actual service. Rather,
+                    Synapse responds to the client with the cached response. In case of a cache miss
+                    that particular message will be forwarded to the actual service and caches that
+                    response in the out path for the use of consecutive requests of the same type. 
+                </p>
+                <p>
+                    To try out this scenario, send a request from the sample client as follows.
+                </p>
+                <div class="command">ant stockquote -Dtrpurl=http://localhost:8280/</div>
+                <p>
+                    You will notice that if you send more than one requests within 20 seconds, only
+                    the first request is forwarded to the actual service, and the rest of the requests
+                    will be served by the cache inside Synapse. You could observe this by looking at
+                    the logs printed by the Axis2 server, as well as by observing a constant quote value in
+                    the response to the client instead of the random rate, which changes by each and
+                    every 20 seconds.
+                </p>
+            </subsection>
+        </section>
+        <p><a href="../samples.html">Back to Catalog</a></p>        
+    </body>
+</document>
\ No newline at end of file
diff --git a/src/site/xdoc/userguide/samples/sample430.xml b/src/site/xdoc/userguide/samples/sample430.xml
new file mode 100644
index 0000000..a75ad12
--- /dev/null
+++ b/src/site/xdoc/userguide/samples/sample430.xml
@@ -0,0 +1,84 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+  ~  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.
+  -->
+
+<document>
+    <properties>
+        <title>Apache Synapse - Sample 430</title>
+    </properties>
+    <body>
+        <section name="Sample 430: Callout Mediator for Synchronous Web Service Invocations">
+            <div class="xmlConf">&lt;definitions xmlns="http://ws.apache.org/ns/synapse"&gt;
+
+    &lt;sequence name="main"&gt;
+        &lt;callout serviceURL="http://localhost:9000/services/SimpleStockQuoteService"
+                 action="urn:getQuote"&gt;
+            &lt;source xmlns:s11="http://schemas.xmlsoap.org/soap/envelope/"
+                    xmlns:s12="http://www.w3.org/2003/05/soap-envelope"
+                    xpath="s11:Body/child::*[fn:position()=1] | s12:Body/child::*[fn:position()=1]"/&gt;
+            &lt;target xmlns:s11="http://schemas.xmlsoap.org/soap/envelope/"
+                    xmlns:s12="http://www.w3.org/2003/05/soap-envelope"
+                    xpath="s11:Body/child::*[fn:position()=1] | s12:Body/child::*[fn:position()=1]"/&gt;
+        &lt;/callout&gt;
+        &lt;property name="RESPONSE" value="true"/&gt;
+        &lt;header name="To" action="remove"/&gt;
+        &lt;send/&gt;
+        &lt;drop/&gt;
+    &lt;/sequence&gt;
+
+&lt;/definitions&gt;</div>
+            <subsection name="Objective">
+                <p>
+                    Demonstrate the usage of the callout mediator for making synchronous (blocking)
+                    Web service calls during mediation
+                </p>
+            </subsection>
+            <subsection name="Pre-requisites">
+                <p>
+                    <ul>
+                        <li>
+                            Deploy the SimpleStockQuoteService in the sample Axis2 server and start Axis2
+                        </li>
+                        <li>
+                            Start Synapse using the configuration numbered 430 (repository/conf/sample/synapse_sample_430.xml)
+                            <div class="command">
+                                Unix/Linux: sh synapse.sh -sample 430<br/>
+                                Windows: synapse.bat -sample 430
+                            </div>
+                        </li>
+                    </ul>
+                </p>
+            </subsection>
+            <subsection name="Executing the Client">
+                <p>
+                    In this sample, the callout mediator does the direct service invocation to the
+                    StockQuoteService using the client request, gets the response and sets it as the
+                    first child of the SOAP message body. Then using the send mediator, the message
+                    is sent back to the client. As a result there is no need to define any endpoints
+                    in this configuration.
+                </p>
+                <p>
+                    Invoke the client as follows.
+                </p>
+                <div class="command">ant stockquote -Daddurl=http://localhost:9000/services/SimpleStockQuoteService -Dtrpurl=http://localhost:8280/</div>
+            </subsection>
+        </section>
+        <p><a href="../samples.html">Back to Catalog</a></p>        
+    </body>
+</document>
\ No newline at end of file
diff --git a/src/site/xdoc/userguide/samples/sample450.xml b/src/site/xdoc/userguide/samples/sample450.xml
new file mode 100644
index 0000000..951fa01
--- /dev/null
+++ b/src/site/xdoc/userguide/samples/sample450.xml
@@ -0,0 +1,88 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+  ~  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.
+  -->
+
+<document>
+    <properties>
+        <title>Apache Synapse - Sample 450</title>
+    </properties>
+    <body>
+        <section name="Sample 450: Introduction to the URL Rewrite Mediator">
+            <div class="xmlConf">&lt;definitions xmlns="http://ws.apache.org/ns/synapse"&gt;
+
+    &lt;sequence name="main"&gt;
+        &lt;in&gt;
+            &lt;rewrite&gt;
+                &lt;rule&gt;
+                    &lt;action type="replace" regex="soap" value="services" fragment="path"/&gt;
+                &lt;/rule&gt;
+            &lt;/rewrite&gt;
+            &lt;send/&gt;
+        &lt;/in&gt;
+        &lt;out&gt;
+            &lt;send/&gt;
+        &lt;/out&gt;
+    &lt;/sequence&gt;
+
+&lt;/definitions&gt;</div>
+            <subsection name="Objective">
+                <p>
+                    Demonstrate the basic functions of the URL rewrite mediator
+                </p>
+            </subsection>
+            <subsection name="Pre-requisites">
+                <p>
+                    <ul>
+                        <li>
+                            Deploy the SimpleStockQuoteService in the sample Axis2 server and start Axis2
+                        </li>
+                        <li>
+                            Start Synapse using the configuration numbered 450 (repository/conf/sample/synapse_sample_450.xml)
+                            <div class="command">
+                                Unix/Linux: sh synapse.sh -sample 450<br/>
+                                Windows: synapse.bat -sample 450
+                            </div>
+                        </li>
+                    </ul>
+                </p>
+            </subsection>
+            <subsection name="Executing the Client">
+                <p>
+                    URL rewrite mediator can be used to modify the 'To' header of a request based on
+                    one or more user defined URL rewrite rules. A rewrite rule could be a
+                    plain rewrite instruction or a conditional instruction. In this sample we use a
+                    plain, unconidtional rewrite rule which simply replaces the string 'soap' with
+                    'services' in the 'To' header.
+                </p>
+                <p>
+                    Invoke the sample client as follows to try this out.
+                </p>
+                <div class="command">ant stockquote -Dtrpurl=http://localhost:8280 -Daddurl=http://localhost:9000/soap/SimpleStockQuoteService</div>
+                <p>
+                    Note that the address URL of the client request contains the context 'soap'. But
+                    in the Axis2 server all the services are deployed under a context named 'services'
+                    by default. Synapse will rewrite the To header of the request by replacing the
+                    'soap' context with 'services. Hence the request will be delivered to the Axis2
+                    server and the Axis2 client will receive a valid response.
+                </p>                
+            </subsection>
+        </section>
+        <p><a href="../samples.html">Back to Catalog</a></p>        
+    </body>
+</document>
\ No newline at end of file
diff --git a/src/site/xdoc/userguide/samples/sample451.xml b/src/site/xdoc/userguide/samples/sample451.xml
new file mode 100644
index 0000000..eba4a1c
--- /dev/null
+++ b/src/site/xdoc/userguide/samples/sample451.xml
@@ -0,0 +1,99 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+  ~  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.
+  -->
+
+<document>
+    <properties>
+        <title>Apache Synapse - Sample 451</title>
+    </properties>
+    <body>
+        <section name="Sample 451: Conditional URL Rewriting">
+            <div class="xmlConf">&lt;definitions xmlns="http://ws.apache.org/ns/synapse"&gt;
+
+    &lt;sequence name="main"&gt;
+        &lt;in&gt;
+            &lt;rewrite&gt;
+                &lt;rule&gt;
+                    &lt;condition&gt;
+                        &lt;and&gt;
+                            &lt;equal type="url" source="host" value="localhost"/&gt;
+                            &lt;not&gt;
+                                &lt;equal type="url" source="protocol" value="https"/&gt;
+                            &lt;/not&gt;
+                        &lt;/and&gt;
+                    &lt;/condition&gt;
+                    &lt;action fragment="protocol" value="https"/&gt;
+                    &lt;action fragment="port" value="9002"/&gt;
+                &lt;/rule&gt;
+            &lt;/rewrite&gt;
+            &lt;send/&gt;
+        &lt;/in&gt;
+        &lt;out&gt;
+            &lt;send/&gt;
+        &lt;/out&gt;
+    &lt;/sequence&gt;
+
+&lt;/definitions&gt;</div>
+            <subsection name="Objective">
+                <p>
+                    Demonstrate the ability of the URL rewrite mediator to evaluate conditions on
+                    messages and perform rewrites based on the results                                        
+                </p>
+            </subsection>
+            <subsection name="Pre-requisites">
+                <p>
+                    <ul>
+                        <li>
+                            Deploy the SimpleStockQuoteService in the sample Axis2 server and start Axis2
+                        </li>
+                        <li>
+                            Start Synapse using the configuration numbered 451 (repository/conf/sample/synapse_sample_451.xml)
+                            <div class="command">
+                                Unix/Linux: sh synapse.sh -sample 451<br/>
+                                Windows: synapse.bat -sample 451
+                            </div>
+                        </li>
+                    </ul>
+                </p>
+            </subsection>
+            <subsection name="Executing the Client">
+                <p>
+                    Invoke the Axis2 client and send some requests to Synapse with different address
+                    URL values. If the address URL value contains 'localhost' as the hostname and 'https'
+                    as the protocol prefix, Synapse will route the message as it is. But if the
+                    hostname is 'localhost' and the protocol is not https, Synapse will rewrite the
+                    URL by setting 'https' as the protocol. The port number will also be set to the
+                    HTTPS port of the Axis2 server.
+                </p>
+                <p>
+                    If you invoke the client as follows, Synapse will rewrite the 'To' header and
+                    forward the message to Axis2 over HTTPS.
+                </p>
+                <div class="command">ant stockquote -Daddurl=http://localhost:9000/services/SimpleStockQuoteService -Dtrpurl=http://localhost:8280/</div>
+                <p>
+                    The condition evaluation feature is provided by the Synapse evaluator framework.
+                    Currently one can evaluate expressions on URL values, query parameters, transport
+                    headers, properties and SOAP envelope content using this framework. Hence URL
+                    rewriting can be done based on any of these aspects.
+                </p>                
+            </subsection>
+        </section>
+        <p><a href="../samples.html">Back to Catalog</a></p>        
+    </body>
+</document>
\ No newline at end of file
diff --git a/src/site/xdoc/userguide/samples/sample452.xml b/src/site/xdoc/userguide/samples/sample452.xml
new file mode 100644
index 0000000..9d830a2
--- /dev/null
+++ b/src/site/xdoc/userguide/samples/sample452.xml
@@ -0,0 +1,106 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+  ~  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.
+  -->
+
+<document>
+    <properties>
+        <title>Apache Synapse - Sample 452</title>
+    </properties>
+    <body>
+        <section name="Sample 452: Conditional URL Rewriting with Multiple Rules">
+            <div class="xmlConf">&lt;definitions xmlns="http://ws.apache.org/ns/synapse"&gt;
+
+    &lt;sequence name="main"&gt;
+        &lt;in&gt;
+            &lt;property name="http.port" value="9000"/&gt;
+            &lt;property name="https.port" value="9002"/&gt;
+            &lt;rewrite&gt;
+                &lt;rule&gt;
+                    &lt;action fragment="host" value="localhost"/&gt;
+                    &lt;action fragment="path" type="prepend" value="/services"/&gt;
+                &lt;/rule&gt;
+                &lt;rule&gt;
+                    &lt;condition&gt;
+                        &lt;equal type="url" source="protocol" value="http"/&gt;
+                    &lt;/condition&gt;
+                    &lt;action fragment="port" xpath="get-property('http.port')"/&gt;
+                &lt;/rule&gt;
+                &lt;rule&gt;
+                    &lt;condition&gt;
+                        &lt;equal type="url" source="protocol" value="https"/&gt;
+                    &lt;/condition&gt;
+                    &lt;action fragment="port" xpath="get-property('https.port')"/&gt;
+                &lt;/rule&gt;
+            &lt;/rewrite&gt;
+            &lt;log level="full"/&gt;
+            &lt;send/&gt;
+        &lt;/in&gt;
+        &lt;out&gt;
+            &lt;send/&gt;
+        &lt;/out&gt;
+    &lt;/sequence&gt;
+
+&lt;/definitions&gt;</div>
+            <subsection name="Objective">
+                <p>
+                    Demonstrate the ability of the URL rewrite mediator to perform rewrites based
+                    on multiple rules
+                </p>
+            </subsection>
+            <subsection name="Pre-requisites">
+                <p>
+                    <ul>
+                        <li>
+                            Deploy the SimpleStockQuoteService in the sample Axis2 server and start Axis2
+                        </li>
+                        <li>
+                            Start Synapse using the configuration numbered 452 (repository/conf/sample/synapse_sample_452.xml)
+                            <div class="command">
+                                Unix/Linux: sh synapse.sh -sample 452<br/>
+                                Windows: synapse.bat -sample 452
+                            </div>
+                        </li>
+                    </ul>
+                </p>
+            </subsection>
+            <subsection name="Executing the Client">
+                <p>
+                    One may specify multiple rewrite rules for a URL rewrite mediator instance. In
+                    that case Synapse will execute all the rules on each message, in the order they
+                    appear. This particular sample lists 3 rewrite rules. To try it out, invoke the
+                    client as follows.
+                </p>
+                <div class="command">ant stockquote -Dtrpurl=http://localhost:8280 -Daddurl=http://test.com/SimpleStockQuoteService</div>
+                <p>
+                    The provided address URL does not contain a port number and the context. The URL
+                    rewrite mediator will replace the hostname (test.com) with 'localhost' and add the
+                    context '/services' to the path. Then it will add the appropriate port number to
+                    the URL by looking at the protocol prefix. Ultimately the service request will be
+                    routed the sample Axis2 server and the client will receive a valid response.
+                </p>
+                <p>
+                    Another important aspect shown by this sample is the ability of the URL rewirte
+                    mediator to obtain the necessary values by executing XPath expressions. The port
+                    numbers are calculated by executing an XPath on the messages.
+                </p>
+            </subsection>
+        </section>
+        <p><a href="../samples.html">Back to Catalog</a></p>        
+    </body>
+</document>
\ No newline at end of file
diff --git a/src/site/xdoc/userguide/samples/sample460.xml b/src/site/xdoc/userguide/samples/sample460.xml
new file mode 100644
index 0000000..aea56da
--- /dev/null
+++ b/src/site/xdoc/userguide/samples/sample460.xml
@@ -0,0 +1,104 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+  ~  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.
+  -->
+
+<document>
+    <properties>
+        <title>Apache Synapse - Sample 460</title>
+    </properties>
+    <body>
+        <section name="Sample 460: Introduction to the Spring Mediator">
+            <div class="xmlConf">&lt;definitions xmlns="http://ws.apache.org/ns/synapse"&gt;
+
+    &lt;registry provider="org.apache.synapse.registry.url.SimpleURLRegistry"&gt;
+        &lt;parameter name="root"&gt;file:repository/conf/sample/resources/&lt;/parameter&gt;
+        &lt;parameter name="cachableDuration"&gt;15000&lt;/parameter&gt;
+    &lt;/registry&gt;
+
+    &lt;sequence name="main"&gt;
+        &lt;!--Setting the Spring Mediator and its Spring Beans xml file location --&gt;
+        &lt;!--Note that springtest is the bean id used in springCustomLogger.xml --&gt;
+        &lt;spring bean="springtest" key="spring/springCustomLogger.xml"/&gt;
+        &lt;send/&gt;
+    &lt;/sequence&gt;
+
+&lt;/definitions&gt;</div>
+            <p>
+                This sample configuration loads an external SpringBean from a file named
+                springCustomLogger.xml. Contents of this file are as follows.
+            </p>
+            <div class="xmlConf">&lt;?xml version="1.0" encoding="UTF-8"?&gt;
+&lt;!DOCTYPE beans PUBLIC  "-//SPRING//DTD BEAN//EN"
+    "http://www.springframework.org/dtd/spring-beans.dtd"&gt;
+
+&lt;beans&gt;
+
+   &lt;bean id="springtest" class="samples.mediators.extentions.SpringCustomLogger" singleton="false"&gt;
+	   &lt;property name="userName"&gt;&lt;value&gt;"Synapse User"&lt;/value&gt;&lt;/property&gt;
+	   &lt;property name="email"&gt;&lt;value&gt;"usr@synapse.org"&lt;/value&gt;&lt;/property&gt;
+   &lt;/bean&gt;
+
+&lt;/beans&gt;</div>
+            
+            <subsection name="Objective">
+                <p>
+                    Demonstrate how to initialize and use a SpringBean as a mediator
+                </p>
+            </subsection>
+            <subsection name="Pre-requisites">
+                <p>
+                    <ul>
+                        <li>
+                            Deploy the SimpleStockQuoteService in the sample Axis2 server and start Axis2
+                        </li>
+                        <li>
+                            Start Synapse using the configuration numbered 460 (repository/conf/sample/synapse_sample_460.xml)
+                            <div class="command">
+                                Unix/Linux: sh synapse.sh -sample 460<br/>
+                                Windows: synapse.bat -sample 460
+                            </div>
+                        </li>
+                    </ul>
+                </p>
+            </subsection>
+            <subsection name="Executing the Client">
+                <p>
+                    In this sample, the Spring Bean named 'SpringCustomLogger' gets loaded from the
+                    springCustomLogger.xml file and then it is used to log the message ID of each
+                    message being mediated. To see it in action, invoke the sample client as follows.
+                </p>
+                <div class="command">ant stockquote -Daddurl=http://localhost:9000/services/SimpleStockQuoteService -Dtrpurl=http://localhost:8280/</div>
+                <p>
+                    If you have enabled logging for the samples.mediators package in the log4j.properties
+                    file, you will see an output similar to the following, on the console.
+                </p>
+                <div class="consoleOutput">2010-09-26 20:46:57,946 [-] [HttpServerWorker-1]  INFO SpringCustomLogger Starting Spring Meditor
+2010-09-26 20:46:57,946 [-] [HttpServerWorker-1]  INFO SpringCustomLogger Bean in Initialized with User:["Synapse User"]
+2010-09-26 20:46:57,946 [-] [HttpServerWorker-1]  INFO SpringCustomLogger E-MAIL:["usr@synapse.org"]
+2010-09-26 20:46:57,946 [-] [HttpServerWorker-1]  INFO SpringCustomLogger Massage Id:  urn:uuid:383FA8B27D7CC549D91285514217720
+2010-09-26 20:46:57,946 [-] [HttpServerWorker-1]  INFO SpringCustomLogger Logged....</div>
+                <p>
+                    Similarly you can import any SpringBean into the Synapse runtime using the
+                    spring mediator, and use Spring to execute mediation rules.
+                </p>
+            </subsection>
+        </section>
+        <p><a href="../samples.html">Back to Catalog</a></p>        
+    </body>
+</document>
\ No newline at end of file
diff --git a/src/site/xdoc/userguide/samples/sample5.xml b/src/site/xdoc/userguide/samples/sample5.xml
new file mode 100644
index 0000000..b6fd59b
--- /dev/null
+++ b/src/site/xdoc/userguide/samples/sample5.xml
@@ -0,0 +1,114 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+  ~  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.
+  -->
+
+<document>
+    <properties>
+        <title>Apache Synapse - Sample 5</title>
+    </properties>
+    <body>
+        <section name="Sample 5: Creating SOAP Faults and Changing the Direction of Messages">
+            <div class="xmlConf">&lt;definitions xmlns="http://ws.apache.org/ns/synapse"&gt;
+
+    &lt;sequence name="myFaultHandler"&gt;
+        &lt;makefault response="true"&gt;
+            &lt;code xmlns:tns="http://www.w3.org/2003/05/soap-envelope" value="tns:Receiver"/&gt;
+            &lt;reason expression="get-property('ERROR_MESSAGE')"/&gt;
+        &lt;/makefault&gt;
+        &lt;send/&gt;
+    &lt;/sequence&gt;
+
+    &lt;sequence name="main" onError="myFaultHandler"&gt;
+        &lt;in&gt;
+            &lt;switch xmlns:m0="http://services.samples" source="//m0:getQuote/m0:request/m0:symbol"&gt;
+                &lt;case regex="MSFT"&gt;
+                    &lt;send&gt;
+                        &lt;endpoint&gt;
+                            &lt;address uri="http://bogus:9000/services/NonExistentStockQuoteService"/&gt;
+                        &lt;/endpoint&gt;
+                    &lt;/send&gt;
+                &lt;/case&gt;
+                &lt;case regex="SUN"&gt;
+                    &lt;send&gt;
+                        &lt;endpoint&gt;
+                            &lt;address uri="http://localhost:9009/services/NonExistentStockQuoteService"/&gt;
+                        &lt;/endpoint&gt;
+                    &lt;/send&gt;
+                &lt;/case&gt;
+            &lt;/switch&gt;
+            &lt;drop/&gt;
+        &lt;/in&gt;
+
+        &lt;out&gt;
+            &lt;send/&gt;
+        &lt;/out&gt;
+    &lt;/sequence&gt;
+
+&lt;/definitions&gt;</div>
+            <subsection name="Objective">
+                <p>
+                    Demonstrating how makefault mediator can be used to construct custom SOAP
+                    faults and change the direction (in/out) of messages.
+                </p>
+            </subsection>
+            <subsection name="Pre-requisites">
+                <p>
+                    <ul>                        
+                        <li>
+                            Start Synapse using the configuration numbered 5 (repository/conf/sample/synapse_sample_5.xml)
+                            <div class="command">
+                                Unix/Linux: sh synapse.sh -sample 5<br/>
+                                Windows: synapse.bat -sample 5
+                            </div>
+                        </li>
+                    </ul>
+                </p>
+            </subsection>
+            <subsection name="Executing the Client">
+                <p>
+                    When the MSFT stock quote is requested, an unknown host exception would be
+                    generated. A connection refused exception would be generated for the SUN stock
+                    request. These errors are captured and returned to the original client as a SOAP
+                    fault in this example.
+                </p>
+                <div class="command">ant stockquote -Daddurl=http://localhost:9000/services/SimpleStockQuoteService -Dtrpurl=http://localhost:8280/ -Dsymbol=MSFT</div>
+                <p>returns,</p>
+                <div class="consoleOutput">&lt;soapenv:Fault xmlns:soapenv=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot;&gt;
+    &lt;faultcode&gt;soapenv:Client&lt;/faultcode&gt;
+    &lt;faultstring&gt;java.net.UnknownHostException: bogus&lt;/faultstring&gt;
+    &lt;detail /&gt;
+&lt;/soapenv:Fault&gt;</div>
+                <p>And </p>
+                <div class="command">ant stockquote -Daddurl=http://localhost:9000/services/SimpleStockQuoteService -Dtrpurl=http://localhost:8280/ -Dsymbol=SUN</div>
+                <p>returns, </p>
+                <div class="consoleOutput">&lt;soapenv:Fault xmlns:soapenv=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot;&gt;
+    &lt;faultcode&gt;soapenv:Client&lt;/faultcode&gt;
+    &lt;faultstring&gt;java.net.ConnectException: Connection refused&lt;/faultstring&gt;
+    &lt;detail /&gt;
+&lt;/soapenv:Fault&gt;</div>
+                <p>
+                    Note that the response attribute is set to 'true' on the makefault mediator.
+                    This instructs the mediator to change the direction of messages to 'response'
+                    as messages are transformed into SOAP faults.
+                </p>
+            </subsection>
+        </section>
+        <p><a href="../samples.html">Back to Catalog</a></p>
+    </body>
+</document>
\ No newline at end of file
diff --git a/src/site/xdoc/userguide/samples/sample50.xml b/src/site/xdoc/userguide/samples/sample50.xml
new file mode 100644
index 0000000..b4f0c46
--- /dev/null
+++ b/src/site/xdoc/userguide/samples/sample50.xml
@@ -0,0 +1,101 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+  ~  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.
+  -->
+
+<document>
+    <properties>
+        <title>Apache Synapse - Sample 50</title>
+    </properties>
+    <body>
+        <section name="Sample 50: POX to SOAP Conversion">
+            <div class="xmlConf">&lt;definitions xmlns="http://ws.apache.org/ns/synapse"&gt;
+
+    &lt;sequence name="main"&gt;
+        &lt;!-- filtering of messages with XPath and regex matches --&gt;
+        &lt;filter source="get-property('To')" regex=".*/StockQuote.*"&gt;
+            &lt;then&gt;
+                &lt;send&gt;
+                    &lt;endpoint&gt;
+                        &lt;address uri="http://localhost:9000/services/SimpleStockQuoteService" format="soap11"/&gt;
+                    &lt;/endpoint&gt;
+                &lt;/send&gt;
+                &lt;drop/&gt;
+            &lt;/then&gt;
+        &lt;/filter&gt;
+        &lt;send/&gt;
+    &lt;/sequence&gt;
+
+&lt;/definitions&gt;</div>
+            <subsection name="Objective">
+                <p>
+                    Demonstrating how to convert a POX (Plain Old XML) message to a standard SOAP 1.1
+                    request.
+                </p>
+            </subsection>
+            <subsection name="Pre-requisites">
+                <p>
+                    <ul>
+                        <li>
+                            Deploy the SimpleStockQuoteService in the sample Axis2 server and start Axis2
+                        </li>
+                        <li>
+                            Start Synapse using the configuration numbered 50 (repository/conf/sample/synapse_sample_50.xml)
+                            <div class="command">
+                                Unix/Linux: sh synapse.sh -sample 50<br/>
+                                Windows: synapse.bat -sample 50
+                            </div>
+                        </li>
+                    </ul>
+                </p>
+            </subsection>
+            <subsection name="Executing the Client">
+                <p>
+                    Execute the sample client as follows and send a plain XML getQuote request to
+                    Synapse.
+                </p>
+                <div class="command">ant stockquote -Dtrpurl=http://localhost:8280/services/StockQuote -Drest=true</div>
+
+                <p>
+                    The request sent by the client will look something like this.
+                </p>
+                <div class="consoleOutput">POST /services/StockQuote HTTP/1.1
+Content-Type: application/xml; charset=UTF-8;action=&quot;urn:getQuote&quot;;
+SOAPAction: urn:getQuote
+User-Agent: Axis2
+Host: 127.0.0.1
+Transfer-Encoding: chunked
+
+75
+&lt;m0:getQuote xmlns:m0=&quot;http://services.samples&quot;&gt;
+   &lt;m0:request&gt;
+      &lt;m0:symbol&gt;IBM&lt;/m0:symbol&gt;
+   &lt;/m0:request&gt;
+&lt;/m0:getQuote&gt;0</div>
+                <p>
+                    Note that this is simply an XML payload going over the HTTP connection. It is
+                    not a SOAP envelope and hence the content type is set to application/xml. Synapse
+                    will convert the above message to a valid SOAP 1.1 request and send to the sample
+                    Axis2 server. The response from Axis2 will also be a SOAP message, which will
+                    be converted back to POX format before sending back to the client.
+                </p>
+            </subsection>
+        </section>
+        <p><a href="../samples.html">Back to Catalog</a></p>        
+    </body>
+</document>
\ No newline at end of file
diff --git a/src/site/xdoc/userguide/samples/sample500.xml b/src/site/xdoc/userguide/samples/sample500.xml
new file mode 100644
index 0000000..fa5d9eb
--- /dev/null
+++ b/src/site/xdoc/userguide/samples/sample500.xml
@@ -0,0 +1,123 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+  ~  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.
+  -->
+
+<document>
+    <properties>
+        <title>Apache Synapse - Sample 500</title>
+    </properties>
+    <body>
+        <section name="Sample 500: Introduction to Eventing">
+            <div class="xmlConf">&lt;definitions xmlns="http://ws.apache.org/ns/synapse"&gt;
+
+    &lt;eventSource name="SampleEventSource"&gt;
+        &lt;subscriptionManager
+                class="org.apache.synapse.eventing.managers.DefaultInMemorySubscriptionManager"&gt;
+            &lt;!--property name="registryURL" value="http://localhost:8180/wso2registry"/&gt;
+          &lt;property name="username" value="admin"/&gt;
+          &lt;property name="password" value="admin"/--&gt;
+            &lt;property name="topicHeaderName" value="Topic"/&gt;
+            &lt;property name="topicHeaderNS" value="http://apache.org/aip"/&gt;
+        &lt;/subscriptionManager&gt;
+    &lt;/eventSource&gt;
+
+    &lt;sequence name="PublicEventSource"&gt;
+        &lt;log level="full"/&gt;
+        &lt;eventPublisher eventSourceName="SampleEventSource"/&gt;
+    &lt;/sequence&gt;
+
+    &lt;proxy name="EventingProxy"&gt;
+        &lt;target inSequence="PublicEventSource"/&gt;
+    &lt;/proxy&gt;
+
+&lt;/definitions&gt;</div>
+            <subsection name="Objective">
+                <p>
+                    Demonstrate the use of the Eventing functionality built into Synapse
+                </p>
+            </subsection>
+            <subsection name="Pre-requisites">
+                <p>
+                    <ul>
+                        <li>
+                            Deploy the SimpleStockQuoteService in the sample Axis2 server and start Axis2
+                        </li>
+                        <li>
+                            Start Synapse using the configuration numbered 500 (repository/conf/sample/synapse_sample_500.xml)
+                            <div class="command">
+                                Unix/Linux: sh synapse.sh -sample 500<br/>
+                                Windows: synapse.bat -sample 500
+                            </div>
+                        </li>
+                    </ul>
+                </p>
+            </subsection>
+            <subsection name="Executing the Client">
+                <p>
+                    In this sample an event source is creted based on the provided configuration. Event
+                    subscriber subscribes for the events, Event sender publishes events and the
+                    SimpleStockQuoteService acts as the Event Sink.
+                </p>
+                <p>
+                    First, invoke the sample client (Subscriber) as follows.
+                </p>
+                <div class="command">ant eventsubscriber</div>
+                <p>
+                    This will create a new subscription with the SimpleStockQuoteService deployed on
+                    the sample Axis2 server acting as the sink. Whenever a new event is published,
+                    SimpleStockQuoteService will receive a message with that event. You should see a
+                    message like this on the client console confirming the subscription.
+                </p>
+                <div class="consoleOutput">[java] Subscription identifier: urn:uuid:6989F66706E73C69F5259116575749162017010321</div>
+                <p>
+                    You will need this identifier to modify the subscription in the next steps. Now,
+                    invoke the client (Sender) as follows.
+                </p>
+                <div class="command">ant eventsender</div>
+                <p>
+                    This will send a placeOrder request to the EventingProxy. You should see a
+                    message in the Synapse logs. Note the presence of the following SOAP header
+                    in the request.
+                </p>
+                <div class="consoleOutput">&lt;aip:Topic xmlns:aip="http://apache.org/aip">synapse/event/test&lt;/aip:Topic></div>
+                <p>
+                    Since there is a single subscription with SimpleStockQuoteService as the sink,
+                    Synapse will send the message to the sample Axis2 server and you should see the
+                    following message in its logs:
+                </p>
+                <div class="consoleOutput">Accepted order for : 1000 stocks of GOOG at $ 10.1</div>
+                <p>
+                    You can also send various other WS-Eventing messages from the sample client to
+                    modify the subscription details. To get the current status of the subscription,
+                    invoke the client as follows.
+                </p>
+                <div class="command">ant eventsubscriber -Dmode=getstatus -Didentifier=<i>&lt;identifier></i></div>
+                <p>
+                    To renew the subscription, invoke the client as follows.
+                </p>
+                <div class="command">ant eventsubscriber -Dmode=renew -Didentifier=<i>&lt;identifier></i> -Dexpires=2012-12-31T21:07:00.000-08:00</div>
+                <p>
+                    Finally, in order to unsubscribe, use the following command.
+                </p>
+                <div class="command">ant eventsubscriber -Dmode=unsubscribe -Didentifier=<i>&lt;identifier></i></div>
+            </subsection>
+        </section>
+        <p><a href="../samples.html">Back to Catalog</a></p>        
+    </body>
+</document>
\ No newline at end of file
diff --git a/src/site/xdoc/userguide/samples/sample501.xml b/src/site/xdoc/userguide/samples/sample501.xml
new file mode 100644
index 0000000..002f1eb
--- /dev/null
+++ b/src/site/xdoc/userguide/samples/sample501.xml
@@ -0,0 +1,101 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+  ~  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.
+  -->
+
+<document>
+    <properties>
+        <title>Apache Synapse - Sample 501</title>
+    </properties>
+    <body>
+        <section name="Sample 501: Event Source with Static Subscriptions">
+            <div class="xmlConf">&lt;definitions xmlns="http://ws.apache.org/ns/synapse"&gt;
+
+    &lt;eventSource name="SampleEventSource"&gt;
+        &lt;subscriptionManager
+                class="org.apache.synapse.eventing.managers.DefaultInMemorySubscriptionManager"&gt;
+            &lt;!--property name="registryURL" value="http://localhost:8180/wso2registry"/&gt;
+          &lt;property name="username" value="admin"/&gt;
+          &lt;property name="password" value="admin"/--&gt;
+            &lt;property name="topicHeaderName" value="Topic"/&gt;
+            &lt;property name="topicHeaderNS" value="http://apache.org/aip"/&gt;
+        &lt;/subscriptionManager&gt;
+        &lt;subscription id="mysub1"&gt;
+            &lt;filter source="synapse/event/test"
+                    dialect="http://synapse.apache.org/eventing/dialect/topicFilter"/&gt;
+            &lt;endpoint&gt;
+                &lt;address uri="http://localhost:9000/services/SimpleStockQuoteService"/&gt;
+            &lt;/endpoint&gt;
+        &lt;/subscription&gt;
+        &lt;subscription id="mysub2"&gt;
+            &lt;filter source="synapse/event/test"
+                    dialect="http://synapse.apache.org/eventing/dialect/topicFilter"/&gt;
+            &lt;endpoint&gt;
+                &lt;address uri="http://localhost:9000/services/SimpleStockQuoteService"/&gt;
+            &lt;/endpoint&gt;
+            &lt;expires&gt;2020-06-27T21:07:00.000-08:00&lt;/expires&gt;
+        &lt;/subscription&gt;
+    &lt;/eventSource&gt;
+
+    &lt;sequence name="PublicEventSource"&gt;
+        &lt;log level="full"/&gt;
+        &lt;eventPublisher eventSourceName="SampleEventSource"/&gt;
+    &lt;/sequence&gt;
+
+    &lt;proxy name="EventingProxy"&gt;
+        &lt;target inSequence="PublicEventSource"/&gt;
+    &lt;/proxy&gt;
+
+&lt;/definitions&gt;</div>
+            <subsection name="Objective">
+                <p>
+                    Showcase how to use a predefined set of static subscriptions with Synapse
+                </p>
+            </subsection>
+            <subsection name="Pre-requisites">
+                <p>
+                    <ul>
+                        <li>
+                            Deploy the SimpleStockQuoteService in the sample Axis2 server and start Axis2
+                        </li>
+                        <li>
+                            Start Synapse using the configuration numbered 501 (repository/conf/sample/synapse_sample_501.xml)
+                            <div class="command">
+                                Unix/Linux: sh synapse.sh -sample 501<br/>
+                                Windows: synapse.bat -sample 501
+                            </div>
+                        </li>
+                    </ul>
+                </p>
+            </subsection>
+            <subsection name="Executing the Client">
+                <p>
+                    In this sample configuration, two static subscriptions are created by providing the 
+                    SimpleStockQuoteService as the event sink. To try this out, invoke the sample
+                    client as follows.
+                </p>
+                <div class="command">ant eventsender</div>
+                <p>
+                    Events will be mediated and sent to the sample Axis2 server as operated by the
+                    two static subscriptions.
+                </p>
+            </subsection>
+        </section>
+        <p><a href="../samples.html">Back to Catalog</a></p>        
+    </body>
+</document>
\ No newline at end of file
diff --git a/src/site/xdoc/userguide/samples/sample502.xml b/src/site/xdoc/userguide/samples/sample502.xml
new file mode 100644
index 0000000..2009094
--- /dev/null
+++ b/src/site/xdoc/userguide/samples/sample502.xml
@@ -0,0 +1,98 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+  ~  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.
+  -->
+
+<document>
+    <properties>
+        <title>Apache Synapse - Sample 502</title>
+    </properties>
+    <body>
+        <section name="Sample 502: Transforming Events Before Publish">
+            <div class="xmlConf">&lt;definitions xmlns="http://ws.apache.org/ns/synapse"&gt;
+
+    &lt;eventSource name="SampleEventSource"&gt;
+        &lt;subscriptionManager
+                class="org.apache.synapse.eventing.managers.DefaultInMemorySubscriptionManager"&gt;
+            &lt;!--property name="registryURL" value="http://localhost:8180/wso2registry"/&gt;
+          &lt;property name="username" value="admin"/&gt;
+          &lt;property name="password" value="admin"/--&gt;
+            &lt;property name="topicHeaderName" value="Topic"/&gt;
+            &lt;property name="topicHeaderNS" value="http://apache.org/aip"/&gt;
+        &lt;/subscriptionManager&gt;
+        &lt;subscription id="mysub1"&gt;
+            &lt;filter source="synapse/event/test"
+                    dialect="http://synapse.apache.org/eventing/dialect/topicFilter"/&gt;
+            &lt;endpoint&gt;
+                &lt;address uri="http://localhost:9000/services/SimpleStockQuoteService"/&gt;
+            &lt;/endpoint&gt;
+        &lt;/subscription&gt;
+    &lt;/eventSource&gt;
+
+    &lt;sequence name="PublicEventSource"&gt;
+        &lt;log level="full"/&gt;
+        &lt;xslt key="xslt-key-req"/&gt;
+        &lt;log level="full"/&gt;
+        &lt;eventPublisher eventSourceName="SampleEventSource"/&gt;
+    &lt;/sequence&gt;
+
+    &lt;proxy name="EventingProxy"&gt;
+        &lt;target inSequence="PublicEventSource"/&gt;
+    &lt;/proxy&gt;
+
+    &lt;localEntry key="xslt-key-req"
+                src="file:repository/conf/sample/resources/transform/transform_eventing.xslt"/&gt;
+
+&lt;/definitions&gt;</div>
+            <subsection name="Objective">
+                <p>
+                    Demonstrate how to mediate and transform events before they are sent to the
+                    target event sinks
+                </p>
+            </subsection>
+            <subsection name="Pre-requisites">
+                <p>
+                    <ul>
+                        <li>
+                            Deploy the SimpleStockQuoteService in the sample Axis2 server and start Axis2
+                        </li>
+                        <li>
+                            Start Synapse using the configuration numbered 502 (repository/conf/sample/synapse_sample_502.xml)
+                            <div class="command">
+                                Unix/Linux: sh synapse.sh -sample 502<br/>
+                                Windows: synapse.bat -sample 502
+                            </div>
+                        </li>
+                    </ul>
+                </p>
+            </subsection>
+            <subsection name="Executing the Client">
+                <p>
+                    In this sample, the event (order request) is transformed into a new order with
+                    a different namesapce using the XSLT mediator. Invoke the client as follows.
+                </p>
+                <div class="command">ant eventsender</div>
+                <p>
+                    Event will be mediated through the 'PublicEventSource' sequence and get transformed
+                    before it gets published to the event sink (Axis2 server).
+                </p>
+            </subsection>
+        </section>
+        <p><a href="../samples.html">Back to Catalog</a></p>        
+    </body>
+</document>
\ No newline at end of file
diff --git a/src/site/xdoc/userguide/samples/sample51.xml b/src/site/xdoc/userguide/samples/sample51.xml
new file mode 100644
index 0000000..07fd6fb
--- /dev/null
+++ b/src/site/xdoc/userguide/samples/sample51.xml
@@ -0,0 +1,197 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+  ~  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.
+  -->
+
+<document>
+    <properties>
+        <title>Apache Synapse - Sample 51</title>
+    </properties>
+    <body>
+        <section name="Sample 51: MTOM and SwA Optimizations and Request/Response Correlation">
+            <div class="xmlConf">&lt;definitions xmlns="http://ws.apache.org/ns/synapse"&gt;
+
+    &lt;sequence name="main"&gt;
+        &lt;in&gt;
+            &lt;filter source="get-property('Action')" regex="urn:uploadFileUsingMTOM"&gt;
+                &lt;then&gt;
+                    &lt;property name="example" value="mtom"/&gt;
+                    &lt;send&gt;
+                        &lt;endpoint&gt;
+                            &lt;address uri="http://localhost:9000/services/MTOMSwASampleService"
+                                     optimize="mtom"/&gt;
+                        &lt;/endpoint&gt;
+                    &lt;/send&gt;
+                &lt;/then&gt;
+            &lt;/filter&gt;
+            &lt;filter source="get-property('Action')" regex="urn:uploadFileUsingSwA"&gt;
+                &lt;then&gt;
+                    &lt;property name="example" value="swa"/&gt;
+                    &lt;send&gt;
+                        &lt;endpoint&gt;
+                            &lt;address uri="http://localhost:9000/services/MTOMSwASampleService"
+                                     optimize="swa"/&gt;
+                        &lt;/endpoint&gt;
+                    &lt;/send&gt;
+                &lt;/then&gt;
+            &lt;/filter&gt;
+        &lt;/in&gt;
+        &lt;out&gt;
+            &lt;filter source="get-property('example')" regex="mtom"&gt;
+                &lt;then&gt;
+                    &lt;property name="enableMTOM" value="true" scope="axis2"/&gt;
+                &lt;/then&gt;
+            &lt;/filter&gt;
+            &lt;filter source="get-property('example')" regex="swa"&gt;
+                &lt;then&gt;
+                    &lt;property name="enableSwA" value="true" scope="axis2"/&gt;
+                &lt;/then&gt;
+            &lt;/filter&gt;
+            &lt;send/&gt;
+        &lt;/out&gt;
+    &lt;/sequence&gt;
+
+&lt;/definitions&gt;</div>
+            <subsection name="Objective">
+                <p>
+                    Demonstrate the use of content optimization mechanisms like MTOM and SwA with
+                    Synapse.
+                </p>
+            </subsection>
+            <subsection name="Pre-requisites">
+                <p>
+                    <ul>
+                        <li>
+                            Deploy the MTOMSwASampleService in the sample Axis2 server and start Axis2
+                        </li>
+                        <li>
+                            Start Synapse using the configuration numbered 51 (repository/conf/sample/synapse_sample_51.xml)
+                            <div class="command">
+                                Unix/Linux: sh synapse.sh -sample 51<br/>
+                                Windows: synapse.bat -sample 51
+                            </div>
+                        </li>
+                    </ul>
+                </p>
+            </subsection>
+            <subsection name="Executing the Client">
+                <p>
+                    Execute the client as follows to send a MTOM optimized request to Synapse.
+                </p>                
+                <div class="command">ant optimizeclient -Dopt_mode=mtom</div>
+                <p>
+                    Synapse sets a local message context property, and forwards the message to
+                    'http://localhost:9000/services/MTOMSwASampleService', while optimizing binary
+                    content as MTOM. By sending this message through TCPMon you will be able to see
+                    the actual message sent by Synapse if required.
+                </p>
+                <div class="consoleOutput">POST /services/MTOMSwASampleService HTTP/1.1
+Host: 127.0.0.1
+SOAPAction: urn:uploadFileUsingMTOM
+Content-Type: multipart/related; boundary=MIMEBoundaryurn_uuid_B94996494E1DD5F9B51177413845353; type=&quot;application/xop+xml&quot;;
+start=&quot;&lt;0.urn:uuid:B94996494E1DD5F9B51177413845354@apache.org&gt;&quot;; start-info=&quot;text/xml&quot;; charset=UTF-8
+Transfer-Encoding: chunked
+Connection: Keep-Alive
+User-Agent: Synapse-HttpComponents-NIO
+
+--MIMEBoundaryurn_uuid_B94996494E1DD5F9B51177413845353241
+Content-Type: application/xop+xml; charset=UTF-8; type=&quot;text/xml&quot;
+Content-Transfer-Encoding: binary
+Content-ID:
+   &lt;0.urn:uuid:B94996494E1DD5F9B51177413845354@apache.org&gt;221b1
+      &lt;?xml version='1.0' encoding='UTF-8'?&gt;
+         &lt;soapenv:Envelope xmlns:soapenv=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot;&gt;
+            &lt;soapenv:Body&gt;
+               &lt;m0:uploadFileUsingMTOM xmlns:m0=&quot;http://www.apache-synapse.org/test&quot;&gt;
+                  &lt;m0:request&gt;
+                     &lt;m0:image&gt;
+                        &lt;xop:Include href=&quot;cid:1.urn:uuid:78F94BC50B68D76FB41177413845003@apache.org&quot; xmlns:xop=&quot;http://www.w3.org/2004/08/xop/include&quot; /&gt;
+                     &lt;/m0:image&gt;
+                  &lt;/m0:request&gt;
+               &lt;/m0:uploadFileUsingMTOM&gt;
+            &lt;/soapenv:Body&gt;
+         &lt;/soapenv:Envelope&gt;
+--MIMEBoundaryurn_uuid_B94996494E1DD5F9B51177413845353217
+Content-Type: image/gif
+Content-Transfer-Encoding: binary
+Content-ID:
+         &lt;1.urn:uuid:78F94BC50B68D76FB41177413845003@apache.org&gt;22800GIF89a... &lt;&lt; binary content &gt;&gt;</div>
+                <p>
+                    During response processing, by checking the local message property Synapse can
+                    discover past information about the current message context, and use this
+                    knowledge to send the response back to the client in the same format as the
+                    original request.
+                </p>
+                <p>
+                    When the client executes successfully, it will upload a file containing the ASF
+                    logo and receive a response which is savesd a temporary file.
+                </p>
+                <div class="consoleOutput">[java] Sending file : ./../../repository/conf/sample/resources/mtom/asf-logo.gif as MTOM
+[java] Saved response to file : ./../../work/temp/sampleClient/mtom-4417.gif</div>
+
+                <p>
+                    Now invoke the client as follows to send a SwA optimized request.
+                </p>
+                <div class="command">ant optimizeclient -Dopt_mode=swa</div>
+                <p>
+                    This is identical to the previous invocation with only difference being the use
+                    of SwA (SOAP with Attachement) instead of MTOM for content optimization. You
+                    will get an output similar to following.
+                </p>
+                <div class="consoleOutput">[java] Sending file : ./../../repository/conf/sample/resources/mtom/asf-logo.gif as SwA
+[java] Saved response to file : ./../../work/temp/sampleClient/swa-30391.gif</div>
+                <p>
+                    By using TCPMon and sending the message through it, one can see that the
+                    requests and responses sent are indeed sent as HTTP attachments as follows.
+                </p>
+
+                <div class="consoleOutput">POST /services/MTOMSwASampleService HTTP/1.1
+Host: 127.0.0.1
+SOAPAction: urn:uploadFileUsingSwA
+Content-Type: multipart/related; boundary=MIMEBoundaryurn_uuid_B94996494E1DD5F9B51177414170491; type=&quot;text/xml&quot;;
+start=&quot;&lt;0.urn:uuid:B94996494E1DD5F9B51177414170492@apache.org&gt;&quot;; charset=UTF-8
+Transfer-Encoding: chunked
+Connection: Keep-Alive
+User-Agent: Synapse-HttpComponents-NIO
+
+--MIMEBoundaryurn_uuid_B94996494E1DD5F9B51177414170491225
+Content-Type: text/xml; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+Content-ID:
+   &lt;0.urn:uuid:B94996494E1DD5F9B51177414170492@apache.org&gt;22159
+      &lt;?xml version='1.0' encoding='UTF-8'?&gt;
+         &lt;soapenv:Envelope xmlns:soapenv=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot;&gt;
+            &lt;soapenv:Body&gt;
+               &lt;m0:uploadFileUsingSwA xmlns:m0=&quot;http://www.apache-synapse.org/test&quot;&gt;
+                  &lt;m0:request&gt;
+                     &lt;m0:imageId&gt;urn:uuid:15FD2DA2584A32BF7C1177414169826&lt;/m0:imageId&gt;
+                  &lt;/m0:request&gt;
+               &lt;/m0:uploadFileUsingSwA&gt;
+            &lt;/soapenv:Body&gt;
+         &lt;/soapenv:Envelope&gt;22--34MIMEBoundaryurn_uuid_B94996494E1DD5F9B511774141704912
+17
+Content-Type: image/gif
+Content-Transfer-Encoding: binary
+Content-ID:
+         &lt;urn:uuid:15FD2DA2584A32BF7C1177414169826&gt;22800GIF89a... &lt;&lt; binary content &gt;&gt;</div>
+                
+            </subsection>
+        </section>
+        <p><a href="../samples.html">Back to Catalog</a></p>        
+    </body>
+</document>
\ No newline at end of file
diff --git a/src/site/xdoc/userguide/samples/sample52.xml b/src/site/xdoc/userguide/samples/sample52.xml
new file mode 100644
index 0000000..f2d0aea
--- /dev/null
+++ b/src/site/xdoc/userguide/samples/sample52.xml
@@ -0,0 +1,150 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+  ~  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.
+  -->
+
+<document>
+    <properties>
+        <title>Apache Synapse - Sample 52</title>
+    </properties>
+    <body>
+        <section name="Sample 52: Session-less Load Balancing Between 3 Endpoints">
+            <div class="xmlConf">&lt;definitions xmlns="http://ws.apache.org/ns/synapse"&gt;
+
+    &lt;sequence name="main" onError="errorHandler"&gt;
+        &lt;in&gt;
+            &lt;send&gt;
+                &lt;endpoint&gt;
+                    &lt;loadbalance&gt;
+                        &lt;endpoint&gt;
+                            &lt;address uri="http://localhost:9001/services/LBService1"&gt;
+                                &lt;enableAddressing/&gt;
+                                &lt;suspendDurationOnFailure&gt;60&lt;/suspendDurationOnFailure&gt;
+                            &lt;/address&gt;
+                        &lt;/endpoint&gt;
+                        &lt;endpoint&gt;
+                            &lt;address uri="http://localhost:9002/services/LBService1"&gt;
+                                &lt;enableAddressing/&gt;
+                                &lt;suspendDurationOnFailure&gt;60&lt;/suspendDurationOnFailure&gt;
+                            &lt;/address&gt;
+                        &lt;/endpoint&gt;
+                        &lt;endpoint&gt;
+                            &lt;address uri="http://localhost:9003/services/LBService1"&gt;
+                                &lt;enableAddressing/&gt;
+                                &lt;suspendDurationOnFailure&gt;60&lt;/suspendDurationOnFailure&gt;
+                            &lt;/address&gt;
+                        &lt;/endpoint&gt;
+                    &lt;/loadbalance&gt;
+                &lt;/endpoint&gt;
+            &lt;/send&gt;
+            &lt;drop/&gt;
+        &lt;/in&gt;
+
+        &lt;out&gt;
+            &lt;!-- Send the messages where they have been sent (i.e. implicit To EPR) --&gt;
+            &lt;send/&gt;
+        &lt;/out&gt;
+    &lt;/sequence&gt;
+
+    &lt;sequence name="errorHandler"&gt;
+        &lt;makefault response="true"&gt;
+            &lt;code xmlns:tns="http://www.w3.org/2003/05/soap-envelope" value="tns:Receiver"/&gt;
+            &lt;reason value="COULDN'T SEND THE MESSAGE TO THE SERVER."/&gt;
+        &lt;/makefault&gt;
+        &lt;send/&gt;
+    &lt;/sequence&gt;
+
+&lt;/definitions&gt;</div>
+            <subsection name="Objective">
+                <p>
+                    Demonstrate the ability of Synapse to act as a load balancer for a set of
+                    servers hosting stateless services
+                </p>
+            </subsection>
+            <subsection name="Pre-requisites">
+                <p>
+                    <ul>
+                        <li>
+                            Deploy the LoadbalanceFailoverService in the sample Axis2 server (go to
+                            samples/axis2Server/src/LoadbalanceFailoverService and run 'ant')
+                        </li>
+                        <li>
+                            Start 3 instances of the Axis2 server on different ports as follows
+                            <div class="command">./axis2server.sh -http 9001 -https 9005 -name MyServer1<br/>
+./axis2server.sh -http 9002 -https 9006 -name MyServer2<br/>
+./axis2server.sh -http 9003 -https 9007 -name MyServer3</div>
+                        </li>
+                        <li>
+                            Start Synapse using the configuration numbered 52 (repository/conf/sample/synapse_sample_52.xml)
+                            <div class="command">
+                                Unix/Linux: sh synapse.sh -sample 52<br/>
+                                Windows: synapse.bat -sample 52
+                            </div>
+                        </li>
+                    </ul>
+                </p>
+            </subsection>
+            <subsection name="Executing the Client">
+                <p>
+                    Invoke the sample client as follows
+                </p>
+                <div class="command">ant loadbalancefailover -Di=100</div>
+                <p>
+                    This will send 100 requests to the LoadbalanceFailoverService through Synapse.
+                    Synapse will distribute the load among the three endpoints mentioned in the
+                    configuration in round-robin manner. LoadbalanceFailoverService appends the name
+                    of the server to the response, so that client can determine which server has
+                    processed the message. If you examine the console output of the client, you can
+                    see that requests are processed by three servers as follows:
+                </p>
+                <div class="consoleOutput">[java] Request: 1 ==&gt; Response from server: MyServer1
+[java] Request: 2 ==&gt; Response from server: MyServer2
+[java] Request: 3 ==&gt; Response from server: MyServer3
+[java] Request: 4 ==&gt; Response from server: MyServer1
+[java] Request: 5 ==&gt; Response from server: MyServer2
+[java] Request: 6 ==&gt; Response from server: MyServer3
+[java] Request: 7 ==&gt; Response from server: MyServer1
+...</div>
+                <p>
+                    Now run the client without the -Di=100 parameter to send requests indefinitely.
+                    While running the client shutdown the server named MyServer1. Then you can observe
+                    that requests are only distributed among MyServer2 and MyServer3. Console output
+                    before and after shutting down MyServer1 is listed below (MyServer1 was shutdown
+                    after request 63):
+                </p>
+                <div class="consoleOutput">...
+[java] Request: 61 ==&gt; Response from server: MyServer1
+[java] Request: 62 ==&gt; Response from server: MyServer2
+[java] Request: 63 ==&gt; Response from server: MyServer3
+[java] Request: 64 ==&gt; Response from server: MyServer2
+[java] Request: 65 ==&gt; Response from server: MyServer3
+[java] Request: 66 ==&gt; Response from server: MyServer2
+[java] Request: 67 ==&gt; Response from server: MyServer3
+...</div>
+                <p>
+                    Now restart MyServer1. You can observe that requests will be again sent to all 
+                    three servers within 60 seconds. This is because we have specified
+                    &lt;suspendDurationOnFailure&gt; as 60 seconds in the configuration. Therefore,
+                    load balance endpoint will suspend any failed child endpoint only for 60 seconds
+                    after detecting the failure.
+                </p>
+            </subsection>
+        </section>
+        <p><a href="../samples.html">Back to Catalog</a></p>        
+    </body>
+</document>
\ No newline at end of file
diff --git a/src/site/xdoc/userguide/samples/sample53.xml b/src/site/xdoc/userguide/samples/sample53.xml
new file mode 100644
index 0000000..f415dcc
--- /dev/null
+++ b/src/site/xdoc/userguide/samples/sample53.xml
@@ -0,0 +1,142 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+  ~  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.
+  -->
+
+<document>
+    <properties>
+        <title>Apache Synapse - Sample 53</title>
+    </properties>
+    <body>
+        <section name="Sample 53: Fail-over Routing Among 3 Endpoints">
+            <div class="xmlConf">&lt;definitions xmlns="http://ws.apache.org/ns/synapse"&gt;
+
+    &lt;sequence name="main" onError="errorHandler"&gt;
+        &lt;in&gt;
+            &lt;send&gt;
+                &lt;endpoint&gt;
+                    &lt;failover&gt;
+                        &lt;endpoint&gt;
+                            &lt;address uri="http://localhost:9001/services/LBService1"&gt;
+                                &lt;enableAddressing/&gt;
+                                &lt;suspendDurationOnFailure&gt;60&lt;/suspendDurationOnFailure&gt;
+                            &lt;/address&gt;
+                        &lt;/endpoint&gt;
+                        &lt;endpoint&gt;
+                            &lt;address uri="http://localhost:9002/services/LBService1"&gt;
+                                &lt;enableAddressing/&gt;
+                                &lt;suspendDurationOnFailure&gt;60&lt;/suspendDurationOnFailure&gt;
+                            &lt;/address&gt;
+                        &lt;/endpoint&gt;
+                        &lt;endpoint&gt;
+                            &lt;address uri="http://localhost:9003/services/LBService1"&gt;
+                                &lt;enableAddressing/&gt;
+                                &lt;suspendDurationOnFailure&gt;60&lt;/suspendDurationOnFailure&gt;
+                            &lt;/address&gt;
+                        &lt;/endpoint&gt;
+                    &lt;/failover&gt;
+                &lt;/endpoint&gt;
+            &lt;/send&gt;
+            &lt;drop/&gt;
+        &lt;/in&gt;
+
+        &lt;out&gt;
+            &lt;!-- Send the messages where they have been sent (i.e. implicit To EPR) --&gt;
+            &lt;send/&gt;
+        &lt;/out&gt;
+    &lt;/sequence&gt;
+
+    &lt;sequence name="errorHandler"&gt;
+        &lt;makefault response="true"&gt;
+            &lt;code xmlns:tns="http://www.w3.org/2003/05/soap-envelope" value="tns:Receiver"/&gt;
+            &lt;reason value="COULDN'T SEND THE MESSAGE TO THE SERVER."/&gt;
+        &lt;/makefault&gt;
+        &lt;send/&gt;
+    &lt;/sequence&gt;
+
+&lt;/definitions&gt;</div>
+            <subsection name="Objective">
+                <p>
+                    Demonstrate the fail-over routing capabilities of Synapse. In fail-over routing
+                    messages are sent to a designated primary endpoint. When the primary endpoint
+                    fails, Synapse fails over to the one of the backup endpoints.
+                </p>
+            </subsection>
+            <subsection name="Pre-requisites">
+                <p>
+                    <ul>
+                        <li>
+                            Deploy the LoadbalanceFailoverService in the sample Axis2 server (go to
+                            samples/axis2Server/src/LoadbalanceFailoverService and run 'ant')
+                        </li>
+                        <li>
+                            Start 3 instances of the Axis2 server on different ports as follows
+                            <div class="command">./axis2server.sh -http 9001 -https 9005 -name MyServer1<br/>
+./axis2server.sh -http 9002 -https 9006 -name MyServer2<br/>
+./axis2server.sh -http 9003 -https 9007 -name MyServer3</div>
+                        </li>
+                        <li>
+                            Start Synapse using the configuration numbered 53 (repository/conf/sample/synapse_sample_53.xml)
+                            <div class="command">
+                                Unix/Linux: sh synapse.sh -sample 53<br/>
+                                Windows: synapse.bat -sample 53
+                            </div>
+                        </li>
+                    </ul>
+                </p>
+            </subsection>
+            <subsection name="Executing the Client">
+                <p>
+                    Above configuration sends messages with the fail-over behavior. Initially the
+                    server at port 9001 is treated as primary and other two are treated as backups.
+                    Messages are always directed only to the primary server. If the primary server
+                    fails, next listed server is selected as the primary. Thus, messages are sent
+                    successfully as long as there is at least one active server. To test this, run
+                    the loadbalancefailover client to send infinite requests as follows:
+                </p>
+                <div class="command">ant loadbalancefailover</div>
+                <p>
+                    You can see that all requests are processed by MyServer1. Now shutdown MyServer1
+                    and inspect the console output of the client. You will observe that all subsequent
+                    requests are processed by MyServer2. (MyServer 1 was shutdown after request 127)
+                </p>
+                <div class="consoleOutput">...
+[java] Request: 125 ==&gt; Response from server: MyServer1
+[java] Request: 126 ==&gt; Response from server: MyServer1
+[java] Request: 127 ==&gt; Response from server: MyServer1
+[java] Request: 128 ==&gt; Response from server: MyServer2
+[java] Request: 129 ==&gt; Response from server: MyServer2
+[java] Request: 130 ==&gt; Response from server: MyServer2
+...</div>
+                <p>
+                    You can keep on shutting servers down like this. Client will get a response untill
+                    you shutdown all listed servers. Once all servers are shutdown, the error sequence
+                    is triggered and a fault message is sent to the client as follows.
+                </p>
+                <div class="consoleOutput">[java] COULDN'T SEND THE MESSAGE TO THE SERVER.</div>
+                <p>
+                    Once a server is detected as failed, it will be added to the active servers
+                    list again after 60 seconds (specified in &lt;suspendDurationOnFailure&gt; in
+                    the configuration). Therefore, if you have restarted any of the stopped servers,
+                    messages will be directed to the newly started server within 60 seconds.
+                </p>
+            </subsection>
+        </section>
+        <p><a href="../samples.html">Back to Catalog</a></p>        
+    </body>
+</document>
\ No newline at end of file
diff --git a/src/site/xdoc/userguide/samples/sample54.xml b/src/site/xdoc/userguide/samples/sample54.xml
new file mode 100644
index 0000000..7871c6f
--- /dev/null
+++ b/src/site/xdoc/userguide/samples/sample54.xml
@@ -0,0 +1,142 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+  ~  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.
+  -->
+
+<document>
+    <properties>
+        <title>Apache Synapse - Sample 54</title>
+    </properties>
+    <body>
+        <section name="Sample 54: Session Affinity Load Balancing Between 3 Endpoints">
+            <div class="xmlConf">&lt;definitions xmlns="http://ws.apache.org/ns/synapse"&gt;
+
+    &lt;sequence name="main" onError="errorHandler"&gt;
+        &lt;in&gt;
+            &lt;send&gt;
+                &lt;endpoint&gt;
+                    &lt;!-- specify the session as the simple client session provided by Synapse for
+                                            testing purpose --&gt;
+                    &lt;session type="simpleClientSession"/&gt;
+
+                    &lt;loadbalance&gt;
+                        &lt;endpoint&gt;
+                            &lt;address uri="http://localhost:9001/services/LBService1"&gt;
+                                &lt;enableAddressing/&gt;
+                            &lt;/address&gt;
+                        &lt;/endpoint&gt;
+                        &lt;endpoint&gt;
+                            &lt;address uri="http://localhost:9002/services/LBService1"&gt;
+                                &lt;enableAddressing/&gt;
+                            &lt;/address&gt;
+                        &lt;/endpoint&gt;
+                        &lt;endpoint&gt;
+                            &lt;address uri="http://localhost:9003/services/LBService1"&gt;
+                                &lt;enableAddressing/&gt;
+                            &lt;/address&gt;
+                        &lt;/endpoint&gt;
+                    &lt;/loadbalance&gt;
+                &lt;/endpoint&gt;
+            &lt;/send&gt;
+            &lt;drop/&gt;
+        &lt;/in&gt;
+
+        &lt;out&gt;
+            &lt;!-- Send the messages where they have been sent (i.e. implicit To EPR) --&gt;
+            &lt;send/&gt;
+        &lt;/out&gt;
+    &lt;/sequence&gt;
+
+    &lt;sequence name="errorHandler"&gt;
+        &lt;makefault response="true"&gt;
+            &lt;code xmlns:tns="http://www.w3.org/2003/05/soap-envelope" value="tns:Receiver"/&gt;
+            &lt;reason value="COULDN'T SEND THE MESSAGE TO THE SERVER."/&gt;
+        &lt;/makefault&gt;
+        &lt;send/&gt;
+    &lt;/sequence&gt;
+
+&lt;/definitions&gt;</div>
+            <subsection name="Objective">
+                <p>
+                    Showcase the ability of Synapse to act as a session aware load balancer with
+                    simple client sessions
+                </p>
+            </subsection>
+            <subsection name="Pre-requisites">
+                <p>
+                    <ul>
+                        <li>
+                            Deploy the LoadbalanceFailoverService in the sample Axis2 server (go to
+                            samples/axis2Server/src/LoadbalanceFailoverService and run 'ant')
+                        </li>
+                        <li>
+                            Start 3 instances of the Axis2 server on different ports as follows
+                            <div class="command">./axis2server.sh -http 9001 -https 9005 -name MyServer1<br/>
+./axis2server.sh -http 9002 -https 9006 -name MyServer2<br/>
+./axis2server.sh -http 9003 -https 9007 -name MyServer3</div>
+                        </li>
+                        <li>
+                            Start Synapse using the configuration numbered 54 (repository/conf/sample/synapse_sample_54.xml)
+                            <div class="command">
+                                Unix/Linux: sh synapse.sh -sample 54<br/>
+                                Windows: synapse.bat -sample 54
+                            </div>
+                        </li>
+                    </ul>
+                </p>
+            </subsection>
+            <subsection name="Executing the Client">
+                <p>
+                    Above configuration is same as the load balancing configuration in
+                    <a href="sample52.html">sample 52</a>, except that the session type is specified
+                    as 'simpleClientSession'. This is a client initiated session, which means that
+                    the client generates the session identifier and sends it with each request. In
+                    this sample, client adds a SOAP header named ClientID containing the identifier
+                    of the client. Synapse binds this ID with a server on the first request and sends
+                    all successive requests containing that ID to the same server. Now switch to
+                    samples/axis2Client directory and run the client using the following command to
+                    check this in action.
+                </p>
+                <div class="command">ant loadbalancefailover -Dmode=session</div>
+                <p>
+                    In the session mode, client continuously sends requests with three different
+                    client (session) IDs. One ID is selected among these three IDs for each request
+                    randomly. Then client prints the session ID with the responded server for each
+                    request. Client output for the first 10 requests are shown below.
+                </p>
+                <div class="consoleOutput">[java] Request: 1 Session number: 1 Response from server: MyServer3
+[java] Request: 2 Session number: 2 Response from server: MyServer2
+[java] Request: 3 Session number: 0 Response from server: MyServer1
+[java] Request: 4 Session number: 2 Response from server: MyServer2
+[java] Request: 5 Session number: 1 Response from server: MyServer3
+[java] Request: 6 Session number: 2 Response from server: MyServer2
+[java] Request: 7 Session number: 2 Response from server: MyServer2
+[java] Request: 8 Session number: 1 Response from server: MyServer3
+[java] Request: 9 Session number: 0 Response from server: MyServer1
+[java] Request: 10 Session number: 0 Response from server: MyServer1
+... </div>
+                <p>
+                    You can see that session ID 0 is always directed to the server named MyServer1.
+                    That means session ID 0 is bound to MyServer1. Similarly session 1 and 2 are bound
+                    to MyServer3 and MyServer2 respectively.
+                </p>
+            </subsection>
+        </section>
+        <p><a href="../samples.html">Back to Catalog</a></p>        
+    </body>
+</document>
\ No newline at end of file
diff --git a/src/site/xdoc/userguide/samples/sample55.xml b/src/site/xdoc/userguide/samples/sample55.xml
new file mode 100644
index 0000000..cad2771
--- /dev/null
+++ b/src/site/xdoc/userguide/samples/sample55.xml
@@ -0,0 +1,169 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+  ~  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.
+  -->
+
+<document>
+    <properties>
+        <title>Apache Synapse - Sample 55</title>
+    </properties>
+    <body>
+        <section name="Sample 55: Session Affinity Load Balancing Between Fail-over Endpoints">
+            <div class="xmlConf">&lt;definitions xmlns="http://ws.apache.org/ns/synapse"&gt;
+
+    &lt;sequence name="main" onError="errorHandler"&gt;
+        &lt;in&gt;
+            &lt;send&gt;
+                &lt;endpoint&gt;
+                    &lt;!-- specify the session as the simple client session provided by Synapse for
+                                     testing purpose --&gt;
+                    &lt;session type="simpleClientSession"/&gt;
+
+                    &lt;loadbalance&gt;
+                        &lt;endpoint&gt;
+                            &lt;failover&gt;
+                                &lt;endpoint&gt;
+                                    &lt;address uri="http://localhost:9001/services/LBService1"&gt;
+                                        &lt;enableAddressing/&gt;
+                                    &lt;/address&gt;
+                                &lt;/endpoint&gt;
+                                &lt;endpoint&gt;
+                                    &lt;address uri="http://localhost:9002/services/LBService1"&gt;
+                                        &lt;enableAddressing/&gt;
+                                    &lt;/address&gt;
+                                &lt;/endpoint&gt;
+                            &lt;/failover&gt;
+                        &lt;/endpoint&gt;
+                        &lt;endpoint&gt;
+                            &lt;failover&gt;
+                                &lt;endpoint&gt;
+                                    &lt;address uri="http://localhost:9003/services/LBService1"&gt;
+                                        &lt;enableAddressing/&gt;
+                                    &lt;/address&gt;
+                                &lt;/endpoint&gt;
+                                &lt;endpoint&gt;
+                                    &lt;address uri="http://localhost:9004/services/LBService1"&gt;
+                                        &lt;enableAddressing/&gt;
+                                    &lt;/address&gt;
+                                &lt;/endpoint&gt;
+                            &lt;/failover&gt;
+                        &lt;/endpoint&gt;
+                    &lt;/loadbalance&gt;
+                &lt;/endpoint&gt;
+            &lt;/send&gt;
+            &lt;drop/&gt;
+        &lt;/in&gt;
+
+        &lt;out&gt;
+            &lt;!-- Send the messages where they have been sent (i.e. implicit To EPR) --&gt;
+            &lt;send/&gt;
+        &lt;/out&gt;
+    &lt;/sequence&gt;
+
+    &lt;sequence name="errorHandler"&gt;
+        &lt;makefault response="true"&gt;
+            &lt;code xmlns:tns="http://www.w3.org/2003/05/soap-envelope" value="tns:Receiver"/&gt;
+            &lt;reason value="COULDN'T SEND THE MESSAGE TO THE SERVER."/&gt;
+        &lt;/makefault&gt;
+        &lt;send/&gt;
+    &lt;/sequence&gt;
+
+&lt;/definitions&gt;</div>
+            <subsection name="Objective">
+                <p>
+                    Demonstrate session aware load balancing in conjunction with fail-over 
+                    routing.
+                </p>
+            </subsection>
+            <subsection name="Pre-requisites">
+                <p>
+                    <ul>
+                        <li>
+                            Deploy the LoadbalanceFailoverService in the sample Axis2 server (go to
+                            samples/axis2Server/src/LoadbalanceFailoverService and run 'ant')
+                        </li>
+                        <li>
+                            Start 4 instances of the Axis2 server on different ports as follows
+                            <div class="command">./axis2server.sh -http 9001 -https 9005 -name MyServer1<br/>
+./axis2server.sh -http 9002 -https 9006 -name MyServer2<br/>
+./axis2server.sh -http 9003 -https 9007 -name MyServer3<br/>
+./axis2server.sh -http 9004 -https 9008 -name MyServer4</div>
+                        </li>
+                        <li>
+                            Start Synapse using the configuration numbered 55 (repository/conf/sample/synapse_sample_55.xml)
+                            <div class="command">
+                                Unix/Linux: sh synapse.sh -sample 55<br/>
+                                Windows: synapse.bat -sample 55
+                            </div>
+                        </li>
+                    </ul>
+                </p>
+            </subsection>
+            <subsection name="Executing the Client">
+                <p>
+                    This configuration also uses 'simpleClientSession' to bind session ID values to
+                    servers as in <a href="sample54.html">sample 54</a>. But fail-over endpoints are
+                    specified as the child endpoints of the load balance endpoint. Therefore sessions
+                    are bound to the fail-over endpoints. Session information has to be replicated
+                    among the servers listed under each failover endpoint using some clustering
+                    mechanism. Therefore, if one endpoint bound to a session failed, successive requets
+                    for that session will be directed to the next endpoint in that failover group.
+                    Run the client using the following command to observe this behaviour.
+                </p>
+                <div class="command">ant loadbalancefailover -Dmode=session</div>
+                <p>
+                    You can see a client output as shown below.
+                </p>
+                <div class="consoleOutput">...
+[java] Request: 222 Session number: 0 Response from server: MyServer1
+[java] Request: 223 Session number: 0 Response from server: MyServer1
+[java] Request: 224 Session number: 1 Response from server: MyServer1
+[java] Request: 225 Session number: 2 Response from server: MyServer3
+[java] Request: 226 Session number: 0 Response from server: MyServer1
+[java] Request: 227 Session number: 1 Response from server: MyServer1
+[java] Request: 228 Session number: 2 Response from server: MyServer3
+[java] Request: 229 Session number: 1 Response from server: MyServer1
+[java] Request: 230 Session number: 1 Response from server: MyServer1
+[java] Request: 231 Session number: 2 Response from server: MyServer3
+...</div>
+                <p>
+                    Note that session 0 is always directed to MyServer1 and session 2 is directed to
+                    MyServer3. No requests are directed to MyServer2 and MyServer4 as they are kept
+                    as backups by fail-over endpoints. Now shutdown the server named MyServer1 while
+                    running the sample. You will observe that all successive requests for session 0
+                    is now directed to MyServer2, which is the backup server for MyServer1's group.
+                    This is shown below, where MyServer1 was shutdown after the request 534.
+                </p>
+                <div class="consoleOutput">...
+[java] Request: 529 Session number: 2 Response from server: MyServer3
+[java] Request: 530 Session number: 1 Response from server: MyServer1
+[java] Request: 531 Session number: 0 Response from server: MyServer1
+[java] Request: 532 Session number: 1 Response from server: MyServer1
+[java] Request: 533 Session number: 1 Response from server: MyServer1
+[java] Request: 534 Session number: 1 Response from server: MyServer1
+[java] Request: 535 Session number: 0 Response from server: MyServer2
+[java] Request: 536 Session number: 0 Response from server: MyServer2
+[java] Request: 537 Session number: 0 Response from server: MyServer2
+[java] Request: 538 Session number: 2 Response from server: MyServer3
+[java] Request: 539 Session number: 0 Response from server: MyServer2
+...</div>
+            </subsection>
+        </section>
+        <p><a href="../samples.html">Back to Catalog</a></p>        
+    </body>
+</document>
\ No newline at end of file
diff --git a/src/site/xdoc/userguide/samples/sample56.xml b/src/site/xdoc/userguide/samples/sample56.xml
new file mode 100644
index 0000000..416cc7a
--- /dev/null
+++ b/src/site/xdoc/userguide/samples/sample56.xml
@@ -0,0 +1,100 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+  ~  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.
+  -->
+
+<document>
+    <properties>
+        <title>Apache Synapse - Sample 56</title>
+    </properties>
+    <body>
+        <section name="Sample 56: WSDL Endpoint">
+            <div class="xmlConf">&lt;definitions xmlns="http://ws.apache.org/ns/synapse"&gt;
+
+    &lt;sequence name="main"&gt;
+        &lt;in&gt;
+            &lt;send&gt;
+                &lt;!-- get epr from the given wsdl --&gt;
+                &lt;endpoint&gt;
+                    &lt;wsdl uri="file:repository/conf/sample/resources/proxy/sample_proxy_1.wsdl"
+                          service="SimpleStockQuoteService"
+                          port="SimpleStockQuoteServiceHttpSoap11Endpoint"/&gt;
+                &lt;/endpoint&gt;
+            &lt;/send&gt;
+        &lt;/in&gt;
+
+        &lt;out&gt;
+            &lt;send/&gt;
+        &lt;/out&gt;
+    &lt;/sequence&gt;
+
+&lt;/definitions&gt;</div>
+            <subsection name="Objective">
+                <p>
+                    Showcase the ability of Synapse to use a WSDL as the target endpoint
+                </p>
+            </subsection>
+            <subsection name="Pre-requisites">
+                <p>
+                    <ul>
+                        <li>
+                            Deploy the SimpleStockQuoteService in the sample Axis2 server and start Axis2
+                        </li>
+                        <li>
+                            Start Synapse using the configuration numbered 56 (repository/conf/sample/synapse_sample_56.xml)
+                            <div class="command">
+                                Unix/Linux: sh synapse.sh -sample 56<br/>
+                                Windows: synapse.bat -sample 56
+                            </div>
+                        </li>
+                    </ul>
+                </p>
+            </subsection>
+            <subsection name="Executing the Client">
+                <p>
+                    This sample uses a WSDL endpoint inside the send mediator. WSDL endpoints can
+                    extract endpoint's address from the given WSDL. As WSDL documents can have many
+                    services and many ports inside each service, the service and port of the
+                    required endpoint has to be specified. As with address endpoints, QoS parameters
+                    for the endpoint can be specified in-line in the configuration. An excerpt taken
+                    from the sample_proxy_1.wsdl containing the specified service and port is
+                    listed below.
+                </p>
+                <div class="xmlConf">&lt;wsdl:service name="SimpleStockQuoteService"&gt;
+    &lt;wsdl:port name="SimpleStockQuoteServiceHttpSoap11Endpoint" binding="ns:SimpleStockQuoteServiceSoap11Binding"&gt;
+        &lt;soap:address location="http://localhost:9000/services/SimpleStockQuoteService.SimpleStockQuoteServiceHttpSoap11Endpoint"/&gt;
+    &lt;/wsdl:port&gt;
+    &lt;wsdl:port name="SimpleStockQuoteServiceHttpSoap12Endpoint" binding="ns:SimpleStockQuoteServiceSoap12Binding"&gt;
+        &lt;soap12:address location="http://localhost:9000/services/SimpleStockQuoteService.SimpleStockQuoteServiceHttpSoap12Endpoint"/&gt;
+    &lt;/wsdl:port&gt;
+&lt;/wsdl:service&gt;</div>
+                <p>
+                    Specified service and port refers to the endpoint address 'http://localhost:9000/services/SimpleStockQuoteService.SimpleStockQuoteServiceHttpSoap11Endpoint'
+                    according to the above WSDL. Now run the client using the following command.
+                </p>
+                <div class="command">ant stockquote -Daddurl=http://localhost:8280/</div>
+                <p>
+                    Client will print the quote price for IBM received from the server running on
+                    port 9000.
+                </p>
+                <div class="consoleOutput">Standard :: Stock price = $95.26454380258552</div>
+            </subsection>
+        </section>
+        <p><a href="../samples.html">Back to Catalog</a></p>        
+    </body>
+</document>
\ No newline at end of file
diff --git a/src/site/xdoc/userguide/samples/sample57.xml b/src/site/xdoc/userguide/samples/sample57.xml
new file mode 100644
index 0000000..46185fc
--- /dev/null
+++ b/src/site/xdoc/userguide/samples/sample57.xml
@@ -0,0 +1,153 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+  ~  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.
+  -->
+
+<document>
+    <properties>
+        <title>Apache Synapse - Sample 57</title>
+    </properties>
+    <body>
+        <section name="Sample 57: Dynamic Load Balancing Between 3 Nodes">
+            <div class="xmlConf">&lt;definitions xmlns="http://ws.apache.org/ns/synapse"&gt;
+
+    &lt;sequence name="main" onError="errorHandler"&gt;
+        &lt;in&gt;
+            &lt;send&gt;
+                &lt;endpoint name="dynamicLB"&gt;
+                    &lt;dynamicLoadbalance failover="true"
+                                        algorithm="org.apache.synapse.endpoints.algorithms.RoundRobin"&gt;
+                        &lt;membershipHandler
+                                class="org.apache.synapse.core.axis2.Axis2LoadBalanceMembershipHandler"&gt;
+                            &lt;property name="applicationDomain" value="apache.axis2.app.domain"/&gt;
+                        &lt;/membershipHandler&gt;
+                    &lt;/dynamicLoadbalance&gt;
+                &lt;/endpoint&gt;
+            &lt;/send&gt;
+            &lt;drop/&gt;
+        &lt;/in&gt;
+
+        &lt;out&gt;
+            &lt;!-- Send the messages where they have been sent (i.e. implicit To EPR) --&gt;
+            &lt;send/&gt;
+        &lt;/out&gt;
+    &lt;/sequence&gt;
+
+    &lt;sequence name="errorHandler"&gt;
+        &lt;makefault response="true"&gt;
+            &lt;code xmlns:tns="http://www.w3.org/2003/05/soap-envelope" value="tns:Receiver"/&gt;
+            &lt;reason value="COULDN'T SEND THE MESSAGE TO THE SERVER."/&gt;
+        &lt;/makefault&gt;
+        &lt;send/&gt;
+    &lt;/sequence&gt;
+
+&lt;/definitions&gt;</div>
+            <subsection name="Objective">
+                <p>
+                    Demonstrate the ability of Synapse to perform dynamic load balancing. In
+                    dynamic load balancing, nodes can be added and removed from the pool dynamically.
+                </p>
+            </subsection>
+            <subsection name="Pre-requisites">
+                <p>
+                    <ul>
+                        <li>
+                            Deploy the LoadbalanceFailoverService by switching to samples/axis2Server/src/LoadbalanceFailoverService
+                            directory and running 'ant'.
+                        </li>
+                        <li>
+                            Enable clustering for the sample Axis2 server. Edit the axis2.xml file at
+                            samples/axis2Server/repository/conf directory and set the 'enable' attribute
+                            on the 'clustering' element to 'true'. Specify the IP address of the
+                            machine as the values of 'mcastBindAddress' and 'localMemberHost'
+                            parameters.
+                        </li>
+                        <li>
+                            Enable clustering for Synapse by editing repository/conf/axis2.xml file.
+                            This should be done by setting the 'enable' attribute of the 'clustering'
+                            element to 'true'. Also provide the IP address of your machine as the
+                            values of the 'mcastBindAddress' and 'localMemberHost' parameters. In
+                            addition also set the 'enable' attribute on 'groupManagement' element
+                            to 'true'.
+                        </li>
+                        <li>
+                            Start Synapse using the configuration numbered 57 (repository/conf/sample/synapse_sample_57.xml)
+                            <div class="command">
+                                Unix/Linux: sh synapse.sh -sample 57<br/>
+                                Windows: synapse.bat -sample 57
+                            </div>
+                        </li>
+                        <li>
+                            Start 3 instances of the sample Axis2 server as follows.
+                            <div class="command">./axis2server.sh -http 9001 -https 9005 -name MyServer1<br/>
+./axis2server.sh -http 9002 -https 9006 -name MyServer2<br/>
+./axis2server.sh -http 9003 -https 9007 -name MyServer3</div>
+                        </li>
+                    </ul>
+                </p>
+            </subsection>
+            <subsection name="Executing the Client">
+                <p>
+                    Note that the Synapse configuration does not define any concrete addresses or
+                    URLs as targets. They are discovered dynamically by the dynamic load balance
+                    endpoint. To test this feature start the load balance and failover client using
+                    the following command:
+                </p>
+                <div class="command">ant loadbalancefailover -Di=100</div>
+                <p>
+                    This client sends 100 requests to the LoadbalanceFailoverService through Synapse.
+                    Synapse will distribute the load among the three nodes we have started 
+                    in round-robin manner. LoadbalanceFailoverService appends the name of the server
+                    to the response, so that client can determine which server has processed the message.
+                    If you examine the console output of the client, you can see that requests are
+                    processed by three servers as follows:
+                </p>
+                <div class="consoleOutput">[java] Request: 1 ==&gt; Response from server: MyServer1
+[java] Request: 2 ==&gt; Response from server: MyServer2
+[java] Request: 3 ==&gt; Response from server: MyServer3
+[java] Request: 4 ==&gt; Response from server: MyServer1
+[java] Request: 5 ==&gt; Response from server: MyServer2
+[java] Request: 6 ==&gt; Response from server: MyServer3
+[java] Request: 7 ==&gt; Response from server: MyServer1
+...</div>
+                <p>
+                    Now run the client without the -Di=100 parameter, to send infinite requests. While
+                    running the client shutdown the server named MyServer1. You can observe that
+                    requests are only distributed among MyServer2 and MyServer3 after shutting down
+                    MyServer1. Console output before and after shutting down MyServer1 is listed below
+                    (MyServer1 was shutdown after request 63):
+                </p>
+                <div class="consoleOutput">...
+[java] Request: 61 ==&gt; Response from server: MyServer1
+[java] Request: 62 ==&gt; Response from server: MyServer2
+[java] Request: 63 ==&gt; Response from server: MyServer3
+[java] Request: 64 ==&gt; Response from server: MyServer2
+[java] Request: 65 ==&gt; Response from server: MyServer3
+[java] Request: 66 ==&gt; Response from server: MyServer2
+[java] Request: 67 ==&gt; Response from server: MyServer3
+...</div>
+                <p>
+                    Now restart MyServer1. You can observe that requests will be again sent to all
+                    three servers. If you start a new Axis2 instance (say MyServer4) that will also
+                    be added to the load balance pool dynamically.
+                </p>
+            </subsection>
+        </section>
+        <p><a href="../samples.html">Back to Catalog</a></p>        
+    </body>
+</document>
\ No newline at end of file
diff --git a/src/site/xdoc/userguide/samples/sample58.xml b/src/site/xdoc/userguide/samples/sample58.xml
new file mode 100644
index 0000000..210c9f1
--- /dev/null
+++ b/src/site/xdoc/userguide/samples/sample58.xml
@@ -0,0 +1,134 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+  ~  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.
+  -->
+
+<document>
+    <properties>
+        <title>Apache Synapse - Sample 58</title>
+    </properties>
+    <body>
+        <section name="Sample 58: Static Load Balancing Between 3 Nodes">
+            <div class="xmlConf">&lt;definitions xmlns="http://ws.apache.org/ns/synapse"&gt;
+
+    &lt;sequence name="main" onError="errorHandler"&gt;
+        &lt;in&gt;
+            &lt;send&gt;
+                &lt;endpoint&gt;
+                    &lt;loadbalance failover="true"&gt;
+                        &lt;member hostName="127.0.0.1" httpPort="9001" httpsPort="9005"/&gt;
+                        &lt;member hostName="127.0.0.1" httpPort="9002" httpsPort="9006"/&gt;
+                        &lt;member hostName="127.0.0.1" httpPort="9003" httpsPort="9007"/&gt;
+                    &lt;/loadbalance&gt;
+                &lt;/endpoint&gt;
+            &lt;/send&gt;
+            &lt;drop/&gt;
+        &lt;/in&gt;
+
+        &lt;out&gt;
+            &lt;!-- Send the messages where they have been sent (i.e. implicit To EPR) --&gt;
+            &lt;send/&gt;
+        &lt;/out&gt;
+    &lt;/sequence&gt;
+
+    &lt;sequence name="errorHandler"&gt;
+        &lt;makefault response="true"&gt;
+            &lt;code xmlns:tns="http://www.w3.org/2003/05/soap-envelope" value="tns:Receiver"/&gt;
+            &lt;reason value="COULDN'T SEND THE MESSAGE TO THE SERVER."/&gt;
+        &lt;/makefault&gt;
+        &lt;send/&gt;
+    &lt;/sequence&gt;
+
+&lt;/definitions&gt;</div>
+            <subsection name="Objective">
+                <p>
+                    Demonstrate the ability of Synapse to act as a load balancer for a set of
+                    servers hosting stateless services. This sample is very similar to
+                    <a href="sample52.html">sample 52</a> but uses a different syntax style to
+                    configure the load balance endpoint.
+                </p>
+            </subsection>
+            <subsection name="Pre-requisites">
+                <p>
+                    <ul>
+                        <li>
+                            Deploy the LoadbalanceFailoverService in the sample Axis2 server (go to
+                            samples/axis2Server/src/LoadbalanceFailoverService and run 'ant')
+                        </li>
+                        <li>
+                            Start 3 instances of the Axis2 server on different ports as follows
+                            <div class="command">./axis2server.sh -http 9001 -https 9005 -name MyServer1<br/>
+./axis2server.sh -http 9002 -https 9006 -name MyServer2<br/>
+./axis2server.sh -http 9003 -https 9007 -name MyServer3</div>
+                        </li>
+                        <li>
+                            Start Synapse using the configuration numbered 52 (repository/conf/sample/synapse_sample_52.xml)
+                            <div class="command">
+                                Unix/Linux: sh synapse.sh -sample 52<br/>
+                                Windows: synapse.bat -sample 52
+                            </div>
+                        </li>
+                    </ul>
+                </p>
+            </subsection>
+            <subsection name="Executing the Client">
+                <p>
+                    Invoke the sample client as follows
+                </p>
+                <div class="command">ant loadbalancefailover -Di=100</div>
+                <p>
+                    This will send 100 requests to the LoadbalanceFailoverService through Synapse.
+                    Synapse will distribute the load among the three endpoints mentioned in the
+                    configuration in round-robin manner. LoadbalanceFailoverService appends the name
+                    of the server to the response, so that client can determine which server has
+                    processed the message. If you examine the console output of the client, you can
+                    see that requests are processed by three servers as follows:
+                </p>
+                <div class="consoleOutput">[java] Request: 1 ==&gt; Response from server: MyServer1
+[java] Request: 2 ==&gt; Response from server: MyServer2
+[java] Request: 3 ==&gt; Response from server: MyServer3
+[java] Request: 4 ==&gt; Response from server: MyServer1
+[java] Request: 5 ==&gt; Response from server: MyServer2
+[java] Request: 6 ==&gt; Response from server: MyServer3
+[java] Request: 7 ==&gt; Response from server: MyServer1
+...</div>
+                <p>
+                    Now run the client without the -Di=100 parameter to send requests indefinitely.
+                    While running the client shutdown the server named MyServer1. Then you can observe
+                    that requests are only distributed among MyServer2 and MyServer3. Console output
+                    before and after shutting down MyServer1 is listed below (MyServer1 was shutdown
+                    after request 63):
+                </p>
+                <div class="consoleOutput">...
+[java] Request: 61 ==&gt; Response from server: MyServer1
+[java] Request: 62 ==&gt; Response from server: MyServer2
+[java] Request: 63 ==&gt; Response from server: MyServer3
+[java] Request: 64 ==&gt; Response from server: MyServer2
+[java] Request: 65 ==&gt; Response from server: MyServer3
+[java] Request: 66 ==&gt; Response from server: MyServer2
+[java] Request: 67 ==&gt; Response from server: MyServer3
+...</div>
+                <p>
+                    Now restart MyServer1. You can observe that requests will be again sent to all
+                    three servers.
+                </p>
+            </subsection>
+        </section>
+        <p><a href="../samples.html">Back to Catalog</a></p>        
+    </body>
+</document>
\ No newline at end of file
diff --git a/src/site/xdoc/userguide/samples/sample6.xml b/src/site/xdoc/userguide/samples/sample6.xml
new file mode 100644
index 0000000..cf67760
--- /dev/null
+++ b/src/site/xdoc/userguide/samples/sample6.xml
@@ -0,0 +1,81 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+  ~  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.
+  -->
+
+<document>
+    <properties>
+        <title>Apache Synapse - Sample 6</title>
+    </properties>
+    <body>
+        <section name="Sample 6: Manipulating SOAP Headers and Filtering Incoming/Outgoing Messages">
+            <div class="xmlConf">&lt;definitions xmlns="http://ws.apache.org/ns/synapse"&gt;
+
+    &lt;sequence name="main"&gt;
+        &lt;in&gt;
+            &lt;header name="To" value="http://localhost:9000/services/SimpleStockQuoteService"/&gt;
+        &lt;/in&gt;
+        &lt;send/&gt;
+    &lt;/sequence&gt;
+
+&lt;/definitions&gt;</div>
+            <subsection name="Objective">
+                <p>
+                    Introduction to the header mediator for handling SOAP headers and the in/out
+                    mediators for filtering requests and responses.
+                </p>
+            </subsection>
+            <subsection name="Pre-requisites">
+                <p>
+                    <ul>
+                        <li>
+                            Deploy the SimpleStockQuoteService in the sample Axis2 server and start Axis2
+                        </li>
+                        <li>
+                            Start Synapse using the configuration numbered 6 (repository/conf/sample/synapse_sample_6.xml)
+                            <div class="command">
+                                Unix/Linux: sh synapse.sh -sample 6<br/>
+                                Windows: synapse.bat -sample 6
+                            </div>
+                        </li>
+                    </ul>
+                </p>
+            </subsection>
+            <subsection name="Executing the Client">
+                <p>
+                    In this sample we wil run the client in dumb client mode (ie without addressing
+                    information) as follows.
+                </p>
+                <div class="command">ant stockquote -Dtrpurl=http://localhost:8280/</div>
+                <p>
+                    The request is captured by the main sequence of Synapse and handed to the
+                    in mediator. The header mediator sets the WS-Addressing 'To' header on the
+                    request. Finally the send mediator sends the message to the EPR specified in
+                    the addressing 'To' header.
+                </p>
+                <p>
+                    Response coming back from Axis2 will also get dispatched to the main sequence.
+                    But for the response the in mediator will not get executed. Only the send
+                    mediator will operate on responses which will simply send them back to the
+                    client.
+                </p>
+            </subsection>
+        </section>
+        <p><a href="../samples.html">Back to Catalog</a></p>        
+    </body>
+</document>
\ No newline at end of file
diff --git a/src/site/xdoc/userguide/samples/sample600.xml b/src/site/xdoc/userguide/samples/sample600.xml
new file mode 100644
index 0000000..3f4e16a
--- /dev/null
+++ b/src/site/xdoc/userguide/samples/sample600.xml
@@ -0,0 +1,119 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+  ~  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.
+  -->
+
+<document>
+    <properties>
+        <title>Apache Synapse - Sample 600</title>
+    </properties>
+    <body>
+        <section name="Sample 600: File Hierarchy Based Configuration Builder">
+            <p>
+                In this sample we will be looking at how Synapse configuration files can be
+                organized into a single rooted file hierarchy. We will be using the following set
+                of files and directories.
+            </p>
+            <div class="consoleOutput">synapse_sample_600.xml
+            |-- endpoints
+            |   `-- foo.xml
+            |-- events
+            |   `-- event1.xml
+            |-- local-entries
+            |   `-- bar.xml
+            |-- proxy-services
+            |   |-- proxy1.xml
+            |   |-- proxy2.xml
+            |   `-- proxy3.xml
+            |-- registry.xml
+            |-- sequences
+            |   |-- custom-logger.xml
+            |   |-- fault.xml
+            |   `-- main.xml
+            |-- synapse.xml
+            `-- tasks
+                `-- task1.xml</div>
+            <subsection name="Objective">
+                <p>
+                    Demonstrate the ability to load the Synapse configuration from a file hierarchy
+                </p>
+            </subsection>
+            <subsection name="Pre-requisites">
+                <p>
+                    <ul>
+                        <li>
+                            Deploy the SimpleStockQuoteService in the sample Axis2 server and start Axis2
+                        </li>
+                        <li>
+                            Start Synapse using the configuration numbered 600 (this is available
+                            in the directory at repository/conf/sample/synapse_sample_600.xml)
+                            <div class="command">
+                                Unix/Linux: sh synapse.sh -sample 600<br/>
+                                Windows: synapse.bat -sample 600
+                            </div>
+                        </li>
+                    </ul>
+                </p>
+            </subsection>
+            <subsection name="Description">
+                <p>
+                    Go to the SYNAPSE_HOME/repository/conf/sample directory and locate the subdirectory
+                    named synapse_sample_600.xml within it. When Synapse is started with the sample
+                    configuration 600, Synapse will load the configuration from this directory. You
+                    will find a number of subdirectories and a set of XML files in each of those
+                    directories. Synapse will parse all the XML files in this file hierarchy and
+                    construct the full Synapse configuration at startup. As a result when this sample
+                    is executed Synapse will start with four proxy services, several sequences, a task,
+                    an event source and some endpoint and local entry definitions.
+                </p>
+                <p>
+                    The names of the subdirectories (eg: proxy-services, sequences, endpoints) are
+                    fixed and hence cannot be changed. Also the registry definition should go into a
+                    file named registry.xml which resides at the top level of the file hierarchy. It
+                    can also be specified in the synapse.xml file at top level. This synapse.xml file
+                    can include any item that can be normally defined in a synapse.xml file. The files
+                    which define proxy services, sequences, endpoints etc can have any name. These
+                    configuration files must have the .xml extension at the end of the name. Synapse
+                    will ignore any files which do not have the .xml extension.
+                </p>
+                <p>
+                    None of the directories and files in the sample file hierachy are mandatory. You
+                    can leave entire directories out if you do not need them. For example if your
+                    configuration does not contain any proxy services you can leave the
+                    subdirectory named proxy-services out.
+                </p>
+                <p>
+                    To use this feature you should simply pass a path to an existing directory when
+                    starting the Synapse server. The SynapseServer class which is responsible for
+                    starting the server accepts a file path as an argument from where to
+                    load the configuration. Generally we pass the path to the synapse.xml file as the
+                    value of this argument. If you pass a directory path instead, Synapse configuration
+                    will be loaded from the specified directory. Note the following line on the console
+                    when Synapse is loading the configuration from a file hierarchy.
+                </p>
+                <div class="consoleOutput">2009-08-04 14:14:42,489 [-] [main]  INFO SynapseConfigurationBuilder Loaded Synapse configuration from the directory hierarchy at : /home/synapse/repository/conf/sample/synapse_sample_600.xml</div>
+                <p>
+                    This feature comes in handy when managing large Synapse configurations. It is
+                    easier to maintain a well structured file hierarchy than managing one large, flat
+                    XML file.
+                </p>
+            </subsection>
+        </section>
+        <p><a href="../samples.html">Back to Catalog</a></p>
+    </body>
+</document>
\ No newline at end of file
diff --git a/src/site/xdoc/userguide/samples/sample601.xml b/src/site/xdoc/userguide/samples/sample601.xml
new file mode 100644
index 0000000..e9bb395
--- /dev/null
+++ b/src/site/xdoc/userguide/samples/sample601.xml
@@ -0,0 +1,79 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+  ~  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.
+  -->
+
+<document>
+    <properties>
+        <title>Apache Synapse - Sample 601</title>
+    </properties>
+    <body>
+        <section name="Sample 601: Using Synapse Observers">
+            <subsection name="Objective">
+                <p>
+                    Demonstrate the ability to monitor the Synapse configuration at runtime using the
+                    SynapseObserver interface
+                </p>
+            </subsection>
+            <subsection name="Running the Sample">
+                <p>
+                    Open the synapse.properties file in the SYNAPSE_HOME/repository/conf directory
+                    using a text editor and uncomment the line which defines the simple logging
+                    Synapse observer.
+                </p>
+                <div class="consoleOutput">synapse.observers=samples.userguide.SimpleLoggingObserver</div>
+                <p>
+                    Open the log4j.properties file in the SYNAPSE_HOME/lib directory and
+                    uncomment the line which sets the INFO log level to the samples.userguide
+                    package.
+                </p>
+                <div class="consoleOutput">log4j.category.samples.userguide=INFO</div>
+                <p>
+                    Start Synapse using any of the sample configurations. The SimpleLoggingObserver
+                    will capture events that occur while constructing the Synapse configuration
+                    and log them on the console as follows.
+                </p>
+                <div class="consoleOutput">2009-08-06 14:30:24,578 [-] [main]  INFO SimpleLoggingObserver Simple logging observer initialized...Capturing Synapse events...
+ 2009-08-06 14:30:24,604 [-] [main]  INFO SimpleLoggingObserver Endpoint : a3 was added to the Synapse configuration successfully
+ 2009-08-06 14:30:24,605 [-] [main]  INFO SimpleLoggingObserver Endpoint : a2 was added to the Synapse configuration successfully
+ 2009-08-06 14:30:24,606 [-] [main]  INFO SimpleLoggingObserver Endpoint : null was added to the Synapse configuration successfully
+ 2009-08-06 14:30:24,611 [-] [main]  INFO SimpleLoggingObserver Local entry : a1 was added to the Synapse configuration successfully
+ 2009-08-06 14:30:24,649 [-] [main]  INFO SimpleLoggingObserver Proxy service : StockQuoteProxy2 was added to the Synapse configuration successfully
+ 2009-08-06 14:30:24,661 [-] [main]  INFO SimpleLoggingObserver Proxy service : StockQuoteProxy1 was added to the Synapse configuration successfully
+ 2009-08-06 14:30:24,664 [-] [main]  INFO SimpleLoggingObserver Sequence : main was added to the Synapse configuration successfully
+ 2009-08-06 14:30:24,701 [-] [main]  INFO SimpleLoggingObserver Sequence : fault was added to the Synapse configuration successfully</div>
+                <p>
+                    The SimpleLoggingObserver is implemented as follows. It does not override any of the event handler implementations
+                    in the AbstractSynapseObserver class. The AbstractSynapseObserver logs all the received events by default.
+                </p>
+                <div class="consoleOutput">package samples.userguide;
+
+import org.apache.synapse.config.AbstractSynapseObserver;
+
+public class SimpleLoggingObserver extends AbstractSynapseObserver {
+
+    public SimpleLoggingObserver() {
+        super();
+        log.info("Simple logging observer initialized...Capturing Synapse events...");
+    }
+}</div>
+            </subsection>            
+        </section>
+        <p><a href="../samples.html">Back to Catalog</a></p>
+    </body>
+</document>
\ No newline at end of file
diff --git a/src/site/xdoc/userguide/samples/sample650.xml b/src/site/xdoc/userguide/samples/sample650.xml
new file mode 100644
index 0000000..4e61fec
--- /dev/null
+++ b/src/site/xdoc/userguide/samples/sample650.xml
@@ -0,0 +1,147 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+  ~  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.
+  -->
+
+<document>
+    <properties>
+        <title>Apache Synapse - Sample 650</title>
+    </properties>
+    <body>
+        <section name="Sample 650: Introduction to Priority Based Mediation">
+            <div class="xmlConf">&lt;definitions xmlns="http://ws.apache.org/ns/synapse"&gt;
+
+    &lt;priorityExecutor name="exec"&gt;
+        &lt;queues&gt;
+            &lt;queue size="100" priority="1"/&gt;
+            &lt;queue size="100" priority="10"/&gt;
+        &lt;/queues&gt;
+    &lt;/priorityExecutor&gt;
+
+    &lt;proxy name="StockQuoteProxy"&gt;
+        &lt;target&gt;
+            &lt;inSequence&gt;
+                &lt;filter source="$trp:priority" regex="1"&gt;
+                    &lt;then&gt;
+                        &lt;enqueue priority="1" sequence="priority_sequence" executor="exec"/&gt;
+                    &lt;/then&gt;
+                    &lt;else&gt;
+                        &lt;enqueue priority="10" sequence="priority_sequence" executor="exec"/&gt;
+                    &lt;/else&gt;
+                &lt;/filter&gt;
+            &lt;/inSequence&gt;
+            &lt;outSequence&gt;
+                &lt;send/&gt;
+            &lt;/outSequence&gt;
+        &lt;/target&gt;
+        &lt;publishWSDL uri="file:repository/conf/sample/resources/proxy/sample_proxy_1.wsdl"/&gt;
+    &lt;/proxy&gt;
+
+    &lt;sequence name="priority_sequence"&gt;
+        &lt;log level="full"/&gt;
+        &lt;send&gt;
+            &lt;endpoint&gt;
+                &lt;address uri="http://localhost:9000/services/SimpleStockQuoteService"/&gt;
+            &lt;/endpoint&gt;
+        &lt;/send&gt;
+    &lt;/sequence&gt;
+
+&lt;/definitions&gt;</div>
+            <subsection name="Objective">
+                <p>
+                    Demonstrate the usage of priority executors in Synapse to assign priority levels
+                    to requests and mediate them based on the assigned priority
+                </p>
+            </subsection>
+            <subsection name="Pre-requisites">
+                <p>
+                    <ul>
+                        <li>
+                            Deploy the SimpleStockQuoteService in the sample Axis2 server and start Axis2
+                        </li>
+                        <li>
+                            Start Synapse using the configuration numbered 650 (repository/conf/sample/synapse_sample_650.xml)
+                            <div class="command">
+                                Unix/Linux: sh synapse.sh -sample 650<br/>
+                                Windows: synapse.bat -sample 650
+                            </div>
+                        </li>
+                    </ul>
+                </p>
+            </subsection>
+            <subsection name="Executing the Client">
+                <p>
+                    Priority is applied only when synapse is loaded with enough messages to consume
+                    all of its core worker threads. So to observe the priority based mediation, it is
+                    required to use a load testing tool like JMeter, SOAP UI or Apache bench.
+                </p>
+                <p>
+                    In this sample, client should send a HTTP header that specifies the priority of
+                    the message.This header name is 'priority'. This header is retrieved in the synapse
+                    configuration using the $trp:priority XPath expression. Then it is matched against
+                    the value 1. If it has the value 1, message is executed with priority 1. Otherwise
+                    the message is executed with priority 10.
+                </p>
+                <p>
+                    Messages with different priorities are put into different priority queues. Then they
+                    are mediated in a manner so that high priority messages are always processed first.
+                </p>
+                <p>
+                    Here are two sample SOAP requests that can be used to invoke the service using a
+                    tool like JMeter, or Apache Bench. For SOAP UI, user can use the WSDL
+                    repository/conf/sample/resources/proxy/sample_proxy_1.wsdl to create the request.
+                    The only difference between the two requests shown here is the symbol. One
+                    has the symbol as IBM and other has MSFT. For one type of requests set the priority
+                    header to 1 and for the next set the priority header to 10. Then load Synapse with
+                    a large volume of traffic consisting of both types of requests using the load testing tool.
+                    Back end Axis2 server prints the symbol of the incoming requests. User should be
+                    able to see more of the high priority symbol.
+                </p>
+                <div class="xmlConf">&lt;soapenv:Envelope xmlns:soapenv=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot;&gt;
+     &lt;soapenv:Header xmlns:wsa=&quot;http://www.w3.org/2005/08/addressing&quot;&gt;
+        &lt;wsa:To&gt;http://localhost:8281/services/SimpleStockQuoteService&lt;/wsa:To&gt;
+        &lt;wsa:MessageID&gt;urn:uuid:1B57D0B0BF770678DE1261165228620&lt;/wsa:MessageID&gt;
+        &lt;wsa:Action&gt;urn:getQuote&lt;/wsa:Action&gt;
+     &lt;/soapenv:Header&gt;
+     &lt;soapenv:Body&gt;
+        &lt;m0:getQuote xmlns:m0=&quot;http://services.samples&quot;&gt;
+           &lt;m0:request&gt;
+              &lt;m0:symbol&gt;IBM&lt;/m0:symbol&gt;
+           &lt;/m0:request&gt;
+        &lt;/m0:getQuote&gt;
+     &lt;/soapenv:Body&gt;
+&lt;/soapenv:Envelope&gt;</div>
+           <div class="xmlConf">&lt;soapenv:Envelope xmlns:soapenv=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot;&gt;
+     &lt;soapenv:Header xmlns:wsa=&quot;http://www.w3.org/2005/08/addressing&quot;&gt;
+        &lt;wsa:To&gt;http://localhost:8281/services/SimpleStockQuoteService&lt;/wsa:To&gt;
+        &lt;wsa:MessageID&gt;urn:uuid:1B57D0B0BF770678DE1261165228620&lt;/wsa:MessageID&gt;
+        &lt;wsa:Action&gt;urn:getQuote&lt;/wsa:Action&gt;
+     &lt;/soapenv:Header&gt;
+     &lt;soapenv:Body&gt;
+        &lt;m0:getQuote xmlns:m0=&quot;http://services.samples&quot;&gt;
+           &lt;m0:request&gt;
+              &lt;m0:symbol&gt;MSFT&lt;/m0:symbol&gt;
+           &lt;/m0:request&gt;
+        &lt;/m0:getQuote&gt;
+     &lt;/soapenv:Body&gt;
+&lt;/soapenv:Envelope&gt;</div>
+            </subsection>
+        </section>
+        <p><a href="../samples.html">Back to Catalog</a></p>        
+    </body>
+</document>
\ No newline at end of file
diff --git a/src/site/xdoc/userguide/samples/sample651.xml b/src/site/xdoc/userguide/samples/sample651.xml
new file mode 100644
index 0000000..99df298
--- /dev/null
+++ b/src/site/xdoc/userguide/samples/sample651.xml
@@ -0,0 +1,147 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+  ~  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.
+  -->
+
+<document>
+    <properties>
+        <title>Apache Synapse - Sample 651</title>
+    </properties>
+    <body>
+        <section name="Sample 651: Priority Based Dispatching at Transport Level">
+            <p>
+                For this sample we will be using the same Synapse configuration used in
+                <a href="sample150.html">sample 150</a>. In addition we will be using the following
+                priority configuration for the Synapse NHTTP transport.
+            </p>
+            <div class="xmlConf">&lt;priorityConfiguration&gt;
+    &lt;priorityExecutor&gt;
+        &lt;!-- two priorities specified with priority 10 and 1. Both priority messages has a queue depth of 100 --&gt;
+        &lt;queues isFixedCapacity=&quot;true&quot; nextQueue=&quot;org.apache.synapse.commons.executors.PRRNextQueueAlgorithm&quot;&gt;
+            &lt;queue size=&quot;100&quot; priority=&quot;10&quot;/&gt;
+            &lt;queue size=&quot;100&quot; priority=&quot;1&quot;/&gt;
+        &lt;/queues&gt;
+        &lt;!-- these are the default values, values are put here to show their availability --&gt;
+        &lt;threads core=&quot;20&quot; max=&quot;100&quot; keep-alive=&quot;5&quot;/&gt;
+    &lt;/priorityExecutor&gt;
+
+    &lt;!-- if a message comes that we cannot determine priority, we set a default priority of 1 --&gt;
+    &lt;conditions defaultPriority=&quot;1&quot;&gt;
+        &lt;condition priority=&quot;10&quot;&gt;
+            &lt;!-- check for the header named priority --&gt;
+            &lt;equal type=&quot;header&quot; source=&quot;priority&quot; value=&quot;5&quot;/&gt;
+        &lt;/condition&gt;
+        &lt;condition priority=&quot;1&quot;&gt;
+            &lt;equal type=&quot;header&quot; source=&quot;priority&quot; value=&quot;1&quot;/&gt;
+        &lt;/condition&gt;
+    &lt;/conditions&gt;
+&lt;/priorityConfiguration&gt;</div>
+            <subsection name="Objective">
+                <p>
+                    Demonstrate priority based dispatching capabilities of the Synapse NHTTP
+                    transport
+                </p>
+            </subsection>
+            <subsection name="Pre-requisites">
+                <p>
+                    <ul>
+                        <li>
+                            Deploy the SimpleStockQuoteService in the sample Axis2 server and start Axis2
+                        </li>
+                        <li>
+                            Open axis2.xml file in repository/conf directory and uncomment the
+                            following parameter in the NHTTP transport receiver configuration.
+                            <br/><strong>priorityConfigFile</strong>
+                            <br/>Set the value to repository/conf/sample/resources/priority/priority-configuration.xml
+                        </li>
+                        <li>
+                            Start Synapse using the configuration numbered 150 (repository/conf/sample/synapse_sample_150.xml)
+                            <div class="command">
+                                Unix/Linux: sh synapse.sh -sample 150<br/>
+                                Windows: synapse.bat -sample 150
+                            </div>
+                        </li>
+                    </ul>
+                </p>
+            </subsection>
+            <subsection name="Executing the Client">
+                <p>
+                    Priority is applied only when synapse is loaded with enough messages to consume
+                    all of its core worker threads. So to observe the priority based mediation, it is
+                    required to use a load testing tool like JMeter, SOAP UI or Apache bench.
+                </p>
+                <p>
+                    In this sample, client should send a HTTP header that specifies the priority of
+                    the message.This header name is 'priority'. This header is retrieved in the synapse
+                    configuration using the $trp:priority XPath expression. Then it is matched against
+                    the value 1. If it has the value 1, message is executed with priority 1. Otherwise
+                    the message is executed with priority 10.
+                </p>
+                <p>
+                    Messages with different priorities are put into different priority queues. Then they
+                    are mediated in a manner so that high priority messages are always processed first.
+                </p>
+                <p>
+                    Here are two sample SOAP requests that can be used to invoke the service using a
+                    tool like JMeter, or Apache Bench. For SOAP UI, user can use the WSDL
+                    repository/conf/sample/resources/proxy/sample_proxy_1.wsdl to create the request.
+                    The only difference between the two requests shown here is the symbol. One
+                    has the symbol as IBM and other has MSFT. For one type of requests set the priority
+                    header to 1 and for the next set the priority header to 10. Then load Synapse with
+                    a large volume of traffic consisting of both types of requests using the load testing tool.
+                    Back end Axis2 server prints the symbol of the incoming requests. User should be
+                    able to see more of the high priority symbol.
+                </p>
+                <div class="xmlConf">&lt;soapenv:Envelope xmlns:soapenv=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot;&gt;
+     &lt;soapenv:Header xmlns:wsa=&quot;http://www.w3.org/2005/08/addressing&quot;&gt;
+        &lt;wsa:To&gt;http://localhost:8281/services/SimpleStockQuoteService&lt;/wsa:To&gt;
+        &lt;wsa:MessageID&gt;urn:uuid:1B57D0B0BF770678DE1261165228620&lt;/wsa:MessageID&gt;
+        &lt;wsa:Action&gt;urn:getQuote&lt;/wsa:Action&gt;
+     &lt;/soapenv:Header&gt;
+     &lt;soapenv:Body&gt;
+        &lt;m0:getQuote xmlns:m0=&quot;http://services.samples&quot;&gt;
+           &lt;m0:request&gt;
+              &lt;m0:symbol&gt;IBM&lt;/m0:symbol&gt;
+           &lt;/m0:request&gt;
+        &lt;/m0:getQuote&gt;
+     &lt;/soapenv:Body&gt;
+&lt;/soapenv:Envelope&gt;</div>
+           <div class="xmlConf">&lt;soapenv:Envelope xmlns:soapenv=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot;&gt;
+     &lt;soapenv:Header xmlns:wsa=&quot;http://www.w3.org/2005/08/addressing&quot;&gt;
+        &lt;wsa:To&gt;http://localhost:8281/services/SimpleStockQuoteService&lt;/wsa:To&gt;
+        &lt;wsa:MessageID&gt;urn:uuid:1B57D0B0BF770678DE1261165228620&lt;/wsa:MessageID&gt;
+        &lt;wsa:Action&gt;urn:getQuote&lt;/wsa:Action&gt;
+     &lt;/soapenv:Header&gt;
+     &lt;soapenv:Body&gt;
+        &lt;m0:getQuote xmlns:m0=&quot;http://services.samples&quot;&gt;
+           &lt;m0:request&gt;
+              &lt;m0:symbol&gt;MSFT&lt;/m0:symbol&gt;
+           &lt;/m0:request&gt;
+        &lt;/m0:getQuote&gt;
+     &lt;/soapenv:Body&gt;
+&lt;/soapenv:Envelope&gt;</div>
+                <p>
+                    In this sample, priority based mediation takes place at the transport level
+                    itself (before the message is even received by the mediation engine). High
+                    priority messages will reach the service bus first.
+                </p>
+            </subsection>
+        </section>
+        <p><a href="../samples.html">Back to Catalog</a></p>
+    </body>
+</document>
\ No newline at end of file
diff --git a/src/site/xdoc/userguide/samples/sample652.xml b/src/site/xdoc/userguide/samples/sample652.xml
new file mode 100644
index 0000000..9930b35
--- /dev/null
+++ b/src/site/xdoc/userguide/samples/sample652.xml
@@ -0,0 +1,136 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+  ~  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.
+  -->
+
+<document>
+    <properties>
+        <title>Apache Synapse - Sample 652</title>
+    </properties>
+    <body>
+        <section name="Sample 652: Distributed transaction management">
+            <div class="xmlConf">&lt;definitions xmlns="http://ws.apache.org/ns/synapse"&gt;
+
+&lt;sequence name="myFaultHandler"&gt;
+    &lt;log level="custom"&gt;
+        &lt;property name="text" value="** Rollback Transaction**"/&gt;
+    &lt;/log&gt;
+    &lt;transaction action="rollback"/&gt;
+    &lt;send/&gt;
+&lt;/sequence&gt;
+
+&lt;sequence name="main" onError="myFaultHandler"&gt;
+    &lt;in&gt;
+        &lt;send&gt;
+            &lt;endpoint&gt;
+                &lt;address uri="http://localhost:9000/services/SimpleStockQuoteService"/&gt;
+            &lt;/endpoint&gt;
+        &lt;/send&gt;
+    &lt;/in&gt;
+
+    &lt;out&gt;
+        &lt;transaction action="new"/&gt;
+
+        &lt;log level="custom"&gt;
+            &lt;property name="text" value="** Reporting to the Database esbdb**"/&gt;
+        &lt;/log&gt;
+        &lt;dbreport useTransaction="true" xmlns="http://ws.apache.org/ns/synapse"&gt;
+            &lt;connection&gt;
+                &lt;pool&gt;
+                    &lt;dsName&gt;java:jdbc/XADerbyDS&lt;/dsName&gt;
+                    &lt;icClass&gt;org.jnp.interfaces.NamingContextFactory&lt;/icClass&gt;
+                    &lt;url&gt;localhost:1099&lt;/url&gt;
+                    &lt;user&gt;synapse&lt;/user&gt;
+                    &lt;password&gt;synapse&lt;/password&gt;
+                &lt;/pool&gt;
+            &lt;/connection&gt;
+            &lt;statement&gt;
+                &lt;sql&gt;delete from company where name =?&lt;/sql&gt;
+                &lt;parameter expression="//m0:return/m1:symbol/child::text()"
+                           xmlns:m0="http://services.samples" xmlns:m1="http://services.samples/xsd"
+                           type="VARCHAR"/&gt;
+            &lt;/statement&gt;
+        &lt;/dbreport&gt;
+
+        &lt;log level="custom"&gt;
+            &lt;property name="text" value="** Reporting to the Database esbdb1**"/&gt;
+        &lt;/log&gt;
+        &lt;dbreport useTransaction="true" xmlns="http://ws.apache.org/ns/synapse"&gt;
+            &lt;connection&gt;
+                &lt;pool&gt;
+                    &lt;dsName&gt;java:jdbc/XADerbyDS1&lt;/dsName&gt;
+                    &lt;icClass&gt;org.jnp.interfaces.NamingContextFactory&lt;/icClass&gt;
+                    &lt;url&gt;localhost:1099&lt;/url&gt;
+                    &lt;user&gt;synapse&lt;/user&gt;
+                    &lt;password&gt;synapse&lt;/password&gt;
+                &lt;/pool&gt;
+            &lt;/connection&gt;
+            &lt;statement&gt;
+                &lt;sql&gt; INSERT into company values ('IBM','c4',12.0)&lt;/sql&gt;
+            &lt;/statement&gt;
+        &lt;/dbreport&gt;
+        &lt;transaction action="commit"/&gt;
+        &lt;send/&gt;
+    &lt;/out&gt;
+&lt;/sequence&gt;
+&lt;/definitions&gt;</div>
+            <subsection name="Objective">
+                <p>
+					Demonstrate the use of the transaction mediator in a distributed transaction
+                </p>
+            </subsection>
+            <subsection name="Pre-requisites">
+                <p>
+                    <ul>
+                        <li>
+                              Deploy the SimpleStockQuoteService in the sample Axis2 server and start Axis2
+                              <p>To run this sample it is required to deploy synpase on JBoss application server(This is only tested with JBoss application sever), you
+                              can use the war distribution to deploy synapse on JBoss application server. Use the synpase_sample_652.xml as the synapse confiuration
+                              file and start JBoss with that synpase configuration file. Also you need to define two XA datasources for above two datasources.
+                              You'll need to refer JBoss documentation to see how to do this.</p>
+                              <p>
+                                It also required to have two database instances, this will be used by the two XA datasources.
+                                Refer the <a href="setup/db.html#derby">Sample Setup Guide </a> to see how you can set up the derby database server.
+                              </p>
+                              <p>
+                                In this sample a record is delete from one database and it is added into the second database.
+                                If either of the operations(deleting from the 1st database and adding into the second database)
+                                fails everything will be roll backed. The records will be untoched.
+                              </p>
+                        </li>
+                        <li>
+                            Start Synapse using the configuration numbered 652 (repository/conf/sample/synapse_sample_652.xml)
+                            <div class="command">
+                                Unix/Linux: sh synapse.sh -sample 652<br/>
+                                Windows: synapse.bat -sample 652
+                            </div>
+                        </li>
+                    </ul>
+                </p>
+            </subsection>
+            <subsection name="Executing the Client">
+                <div class="command">ant stockquote -Daddurl=http://localhost:9000/services/SimpleStockQuoteService -Dtrpurl=http://localhost:8280/</div>
+
+                <div class="consoleOutput">Sat Nov 18 21:01:23 IST 2006 SimpleStockQuoteService :: Generating quote for : IBM</div>
+
+                <div class="consoleOutput">Standard :: Stock price = $95.26454380258552</div>
+            </subsection>
+        </section>
+        <p><a href="../samples.html">Back to Catalog</a></p>        
+    </body>
+</document>
\ No newline at end of file
diff --git a/src/site/xdoc/userguide/samples/sample7.xml b/src/site/xdoc/userguide/samples/sample7.xml
new file mode 100644
index 0000000..aa842b9
--- /dev/null
+++ b/src/site/xdoc/userguide/samples/sample7.xml
@@ -0,0 +1,116 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+  ~  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.
+  -->
+
+<document>
+    <properties>
+        <title>Apache Synapse - Sample 7</title>
+    </properties>
+    <body>
+        <section name="Sample 7: Introduction to Local Registry Entries and Using Schema Validation">
+            <div class="xmlConf">&lt;definitions xmlns="http://ws.apache.org/ns/synapse"&gt;
+
+    &lt;sequence name="main"&gt;
+        &lt;in&gt;
+            &lt;validate&gt;
+                &lt;schema key="validate_schema"/&gt;
+                &lt;on-fail&gt;
+                    &lt;!-- if the request does not validate againt schema throw a fault --&gt;
+                    &lt;makefault response="true"&gt;
+                        &lt;code xmlns:tns="http://www.w3.org/2003/05/soap-envelope" value="tns:Receiver"/&gt;
+                        &lt;reason value="Invalid custom quote request"/&gt;
+                    &lt;/makefault&gt;
+                &lt;/on-fail&gt;
+            &lt;/validate&gt;
+        &lt;/in&gt;
+        &lt;send/&gt;
+    &lt;/sequence&gt;
+
+    &lt;localEntry key="validate_schema"&gt;
+        &lt;xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+                   xmlns="http://services.samples" elementFormDefault="qualified"
+                   attributeFormDefault="unqualified" targetNamespace="http://services.samples"&gt;
+            &lt;xs:element name="getQuote"&gt;
+                &lt;xs:complexType&gt;
+                    &lt;xs:sequence&gt;
+                        &lt;xs:element name="request"&gt;
+                            &lt;xs:complexType&gt;
+                                &lt;xs:sequence&gt;
+                                    &lt;xs:element name="stocksymbol" type="xs:string"/&gt;
+                                &lt;/xs:sequence&gt;
+                            &lt;/xs:complexType&gt;
+                        &lt;/xs:element&gt;
+                    &lt;/xs:sequence&gt;
+                &lt;/xs:complexType&gt;
+            &lt;/xs:element&gt;
+        &lt;/xs:schema&gt;
+    &lt;/localEntry&gt;
+
+&lt;/definitions&gt;</div>
+            <subsection name="Objective">
+                <p>
+                    Demonstrating the usage of the validate mediator for XML schema validation
+                    and using local registry (local entries) for storing configuration metadata.
+                </p>
+            </subsection>
+            <subsection name="Pre-requisites">
+                <p>
+                    <ul>
+                        <li>
+                            Deploy the SimpleStockQuoteService in the sample Axis2 server and start Axis2
+                        </li>
+                        <li>
+                            Start Synapse using the configuration numbered 7 (repository/conf/sample/synapse_sample_7.xml)
+                            <div class="command">
+                                Unix/Linux: sh synapse.sh -sample 7<br/>
+                                Windows: synapse.bat -sample 7
+                            </div>
+                        </li>
+                    </ul>
+                </p>
+            </subsection>
+            <subsection name="Executing the Client">
+                <p>
+                    This example shows how a static XML fragment could be stored in the the
+                    Synapse local registry. Resources defined in the local registry are static
+                    (i.e. never changes over the lifetime of the configuration) and may be
+                    specified as a source URL, in-line text or in-line xml. In this example the
+                    schema is made available under the key 'validate_schema'.
+                </p>
+                <p>
+                    The validate mediator by default operates on the first child element of the
+                    SOAP body. You may specify an XPath expression using the 'source' attribute
+                    to override this behaviour. The validate mediator in this sample uses the 'validate_schema'
+                    resource to validate the incoming message, and if the message validation fails
+                    it invokes the 'on-fail' sequence of mediators.
+                </p>
+                <p>
+                    If you send a stockquote request using the 'ant stockquote ...' command as follows
+                    you will get a fault back with the message 'Invalid custom quote request' as
+                    the schema validation fails. This is because the schema used in the example
+                    expects a slightly different message than what is created by the stock quote
+                    client. (i.e. expects a 'stocksymbol' element instead of 'symbol' to specify
+                    the stock symbol)
+                </p>
+                <div class="command">ant stockquote -Daddurl=http://localhost:9000/services/SimpleStockQuoteService -Dtrpurl=http://localhost:8280/</div>
+            </subsection>
+        </section>
+        <p><a href="../samples.html">Back to Catalog</a></p>        
+    </body>
+</document>
\ No newline at end of file
diff --git a/src/site/xdoc/userguide/samples/sample700.xml b/src/site/xdoc/userguide/samples/sample700.xml
new file mode 100644
index 0000000..423ecbe
--- /dev/null
+++ b/src/site/xdoc/userguide/samples/sample700.xml
@@ -0,0 +1,102 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+  ~  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.
+  -->
+
+<document>
+    <properties>
+        <title>Apache Synapse - Sample 700</title>
+    </properties>
+    <body>
+        <section name="Sample 700: Introduction to Synapse Message Stores">
+            <div class="xmlConf">&lt;definitions xmlns="http://ws.apache.org/ns/synapse"&gt;
+    &lt;!--Simple in Memory Message Store with name foo --&gt;
+    &lt;messageStore name="foo" sequence="bar"&gt;
+        &lt;redelivery&gt;
+            &lt;!--retry interval 1 sec --&gt;
+            &lt;interval&gt;1&lt;/interval&gt;
+            &lt;!--Message will be stored after 2 redeliveries --&gt;
+            &lt;maximumRedeliveries&gt;2&lt;/maximumRedeliveries&gt;
+            &lt;exponentialBackoff&gt;true&lt;/exponentialBackoff&gt;
+            &lt;backoffMutiplier&gt;2&lt;/backoffMutiplier&gt;
+        &lt;/redelivery&gt;
+    &lt;/messageStore&gt;
+
+    &lt;!-- filtering of messages with XPath and regex matches --&gt;
+    &lt;filter source="get-property('To')" regex=".*/StockQuote.*"&gt;
+        &lt;send&gt;
+            &lt;endpoint key="SampleEndpoint"/&gt;
+        &lt;/send&gt;
+        &lt;drop/&gt;
+    &lt;/filter&gt;
+    &lt;send/&gt;
+    &lt;!-- Endpoint named SampleEndpoint--&gt;
+    &lt;endpoint name="SampleEndpoint" onFault="foo"&gt;
+        &lt;address uri="http://localhost:9000/services/SimpleStockQuoteService"&gt;
+            &lt;suspendDurationOnFailure&gt;2&lt;/suspendDurationOnFailure&gt;
+        &lt;/address&gt;
+    &lt;/endpoint&gt;
+
+    &lt;sequence name="bar"&gt;
+        &lt;log level="full"/&gt;
+    &lt;/sequence&gt;
+&lt;/definitions&gt;</div>
+            <subsection name="Objective">
+                <p>
+                    Demonstrate the usage of Synapse message stores and how to use a message store
+                    to implement the popular 'Dead Letter Channel' integration pattern
+                </p>
+            </subsection>
+            <subsection name="Pre-requisites">
+                <p>
+                    <ul>
+                        <li>
+                            Deploy the SimpleStockQuoteService in the sample Axis2 server and start Axis2
+                        </li>
+                        <li>
+                            Start Synapse using the configuration numbered 700 (repository/conf/sample/synapse_sample_700.xml)
+                            <div class="command">
+                                Unix/Linux: sh synapse.sh -sample 700<br/>
+                                Windows: synapse.bat -sample 700
+                            </div>
+                        </li>
+                    </ul>
+                </p>
+            </subsection>
+            <subsection name="Executing the Client">
+                <p>
+                    First execute the sample client as follows.
+                </p>
+                <div class="command">ant stockquote -Dtrpurl=http://localhost:8280/soap/StockQuote</div>
+                <p>
+                    Since you have the sample Axis2 server running, you will get a stock quote response
+                    at the client side. Axis2 server will also print a log confirming the generation
+                    of a new quote value. Now shut the Axis2 server down and invoke the sample client
+                    again. Now Synapse will attempt twice to deliever the message and faling that, the
+                    message will be stored in the specified in-memory message store (dead letter channel)
+                    for later delivery.
+                </p>
+                <p>
+                    Now you can use the JMX view of the Synapse message store to see the message
+                    stored in the dead letter channel and manually retry on them.
+                </p>                
+            </subsection>
+        </section>
+        <p><a href="../samples.html">Back to Catalog</a></p>        
+    </body>
+</document>
\ No newline at end of file
diff --git a/src/site/xdoc/userguide/samples/sample750.xml b/src/site/xdoc/userguide/samples/sample750.xml
new file mode 100644
index 0000000..30f0809
--- /dev/null
+++ b/src/site/xdoc/userguide/samples/sample750.xml
@@ -0,0 +1,108 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+  ~  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.
+  -->
+
+<document>
+    <properties>
+        <title>Apache Synapse - Sample 750</title>
+    </properties>
+    <body>
+        <section name="Sample 750: Stereotyping XSLT Transformations with Templates">
+            <div class="xmlConf">&lt;definitions xmlns=&quot;http://ws.apache.org/ns/synapse&quot;&gt;
+
+        &lt;proxy name=&quot;StockQuoteProxy&quot;&gt;
+            &lt;target&gt;
+            &lt;inSequence&gt;
+            &lt;!--use sequence template to trasnform incoming request--&gt;
+            &lt;call-template target=&quot;xslt_func&quot;&gt;
+                            &lt;with-param name=&quot;xslt_key&quot; value=&quot;xslt-key-req&quot;/&gt;
+                    &lt;/call-template&gt;
+            &lt;send&gt;
+                &lt;endpoint&gt;
+                                  &lt;address uri=&quot;http://localhost:9000/services/SimpleStockQuoteService&quot;/&gt;
+                            &lt;/endpoint&gt;
+                    &lt;/send&gt;
+                &lt;/inSequence&gt;
+
+                &lt;outSequence&gt;
+            &lt;!--use sequence template to trasnform incoming response--&gt;
+            &lt;call-template target=&quot;xslt_func&quot;&gt;
+                            &lt;with-param name=&quot;xslt_key&quot; value=&quot;xslt-key-back&quot;/&gt;
+                    &lt;/call-template&gt;
+                    &lt;send/&gt;
+                &lt;/outSequence&gt;
+            &lt;/target&gt;
+        &lt;/proxy&gt;
+
+        &lt;!--this sequence template will trasnform requests with the given xslt local entry key And will log
+        the message before and after. Takes Iterate local entry key as an argument--&gt;
+        &lt;template xmlns=&quot;http://ws.apache.org/ns/synapse&quot; name=&quot;xslt_func&quot;&gt;
+            &lt;parameter name=&quot;xslt_key&quot;/&gt;
+            &lt;sequence&gt;
+                    &lt;log level=&quot;full&quot;&gt;
+                &lt;property name=&quot;BEFORE_TRANSFORM&quot; value=&quot;true&quot; /&gt;
+            &lt;/log&gt;
+                 &lt;xslt key=&quot;{$func:xslt_key}&quot;/&gt;
+            &lt;log level=&quot;full&quot;&gt;
+                &lt;property name=&quot;AFTER_TRANSFORM&quot; value=&quot;true&quot; /&gt;
+            &lt;/log&gt;
+            &lt;/sequence&gt;
+        &lt;/template&gt;
+
+        &lt;localEntry key=&quot;xslt-key-req&quot; src=&quot;file:repository/samples/resources/transform/transform.xslt&quot;/&gt;
+        &lt;localEntry key=&quot;xslt-key-back&quot; src=&quot;file:repository/samples/resources/transform/transform_back.xslt&quot;/&gt;
+&lt;/definitions&gt;</div>
+            <subsection name="Objective">
+                <p>
+                    Introduction to Apache Synapse Sequence Templates
+                </p>
+            </subsection>
+            <subsection name="Pre-requisites">
+                <p>
+                    <ul>
+                        <li>
+                            Deploy the SimpleStockQuoteService in the sample Axis2 server and start Axis2
+                        </li>
+                        <li>
+                            Start Synapse using the configuration numbered 750 (repository/conf/sample/synapse_sample_750.xml)
+                            <div class="command">
+                                Unix/Linux: sh synapse.sh -sample 750<br/>
+                                Windows: synapse.bat -sample 750
+                            </div>
+                        </li>
+                    </ul>
+                </p>
+            </subsection>
+            <subsection name="Executing the Client">
+                <p>
+                    First execute the sample client as follows.
+                </p>
+                <div class="command">ant stockquote -Daddurl=http://localhost:8280/services/StockQuoteProxy  -Dmode=customquote</div>
+                <p>
+                    Sequence Template can act a reusable function. Here the proxy service reuses
+                    template xslt_func which will transform requests with the given xslt local entry
+                    key And will log the message before and after. It takes xslt transformation corresponding
+                    to local entry key as an argument (for insequence this key is xslt-key-req and out sequence it is xslt-key-back).
+                    We use call-template mediator for passing the xslt key parameter to a sequence template.
+                </p>
+            </subsection>
+        </section>
+        <p><a href="../samples.html">Back to Catalog</a></p>
+    </body>
+</document>
\ No newline at end of file
diff --git a/src/site/xdoc/userguide/samples/sample8.xml b/src/site/xdoc/userguide/samples/sample8.xml
new file mode 100644
index 0000000..53b68bd
--- /dev/null
+++ b/src/site/xdoc/userguide/samples/sample8.xml
@@ -0,0 +1,149 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+  ~  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.
+  -->
+
+<document>
+    <properties>
+        <title>Apache Synapse - Sample 8</title>
+    </properties>
+    <body>
+        <section name="Sample 8: Introduction to Static and Dynamic Registry Resources, and Using XSLT Transformations">
+            <div class="xmlConf">&lt;definitions xmlns="http://ws.apache.org/ns/synapse"&gt;
+
+    &lt;!-- the SimpleURLRegistry allows access to a URL based registry (e.g. file:/// or http://) --&gt;
+    &lt;registry provider="org.apache.synapse.registry.url.SimpleURLRegistry"&gt;
+        &lt;!-- the root property of the simple URL registry helps resolve a resource URL as root + key --&gt;
+        &lt;parameter name="root"&gt;file:repository/conf/sample/resources/&lt;/parameter&gt;
+        &lt;!-- all resources loaded from the URL registry would be cached for this number of milli seconds --&gt;
+        &lt;parameter name="cachableDuration"&gt;15000&lt;/parameter&gt;
+    &lt;/registry&gt;
+
+    &lt;!-- define the request processing XSLT resource as a static URL source --&gt;
+    &lt;localEntry key="xslt-key-req" src="file:repository/conf/sample/resources/transform/transform.xslt"/&gt;
+
+    &lt;sequence name="main"&gt;
+        &lt;in&gt;
+            &lt;!-- transform the custom quote request into a standard quote requst expected by the service --&gt;
+            &lt;xslt key="xslt-key-req"/&gt;
+        &lt;/in&gt;
+        &lt;out&gt;
+            &lt;!-- transform the standard response back into the custom format the client expects --&gt;
+            &lt;!-- the key is looked up in the remote registry and loaded as a 'dynamic' registry resource --&gt;
+            &lt;xslt key="transform/transform_back.xslt"/&gt;
+        &lt;/out&gt;
+        &lt;send/&gt;
+    &lt;/sequence&gt;
+
+&lt;/definitions&gt;</div>
+            <subsection name="Objective">
+                <p>
+                    Demonstrating the usage of the XSLT mediator for transforming message content
+                    and using local registry and remote registry for storing configuration
+                    metadata.
+                </p>
+            </subsection>
+            <subsection name="Pre-requisites">
+                <p>
+                    <ul>
+                        <li>
+                            Deploy the SimpleStockQuoteService in the sample Axis2 server and start Axis2
+                        </li>
+                        <li>
+                            Start Synapse using the configuration numbered 8 (repository/conf/sample/synapse_sample_8.xml)
+                            <div class="command">
+                                Unix/Linux: sh synapse.sh -sample 8<br/>
+                                Windows: synapse.bat -sample 8
+                            </div>
+                        </li>
+                    </ul>
+                </p>
+            </subsection>
+            <subsection name="Executing the Client">
+                <p>
+                    This example uses the XSLT mediator to perform transformations, and the xslt
+                    transformations are specified as registry resources. The first resource
+                    'xslt-key-req' is specified as a 'local' registry entry. Local entries do not
+                    place the resource on the registry, but simply make it available to the local
+                    configuration. If a local entry is defined with a key that already exists in
+                    the remote registry, the local entry will get higher precedence over the remote
+                    resource.
+                </p>
+                <p>
+                    In this example you will notice the new 'registry' definition. Synapse comes
+                    with a simple URL based registry implementation (SimpleURLRegistry). During
+                    initialization of the registry, the SimpleURLRegistry expects to find a property
+                    named 'root', which specifies a prefix for the registry keys used later.
+                    When the SimpleURLRegistry is used, this root is prefixed to the entry keys to
+                    form the complete URL of the resource being looked up. The registry caches a
+                    resource once requested, and stores it internally for a specified duration.
+                    Once this period expires, it will reload the meta information about the resource
+                    and reloads its cached copy if necessary, the next time the resource is requested.
+                </p>
+                <p>
+                    Hence the second XSLT resource key 'transform/transform_back.xslt' concatenated
+                    with the 'root' of the SimpleURLRegistry 'file:repository/conf/sample/resources/'
+                    forms the complete URL of the resource as
+                    'file:repository/conf/sample/resources/transform/transform_back.xslt' and caches
+                    its value for a period of 15000 ms. 
+                </p>
+                <p>
+                    Execute the custom quote client as follows and analyze the the Synapse debug
+                    log output.
+                </p>
+                <div class="command">ant stockquote -Daddurl=http://localhost:9000/services/SimpleStockQuoteService -Dtrpurl=http://localhost:8280/ -Dmode=customquote</div>
+                <p>
+                    The incoming message is transformed into a standard stock quote request by the
+                    XSLT mediator. The XSLT mediator uses Xalan-J to perform the transformations.
+                    It is possible to configure the underlying transformation engine using properties
+                    when necessary. The response from the SimpleStockQuoteService is converted back
+                    into the custom format as expected by the client during the out message processing.
+                </p>
+                <p>
+                    During the response processing you could see the SimpleURLRegistry fetching the
+                    resource as shown by the log message below.
+                </p>
+                <div class="consoleOutput">[HttpClientWorker-1] DEBUG SimpleURLRegistry ==&gt; Repository fetch of resource with key : transform/transform_back.xslt</div>
+                <p>
+                    If you run the client again immediately (i.e within 15 seconds of the first
+                    request) you will not see the resource being reloaded by the registry as the
+                    cached value would be still valid.
+                </p>
+                <p>
+                    However if you leave the system idle for 15 seconds or more and then retry the
+                    same request, you will now notice that the registry notices the cached resource
+                    has expired and will reload the meta information about the resource to check if
+                    the resource has changed and will require a fresh fetch from the source URL.
+                    If the meta data / version number indicates that a reload of the cached resource
+                    is not necessary (i.e. unless the resource itself actually changed) the updated
+                    meta information is used and the cache lease extended as appropriate.
+                </p>
+                <div class="consoleOutput">[HttpClientWorker-1] DEBUG AbstractRegistry - Cached object has expired for key : transform/transform_back.xslt
+[HttpClientWorker-1] DEBUG SimpleURLRegistry - Perform RegistryEntry lookup for key : transform/transform_back.xslt
+[HttpClientWorker-1] DEBUG AbstractRegistry - Expired version number is same as current version in registry
+[HttpClientWorker-1] DEBUG AbstractRegistry - Renew cache lease for another 15s</div>
+                <p>
+                    Thus the SimpleURLRegistry allows resource to be cached, and updates are detected
+                    so that the configuration changes could be reloaded without restarting the
+                    Synapse instance.
+                </p>
+            </subsection>
+        </section>
+        <p><a href="../samples.html">Back to Catalog</a></p>        
+    </body>
+</document>
\ No newline at end of file
diff --git a/src/site/xdoc/userguide/samples/sample800.xml b/src/site/xdoc/userguide/samples/sample800.xml
new file mode 100644
index 0000000..c0df7eb
--- /dev/null
+++ b/src/site/xdoc/userguide/samples/sample800.xml
@@ -0,0 +1,121 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+  ~  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.
+  -->
+
+<document>
+    <properties>
+        <title>Apache Synapse - Sample 800</title>
+    </properties>
+    <body>
+        <section name="Sample 800: Introduction to REST APIs">
+            <div class="xmlConf">&lt;definitions xmlns="http://ws.apache.org/ns/synapse"&gt;
+&lt;api name="StockQuoteAPI" context="/stockquote"&gt;
+   &lt;resource uri-template="/view/{symbol}" methods="GET"&gt;
+      &lt;inSequence&gt;
+         &lt;payloadFactory&gt;
+	    &lt;format&gt;
+		&lt;m0:getQuote xmlns:m0="http://services.samples"&gt;
+	            &lt;m0:request&gt;
+        	       &lt;m0:symbol&gt;$1&lt;/m0:symbol&gt;
+	            &lt;/m0:request&gt;
+        	 &lt;/m0:getQuote&gt;
+	    &lt;/format&gt;
+	    &lt;args&gt;
+		&lt;arg expression="get-property('uri.var.symbol')"/&gt;
+	    &lt;/args&gt;
+	 &lt;/payloadFactory&gt;
+	 &lt;send&gt;
+	    &lt;endpoint&gt;
+		&lt;address uri="http://localhost:9000/services/SimpleStockQuoteService" format="soap11"/&gt;
+	    &lt;/endpoint&gt;
+	 &lt;/send&gt;
+      &lt;/inSequence&gt;
+      &lt;outSequence&gt;
+	 &lt;send/&gt;
+      &lt;/outSequence&gt;
+   &lt;/resource&gt;
+   &lt;resource url-pattern="/order/*" methods="POST"&gt;
+      &lt;inSequence&gt;
+        &lt;property name="FORCE_SC_ACCEPTED" value="true" scope="axis2"/&gt;
+	&lt;property name="OUT_ONLY" value="true"/&gt;
+	&lt;send&gt;
+            &lt;endpoint&gt;
+                &lt;address uri="http://localhost:9000/services/SimpleStockQuoteService" format="soap11"/&gt;
+            &lt;/endpoint&gt;
+         &lt;/send&gt;
+      &lt;/inSequence&gt;
+   &lt;/resource&gt;
+&lt;/api&gt;
+&lt;/definitions&gt;</div>
+            <subsection name="Objective">
+                <p>
+                    APIs in Synapse provide a convenient approach for receiving and processing
+                    REST traffic through the service bus. APIs can be used to receive specific
+                    types of RESTful invocations and then process them through a set of user
+                    defined resources. This sample is aimed at introducing the basic capabilities
+                    of APIs and how they are configured to front existing services.
+                </p>
+            </subsection>
+            <subsection name="Pre-requisites">
+                <p>
+                    <ul>
+                        <li>
+                            Deploy the SimpleStockQuoteService in the sample Axis2 server and start Axis2 Server
+                        </li>
+                        <li>
+                            Start Synapse using the configuration numbered 800 (repository/conf/sample/synapse_sample_800.xml)
+                            <div class="command">
+                                Unix/Linux: sh synapse.sh -sample 800<br/>
+                                Windows: synapse.bat -sample 800
+                            </div>
+                        </li>
+                    </ul>
+                </p>
+            </subsection>
+            <subsection name="Executing the REST Client">
+                <p>
+                    You might need a REST client like curl to test this
+                </p>
+                <div class="command">curl -v http://127.0.0.1:8280/stockquote/view/IBM</div>
+                <div class="command">curl -v http://127.0.0.1:8280/stockquote/view/MSFT</div>
+
+                <p>
+                    The above GET calls will be handled by the first resource in the StockQuoteAPI.
+                    These REST calls will get converted into SOAP calls and will be sent to the Axis2
+                    server. Response will be sent to the client in POX format.
+                </p>
+                <p>
+                    The following command POSTs a simple XML to the ESB. Save following sample place
+                    order request as  "placeorder.xml" file in your local file system and execute the
+                    command. That is used to invoke a SOAP service. ESB returns the 202 response back to the client.
+                </p>
+                <div class="command">curl -v -d @placeorder.xml -H "Content-type: application/xml" http://127.0.0.1:8280/stockquote/order/</div>
+
+                <div class="xmlConf">&lt;placeOrder xmlns="http://services.samples"&gt;
+  &lt;order&gt;
+     &lt;price&gt;50&lt;/price&gt;
+     &lt;quantity&gt;10&lt;/quantity&gt;
+     &lt;symbol&gt;IBM&lt;/symbol&gt;
+  &lt;/order&gt;
+&lt;/placeOrder&gt;</div>
+            </subsection>
+        </section>
+        <p><a href="../samples.html">Back to Catalog</a></p>
+    </body>
+</document>
\ No newline at end of file
diff --git a/src/site/xdoc/userguide/samples/sample9.xml b/src/site/xdoc/userguide/samples/sample9.xml
new file mode 100644
index 0000000..06354a0
--- /dev/null
+++ b/src/site/xdoc/userguide/samples/sample9.xml
@@ -0,0 +1,110 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+  ~  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.
+  -->
+
+<document>
+    <properties>
+        <title>Apache Synapse - Sample 9</title>
+    </properties>
+    <body>
+        <section name="Sample 9: Introduction to Dynamic Sequences with Registry">
+            <div class="xmlConf">&lt;definitions xmlns="http://ws.apache.org/ns/synapse"&gt;
+
+    &lt;registry provider="org.apache.synapse.registry.url.SimpleURLRegistry"&gt;
+        &lt;parameter name="root"&gt;file:./repository/conf/sample/resources/&lt;/parameter&gt;
+        &lt;parameter name="cachableDuration"&gt;15000&lt;/parameter&gt;
+    &lt;/registry&gt;
+
+    &lt;sequence name="main"&gt;
+        &lt;sequence key="sequence/dynamic_seq_1.xml"/&gt;
+    &lt;/sequence&gt;
+
+&lt;/definitions&gt;</div>
+            <subsection name="Objective">
+                <p>
+                    Demonstrating the ability to load sequence definitions dynamically from the
+                    remote registry.
+                </p>
+            </subsection>
+            <subsection name="Pre-requisites">
+                <p>
+                    <ul>
+                        <li>
+                            Deploy the SimpleStockQuoteService in the sample Axis2 server and start Axis2
+                        </li>
+                        <li>
+                            Start Synapse using the configuration numbered 9 (repository/conf/sample/synapse_sample_9.xml)
+                            <div class="command">
+                                Unix/Linux: sh synapse.sh -sample 9<br/>
+                                Windows: synapse.bat -sample 9
+                            </div>
+                        </li>
+                    </ul>
+                </p>
+            </subsection>
+            <subsection name="Executing the Client">
+                <p>
+                    This example demonstrates the dynamic behaviour of Synapse through the use of a
+                    registry. Synapse supports dynamic definitions for sequences and endpoints, and
+                    as seen before, for configuration resources (eg: schema files, XSLT files etc).
+                    In this example we define a Synapse configuration which references a sequence
+                    definition specified as a registry key. The registry key resolves to the actual
+                    content of the sequence which would be loaded dynamically by Synapse at runtime,
+                    and cached appropriately as per its definition in the registry. Once the cache
+                    expires, Synapse would re-check the meta information for the definition and
+                    re-load the sequence definition if necessary and re-cache it again.
+                </p>
+                <p>
+                    Execute the client as follows.
+                </p>
+                <div class="command">ant stockquote -Daddurl=http://localhost:9000/services/SimpleStockQuoteService -Dtrpurl=http://localhost:8280/</div>
+                <p>
+                    Go through the mediation debug logs to see how Synapse has dynamically loaded
+                    the sequence configurations from the registry.
+                </p>
+                <div class="consoleOutput">[HttpServerWorker-1] DEBUG  SimpleURLRegistry - ==&gt; Repository fetch of resource with key : sequence/dynamic_seq_1.xml
+...
+[HttpServerWorker-1] DEBUG SequenceMediator - Sequence mediator &lt;dynamic_sequence&gt; :: mediate()
+...
+[HttpServerWorker-1] INFO  LogMediator - message = *** Test Message 1 ***</div>
+                <p>
+                    Now if you execute the client immediately (i.e. within 15 seconds of the last
+                    execution) you will notice that the sequence is not reloaded. If you edit the
+                    sequence definition in repository/conf/sample/resources/sequence/dynamic_seq_1.xml
+                    (i.e. edit the log message to read as '*** Test Message 2 ***') and execute the
+                    client again, you will notice that the new message is not yet visible (i.e. if
+                    you execute this within 15 seconds of loading the resource for the first time).
+                    However, after 15 seconds elapsed since the original caching of the sequence,
+                    you will notice that the new sequence is loaded and executed by Synapse from the
+                    following log messages.
+                </p>
+                <div class="consoleOutput">[HttpServerWorker-1] DEBUG  SimpleURLRegistry - ==&gt; Repository fetch of resource with key : sequence/dynamic_seq_1.xml
+...
+[HttpServerWorker-1] DEBUG SequenceMediator - Sequence mediator &lt;dynamic_sequence&gt; :: mediate()
+...
+[HttpServerWorker-1] INFO  LogMediator - message = *** Test Message 2 ***</div>
+                <p>
+                    The cache timeout could be tuned appropriately by configuring the URL registry
+                    to suit the environment and the needs.
+                </p>
+            </subsection>
+        </section>
+        <p><a href="../samples.html">Back to Catalog</a></p>        
+    </body>
+</document>
\ No newline at end of file
diff --git a/src/site/xdoc/userguide/samples/setup/db.xml b/src/site/xdoc/userguide/samples/setup/db.xml
new file mode 100644
index 0000000..f1f5551
--- /dev/null
+++ b/src/site/xdoc/userguide/samples/setup/db.xml
@@ -0,0 +1,200 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+  ~  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.
+  -->
+
+<document>
+    <properties>
+        <title>Apache Synapse - Database Setup Guide</title>
+    </properties>
+    <body>
+        <section name="Database Setup Guide">
+            <p>
+                This document explains how to setup a database and some data sources as required
+                by the samples. Most samples require an Apache Derby installation whereas a few
+                would require a MySQL setup.
+            </p>
+        </section>
+        <section name="Contents">
+            <ul>
+                <li><a href="#intro">Introduction</a></li>
+                <li><a href="#derby">Setting Up Apache Derby</a></li>
+                <li><a href="#mysql">Setting Up MySQL</a></li>
+                <li><a href="#other">Using Other Database Engines</a></li>
+                <li><a href="#ds">Setting Up Data Sources</a></li>
+            </ul>
+        </section>
+        <section name="Introduction" id="intro">
+            <p>
+                Apache Synapse has the ability to lookup and update relational databases through
+                JDBC. Any database engine that provides JDBC drivers can be integrated with
+                Synapse using the dblookup and dbreport mediators. Synapse ships with a collection
+                of samples which demonstrates various aspects of dblookup, dbreport mediators and
+                database integration. This article describes how to setup the databases, sample
+                tables and reusable data sources required to try these examples out.
+            </p>
+            <p>
+                Most samples assume Apache Derby is used as the database engine. And therefore this
+                article also focuses mainly on setting up Apache Derby. Byt in reality
+                any database engine can be used to run these samples. The database schema and SQL
+                queries described here will work with any database engine. However in such cases
+                some minor changes should be made to the Synapse configuration files.
+            </p>
+            <p>
+                Some samples involve invoking database stored procedures from Synapse. For these
+                samples MySQL database engine is assumed. Therefore this article provides some
+                basic information on setting up MySQL for the example scenarios.
+            </p>
+        </section>
+        <section name="Setting Up Apache Derby" id="derby">
+            <p>
+                To start with, download the latest binary distribution of <a href="http://db.apache.org/derby/">Apache Derby</a>.
+                Extract the downloaded archive to a suitable location in the local disk and switch
+                to the 'bin' directory of the installation. Start the Derby network server by
+                executing the 'startNetworkServer' startup script. An output similar to the following
+                will be displayed as the database engine starts up.
+            </p>
+            <div class="consoleOutput">Sun Jan 02 10:53:28 IST 2011 : Security manager installed using the Basic server security policy.
+Sun Jan 02 10:53:30 IST 2011 : Apache Derby Network Server - 10.7.1.1 - (1040133) started and ready to accept connections on port 1527</div>
+            <p>
+                Now launch the Derby client tool by executing the 'ij' script. This will give a command
+                prompt where you can execute various command and SQL queries. Execute the following
+                connect statement to create a fresh database named 'synapsedb' and obtain a connection
+                to it.
+            </p>
+            <div class="command">CONNECT 'jdbc:derby://localhost:1527/synapsedb;user=synapse;password=synapse;create=true';</div>
+            <p>
+                Now execute the following SQL query to create a new table.
+            </p>
+            <div class="command">CREATE table company(name varchar(10), id varchar(10), price double);</div>
+            <p>
+                Insert some sample data to the table by executing following statements.
+            </p>
+            <div class="command">INSERT into company values ('IBM','c1',0.0);
+INSERT into company values ('SUN','c2',0.0);
+INSERT into company values ('MSFT','c3',0.0);</div>
+            <p>
+                Now we have finished setting up the Derby server for the samples. As the final step
+                we should copy the Derby JDBC drivers to Synapse 'lib' directory. Locate the following
+                jar files in Derby installation and copy them into Synapse.
+            </p>
+            <ul>
+                <li>derby.jar</li>
+                <li>derbyclient.jar</li>
+                <li>derbynet.jar</li>
+            </ul>
+        </section>
+        <section name="Setting Up MySQL" id="mysql">
+            <p>
+                This section assumes that you already have a MySQL server instance up and running.
+                For details on installing MySQL, please refer the relevant
+                <a href="http://dev.mysql.com/doc/refman/5.1/en/installing.html">MySQL documentation</a>.
+            </p>
+            <p>
+                Create a new database named 'synapsedb' in MySQL. Then execute the SQL queries
+                given in the previous section to create a table named 'company' and insert some
+                sample data into it. Then execute the following two commands in MySQL client to
+                create two stored procedures.
+            </p>
+            <div class="command">CREATE PROCEDURE getCompany(compName VARCHAR(10)) SELECT name, id, price FROM company WHERE name = compName;
+CREATE PROCEDURE updateCompany(compPrice DOUBLE,compName VARCHAR(10)) UPDATE company SET price = compPrice WHERE name = compName;</div>
+            <p>
+                Then you should download the <a href="http://www.mysql.com/products/connector/">MySQL JDBC driver</a>
+                and deploy it into the 'lib' directory of Synapse.
+            </p>
+        </section>
+        <section name="Using Other Database Engines" id="other">
+            <p>
+                You can run the given samples using any RDBMS engine you prefer. In that case please
+                make sure you do the following.
+            </p>
+            <ul>
+                <li>Deploy the JDBC drivers for your database engine into Synapse</li>
+                <li>
+                    Update the sample configuration files and change the driver class name and JDBC
+                    connection string correctly
+                </li>
+            </ul>
+        </section>
+        <section name="Setting Up Data Sources">
+            <p>
+                Synapse is capable of connecting to databases through predefined data sources.
+                This enables database connection pooling and connection reuse. Different instances
+                of the database mediators (dblookup/dbreport) can either use different data sources
+                or share the same data source.
+            </p>
+            <p>
+                Data sources are configured in the synapse.properties file which can be found in the
+                'lib' directory of the Synapse installation. Currently Synapse supports following
+                types of data sources.
+            </p>
+            <ul>
+                <li>BasicDataSource</li>
+                <li>PerUserPoolDataSource</li>
+            </ul>
+            <p>
+                Both these types of data sources are based on <a href="http://commons.apache.org/dbcp">Apache DBCP</a>.
+            </p>
+            <p>
+                Following section describes how to setup two data sources as required by some of the
+                database integration samples of Synapse. First, it is required to setup two
+                Derby databases. So launch 'ij' client tool for Derby and create two databases
+                named 'lookupdb' and 'reportdb'. Specify the username and password to be 'synapse'
+                for both databases. Create the 'company' table in each database and add some sample
+                data as described under <a href="#derby">Setting Up Apache Derby</a> section.
+            </p>
+            <p>
+                Now you can define two data sources for these databases by adding the following
+                entries to the synapse.properties file.
+            </p>
+            <div class="consoleOutput">synapse.datasources=lookupds,reportds
+synapse.datasources.icFactory=com.sun.jndi.rmi.registry.RegistryContextFactory
+synapse.datasources.providerUrl=rmi://localhost:2199
+synapse.datasources.providerPort=2199
+
+synapse.datasources.lookupds.type=BasicDataSource
+synapse.datasources.lookupds.driverClassName=org.apache.derby.jdbc.ClientDriver
+synapse.datasources.lookupds.url=jdbc:derby://localhost:1527/lookupdb;create=false
+synapse.datasources.lookupds.username=synapse
+synapse.datasources.lookupds.password=synapse
+synapse.datasources.lookupds.dsName=lookupdb
+synapse.datasources.lookupds.maxActive=100
+synapse.datasources.lookupds.maxIdle=20
+synapse.datasources.lookupds.maxWait=10000
+
+synapse.datasources.reportds.type=PerUserPoolDataSource
+synapse.datasources.reportds.cpdsadapter.factory=org.apache.commons.dbcp.cpdsadapter.DriverAdapterCPDS
+synapse.datasources.reportds.cpdsadapter.className=org.apache.commons.dbcp.cpdsadapter.DriverAdapterCPDS
+synapse.datasources.reportds.cpdsadapter.name=cpds
+synapse.datasources.reportds.dsName=reportdb
+synapse.datasources.reportds.driverClassName=org.apache.derby.jdbc.ClientDriver
+synapse.datasources.reportds.url=jdbc:derby://localhost:1527/reportdb;create=false
+synapse.datasources.reportds.username=synapse
+synapse.datasources.reportds.password=synapse
+synapse.datasources.reportds.maxActive=100
+synapse.datasources.reportds.maxIdle=20
+synapse.datasources.reportds.maxWait=10000</div>
+            <p>
+                Here we are defining two data sources named 'lookupds' and 'reportds'. The first
+                data source is defined as a BasicDataSource and the other one is defined as a
+                PerUserPoolDataSource. Note the various parameters we have specified for each
+                data source thereby further customizing the behavior of each data source.
+            </p>
+        </section>
+    </body>
+</document>
\ No newline at end of file
diff --git a/src/site/xdoc/userguide/samples/setup/fix.xml b/src/site/xdoc/userguide/samples/setup/fix.xml
new file mode 100644
index 0000000..b6cda54
--- /dev/null
+++ b/src/site/xdoc/userguide/samples/setup/fix.xml
@@ -0,0 +1,225 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+  ~  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.
+  -->
+
+<document>
+    <properties>
+        <title>Apache Synapse - FIX Setup Guide</title>
+    </properties>
+    <body>
+        <section name="FIX Setup Guide">
+            <p>
+                This document explains how to setup the FIX transport sender and listener
+                in Synapse as required by the samples. Further it describes how to setup the
+                sample FIX applications (Executor and Banzai) which are essential for trying
+                out the FIX samples.
+            </p>
+        </section>
+        <section name="Contents">
+            <ul>
+                <li><a href="#intro">Introduction</a></li>
+                <li><a href="#pre">Prerequisites</a></li>
+                <li><a href="#synapse">Enabling FIX Transport in Synapse</a></li>
+                <li><a href="#services">Configuring Services for FIX Transport</a></li>
+                <li>
+                    <a href="#samples">Setting Up the Sample FIX Applications</a>
+                    <ul>
+                        <li><a href="#exec">Configuring the Executor</a></li>
+                        <li><a href="#banzai">Configuring Banzai</a></li>
+                    </ul>
+                </li>
+                
+            </ul>
+        </section>
+        <section name="Introduction" id="intro">
+            <p>
+                <a href="http://www.fixprotocol.org">FIX (Financial Information eXchange)</a>
+                is a domain specific communication protocol widely used in the finance sector for
+                securities transactions. The protocol specification spans across the application layer
+                and the session layer of the OSI reference model of networking. Apache Synapse comes
+                with a FIX transport adapter which enables the Synapse ESB to communicate with FIX
+                acceptors and initiators. This allows users to seamlessly integrate FIX applications
+                together and even link FIX applications with other systems that use different protocols.
+            </p>
+            <p>
+                This article describes how to enable and configure the FIX transport listener and
+                sender for Apache Synapse. It also describes how to setup various sample FIX applications
+                required to try out the FIX protocol related examples.
+            </p>
+        </section>
+        <section name="Prerequisites" id="pre">
+            <p>
+                The FIX transport adapter of Synapse is built on top of the <a href="http://www.quickfixj.org">Quickfix/J</a>
+                open source FIX engine. Therefore the users must deploy the Quickfix/J libraries
+                into Synapse before using the FIX transport. Also in order to try out the FIX
+                samples described in this documentation, it is required to have the 2 sample FIX
+                applications (Banzai and Executor) that come bundled with Quickfix/J. Therefore as
+                the first step <a href="http://www.quickfixj.org/downloads/">download</a> the latest
+                binary distribution of Quickfix/J and extract the downloaded archive to a suitable
+                location on the local disk (let's refer to this location as QFJ_HOME).
+            </p>
+            <p>
+                All the necessary Quickfix/J libraries are available in the Quickfix/J binary
+                distribution. You have to copy the following jar files from Quickfix/J installation
+                to the 'lib' directory of Synapse.
+            </p>
+            <ul>
+                <li>quickfixj-core.jar</li>
+                <li>quickfixj-msg-fix40.jar</li>
+                <li>quickfixj-msg-fix41.jar</li>
+                <li>quickfixj-msg-fix42.jar</li>
+                <li>quickfixj-msg-fix43.jar</li>
+                <li>quickfixj-msg-fix44.jar</li>
+                <li>mina-core.jar</li>
+                <li>slf4j-api.jar</li>
+            </ul>
+            <p>
+                The last 2 jar files can be found in the QFJ_HOME/bin directory and all other
+                files should be available in the QFJ_HOME itself.
+            </p>
+        </section>
+        <section name="Enabling FIX Transport in Synapse" id="synapse">
+            <p>
+                FIX transport listener and the FIX transport sender of Synapse can be enabled by
+                uncommenting the following sections in the repository/conf/axis2.xml file.
+            </p>
+            <div class="xmlConf">&lt;transportReceiver name="fix" class="org.apache.synapse.transport.fix.FIXTransportListener"/&gt;</div>
+            <div class="xmlConf">&lt;transportSender name="fix" class="org.apache.synapse.transport.fix.FIXTransportSender"/&gt;</div>
+            <p>
+                This will initialize the FIX transport adapter and have it up and running to be
+                used by the proxy services. However some additional setting should be applied at
+                the service level before a service can make use of the FIX transport.
+            </p>
+        </section>
+        <section name="Configuring Services for FIX Transport" id="services">
+            <p>
+                When a service needs to be exposed over the FIX transport, we should add the
+                following parameter to the service configuration.
+            </p>
+            <div class="xmlConf">&lt;parameter name="transport.fix.AcceptorConfigURL"&gt;url&lt;/parameter&gt;</div>
+            <p>
+                The value of this parameter must be a valid URL which points to a Quickfix/J session
+                configuration file. All the FIX sample configurations are already equipped with this
+                parameter and they are pointing to the sample Quickfix/J configuration files that
+                comes with Synapse. These files can be found in the repository/sample/resources/fix
+                directory. One such configuration file (fix-synapse.cfg) is shown below.
+            </p>
+            <div class="consoleOutput">[default]
+FileStorePath=repository/fix/store/acceptor
+ConnectionType=acceptor
+StartTime=00:00:00
+EndTime=00:00:00
+HeartBtInt=30
+ValidOrderTypes=1,2,F
+SenderCompID=EXEC
+TargetCompID=SYNAPSE
+UseDataDictionary=Y
+DefaultMarketPrice=12.30
+
+[session]
+BeginString=FIX.4.0
+SocketAcceptPort=9876</div>
+            <p>
+                One of the most important parameters in this configuration is the SocketAcceptPort
+                setting. This defines the port used by the Synapse proxy service to receive
+                incoming FIX messages.
+            </p>
+            <p>
+                As far as the FIX samples are considered you don't have to make any changes to
+                these Quickfix/J configuration files or the Synapse sample configurations. Default
+                settings should work out of the box without any issues. However some samples may
+                require you to make minor changes to these files.
+            </p>
+        </section>
+        <section name="Setting Up the Sample FIX Applications" id="samples">
+            <p>
+                Two sample FIX applications are available in the Quickfix/J binray distribution
+                which can be used to send and receive FIX messages. By default these applications
+                are configured to directly communicate with each other. So we should make a few
+                modifications to the configuration to get them to communicate with Synapse. The
+                binaries of these sample programs are available in the quickfixj-examples.jar file
+                in QFJ_HOME. Startup scripts needed to run them can be found in the QFJ_HOME/bin
+                directory.
+            </p>
+            <subsection name="Configuring the Executor" id="exec">
+                <p>
+                    Executor is the sample acceptor program. To configure this application to
+                    receive messages from Synapse, put the following entries to a file named
+                    'executor.cfg'.
+                </p>
+                <div class="consoleOutput">[default]
+FileStorePath=examples/target/data/executor
+ConnectionType=acceptor
+StartTime=00:00:00
+EndTime=00:00:00
+HeartBtInt=30
+ValidOrderTypes=1,2,F
+SenderCompID=EXEC
+TargetCompID=SYNAPSE
+UseDataDictionary=Y
+DefaultMarketPrice=12.30
+
+[session]
+BeginString=FIX.4.0
+SocketAcceptPort=19876</div>
+                <p>
+                    Note that TargetCompID parameter has been set to 'SYNAPSE' and the port number
+                    has been set to 9876. You can launch the Executor using the above configuration
+                    as follows.
+                </p>
+                <div class="command">Unix/Linux: sh executor.sh &lt;path to executor.cfg&gt;<br/>
+Windows: executor.bat &lt;path to executor.cfg&gt;</div>
+                <p>
+                    For some samples you will have to make some minor modifications to this
+                    configuration file.
+                </p>
+            </subsection>
+            <subsection name="Configuring Banzai" id="banzai">
+                <p>
+                    Banzai is a sample FIX initiator that comes with Quickfix/J. This can be
+                    used to send FIX messages to a defined FIX acceptor. In case of samples,
+                    Synapse will act as the acceptor. In order to send messages to Synapse, we
+                    should start Banzai using the following configuration.
+                </p>
+                <div class="consoleOutput">[default]
+FileStorePath=examples/target/data/banzai
+ConnectionType=initiator
+SenderCompID=BANZAI
+TargetCompID=SYNAPSE
+SocketConnectHost=localhost
+StartTime=00:00:00
+EndTime=00:00:00
+HeartBtInt=30
+ReconnectInterval=5
+
+[session]
+BeginString=FIX.4.0
+SocketConnectPort=9876</div>
+                <p>
+                    Note that TargetCompID has been set to 'SYNAPSE' and the socket connect port
+                    is specified to be 9876, which is the port used by Synapse. To start Banzai
+                    with this configuration, save the above in a file named 'banzai.cfg' and
+                    launch the sample application as follows.
+                </p>
+                <div class="command">Unix/Linux: sh banzai.sh &lt;path to banzai.cfg&gt;<br/>
+Windows: banzai.bat &lt;path to banzai.cfg&gt;</div>
+            </subsection>
+        </section>
+    </body>
+</document>
\ No newline at end of file
diff --git a/src/site/xdoc/userguide/samples/setup/index.xml b/src/site/xdoc/userguide/samples/setup/index.xml
new file mode 100644
index 0000000..a0e6c93
--- /dev/null
+++ b/src/site/xdoc/userguide/samples/setup/index.xml
@@ -0,0 +1,390 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+  ~  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.
+  -->
+
+<document>
+    <properties>
+        <title>Apache Synapse - Samples Setup Guide</title>
+    </properties>
+    <body>
+        <section name="Introduction">
+            <p>
+                Apache Synapse comes with a collection of working examples that demonstrates the
+                basic features of the Synapse ESB. In addition to the sample configurations, a set
+                of sample client applications and services are provided which can be used to try out
+                each of the examples. Most examples are self contained and can be run without any third
+                party applications or libraries. A set of Ant build files and scripts are provided
+                to make setting up the examples easier. A few examples however require deploying
+                certain external libraries and using third party client applications.
+            </p>
+            <p>
+                The main objectives of this article are:
+                <ul>
+                    <li>Introduce the concept of Synapse samples</li>
+                    <li>Describe how to setup the environment for running samples</li>
+                    <li>Describe how to run the sample client applications and services</li>
+                    <li>Describe how to deploy third party libraries when required</li>
+                </ul>
+            </p>
+        </section>
+        <section name="Prerequisites">
+            <p>
+                Following applications are required to run any sample that comes with Synapse.
+                Please make sure you have them properly installed and configured in your system.
+            </p>
+            <ul>
+                <li>Java Development Kit version 1.5 or higher (1.6 recommended)</li>
+                <li><a href="http://ant.apache.org">Apache Ant</a> version 1.6.5 or higher</li>
+                <li>
+                    A command line interface such as 'Command Prompt' on Windows and the Bash shell
+                    on Unix/Linux systems
+                </li>
+            </ul>
+            <p>
+                When installing Java, make sure you setup the 'JAVA_HOME' environment variable
+                properly. Also adding the JAVA_HOME/bin directory to the system path will make
+                running the samples much easier.
+            </p>
+            <p>
+                In addition to the applications listed above, some samples require setting up few
+                other external resources such as JMS brokers and database engines. You can find the
+                relevant documentation under the '<a href="#Setting_Up_Additional_Resources">Setting Up Additional Features</a>'
+                section.
+            </p>
+            <p>
+                It is also advisable to run Synapse in the debug mode when trying out the example
+                configurations. This will give you important runtime status information that can be
+                used to better understand the functionality of Synapse. To enable the debug mode,
+                open up the lib/log4j.properties file and specify 'DEBUG' logging mode for the
+                'org.apache.synapse' package.
+            </p>
+            <div class="consoleOutput">log4j.category.org.apache.synapse=DEBUG</div>
+        </section>
+        <section name="Understanding the Samples">
+            <p>
+                A Synapse sample scenario is generally comprised of three elements.
+            </p>
+            <ul>
+                <li>
+                    Sample Synapse configuration (an XML configuration file given as the input
+                    of Synapse)
+                </li>
+                <li>
+                    Sample service (an Axis2 based Web Service to which Synapse will send messages)
+                </li>
+                <li>
+                    Sample client (an Axis2 based service client which is used to send requests to
+                    Synapse)
+                </li>
+            </ul>
+            <subsection name="Sample Synapse Configurations">
+                <p>
+                    All the sample Synapse configurations are housed under the repository/conf/sample
+                    directory. These configuration files are named in the following format.
+                </p>
+                <div class="consoleOutput">synapse_sample_n.xml</div>
+                <p>
+                    Here 'n' is a number which uniquely identifies the sample. This number can be passed
+                    as an argument to the Synapse startup script in order to start Synapse with a particular
+                    sample configuration. For an example to start Synapse with the configuration numbered
+                    100 (ie synapse_sample_100.xml) run one of the following commands in the command line
+                    interface.
+                </p>
+                <div class="command">
+                    Unix/Linux: sh synapse.sh -sample 100<br/>
+                    Windows: synapse.bat -sample 100
+                </div>
+            </subsection>
+            <subsection name="Sample Services">
+                <p>
+                    All the source of example services can be found in the samples/axis2Server/src directory.
+                    You will find the source code for following services in this directory.
+                </p>
+                <table>
+                    <tr>
+                        <th>Service</th>
+                        <th>Description</th>
+                    </tr>
+                    <tr>
+                        <td>SimpleStockQuoteService</td>
+                        <td>
+                            This service has four operations; getQuote (in-out), getFullQuote(in-out),
+                            getMarketActivity(in-out) and placeOrder (in-only). The getQuote operation
+                            will generate a sample stock quote for a given symbol. The getFullQuote
+                            operation will generate a history of stock quotes for the symbol for a
+                            number of days, and the getMarketActivity operation returns stock quotes
+                            for a list of given symbols. The placeOrder operation will accept a one
+                            way message for an order.
+                        </td>
+                    </tr>
+                    <tr>
+                        <td>SecureStockQuoteService</td>
+                        <td>
+                            This service is a clone of the SimpleStockQuoteService, but has
+                            WS-Security enabled and an attached security policy for signing and
+                            encryption of messages.
+                        </td>
+                    </tr>
+                    <tr>
+                        <td>ReliableStockQuoteService</td>
+                        <td>
+                            This service is a clone of the SimpleStockQuoteService, but has
+                            WS-ReliableMessaging enabled.
+                        </td>
+                    </tr>
+                    <tr>
+                        <td>MTOMSwASampleService</td>
+                        <td>
+                            This service has three operations uploadFileUsingMTOM(in-out),
+                            uploadFileUsingSwA(in-out) and oneWayUploadUsingMTOM(in-only) and
+                            demonstrates the use of MTOM and SwA. The uploadFileUsingMTOM and
+                            uploadFileUsingSwA operations accept a binary image from the SOAP request
+                            as MTOM and SwA, and returns this image back again as the response, while
+                            the oneWayUploadUsingMTOM saves the request message to disk.
+                        </td>
+                    </tr>
+                    <tr>
+                        <td>LoadbalanceFailoverService</td>
+                        <td>
+                            A simple web service that can be used to test state less as well as
+                            session aware load balancing scenarios.
+                        </td>
+                    </tr>
+                </table>
+                <p>
+                    You can compile and deploy any of these services into the provided sample Axis2
+                    server by switching to the corresponding directory and invoking 'ant'. For an
+                    example to setup the SimpleStockQuoteService, switch to the
+                    samples/axis2Server/src/SimpleStockQuoteService directory and run the 'ant'
+                    command. You will get an output similar to the following.
+                </p>
+                <div class="consoleOutput">user@host:/tmp/synapse-1.1/samples/axis2Server/src/SimpleStockQuoteService$ ant
+Buildfile: build.xml
+...
+build-service:
+   ....
+      [jar] Building jar: /tmp/synapse-1.1/samples/axis2Server/repository/services/SimpleStockQuoteService.aar
+
+BUILD SUCCESSFUL
+Total time: 3 seconds</div>
+                <p>
+                    To start the Axis2 server, go to the samples/axis2Server directory and execute
+                    the axis2server.sh or axis2server.bat script. This starts the Axis2 server with
+                    the HTTP transport listener on port 9000 and HTTPS on port 9002 respectively.
+                    For some samples it is required to enable additional transport listeners for the
+                    sample Axis2 server. The resources listed under '<a href="#Setting_Up_Additional_Resources">Setting Up Additional Features'</a>
+                    section provides more information on this.
+                </p>
+            </subsection>
+            <subsection name="Sample Client Applications">
+                <p>
+                    The client applications that come with Synapse are able to send SOAP, REST or
+                    POX messages over transports like HTTP/S and JMS. They also support WS-Addressing,
+                    WS-Security and WS-ReliableMessaging. Some sample clients can be used to send
+                    pure binary or plain text messages. They are also capable of sending optimized
+                    binary content using MTOM or SwA. Most sample scenarios involve invoking one
+                    of these clients to send messages to Synapse. Synapse will then mediate those
+                    requests and forward them to the sample services deployed on Axis2.
+                </p>
+                <p>
+                    The sample clients can be executed from the samples/axis2Client directory
+                    using the provided ant script. Simply executing 'ant' displays the available
+                    clients and some of the options used to configure them. The sample clients
+                    available are further described in the next section.
+                </p>
+            </subsection>
+        </section>
+        <section name="Sample Axis2 Clients">
+            <subsection name="Stock Quote Client">
+                <p>
+                    This is a simple SOAP client that can send stock quote requests, receive
+                    generated quotes and display the last sale price for a stock symbol.
+                </p>
+                <div class="command">ant stockquote [-Dsymbol=IBM|MSFT|SUN|..]
+  [-Dmode=quote | customquote | fullquote | placeorder | marketactivity]
+  [-Dsoapver=soap11 | soap12]
+  [-Daddurl=http://localhost:9000/services/SimpleStockQuoteService]
+  [-Dtrpurl=http://localhost:8280] [-Dprxurl=http://localhost:8280]
+  [-Dpolicy=../../repository/conf/sample/resources/policy/policy_1.xml]</div>
+                <p>
+                    The client is able to operate in the following modes, and send the payloads
+                    listed below as SOAP messages.
+                </p>
+                <table>
+                    <tr>
+                        <th>Mode</th>
+                        <th>Payload</th>
+                        <th>Description</th>
+                    </tr>
+                    <tr>
+                        <td>quote</td>
+                        <td>
+                            <div class="xmlConf">&lt;m:getQuote xmlns:m="http://services.samples"&gt;
+  &lt;m:request&gt;
+    &lt;m:symbol&gt;IBM&lt;/m:symbol&gt;
+  &lt;/m:request&gt;
+&lt;/m:getQuote&gt;</div>
+                        </td>
+                        <td>
+                            Sends a quote request for a single stock symbol. The response
+                            contains the last sales price for the stock which will be displayed on
+                            console.
+                        </td>
+                    </tr>
+                    <tr>
+                        <td>customquote</td>
+                        <td>
+                            <div class="xmlConf">&lt;m0:checkPriceRequest xmlns:m0="http://www.apache-synapse.org/test"&gt;
+  &lt;m0:Code&gt;symbol&lt;/m0:Code&gt;
+&lt;/m0:checkPriceRequest&gt;</div>
+                        </td>
+                        <td>
+                            Sends a quote request in a custom format. Synapse will transform this
+                            custom request to the standard stock quote request format and send it to
+                            the Axis2 service. Upon receipt of the response, it will be transformed
+                            again to a custom response format and returned to the client, which will
+                            then display the last sales price.
+                        </td>
+                    </tr>
+                    <tr>
+                        <td>fullquote</td>
+                        <td>
+                            <div class="xmlConf">&lt;m:getFullQuote xmlns:m="http://services.samples"&gt;
+  &lt;m:request&gt;
+    &lt;m:symbol&gt;IBM&lt;/m:symbol&gt;
+  &lt;/m:request&gt;
+&lt;/m:getFullQuote&gt;</div>
+                        </td>
+                        <td>
+                            Gets quote reports for a stock symbol over a number of days (i.e. last 100
+                            days of the year).
+                        </td>
+                    </tr>
+                    <tr>
+                        <td>placeorder</td>
+                        <td><div class="xmlConf">&lt;m:placeOrder xmlns:m="http://services.samples"&gt;
+  &lt;m:order&gt;
+    &lt;m:price&gt;3.141593E0&lt;/m:price&gt;
+    &lt;m:quantity&gt;4&lt;/m:quantity&gt;
+    &lt;m:symbol&gt;IBM&lt;/m:symbol&gt;
+  &lt;/m:order&gt;
+&lt;/m:placeOrder&gt;</div></td>
+                        <td>
+                            Places an order for stocks using a one way request.
+                        </td>
+                    </tr>
+                    <tr>
+                        <td>marketactivity</td>
+                        <td><div class="xmlConf">&lt;m:getMarketActivity xmlns:m="http://services.samples"&gt;
+  &lt;m:request&gt;
+    &lt;m:symbol&gt;IBM&lt;/m:symbol&gt;
+    ...
+    &lt;m:symbol&gt;MSFT&lt;/m:symbol&gt;
+  &lt;/m:request&gt;
+&lt;/m:getMarketActivity&gt;</div></td>
+                        <td>
+                             Gets a market activity report for the day (i.e. quotes for multiple
+                            symbols)
+                        </td>
+                    </tr>
+                </table>
+                <p>
+                    To run the stock quote client in a particular mode, pass the name of the mode
+                    as a system property as follows.
+                </p>
+                <div class="command">ant stockquote -Dmode=placeorder</div>
+                <p>
+                    Behavior of the sample Axis2 client can be further customized by using the 'addurl',
+                    'trpurl' and 'prxurl' parameters. These parameters enable the following modes of
+                    operation.
+                </p>
+                <h5>Smart Client Mode</h5>
+                <p>
+                    The 'addurl' property sets the WS-Addressing EPR, and the 'trpurl' sets a
+                    transport URL for a message. Thus by specifying both of these properties,
+                    the client can operate in the 'smart client' mode, where the addressing EPR can
+                    specify the ultimate receiver, while the transport URL set to Synapse will ensure
+                    that any necessary mediation takes place before the message is delivered to the
+                    ultimate receiver.
+                </p>
+                <div class="command">ant stockquote -Daddurl=&lt;addressingEPR&gt; -Dtrpurl=&lt;synapse&gt;</div>
+                <h5>Gateway/Dumb Client Mode</h5>
+                <p>
+                    By specifying only a transport URL, the client operates in the 'dumb client'
+                    mode, where it sends the message to Synapse and depends on the rules configured
+                    in Synapse for proper mediation and routing of the message to the ultimate
+                    destination.
+                </p>
+                <div class="command">ant stockquote -Dtrpurl=&lt;synapse&gt;</div>
+                <h5>Proxy Client Mode</h5>
+                <p>
+                    In this mode, the client uses the 'prxurl' as a HTTP proxy to send the request.
+                    Thus by setting the 'prxurl' to Synapse, the client can ensure that the message
+                    will reach Synapse for mediation. The client can optionally set a WS-Addressing
+                    EPR if required.
+                </p>
+                <div class="command">ant stockquote -Dprxurl=&lt;synapse&gt; [-Daddurl=&lt;addressingEPR&gt;]</div>
+            </subsection>
+            <subsection name="Generic JMS Client">
+                <p>
+                    The JMS client is able to send plain text, plain binary content or POX content
+                    by directly publishing a JMS message to the specified destination. The JMS
+                    destination name should be specified with the 'jms_dest' property. The 'jms_type'
+                    property can specify 'text', 'binary' or 'pox' to specify the type of message
+                    payload.
+                </p>
+                <p>
+                    The plain text payload for a 'text' message can be specified through the 'payload'
+                    property. For binary messages, the 'payload' property will contain the path to
+                    the binary file. For POX messages, the 'payload' property will hold a stock
+                    symbol name to be used within the POX request for stock order placement requests.
+                </p>
+                <div class="command">ant jmsclient -Djms_type=text -Djms_dest=dynamicQueues/JMSTextProxy -Djms_payload="24.34 100 IBM"
+ant jmsclient -Djms_type=pox -Djms_dest=dynamicQueues/JMSPoxProxy -Djms_payload=MSFT
+ant jmsclient -Djms_type=binary -Djms_dest=dynamicQueues/JMSFileUploadProxy
+                     -Djms_payload=./../../repository/conf/sample/resources/mtom/asf-logo.gif</div>
+                <p>
+                    The JMS client assumes the existence of a default ActiveMQ (v4.1.0 or above)
+                    installation on the local machine. Refer JMS setup guide for more details.
+                </p>
+            </subsection>
+            <subsection name="MTOM/SwA Client">
+                <p>
+                    The MTOM / SwA client is able to send a binary image file as a MTOM or SwA
+                    optimized message, and receive the same file again through the response and save
+                    it as a temporary file. The 'opt_mode' can specify 'mtom' or 'swa' respectively
+                    for the above mentioned optimizations. Optionally the path to a custom file can
+                    be specified through the 'opt_file' property, and the destination address can be
+                    changed through the 'opt_url' property if required.
+                </p>
+                <div class="command">ant optimizeclient -Dopt_mode=[mtom | swa]</div>
+            </subsection>
+        </section>
+        <section name="Setting Up Additional Features">
+            <ul>
+                <li><a href="jms.html">JMS Setup Guide</a></li>
+                <li><a href="fix.html">FIX Setup Guide</a></li>
+                <li><a href="tcp_udp.html">TCP/UDP Setup Guide</a></li>
+                <li><a href="db.html">Database Setup Guide</a></li>
+                <li><a href="script.html">Script Setup Guide</a></li>
+                <li><a href="mail.html">E-Mail Setup Guide</a></li>
+            </ul>
+        </section>
+    </body>
+</document>
diff --git a/src/site/xdoc/userguide/samples/setup/jms.xml b/src/site/xdoc/userguide/samples/setup/jms.xml
new file mode 100644
index 0000000..aaebce7
--- /dev/null
+++ b/src/site/xdoc/userguide/samples/setup/jms.xml
@@ -0,0 +1,198 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+  ~  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.
+  -->
+
+<document>
+    <properties>
+        <title>Apache Synapse - JMS Setup Guide</title>
+    </properties>
+    <body>
+        <section name="JMS Setup Guide">
+            <p>
+                This document explains how to setup the JMS transport sender and listener
+                as required by the samples. An Apache ActiveMQ instance is used as the JMS
+                provider for the samples.
+            </p>
+        </section>
+        <section name="Contents">
+            <ul>
+                <li><a href="#intro">Introduction</a></li>
+                <li><a href="#pre">Prerequisites</a></li>
+                <li>
+                    <a href="#synapse">Enabling JMS Support in Synapse</a>
+                    <ul>
+                        <li><a href="#listener">Enabling the JMS Listener</a></li>
+                        <li><a href="#sender">Enabling the JMS Sender</a></li>
+                    </ul>
+                </li>
+                <li><a href="#server">Enabling JMS Support in Axis2 Server</a></li>
+                <li><a href="#client">Enabling JMS Support in Axis2 Client</a></li>
+                <li><a href="#amqp">Configure Synapse for AMQP Transport</a></li>
+            </ul>
+        </section>
+        <section name="Introduction" id="intro">
+            <p>
+                Apache Synapse has exceptional support for JMS (Java Message Service). It uses JNDI
+                to connect to JMS brokers, and therefore works with any JMS provider that supports
+                JNDI. Synapse has been successfully tested with the following well-known JMS
+                providers.
+            </p>
+            <ul>
+                <li>Apache ActiveMQ</li>
+                <li>Apache Qpid (AMQP)</li>
+                <li>IBM WebsphereMQ</li>
+                <li>SwiftMQ</li>
+                <li>WebLogic</li>
+            </ul>
+            <p>
+                All the JMS related samples that come with Synapse assumes <a href="http://activemq.apache.org">ActiveMQ</a>
+                to be the JMS broker. But they can be executed with any other JMS provider by making
+                a few simple changes to the JMS transport configuration in Synapse.
+            </p>
+            <p>
+                This article explains how to enable and setup the JMS transport for Synapse, the sample
+                Axis2 server and the sample client programs. Since the samples are mainly focusing
+                on ActiveMQ, much of this discussion will also be biased towards Apache ActiveMQ.
+            </p>
+        </section>
+        <section name="Prerequisites" id="pre">
+            <p>
+                First we need to install and start a JMS broker. The actual installation procedure
+                of the JMS broker may vary depending on the broker application. If ActiveMQ is used
+                as the JMS broker, you can install and run the broker by following 3 simple steps
+                given below.
+            </p>
+            <ol>
+                <li><a href="http://activemq.apache.org/download.html">Download</a> the latest Apache ActiveMQ binary distribution</li>
+                <li>Extract the downloaded archive to a suitable location on the local disk</li>
+                <li>Switch to the 'bin' directory of the installation and execute the startup script</li>
+            </ol>
+            <p>
+                Next we need to deploy the JMS client libraries into Synapse. Client libraries are
+                also specific to the JMS broker being used. These jar files are usually available in
+                the binary distribution of the JMS broker. Third party libraries such as JMS client
+                libraries are deployed into Synapse by simply copying them into the 'lib' directory
+                of Synapse. Therefore if we are to use ActiveMQ as the JMS broker, the following jar
+                files which can be found in the 'lib' directory of ActiveMQ installation, should be
+                copied into the 'lib' directory of Synapse.
+            </p>
+            <ul>
+                <li>activemq-core.jar</li>
+                <li>geronimo-jms.jar</li>
+                <li>geronimo-j2ee-management.jar</li>
+            </ul>
+            <p>
+                Now we are all set to enable the JMS transport receiver and sender for Synapse and
+                other sample applications.
+            </p>
+        </section>
+        <section name="Enabling JMS Support in Synapse" id="synapse">
+            <p>
+                The JMS transport of Synapse consists of two main components.
+            </p>
+            <ul>
+                <li>JMS transport receiver (JMS listener)</li>
+                <li>JMS transport sender (JMS sender)</li>
+            </ul>
+            <subsection name="Enabling the JMS Listener" id="listener">
+                <p>
+                    If we want Synapse to receive messages from a JMS destination, then we should enable
+                    the JMS transport receiver of Synapse. This can be done by editing the axis2.xml file
+                    in the repository/conf directory and uncommenting the following XML fragment which
+                    defines the JMS transport receiver configuration.
+                </p>
+                <div class="xmlConf">&lt;!--Uncomment this and configure as appropriate for JMS transport support, after setting up your JMS environment (e.g. ActiveMQ)--&gt;
+&lt;transportReceiver name="jms" class="org.apache.synapse.transport.jms.JMSListener"&gt;
+    &lt;parameter name="myTopicConnectionFactory" locked="false"&gt;
+            &lt;parameter name="java.naming.factory.initial" locked="false"&gt;org.apache.activemq.jndi.ActiveMQInitialContextFactory&lt;/parameter&gt;
+            &lt;parameter name="java.naming.provider.url" locked="false"&gt;tcp://localhost:61616&lt;/parameter&gt;
+            &lt;parameter name="transport.jms.ConnectionFactoryJNDIName" locked="false"&gt;TopicConnectionFactory&lt;/parameter&gt;
+    &lt;/parameter&gt;
+
+    &lt;parameter name="myQueueConnectionFactory" locked="false"&gt;
+            &lt;parameter name="java.naming.factory.initial" locked="false"&gt;org.apache.activemq.jndi.ActiveMQInitialContextFactory&lt;/parameter&gt;
+            &lt;parameter name="java.naming.provider.url" locked="false"&gt;tcp://localhost:61616&lt;/parameter&gt;
+            &lt;parameter name="transport.jms.ConnectionFactoryJNDIName" locked="false"&gt;QueueConnectionFactory&lt;/parameter&gt;
+    &lt;/parameter&gt;
+
+    &lt;parameter name="default" locked="false"&gt;
+            &lt;parameter name="java.naming.factory.initial" locked="false"&gt;org.apache.activemq.jndi.ActiveMQInitialContextFactory&lt;/parameter&gt;
+            &lt;parameter name="java.naming.provider.url" locked="false"&gt;tcp://localhost:61616&lt;/parameter&gt;
+            &lt;parameter name="transport.jms.ConnectionFactoryJNDIName" locked="false"&gt;QueueConnectionFactory&lt;/parameter&gt;
+    &lt;/parameter&gt;
+&lt;/transportReceiver&gt;</div>
+                <p>
+                    Please note that above configuration is for the AcitveMQ broker. If you are using some
+                    other JMS provider, then the values of the parameters should be changed accordingly.
+                </p>
+            </subsection>
+            <subsection name="Enabling the JMS Sender" id="sender">
+                <p>
+                    If you want to configure Synapse to send out JMS messages, then the JMS transport
+                    sender must be enabled. This is done by uncommenting the following section in the
+                    repository/conf/axis2.xml file.
+                </p>
+                <div class="xmlConf">&lt;transportSender name="jms" class="org.apache.axis2.transport.jms.JMSSender"&gt;</div>
+                <p>
+                    Generally JMS transport sender is enabled by default in Synapse.
+                </p>
+                <p>
+                    Synapse also comes with a simple Ant script that can be used to easily setup
+                    and enable the JMS transport in Synapse. To try this out go to the samples/util
+                    directory and execute the following command.
+                </p>
+                <div class="command">ant setupActiveMQ -Dactivemq.home=<i>&lt;ActiveMQ home directory&gt;</i></div>
+                <p>
+                    This will copy the necessary dependencies into Synapse and update the axis2.xml
+                    file accordingly. Instead of providing the ActiveMQ installation path as a system
+                    property, you can opt to set the ACTIVEMQ_HOME environment variable too.
+                </p>
+            </subsection>
+        </section>
+        <section name="Enabling JMS Support in Axis2 Server" id="server">
+            <p>
+                Some of the Synapse samples involve Synapse sending messages to the Axis2 server
+                over JMS. For that we should enable the JMS transport listener and the sender for
+                the Axis2 server (sender is used to send back responses). Provided that all the
+                prerequisites are met, this can be done by uncommenting the JMS transport receiver
+                and sender configurations in the samples/axis2Server/repository/conf/axis2.xml file.
+                You will find that JMS sender is enabled for the Axis2 server by default.
+            </p>
+            <p>
+                You can also execute the following command from the samples/util directory to
+                enable the JMS transport for Axis2 in an automated fashion.
+            </p>
+            <div class="command">ant setupActiveMQ -Daxis2.xml=../axis2Server/repository/conf/axis2.xml</div>
+            <p>
+                As in the case of Synapse, the default JMS listener configurations given in the
+                above axis2.xml file are for ActiveMQ. For other brokers, configuration should be
+                updated accordingly.
+            </p>
+        </section>
+        <section name="Enabling JMS Support in Axis2 Client" id="client">
+            <p>
+                In some sample scenarios we have to send JMS requests using the Axis2 client.
+                In such cases we should enable the JMS transport sender for the sample client. This
+                can be done by uncommenting the JMS sender configuration in the
+                samples/axis2Client/client_repo/conf/axis2.xml file.  Generally this is enabled by
+                default and so you only need to meet the prerequisites described above.
+            </p>
+        </section>
+    </body>
+</document>
\ No newline at end of file
diff --git a/src/site/xdoc/userguide/samples/setup/mail.xml b/src/site/xdoc/userguide/samples/setup/mail.xml
new file mode 100644
index 0000000..d1ec9d4
--- /dev/null
+++ b/src/site/xdoc/userguide/samples/setup/mail.xml
@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!-- ~ 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. -->
+
+<document>
+	<properties>
+		<title>Apache Synapse - E-Mail Setup Guide</title>
+	</properties>
+	<body>
+        <section name="E-Mail Setup Guide">
+            <p>
+                This document explains how to setup the mail transport sender and listener
+                as required by the samples.
+            </p>
+        </section>
+		<section name="Contents">
+			<ul>
+				<li>
+					<a href="#mailTransportSender">Setting up Mail Transport Sender</a>
+				</li>
+				<li>
+					<a href="#mailTransportReceiver">Setting up Mail Transport Receiver</a>
+				</li>
+			</ul>
+		</section>
+		<section name="Setting up Mail Transport Sender"
+			id="mailTransportSender">
+			<p>
+			  To enable the mail transport sender for samples, you need to uncomment
+			  the mail transport sender configuration in the
+			  repository/conf/axis2.xml. Uncomment the mail transport sender sample
+			  configuration and make sure it points to a valid SMTP configuration for
+			  any actual scenarios. 
+			  <div class="xmlConf">&lt;transportSender name=&quot;mailto&quot; class=&quot;org.apache.synapse.transport.mail.MailTransportSender&quot;&gt;
+        &lt;parameter name=&quot;mail.smtp.host&quot;&gt;smtp.gmail.com&lt;/parameter&gt;
+        &lt;parameter name=&quot;mail.smtp.port&quot;&gt;587&lt;/parameter&gt;
+        &lt;parameter name=&quot;mail.smtp.starttls.enable&quot;&gt;true&lt;/parameter&gt;
+        &lt;parameter name=&quot;mail.smtp.auth&quot;&gt;true&lt;/parameter&gt;
+        &lt;parameter name=&quot;mail.smtp.user&quot;&gt;synapse.demo.0&lt;/parameter&gt;
+        &lt;parameter name=&quot;mail.smtp.password&quot;&gt;mailpassword&lt;/parameter&gt;
+        &lt;parameter name=&quot;mail.smtp.from&quot;&gt;synapse.demo.0@gmail.com&lt;/parameter&gt;
+&lt;/transportSender&gt;</div>
+			</p>
+		</section>
+		<section name="Setting up Mail Transport Receiver"
+			id="mailTransportReceiver">
+			<p>
+		     To enable the mail transport receiver for samples, you need to
+		     uncomment the mail transport receiver configuration in the
+			 configuration. Note: you need to provide correct parameters for a valid
+			 mail account at service level.
+			</p>
+			<div class="xmlConf">&lt;transportReceiver name=&quot;mailto&quot; class=&quot;org.apache.axis2.transport.mail.MailTransportListener&quot;&gt;&lt;/transportReceiver&gt;</div>
+		</section>
+	</body>
+</document>
\ No newline at end of file
diff --git a/src/site/xdoc/userguide/samples/setup/script.xml b/src/site/xdoc/userguide/samples/setup/script.xml
new file mode 100644
index 0000000..f8d1e15
--- /dev/null
+++ b/src/site/xdoc/userguide/samples/setup/script.xml
@@ -0,0 +1,110 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!-- ~ 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. -->
+
+<document>
+	<properties>
+		<title>Apache Synapse - Script Setup Guide</title>
+	</properties>
+	<body>
+        <section name="Script Setup Guide">
+            <p>
+                Apache Synapse ships with a set of scripting samples. This document explains
+                how to setup the necessary script engines for these samples. In addition this
+                guide describes how to setup the JSON message builder and formatter for JSON
+                mediation samples.
+            </p>
+        </section>
+		<section name="Contents">
+			<ul>
+				<li>
+					<a href="#intro">Introduction</a>
+				</li>
+				<li>
+					<a href="#javaScript">JavaScripts Support</a>
+				</li>
+				<li>
+					<a href="#ruby">Ruby Support</a>
+				</li>
+				<li>
+					<a href="#json">JSON Support</a>
+				</li>
+			</ul>
+		</section>
+		<section name="Configuring Synapse for Script Mediator Support"
+			id="intro">
+			<p>
+				The Synapse Script Mediator is a Synapse extension, and thus all
+				prerequisites are not bundled by default with the Synapse
+				distribution.Before you use some script mediators you may need to
+				manually add the required jar files to the Synapse lib directory, and
+				optionally 	perform other installation tasks as may be required by the
+				individual scripting language. This is explained in the following
+				sections.
+			</p>
+			<subsection name="JavaScript Support" id="javaScript">
+
+				<p>
+					The JavaScript/E4X support is enabled by default and comes
+					ready-to-use with the Synapse distribution.
+				</p>
+			</subsection>
+			<subsection name="Ruby Support" id="ruby">
+				<p>
+					For Ruby support you need to download the 'jruby-complete.jar'
+					from the Maven repository for JRuby, and copy it into the 'lib'
+					folder of Synapse . The JRuby JAR can be downloaded from
+					<a class="externalLink"
+						href="http://repo2.maven.org/maven2/org/jruby/jruby-complete/1.3.0/jruby-complete-1.3.0.jar">
+						here
+					</a>
+				</p>
+			</subsection>
+			<subsection name="JSON Support" id="json">
+				<p>
+					<a class="externalLink" href="http://json.org">JSON</a>
+					is a lightweight data-interchange format.
+					It can be used as an alternative to XML or SOAP. To enable the JSON
+					support in Synapse, following two jar files should be deployed into the 'lib'
+					directory of Synapse.
+				</p>
+				<ul>
+					<li>
+						<a class="externalLink" href="http://repo1.maven.org/maven2/org/apache/axis2/axis2-json">axis2-json.jar</a>
+					</li>
+					<li>
+						<a class="externalLink" href="http://jettison.codehaus.org/Download">jettison.jar</a>
+					</li>
+				</ul>
+                <p>
+                    Jettison 1.1 is recommended.
+                </p>
+				<p>
+      			Having deployed the necessary libraries you should now register the JSON message
+      			builder and formatter with Synapse. Open up 'repository/conf/axis2.xml' file
+      			of Synapse and add the following two entries under the 'messageBuilders' and
+      			'messageFormatters' sections respectively.
+    			</p>
+    			<div class="xmlConf">&lt;messageBuilder contentType=&quot;application/json&quot;
+    class=&quot;org.apache.axis2.json.JSONOMBuilder&quot;/&gt;
+
+&lt;messageFormatter contentType=&quot;application/json&quot;
+    class=&quot;org.apache.axis2.json.JSONMessageFormatter&quot;/&gt;</div>
+    			<p>
+                    If you are planning to run sample 440, you should also add the above two entries
+                    to the 'samples/axis2Client/client_repo/conf/axis2.xml' file.
+    			</p>
+			</subsection>
+
+		</section>
+	</body>
+</document>
\ No newline at end of file
diff --git a/src/site/xdoc/userguide/samples/setup/tcp_udp.xml b/src/site/xdoc/userguide/samples/setup/tcp_udp.xml
new file mode 100644
index 0000000..c09a156
--- /dev/null
+++ b/src/site/xdoc/userguide/samples/setup/tcp_udp.xml
@@ -0,0 +1,91 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+  ~  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.
+  -->
+
+<document>
+    <properties>
+        <title>Apache Synapse - TCP/UDP Setup Guide</title>
+    </properties>
+    <body>
+        <section name="TCP/UDP Setup Guide">
+            <p>
+                This document explains how to setup the transport sender and listener
+                for TCP/UDP transports required by the samples.
+            </p>
+        </section>
+        <section name="Contents">
+            <ul>
+                <li><a href="#intro">Introduction</a></li>
+                <li><a href="#tcp">Setting Up the TCP Transport</a></li>
+                <li><a href="#udp">Setting Up the UDP Transport</a></li>
+            </ul>
+        </section>
+        <section name="Introduction" id="intro">
+            <p>
+                Apache Synapse is capable of sending and receiving messages over raw TCP and UDP.
+                Any messages received over these transports can be mediated using the usual set of
+                mediators and can be forwarded over different protocols such as HTTP ans JMS. The
+                transport adapters for TCP and UDP are not available in the Synapse binary
+                distribution by default. This guide will help you to download and setup them in
+                Synapse ESB.
+            </p>
+        </section>
+        <section name="Setting Up the TCP Transport" id="tcp">
+            <p>
+                To enable the TCP transport for Synapse, first you need to download the Axis2 TCP
+                transport jar, and copy it to the 'lib' directory of Synapse. This library can be
+                downloaded from the <a href="http://ws.apache.org/commons/transport">WS-Commons Transports</a>
+                website. Then open up the axis2.xml file and uncomment the TCP transport receiver
+                and sender configurations.
+            </p>
+            <div class="xmlConf">&lt;transportReceiver name="tcp" class="org.apache.axis2.transport.tcp.TCPServer"&gt;
+    &lt;parameter name="port"&gt;6060&lt;/parameter&gt;
+&lt;/transportReceiver&gt;</div>
+            <div class="xmlConf">&lt;transportSender name="tcp" class="org.apache.axis2.transport.tcp.TCPTransportSender"/&gt;</div>
+            <p>
+                The above configuration enables Synapse to receive raw TCP messages on port 6060.
+                Since no application level headers are available on such requests, Synapse will be
+                solely depending on the addressing headers or the XML payload of the messages to
+                find the target service for TCP requests.
+            </p>
+            <p>
+                In some of the samples you will have to send raw TCP messages using the sample
+                Axis2 client. In that case you should enable the TCP transport sender for the
+                sample client. This can be done by uncommenting the following entry in the
+                samples/axis2Client/client_repo/conf/axis2.xml file.
+            </p>
+            <div class="xmlConf">&lt;transportSender name="tcp" class="org.apache.axis2.transport.tcp.TCPTransportSender"/&gt;</div>
+        </section>
+        <section name="Setting Up the UDP Transport" id="udp">
+            <p>
+                Enabling the UDP transport for Synapse is similar to enabling the TCP transport. You
+                should <a href="http://ws.apache.org/commons/transport">download</a> the Axis2 UDP
+                transport jar and copy it into 'lib' directory of Synapse. Then uncomment the
+                following entries in the repository/conf/axis2.xml file to enable the UDP listener
+                and sender.
+            </p>
+            <div class="xmlConf">&lt;transportReceiver name="udp" class="org.apache.axis2.transport.udp.UDPListener"/&gt;</div>
+            <div class="xmlConf">&lt;transportSender name="udp" class="org.apache.axis2.transport.udp.UDPSender"/&gt;</div>
+            <p>
+                To send UDP messages from the sample client, enable the UDP transport sender for the
+                client in samples/axis2Client/client_repo/conf/axis2.xml file.
+            </p>
+        </section>
+    </body>
+</document>
\ No newline at end of file
diff --git a/src/site/xdoc/userguide/samples/template.xml b/src/site/xdoc/userguide/samples/template.xml
new file mode 100644
index 0000000..ecc2a5f
--- /dev/null
+++ b/src/site/xdoc/userguide/samples/template.xml
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+  ~  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.
+  -->
+
+<document>
+    <properties>
+        <title>Apache Synapse - Sample X</title>
+    </properties>
+    <body>
+        <section name="Sample X: ">
+            <div class="xmlConf">
+
+            </div>
+            <subsection name="Objective">
+                <p>
+
+                </p>
+            </subsection>
+            <subsection name="Pre-requisites">
+                <p>
+                    <ul>
+                        <li>
+                            Deploy the SimpleStockQuoteService in the sample Axis2 server and start Axis2
+                        </li>
+                        <li>
+                            Start Synapse using the configuration numbered X (repository/conf/sample/synapse_sample_X.xml)
+                            <div class="command">
+                                Unix/Linux: sh synapse.sh -sample X<br/>
+                                Windows: synapse.bat -sample X
+                            </div>
+                        </li>
+                    </ul>
+                </p>
+            </subsection>
+            <subsection name="Executing the Client">
+                <div class="command">ant stockquote -Daddurl=http://localhost:9000/services/SimpleStockQuoteService -Dtrpurl=http://localhost:8280/</div>
+
+                <div class="consoleOutput">Sat Nov 18 21:01:23 IST 2006 SimpleStockQuoteService :: Generating quote for : IBM</div>
+
+                <div class="consoleOutput">Standard :: Stock price = $95.26454380258552</div>
+            </subsection>
+        </section>
+        <p><a href="../samples.html">Back to Catalog</a></p>        
+    </body>
+</document>
\ No newline at end of file
diff --git a/src/site/xdoc/userguide/transports.xml b/src/site/xdoc/userguide/transports.xml
new file mode 100644
index 0000000..dc5e340
--- /dev/null
+++ b/src/site/xdoc/userguide/transports.xml
@@ -0,0 +1,820 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+
+<!--
+  ~  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.
+  -->
+
+<document>
+    <properties>
+        <title>Apache Synapse - Transports Catalog</title>
+    </properties>
+	<body>
+		<section name="Transports Catalog" id="Introduction">
+			<p>
+                The Synapse project has developed a set of transport implementations that provide
+                protocol support and/or features that go beyond what is provided out of the box by
+                Axis2:
+			</p>
+			<ul>
+				<li>
+                    A non blocking HTTP transport that gives better performance in a highly
+                    asynchronous environment like Synapse.
+				</li>
+				<li>
+                    A VFS transport that can read messages from files and write outgoing messages to
+                    a file system. The file system can be local or remote, and several remote
+                    protocols are supported, such as FTP, SSH, WebDAV, etc.
+				</li>
+				<li>
+					A transport supporting the
+					<a class="externalLink" href="http://www.fixprotocol.org">Financial Information eXchange</a>
+					protocol. FIX is a public-domain messaging standard developed specifically for
+                    the real-time electronic exchange of securities transactions. It has a large user
+                    base and is developed by the collaborative effort of banks, broker-dealers,
+                    exchanges, industry utilities and associations, institutional investors, and IT
+                    providers around the world.
+				</li>
+			</ul>
+			<p>Note that while these transports are developed as part of the Synapse project,
+                they can be used with any Axis2 based application.
+			</p>
+			<p>
+				The Synapse distribution also comes bundled with the following transports from
+                the <a class="externalLink" href="http://axis.apache.org/axis2/java/transports/index.html">Axis2 Transport</a>
+				project:
+			</p>
+			<ul>
+				<li>
+					A
+					<a class="externalLink" href="http://axis.apache.org/axis2/java/transports/jms.html">JMS transport</a>
+					supporting any JMS 1.0 or 1.1 provider.
+				</li>
+				<li>
+					A
+					<a class="externalLink" href="http://axis.apache.org/axis2/java/transports/mail.html">Mail transport</a>
+					able to send messages using SMTP and poll messages from a POP3 or IMAP account.
+					<p>
+                        Apache Synapse is also compatible with the following transport implementations
+                        from the Apache Axis2 Transports project:
+					</p>
+				</li>
+				<li>
+					<a class="externalLink" href="http://axis.apache.org/axis2/java/transports/tcp-transport.html">TCP transport</a>
+				</li>
+				<li>
+					<a class="externalLink" href="http://axis.apache.org/axis2/java/transports/sms.html">SMS transport</a>
+				</li>
+				<li>UDP transport</li>
+				<li>
+					XMPP transport
+					<p>
+						These transports are not shipped with Apache Synapse by default and hence they
+                        should be
+						<a class="externalLink" href="http://axis.apache.org/axis2/java/transports/download.cgi">downloaded separately</a>
+						from the Axis2 transport website and installed in the Synapse runtime.
+					</p>
+				</li>
+			</ul>
+		</section>
+		<section name="Content" id="Content">
+			<ul>
+				<li>
+					<a href="#Introduction">Introduction</a>
+				</li>
+				<li>
+					<a href="#Contents">Contents</a>
+				</li>
+				<li>
+					<a href="#Non-blocking_HTTP_transport">Non-blocking HTTP transport</a>
+					<ul>
+						<li>
+							<a href="#Example_configurations">Example configurations</a>
+						</li>
+						<li>
+							<a href="#Transport_listener_parameters">Transport listener parameters</a>
+						</li>
+						<li>
+							<a href="#Transport_sender_parameters">Transport sender parameters</a>
+						</li>
+					</ul>
+				</li>
+				<li>
+					<a href="#VFS_transport">VFS transport</a>
+					<ul>
+						<li>
+							<a href="#Transport_listener">Transport listener</a>
+						</li>
+						<li>
+							<a href="#Transport_sender">Transport sender</a>
+						</li>
+						<li>
+							<a href="#Using_SFTP">Using SFTP</a>
+						</li>
+						<li>
+							<a href="#Known_issues">Known issues</a>
+						</li>
+					</ul>
+				</li>
+				<li>
+					<a href="#FIX_transport">FIX transport</a>
+					<ul>
+						<li>
+							<a href="#Setting_up_the_FIX_Transport">Setting up the FIX Transport</a>
+						</li>
+						<li>
+							<a href="#FIX_Transport_Parameters">FIX Transport Parameters</a>
+						</li>
+					</ul>
+				</li>
+			</ul>
+		</section>
+	    <section name="Non-blocking HTTP transport" id="Non-blocking_HTTP_transport">
+			<subsection name="Example configuration" id="Example_configurations">
+				<div class="xmlConf">&lt;transportReceiver name=&quot;http&quot; class=&quot;org.apache.synapse.transport.nhttp.HttpCoreNIOListener&quot;&gt;
+    &lt;parameter name=&quot;port&quot;&gt;8280&lt;/parameter&gt;
+    &lt;parameter name=&quot;non-blocking&quot;&gt;true&lt;/parameter&gt;
+&lt;/transportReceiver&gt;
+
+&lt;transportReceiver name=&quot;https&quot; class=&quot;org.apache.synapse.transport.nhttp.HttpCoreNIOSSLListener&quot;&gt;
+    &lt;parameter name=&quot;port&quot; locked=&quot;false&quot;&gt;8243&lt;/parameter&gt;
+    &lt;parameter name=&quot;non-blocking&quot; locked=&quot;false&quot;&gt;true&lt;/parameter&gt;
+    &lt;parameter name=&quot;keystore&quot; locked=&quot;false&quot;&gt;
+        &lt;KeyStore&gt;
+            &lt;Location&gt;lib/identity.jks&lt;/Location&gt;
+            &lt;Type&gt;JKS&lt;/Type&gt;
+            &lt;Password&gt;password&lt;/Password&gt;
+            &lt;KeyPassword&gt;password&lt;/KeyPassword&gt;
+        &lt;/KeyStore&gt;
+    &lt;/parameter&gt;
+    &lt;parameter name=&quot;truststore&quot; locked=&quot;false&quot;&gt;
+        &lt;TrustStore&gt;
+            &lt;Location&gt;lib/trust.jks&lt;/Location&gt;
+            &lt;Type&gt;JKS&lt;/Type&gt;
+            &lt;Password&gt;password&lt;/Password&gt;
+        &lt;/TrustStore&gt;
+    &lt;/parameter&gt;
+&lt;/transportReceiver&gt;
+
+&lt;transportSender name=&quot;http&quot;  class=&quot;org.apache.synapse.transport.nhttp.HttpCoreNIOSender&quot;&gt;
+    &lt;parameter name=&quot;non-blocking&quot; locked=&quot;false&quot;&gt;true&lt;/parameter&gt;
+    &lt;parameter name=&quot;warnOnHTTP500&quot; locked=&quot;false&quot;&gt;*&lt;/parameter&gt;
+&lt;/transportSender&gt;
+
+&lt;transportSender name=&quot;https&quot; class=&quot;org.apache.synapse.transport.nhttp.HttpCoreNIOSSLSender&quot;&gt;
+    &lt;parameter name=&quot;non-blocking&quot; locked=&quot;false&quot;&gt;true&lt;/parameter&gt;
+    &lt;parameter name=&quot;warnOnHTTP500&quot; locked=&quot;false&quot;&gt;*&lt;/parameter&gt;
+    &lt;parameter name=&quot;keystore&quot; locked=&quot;false&quot;&gt;
+        &lt;KeyStore&gt;
+            &lt;Location&gt;lib/identity.jks&lt;/Location&gt;
+            &lt;Type&gt;JKS&lt;/Type&gt;
+            &lt;Password&gt;password&lt;/Password&gt;
+            &lt;KeyPassword&gt;password&lt;/KeyPassword&gt;
+        &lt;/KeyStore&gt;
+    &lt;/parameter&gt;
+    &lt;parameter name=&quot;truststore&quot; locked=&quot;false&quot;&gt;
+        &lt;TrustStore&gt;
+            &lt;Location&gt;lib/trust.jks&lt;/Location&gt;
+            &lt;Type&gt;JKS&lt;/Type&gt;
+            &lt;Password&gt;password&lt;/Password&gt;
+        &lt;/TrustStore&gt;
+    &lt;/parameter&gt;
+&lt;/transportSender&gt;</div>
+			</subsection>
+			<subsection name="Transport listener parameters" id="Transport_listener_parameters">
+				<p>The following parameters are supported by both the HTTP and the HTTPS listener:</p>
+				<dl>
+					<dt>
+						<tt>port</tt>
+					</dt>
+					<dd>The TCP port to bind the listener to.</dd>
+					<dt>
+						<tt>bind-address</tt>
+					</dt>
+					<dd>
+                        The IP address to bind the listener to. This can be used on hosts that have
+                        more than one network interface or IP address to run multiple Synapse instances
+                        listening to the same port. If this parameter is not specified, the
+						listener will accept connections on any IP address.
+					</dd>
+					<dt>
+						<tt>hostname</tt>
+					</dt>
+					<dd>
+						The host name to use when computing endpoint references in generated WSDL files.
+                        The default value is the host name as provided by the operation system or
+						<tt>localhost</tt> if the host name can't be determined. The value of this
+                        parameter is ignored if <tt>WSDLEPRPrefix</tt> is specified.
+					</dd>
+					<dt>
+						<tt>WSDLEPRPrefix</tt>
+					</dt>
+					<dd>
+						The URL prefix to use when computing endpoint references in generated WSDL files.
+                        The value must be a valid URL with at least a protocol and host. If this value
+                        is unspecified, endpoint references will be computed based on the listener type
+                        (HTTP or HTTPS) and <tt>hostname</tt> and <tt>port</tt> parameters.
+						<p>
+							This parameter should be used if clients connect to Synapse through a frontend
+                            server, e.g. a (load balancing) Apache, and these clients rely on the address
+                            information in the WSDL documents exposed through <tt>...?wsdl</tt> URLs.
+						</p>
+					</dd>
+				</dl>
+				<p>The following parameters are specific to the HTTPS listener: </p>
+				<dl>
+					<dt>
+						<tt>keystore</tt>
+					</dt>
+					<dd>
+						The keystore configuration. The value of this parameter must be a
+						<tt>&lt;KeyStore&gt;</tt>
+						element as shown in the example configurations above.
+					</dd>
+					<dt>
+						<tt>truststore</tt>
+					</dt>
+					<dd>
+						The truststore configuration. The value of this parameter must be a
+						<tt>&lt;TrustStore&gt;</tt>
+						element as shown in the example configurations above.
+					</dd>
+					<dt>
+						<tt>SSLVerifyClient</tt>
+					</dt>
+					<dd>
+						This parameter has the same meaning as the corresponding
+						<a class="externalLink" href="http://httpd.apache.org/docs/2.2/mod/mod_ssl.html#sslverifyclient">mod_ssl directive</a>
+						and sets the desired certificate verification level for client authentication:
+						<ul>
+							<li>
+								<tt>none</tt> (default): no client certificate is required at all
+							</li>
+							<li>
+								<tt>optional</tt>: the client may present a valid certificate, but is
+                                not required to do so
+							</li>
+							<li>
+								<tt>require</tt>: the client has to present a valid certificate,
+                                otherwise the connection request will be terminated during SSL handshake
+							</li>
+						</ul>
+					</dd>
+				</dl>
+			</subsection>
+			<subsection name="Transport sender parameters" id="Transport_sender_parameters">
+				<p>
+                    The following property can be used to control based on content-types whether the
+                    HTTP/HTTPS sender shall output a warning for responses with HTTP status code 500.
+				</p>
+				<dl>
+					<dt>
+						<tt>warnOnHTTP500</tt>
+					</dt>
+					<dd>
+                        A list of content-types for which Synapse shall output a warning when receiving
+                        an HTTP 500 response (each value each separated by a |). By default Synapse
+                        outputs a warning for any HTTP 500 response, irrespective of the content-type.
+                        Consequently, also for each SOAP fault a warning will be logged. If only for
+                        specific content-types a warning shall be logged, please provide a |-separated
+                        list. To output the warning for messages which do not have a content-type set,
+                        please use the value 'none'.
+						<p>
+                            Example value: x-application/hessian|none
+                        </p>
+					</dd>
+				</dl>
+				<p>
+					The following properties can be used to configure the HTTP sender to use a proxy.
+                    They can be specified either as transport parameters in declared in
+					<tt>&lt;transportSender&gt;</tt> or as system properties.
+				</p>
+				<dl>
+					<dt>
+						<tt>http.proxyHost</tt>
+					</dt>
+					<dd>The host name or address of the proxy server.</dd>
+					<dt>
+						<tt>http.proxyPort</tt>
+					</dt>
+					<dd>The TCP port of the proxy server.</dd>
+					<dt>
+						<tt>http.nonProxyHosts</tt>
+					</dt>
+					<dd>
+						The hosts to which the HTTP sender should connect directly and not through
+                        the proxy server. The value can be a list of hosts, each separated by a |, and
+                        in addition a wildcard character (*) can be used for matching.
+						<p>
+							Example value:
+							<tt>*.foo.com|localhost</tt>
+						</p>
+					</dd>
+				</dl>
+				<p>Note that the HTTPS sender has no proxy support yet.</p>
+				<p>The following parameters are specific to the HTTP sender:</p>
+				<dl>
+					<dt>
+						<tt>keystore</tt>
+					</dt>
+					<dd>
+						The keystore configuration. The value of this parameter must be a
+						<tt>&lt;KeyStore&gt;</tt> element as shown in the example configurations
+                        above.
+					</dd>
+					<dt>
+						<tt>truststore</tt>
+					</dt>
+					<dd>
+						The truststore configuration. The value of this parameter must be a
+						<tt>&lt;TrustStore&gt;</tt>
+						element as shown in the example configurations above.
+					</dd>
+					<dt>
+						<tt>novalidatecert</tt>
+					</dt>
+					<dd>
+						When set to <tt>true</tt>, this parameter disables server certificate
+                        validation (trust). The default value is <tt>false</tt>. This parameter will
+                        be ignored if <tt>truststore</tt> is set.
+						<p>
+							Setting his parameter to <tt>true</tt>
+							is useful in development and test environments, but should not be used in
+                            production environments. If validation is disabled, a warning message will
+                            be logged at startup.
+						</p>
+					</dd>
+					<dt>
+						<tt>HostnameVerifier</tt>
+					</dt>
+					<dd>
+						This optional parameter specifies the policy to apply when checking that the
+                        hostname of the server matches the names stored inside the X.509 certificate
+                        presented by the server. Possible values are <tt>Strict</tt>, <tt>AllowAll</tt>
+                        and <tt>DefaultAndLocalhost</tt>. See the
+						<a href="../apidocs/org/apache/synapse/transport/nhttp/HostnameVerifier.html">HostnameVerifier Javadoc</a>
+						for more details.
+					</dd>
+				</dl>
+		</subsection>
+		</section>
+		 <section name="VFS transport" id="VFS_transport">
+			<subsection name="Transport listener" id="Transport_listener">
+		
+				<p>
+                    The VFS transport listener receives messages dropped in a given local or remote file
+                    system location. The location is specified by a URL that either identifies a single
+                    file or a directory. The transport listener will periodically poll the specified
+                    location and process any file(s) found. After a file has been processed it will be
+					deleted or moved to another location. Note that this is absolutely mandatory to
+                    prevent the listener from processing files multiple times. Therefore the VFS transport
+                    listener can only be used in situations where it has write access to the file system
+                    location and where deleting or moving the dropped files is acceptable.
+				</p>
+				<p>
+					The transport is based on
+					<a class="externalLink" href="http://commons.apache.org/vfs/">Apache Commons VFS</a>
+					and supports any protocol for which a VFS provider is available. The transport is
+                    pre-configured with providers for local files (
+					<tt>file:</tt>
+					scheme), HTTP, HTTPS, FTP and SFTP (i.e. file transfer over SSH).
+				</p>
+				<p>
+                    There is a fundamental difference between the VFS transport and transports such as
+                    HTTP and it is important to understand this difference to be able to use the VFS
+                    transport correctly. The HTTP transport binds to a single protocol endpoint, i.e.
+                    a TCP port on which it accepts incoming HTTP requests. These requests are then
+                    dispatched to the right service based on the request URI. On the other hand, the
+                    VFS transport only receives the payload of a message, but no additional information
+                    that could be used to dispatch the message to a service. This means that file system
+                    locations must be explicitly mapped to services. This is done using a set of service
+                    parameters.
+				</p>
+				<p>For Synapse this means that the VFS transport listener can only be used in
+                    conjunction with proxy services. The relevant service parameters are then specified
+                    as follows:
+				</p>
+				<div class="xmlConf">&lt;proxy name=&quot;MyVFSService&quot; transports=&quot;vfs&quot;&gt;
+    &lt;parameter name=&quot;transport.vfs.FileURI&quot;&gt;file:///var/spool/synapse/in&lt;/parameter&gt;
+    &lt;parameter name=&quot;transport.vfs.ContentType&quot;&gt;application/xml&lt;/parameter&gt;
+    ...
+    &lt;target&gt;
+	    ...
+    &lt;/target&gt;
+&lt;/proxy&gt;</div>
+				<p>
+					In this example the file system location
+					<tt>file:///var/spool/synapse/in</tt>
+					is explicitly bound to
+					<tt>MyVFSService</tt>
+					, i.e. any message dropped in that location will be predispatched to that service, bypassing any other configured
+					dispatch mechanisms that would apply to messages received through HTTP.
+				</p>
+				<p>The VFS transport recognizes the following service parameters:</p>
+				<dl>
+					<dt>
+						<tt>transport.vfs.FileURI</tt>(Required)
+					</dt>
+					<dd>
+                        The primary File (or Directory) URI in the vfs* transport format, for this
+                        service
+                    </dd>
+					<dt>
+						<tt>transport.vfs.ContentType</tt> (Required)
+					</dt>
+					<dd>
+						The expected content type for files retrieved for this service. The VFS
+                        transport uses this information to select the appropriate message builder.
+						<p>Examples:</p>
+						<ul>
+							<li>
+								<tt>text/xml</tt> for plain XML or SOAP
+							</li>
+							<li>
+								<tt>text/plain; charset=ISO-8859-1</tt> for text files
+							</li>
+							<li>
+								<tt>application/octet-stream</tt> for binary data
+							</li>
+						</ul>
+					</dd>
+					<dt>
+						<tt>transport.vfs.FileNamePattern</tt>
+						(Optional)
+					</dt>
+					<dd>
+                        A file name regex pattern to match files against a directory specified by
+                        the FileURI
+                    </dd>
+					<dt>
+						<tt>transport.PollInterval</tt> (Optional)
+					</dt>
+					<dd> The poll interval (in seconds)</dd>
+					<dt>
+						<tt>transport.vfs.ActionAfterProcess</tt> (Optional)
+					</dt>
+					<dd> DELETE or MOVE</dd>
+					<dt>
+						<tt>transport.vfs.MoveAfterProcess</tt> (Optional)
+					</dt>
+					<dd>
+                        The directory to move files after processing (i.e. all files process
+                        successfully)
+                    </dd>
+					<dt>
+						<tt>transport.vfs.ActionAfterErrors</tt> (Optional)
+					</dt>
+					<dd> DELETE or MOVE</dd>
+					<dt>
+						<tt>transport.vfs.MoveAfterErrors</tt> (Optional)
+					</dt>
+					<dd>
+                        The directory to move files after errors (i.e. some of the files succeed
+                        but some fail)
+                    </dd>
+					<dt>
+						<tt>transport.vfs.ActionAfterFailure</tt> (Optional)
+					</dt>
+					<dd> DELETE or MOVE</dd>
+					<dt>
+						<tt>transport.vfs.MoveAfterFailure</tt> (Optional)
+					</dt>
+					<dd> The directory to move after failure (i.e. all files fail)</dd>
+					<dt>
+						<tt>transport.vfs.ReplyFileURI</tt> (Optional)
+					</dt>
+					<dd> Reply file URI</dd>
+					<dt>
+						<tt>transport.vfs.ReplyFileName</tt> (Optional)
+					</dt>
+					<dd> Reply file name (defaults to response.xml)</dd>
+					<dt>
+						<tt>transport.vfs.MoveTimestampFormat</tt> (Optional)
+					</dt>
+					<dd>
+                        Timestamp prefix format for processed file name. java.text.SimpleDateFormat
+                        compatible string. e.g. yyMMddHHmmss'-'
+					</dd>
+					<dt>
+						<tt>transport.vfs.Locking</tt> (Optional)
+					</dt>
+					<dd>
+						By-default file locking is turned on in the VFS transport, and this parameter
+                        lets you configure the locking behaviour on a per service basis. Possible values are
+						<tt>enable</tt> or <tt>disable</tt>, and both these values are important because
+                        the locking can be disabled at the global level by specifying that at the
+                        receiver level and selectively enable locking only for a set of services.
+					</dd>
+					<dt>
+						<tt>transport.vfs.Streaming</tt> (Optional)
+					</dt>
+					<dd>
+						If this parameter is set to <tt>true</tt>, the transport will attempt to use a
+						<tt>javax.activation.DataSource</tt> (instead of a <tt>java.io.InputStream</tt>
+						) object to pass the content of the file to the message builder. Note that this
+                        is only supported by some message builders, e.g. for plain text and binary.
+						<p>
+                            This allows processing of the message without storing the entire content
+                            in memory. It also has two other side effects:
+						</p>
+						<ul>
+							<li>
+                                The incoming file (or connection in case of a remote file) will only
+                                be opened on demand.
+                            </li>
+							<li>
+                                Since the data is not cached, the file might be read several times.
+                            </li>
+						</ul>
+						<p>
+                            This option can be used to achieve streaming of large payloads. Note that
+                            this feature is still somewhat experimental and might be superseded by a
+                            more flexible mechanism in a future release.
+						</p>
+					</dd>
+				</dl>
+				<p>
+					Note that since the VFS endpoints are configured at the level of the service, the
+                    only parameter that is available at the listener is the file locking configuration
+                    parameter which is optional and the transport listener is enabled in
+					<tt>axis2.xml</tt>
+					simply as follows:
+				</p>
+				<div class="xmlConf">&lt;transportReceiver name=&quot;vfs&quot; class=&quot;org.apache.synapse.transport.vfs.VFSTransportListener&quot;&gt;
+    &lt;parameter name=&quot;transport.vfs.Locking&quot;&gt;enable | disable&lt;/parameter&gt; ?
+&lt;/transportReceiver&gt;</div>
+			</subsection>
+			<subsection name="Transport sender" id="Transport_sender">
+				<p>
+                    The VFS transport sender allows to write outgoing messages to local or remote files.
+                    As with the listener, the transport sender supports any protocol for which there
+                    is a VFS provider.
+				</p>
+				<p>
+					The sender is enabled be the following directive in
+					<tt>axis2.xml</tt> file locking which is by-default enabled can be configured
+                    using the <tt>transport.vfs.Locking</tt> parameter:
+				</p>
+				<div class="xmlConf">&lt;transportSender name=&quot;vfs&quot; class=&quot;org.apache.synapse.transport.vfs.VFSTransportSender&quot;&gt;
+    &lt;parameter name=&quot;transport.vfs.Locking&quot;&gt;enable | disable&lt;/parameter&gt; ?
+&lt;/transportSender&gt;</div>
+				<p>
+					To send a message using the VFS transport, the destination URI must start with
+					<tt>vfs:</tt> followed by a valid VFS URL. For example, in a Synapse mediation,
+                    one would use:
+				</p>
+				<div class="xmlConf">&lt;endpoint&gt;
+    &lt;address uri=&quot;vfs:file:///var/spool/synapse/out&quot;/&gt;
+&lt;/endpoint&gt;</div>
+				<p>
+					Other examples of valid VFS URLs are (see
+					<a class="externalLink" href="http://commons.apache.org/vfs/filesystems.html">http://commons.apache.org/vfs/filesystems.html</a>
+					for more samples):
+				</p>
+				<ul>
+					<li>
+						<tt>file:///directory/filename.ext</tt>
+					</li>
+					<li>
+						<tt>file:////somehost/someshare/afile.txt</tt>
+					</li>
+					<li>
+						<tt>jar:../lib/classes.jar!/META-INF/manifest.mf</tt>
+					</li>
+					<li>
+						<tt>jar:zip:outer.zip!/nested.jar!/somedir</tt>
+					</li>
+					<li>
+						<tt>ftp://myusername:mypassword@somehost/pub/downloads/somefile.tgz[?vfs.passive=true]</tt>
+					</li>
+				</ul>
+				<p>
+					The global configuration of the file locking can be overriden by providing the
+					<tt>transport.vfs.Locking</tt> as a URL parameter with the appropriate value (
+					<tt>enable</tt>, or <tt>disable</tt>) on a given endpoint.
+				</p>
+				<p>
+                    It should be noted that by its nature, the VFS transport sender doesn't support
+                    synchronous responses and should only be invoked using the out-only message
+                    exchange pattern. In a Synapse mediation, this can be forced using the
+					following mediator:
+				</p>
+				<div class="xmlConf">&lt;property action=&quot;set&quot; name=&quot;OUT_ONLY&quot; value=&quot;true&quot;/&gt;</div>
+			</subsection>
+			<subsection name="Using SFTP" id="Using_SFTP">
+				<p>
+                    To avoid man-in-the-middle attacks, SSH clients will only connect to hosts with
+                    a known host key. When connecting for the first time to an SSH server, a typical
+                    command line SSH client would request confirmation from the user to add the
+                    server and its fingerprint to the list of known hosts.
+				</p>
+				<p>
+					The VFS transports supports SFTP through the
+					<a class="externalLink" href="http://www.jcraft.com/jsch/">JSch</a>
+					library and this library also requires a list of known hosts. Since Synapse is
+                    not an interactive process, it can't request confirmation from the user and is
+                    therefore unable to automatically add a host to the list. This implies that the
+                    list of known hosts must be set up manually before the transport can connect.
+				</p>
+				<p>
+					Jsch loads the list of known hosts from a file called <tt>known_hosts</tt> in
+                    the <tt>.ssh</tt> sub-directory of the user's home directory, i.e. <tt>$HOME/.ssh</tt>
+					in Unix and <tt>%HOMEPATH%\.ssh</tt> in Windows. The location and format of this
+                    file are compatible with the <a class="externalLink" href="http://www.openssh.com/">OpenSSH</a>
+					client.
+				</p>
+				<p>
+					Since the file not only contains a list of host names but also the fingerprints
+                    of their host keys, the easiest way to add a new host to that file is to simply
+                    use the OpenSSH client to open an SSH session on the target host. The client will
+                    then ask to add the credentials to the <tt>known_hosts</tt> file. Note that if
+                    the SSH server is configured to only allow SFTP sessions, but no interactive
+                    sessions, the connection will actually fail. Since this doesn't rollback the
+                    change to the <tt>known_hosts</tt> file, this error can be ignored.
+				</p>
+			</subsection>
+			<subsection name="Known issues" id="Known_issues">
+				<p>
+                    The VFS listener will start reading a file as soon as it appears in the configured
+                    location. To avoid processing half written files, the creation of these files should
+                    be made atomic. On most platforms this can be achieved by writing the data to a
+                    temporary file and then moving the file to the target location. Note however that
+                    a move operation is only atomic if the source and destination are on the same
+                    physical file system. The location for the temporary file should be chosen with
+                    that constraint in mind.
+				</p>
+				<p>
+                    It should also be noted that the VFS transport sender doesn't create files atomically.
+                </p>
+			</subsection>
+		</section>
+		<section name="FIX transport" id="FIX_transport">
+			<p>A general overview about the FIX transport can be found in the following articles:</p>
+			<ul>
+				<li>
+					<a class="externalLink" href="http://wso2.org/library/3449">Apache Synapse FIX'ed</a>
+				</li>
+				<li>
+					<a class="externalLink" href="http://wso2.org/library/3837">Using the WSO2 ESB and FIX</a>
+					(also applies to Synapse)
+				</li>
+			</ul>
+			<subsection name="Setting up the FIX Transport" id="Setting_up_the_FIX_Transport">
+				<p>
+					To use the FIX transport, you need a local
+					<a class="externalLink" href="http://www.quickfixj.org">Quickfix/J</a>
+					installation. Download Quickfix/J from
+					<a class="externalLink" href="http://www.quickfixj.org/downloads">http://www.quickfixj.org/downloads</a>
+					.
+				</p>
+				<p>
+                    To enable the FIX transport, you need to uncomment the FIX transport sender and
+                    FIX transport receiver configurations in the SYNAPSE_HOME/repository/conf/axis2.xml.
+                    Simply locate and uncomment the FIXTransportSender and FIXTransportListener sample
+                    configurations. Also add the following jars to the Synapse class path
+					(SYNAPSE_HOME/lib directory).
+				</p>
+				<ul>
+					<li>quickfixj-core.jar</li>
+					<li>quickfixj-msg-fix40.jar</li>
+					<li>quickfixj-msg-fix41.jar</li>
+					<li>quickfixj-msg-fix42.jar</li>
+					<li>quickfixj-msg-fix43.jar</li>
+					<li>quickfixj-msg-fix44.jar</li>
+					<li>mina-core.jar</li>
+					<li>slf4j-api.jar</li>
+					<li>slf4j-jdk14.jar</li>
+				</ul>
+				<p>All these jars are shipped with the Quickfix/J binary distribution.</p>
+			</subsection>
+			<subsection name="FIX Transport Parameters" id="FIX_Transport_Parameters">
+				<p>
+                    This is the list of all parameters accepted by the FIX transport. Refer the
+                    sample 257 and 258 to see how some of them are used in practice.
+				</p>
+				<dl>
+					<dt>
+						<tt>transport.fix.AcceptorConfigURL</tt>
+					</dt>
+					<dd>
+                        If a service needs to listen to incoming FIX messages from a remote initiator
+                        then Synapse needs to create an acceptor. This parameter should contain the
+                        URL of the file which contains the FIX configuration for the acceptor.
+						(See sample 257)
+					</dd>
+					<dt>
+						<tt>transport.fix.InitiatorConfigURL</tt>
+					</dt>
+					<dd>
+                        If a service needs to send FIX messages to a remote acceptor Synapse should
+                        create an initiator. This parameter should contain the URL of the file which
+                        contains the FIX configuration for the initiator. (See sample 257)
+					</dd>
+					<dt>
+						<tt>transport.fix.AcceptorMessageStore</tt>
+					</dt>
+					<dd>
+                        The type of message store to be used with the acceptor. Allowed values for
+                        this parameter are 'file', 'jdbc', 'memory' and 'sleepycat'. If not specified
+                        memory based message store will be used by default. Additional parameters
+                        required to configure each of the message stores should be specified in the
+                        acceptor configuration file.
+					</dd>
+					<dt>
+						<tt>transport.fix.InitiatorMessageStore</tt>
+					</dt>
+					<dd>
+                        Same as the above but applies only for the initiators. Additional parameters
+                        required to configure each of the message stores should be specified in the
+                        initiator configuration file.
+					</dd>
+					<dt>
+						<tt>transport.fix.AcceptorLogFactory</tt>
+					</dt>
+					<dd>
+                        Specifies the transport level log factory to be used to log messages going
+                        through the acceptor. FIX messages are logged without putting them in SOAP
+                        envelopes at this level. Accepted values are 'console', 'file' and 'jdbc'.
+						If not specified no logging will be done at the transport level. Additional
+                        parameters required to configure each of the lof factories should be specified
+                        in the acceptor configuration file.
+					</dd>
+					<dt>
+						<tt>transport.fix.InitiatorLogFactory</tt>
+					</dt>
+					<dd>
+                        Specifies the transport level log factory to be used to log messages going
+                        through the initiator. Functionality is similar to the above. Additional
+                        parameters required to configure each of the lof factories should be specified
+						in the initiator configuration file.
+					</dd>
+					<dt>
+						<tt>transport.fix.ResponseDeliverToCompID</tt>
+					</dt>
+					<dd>
+                        If a response FIX message sent from Synapse to a remote FIX engine should be
+                        forwarded from the remote engine to another party this parameter can be used
+                        to set the DeliverToCompID field of the messages at Synapse.
+					</dd>
+					<dt>
+						<tt>transport.fix.ResponseDeliverToSubID</tt>
+					</dt>
+					<dd>
+                        If a response FIX message sent from Synapse to a remote FIX engine should be
+                        forwarded from the remote engine to another party this parameter can be used
+                        to set the DeliverToSubID field of the messages at Synapse.
+					</dd>
+					<dt>
+						<tt>transport.fix.ResponseDeliverToLocationID</tt>
+					</dt>
+					<dd>
+                        If a response FIX message sent from Synapse to a remote FIX engine should be
+                        forwarded from the remote engine to another party this parameter can be used
+                        to set the DeliverToLocationID field of the messages at Synapse.
+					</dd>
+					<dt>
+						<tt>transport.fix.ServiceName</tt>
+					</dt>
+					<dd>
+                        Used when messages coming over a different protocol has to be forwarded over
+                        FIX. The value must be equal to the name of the service and the scope must be
+                        'axis2-client' (See sample 258)
+					</dd>
+					<dt>
+						<tt>transport.fix.SendAllToInSequence</tt>
+					</dt>
+					<dd>
+                        When there are multiple responses to a FIX request and when we need only one
+                        of them to be sent to the original requester this parameter has to be set to
+                        'false'. This mostly comes handy when the original requester is communicating
+                        over a different protocol (like HTTP). If this parameter is not set to 'false'
+                        at such scenarios messages might get into a loop. (See sample 258)
+					</dd>
+					<dt>
+						<tt>transport.fix.BeginStringValidation</tt>
+					</dt>
+					<dd>
+                        When the FIX messages sent to Synapse should not be forwarded to a FIX session
+                        with a different BeginString value this parameter can be set to 'true'. Setting
+                        this parameter to 'true' will enforce this restriction.
+					</dd>
+				</dl>
+			</subsection>
+		</section>
+
+	</body>
+</document>
\ No newline at end of file
diff --git a/src/site/xdoc/userguide/upgrading.xml b/src/site/xdoc/userguide/upgrading.xml
new file mode 100644
index 0000000..817ddcf
--- /dev/null
+++ b/src/site/xdoc/userguide/upgrading.xml
@@ -0,0 +1,352 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+
+<!--
+  ~  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.
+  -->
+
+<document>
+    <properties>
+        <title>Apache Synapse - Upgrading to the Latest Version</title>
+    </properties>
+	<body>
+        <section name="Upgrading to the Latest Version">
+            <p>
+                If you are using an older version of Synapse (1.x) and now looking to migrate to
+                the latest versions (2.x) this document would be a good starting point. This
+                article provides information on steps that need to be carried out to smoothly
+                migrate from an older release of Synapse to the latest version.
+            </p>
+        </section>
+		<section name="Contents">
+				<ul>
+					<li>
+						<a href="#General_comments">General comments</a>
+					</li>
+					<li>
+						<a href="#Upgrading_from_1.2_to_2.1">Upgrading from 1.2 to 2.1</a>
+						<ul>
+							<li>
+								<a href="#Configuration_file_vs_multi_XML_configuration">Configuration file vs multi XML configuration</a>
+							</li>
+							<li>
+								<a href="#Endpoint_URLs_for_proxy_services">Endpoint URLs for proxy services</a>
+							</li>
+							<li>
+								<a href="#Mediator_Deployer">Mediator Deployer</a>
+							</li>
+							<li>
+								<a href="#Main_Sequence">Main Sequence</a>
+							</li>
+							<li>
+								<a href="#Filter_Mediator">Filter Mediator</a>
+							</li>
+							<li>
+								<a href="#Migration_Tool">Migration Tool</a>
+							</li>
+							<li>
+								<a href="#Custom_Extensions_and_API_changes">Custom Extensions and API changes</a>
+							</li>
+						</ul>
+					</li>
+				</ul>
+		</section>
+		<section name="General comments" id="General_comments">
+			<p>
+                If you are using custom extensions (mediators, startups, etc.) implemented in Java and
+				depending on Synapse APIs, you should go through the following process before upgrading
+				to a new release:
+			</p>
+			<ol type="1">
+				<li>
+                    Compile the extension with the libraries from the Synapse release you are
+					currently using and check for any deprecation warnings. You should change your
+                    code to eliminate all those warnings. In general the Javadoc of the
+					deprecated class or method gives you a hint on how to change your code. Test all
+                    your changes with your current Synapse release.
+				</li>
+				<li>
+                    Recompile and test the extension with the libraries from the new Synapse release.
+					We try to avoid to introduce incompatible changes to Synapse's core APIs between
+					releases (except if the related classes or methods were deprecated in the previous
+					release). However, it is not always possible to maintain compatibility. In addition
+					your code might depend on features that are not part of the core API. Therefore,
+                    even if you don't use deprecated methods and classes, there is no guarantee that
+                    your code will not break when upgrading to a new release and you always need to
+                    recompile and test them before deploying to the new release.
+				</li>
+				<li>
+                    Upgrade your Synapse installation and deploy the new version of your extensions.
+                </li>
+			</ol>
+			<p>
+                If you are skipping releases when upgrading your installation, you might nevertheless
+                want to go through the first step for all the intermediate releases. This will make
+                the migration easier.
+			</p>
+		</section>
+		
+		<section name="Upgrading from 1.2 to 2.1" id="Upgrading_from_1.2_to_2.1">
+			<subsection name="Configuration file vs multi XML configuration" id="Configuration_file_vs_multi_XML_configuration">
+				<p>
+                    In 1.2 you have been using a single synapse.xml file which resides on the
+                    repository/conf directory of the distribution, where as on 2.1 we have structured
+                    this into a configuration repository with multiple directories to have different
+                    artifact types and each and every artifact configuration to reside on a different
+                    files inside the desired repository directory. This repository directory on the 2.1
+					release resides in the repository/conf directory too, and named as synapse-config.
+					The repository directory structure inside the synapse-config directory
+					looks like follows;
+				</p>
+				<div class="xmlConf">synapse-config
+  /api
+  /endpoints
+  /event-sources
+  /local-entries
+  /priority-executors
+  /proxy-services
+  /sequences
+	 main.xml
+	 fault.xml
+  /tasks
+  /templates
+	 registry.xml
+	 synapse.xml</div>
+				<p>
+                    As you can see in the above sketch of the repository though it is a repository based
+					configuration, it also supports the old style single flat synapse.xml file in which
+                    case it has to reside inside the root of the repository.
+				</p>
+				<p>
+					So the easiest way to migrate the configuration is to move your already existing
+                    synapse.xml file in repository/conf directory in 1.2 version into the
+                    repository/conf/synapse-config directory of the 2.x version. <em>Note: When doing this
+                    migration you should also delete the main.xml and fault.xml files which are there on the
+                    sequences directory of the repository, otherwise there will be 2 main and fault
+                    sequences one coming from the sequences directory and the other coming from your just
+                    copied synapse.xml file.</em>
+				</p>
+			</subsection>
+			<subsection name="Endpoint URLs for proxy services" id="Endpoint_URLs_for_proxy_services">
+				<p>
+					In release 2.1 the endpoint URLs for proxy services have changed from
+					<tt>/soap</tt> to <tt>/services</tt>. E.g. <tt>http://localhost:8280/services/StockQuote</tt>
+					should be used instead of <tt>http://localhost:8280/soap/StockQuote</tt>.
+				</p>
+			</subsection>
+			<subsection name="MediatorDeployer" id="Mediator_Deployer">
+				<p>
+					Release 1.3 has enhanced capabilities for extension deployment. While in 1.2 extension
+					deployment was limited to mediators bundled as simple JAR files, 1.3 extended this
+                    support to tasks and defined a new archive format (XAR) that allows to bundle
+                    these extensions together with their dependency JARs (see
+					<a class="externalLink" href="http://issues.apache.org/jira/browse/SYNAPSE-377">SYNAPSE-377</a>
+					for more details). Enabling these features requires changes to the <tt>axis2.xml</tt>
+					configuration file. In 1.2 the deployer was configured as follows:
+				</p>
+				<div class="xmlConf">&lt;deployer extension=&quot;jar&quot; directory=&quot;mediators&quot;
+        class=&quot;org.apache.synapse.core.axis2.MediatorDeployer&quot;/&gt;</div>
+				<p>
+                    In 2.1 the suggested configuration is:
+                </p>
+				<div class="xmlConf">&lt;deployer extension=&quot;xar&quot; directory=&quot;extensions&quot;
+        class=&quot;org.apache.synapse.deployers.ExtensionDeployer&quot;/&gt; </div>
+				<p>
+                    It is possible to have multiple configuration entries for the extension deployer
+                    with different settings. For example, if you used the deployer in 1.2 you might
+                    want to have the following configuration:
+				</p>
+				<div class="xmlConf">&lt;deployer extension=&quot;jar&quot; directory=&quot;mediators&quot;
+        class=&quot;org.apache.synapse.deployers.ExtensionDeployer&quot;/&gt;
+&lt;deployer extension=&quot;xar&quot; directory=&quot;extensions&quot;
+	    class=&quot;org.apache.synapse.deployers.ExtensionDeployer&quot;/&gt;</div>
+			</subsection>
+			<subsection name="JMS transport" id="JMS_transport">
+				<p>
+					The way the JMS transport determines the content type of incoming messages has
+                    slightly changed between Synapse 1.2 and 2.x. The mechanism is also more flexible.
+                    See SYNAPSE-304 and SYNAPSE-424 for the reasons of this change and refer to the
+					<a class="externalLink" href="http://ws.apache.org/commons/transport/">WS-Commons Transport project</a>
+					for documentation.
+				</p>
+			</subsection>
+			<subsection name="Main Sequence" id="Main_Sequence">
+				<p>
+					On Synapse 1.2 you could have mediator configuration on the top level definitions
+                    tag and they were treated as the <strong>main</strong> sequence if there is no
+                    main sequence defined in the configuration. How ever removing the conflict of having
+                    top level mediators and a main sequence leading the synapse to fail to start on
+                    2.x Synapse configuration builder simply ignores the top level mediators. So you
+                    need to wrap the top level mediators, if there are any, with the sequence named
+					<strong>main</strong> on the new 2.1 version.
+				</p>
+				<p>
+					To further explain this lets have a look at the following valid configuration bit
+					(this is the sample 0 configuration) on the 1.2;
+					<div class="xmlConf">&lt;definitions xmlns=&quot;http://ws.apache.org/ns/synapse&quot;&gt;
+    &lt;!-- log all attributes of messages passing through --&gt;
+    &lt;log level=&quot;full&quot;/&gt;
+
+    &lt;!-- Send the message to implicit destination --&gt;
+    &lt;send/&gt;
+&lt;/definitions&gt;</div>
+					which needs to be changed to the following configuration on 2.1
+					<div class="xmlConf">&lt;definitions xmlns=&quot;http://ws.apache.org/ns/synapse&quot;&gt;
+
+    &lt;sequence name=&quot;main&quot;&gt;
+        &lt;!-- log all attributes of messages passing through --&gt;
+        &lt;log level=&quot;full&quot;/&gt;
+
+        &lt;!-- Send the message to implicit destination --&gt;
+        &lt;send/&gt;
+    &lt;sequence/&gt;
+
+&lt;/definitions&gt;</div>
+				</p>
+			</subsection>
+			<subsection name="Filter Mediator" id="Filter_Mediator">
+				<p>
+                    From 2.1 onwards Synapse filter mediator supports the else close as well, and hence
+					the filter matching set of mediators has to be enclosed within a &lt;then&gt; element.
+                </p>
+				<p>
+					If we consider the following sample from the 1.2 version of synapse;
+					<div class="xmlConf">&lt;filter source=&quot;get-property('To')&quot; regex=&quot;.*/StockQuote.*&quot;&gt;
+    &lt;send&gt;
+        &lt;endpoint&gt;
+            &lt;address uri=&quot;http://localhost:9000/soap/SimpleStockQuoteService&quot;/&gt;
+        &lt;/endpoint&gt;
+    &lt;/send&gt;
+    &lt;drop/&gt;
+&lt;/filter&gt;</div>
+					the equivalent configuration for the 2.1 release is going to be;
+					<div class="xmlConf">&lt;filter source=&quot;get-property('To')&quot; regex=&quot;.*/StockQuote.*&quot;&gt;
+    &lt;then&gt;
+        &lt;send&gt;
+            &lt;endpoint&gt;
+                &lt;address uri=&quot;http://localhost:9000/soap/SimpleStockQuoteService&quot;/&gt;
+            &lt;/endpoint&gt;
+        &lt;/send&gt;
+        &lt;drop/&gt;
+    &lt;then/&gt;
+&lt;/filter&gt;</div>
+					You could also add an else close to this conditional statement as follows on 2.x
+                    which is not possible on 1.2
+					<div class="xmlConf">&lt;filter source=&quot;get-property('To')&quot; regex=&quot;.*/StockQuote.*&quot;&gt;
+    &lt;then&gt;
+        &lt;send&gt;
+            &lt;endpoint&gt;
+                &lt;address uri=&quot;http://localhost:9000/soap/SimpleStockQuoteService&quot;/&gt;
+            &lt;/endpoint&gt;
+        &lt;/send&gt;
+        &lt;drop/&gt;
+    &lt;then/&gt;
+    &lt;else/&gt;
+        &lt;log/&gt;
+    &lt;else/&gt;
+&lt;/filter&gt;</div>
+				</p>
+			</subsection>
+			<subsection name="Migration Tool" id="Migration_Tool">
+				<p>
+                    In general it is recommended to run the configuration through the migration tool
+					provided with the Synapse 2.x release, on your synapse 1.2 configuration before
+                    using it with the 2.1.
+				</p>
+				<p>
+					To run the migration tool execute the synapse-config-migrator.sh by passing the
+					synapse.xml file location of the
+					1.2 configuration. Which will create the 2.1
+					compatible configuration with the .new suffix. For example;
+					<pre>sh bin/synapse-config-migrator.sh synapse-i1.2/repository/conf/synapse.xml</pre>
+				</p>
+			</subsection>
+			<subsection name="Custom Extensions and API changes" id="Custom_Extensions_and_API_changes">
+				<p>
+                    Even though there is a migration tool it just takes care of your configuration and not
+					custom extensions that you have done for example like CustomMediators or Tasks
+                    and so forth. There are some API changes that affect your custom extensions
+                    unfortunately. This section tries to list all the public API changes which affects
+                    the backward compatibility of the custom extensions that you have been running
+                    with the 1.2 version of Synapse.
+				</p>
+				<table class="bodyTable">
+					<tr class="a">
+						<th>Class</th>
+						<th>Method</th>
+						<th>Change Description</th>
+					</tr>
+					<tr class="b">
+						<td>
+							<a href="../apidocs/org/apache/synapse/config/xml/AbstractMediatorFactory.html">AbstractMediatorFactory</a>
+						</td>
+						<td>createMediator(OMElement)</td>
+						<td>
+							This was the method that you have been overwriting on the 1.2 version to
+							implement a new custom mediator factory to build the mediator by looking at
+							the XML configuration. On the 2.1 version you should be extending the
+							<a href="apidocs/org/apache/synapse/config/xml/AbstractMediatorFactory.html#createSpecificMediator(org.apache.axiom.om.OMElement,%20java.util.Properties)">createSpecificMediator(OMElement, Properties)</a>
+							. Note that in the process of changing the method to be extended, the method
+							<a href="apidocs/org/apache/synapse/config/xml/AbstractMediatorFactory.html#createMediator(org.apache.axiom.om.OMElement,%20java.util.Properties)">createMediator</a>
+							method has been changed to be final. From a users point of view of this
+                            interface he/she should be using the createMediator method which is what
+                            Synapse does.
+						</td>
+					</tr>
+					<tr class="a">
+						<td>
+							<a href="../apidocs/org/apache/synapse/config/xml/AbstractMediatorSerializer.html">AbstractMediatorSerializer</a>
+						</td>
+						<td>serializeMediator(Mediator)</td>
+						<td>
+							This was the method that you have been overwriting on the 1.2 version to
+							implement a new custom mediator serializer to serialize to the XML
+                            Configuration by walking through the mediator properties. On the 2.1
+                            version you should be extending the
+							<a href="apidocs/org/apache/synapse/config/xml/AbstractMediatorSerializer.html#serializeSpecificMediator(org.apache.synapse.Mediator)">serializeSpecificMediator(Mediator)</a>
+							. Note that in the process of changing the method to be extended, the method
+							<a href="apidocs/org/apache/synapse/config/xml/AbstractMediatorSerializer.html#serializeMediator(org.apache.axiom.om.OMElement,%20org.apache.synapse.Mediator)">serializeMediator</a>
+							method has been changed to be final. From a users point of view of this
+                            interface he/she should be using the serializeMediator method which is
+                            what Synapse does.
+						</td>
+					</tr>
+				</table>
+				<p>
+					Further to that if you have been using
+					<a href="../apidocs/org/apache/synapse/ServerManager.html">ServerManager</a>
+					class you may have noticed that the class is no more a singleton and doesn't have
+                    the static getInstance method. Also note that the common utilities like data
+                    sources JMX and RMI registration stuff have been moved to a new module with
+                    org.apache.synapse.commons package name.
+				</p>
+				<p>
+					On the configuration building front all entities are given a properties map to
+                    construct its instance and that has been used to pass in any additional information
+                    required like RESOLVE_ROOT, or SYNAPSE_HOME startup parameters. For example if you
+                    look at the
+					<a href="../apidocs/org/apache/synapse/config/xml/MediatorFactoryFinder.html">MediatorFactoryFinder</a>
+					class the
+					<a href="../apidocs/org/apache/synapse/config/xml/MediatorFactoryFinder.html#getMediator(org.apache.axiom.om.OMElement,%20java.util.Properties)">getMediator</a>
+					method is expecting a properties map apart from the OMElement argument.
+					It is safe to pass in a empty properties map if you are using these methods for
+                    any testing purposes or even in cases where you do not resolve dependencies.
+				</p>
+			</subsection>
+		</section>
+	</body>
+</document>
\ No newline at end of file