You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@synapse.apache.org by in...@apache.org on 2008/08/10 12:26:14 UTC

svn commit: r684446 [2/2] - in /synapse/trunk/java: modules/core/src/main/java/org/apache/synapse/registry/url/ repository/conf/sample/ repository/conf/sample/resources/script/ src/site/xdoc/ src/site/xdoc/1_0/

Modified: synapse/trunk/java/src/site/xdoc/Synapse_Samples.xml
URL: http://svn.apache.org/viewvc/synapse/trunk/java/src/site/xdoc/Synapse_Samples.xml?rev=684446&r1=684445&r2=684446&view=diff
==============================================================================
--- synapse/trunk/java/src/site/xdoc/Synapse_Samples.xml (original)
+++ synapse/trunk/java/src/site/xdoc/Synapse_Samples.xml Sun Aug 10 03:25:49 2008
@@ -1,12 +1,9 @@
 <?xml version="1.0"?>
-
 <document>
-    <properties>
-        <title>Apache Synapse - Samples Guide</title>
-    </properties>
-    <head>
-        <style type="text/css" xml:space="preserve">
-    .command {
+<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;
@@ -99,659 +96,384 @@
         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 - 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>
-          </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>
-          </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>
-          </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>
-          </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>
-              </ul>
-            </li>
-            <li>
-              <a href="#Throttle">Throtteling 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>
-              </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">Synchronize web service invocation with
-              Callout mediator </a>
-              <ul>
-                <li>
-                  <a href="#Sample430">Sample 430: Simple Callout Mediator
-                  for synchronize web service invocation</a>
-                </li>
-              </ul>
-            </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="http://ws.apache.org/ns/synapse"&gt;
+    }</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></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></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></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></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></ul></li>
+<li>
+<a href="#Throttle">Throtteling 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></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">Synchronize web service invocation with Callout mediator </a>
+<ul>
+<li>
+<a href="#Sample430">Sample 430: Simple Callout Mediator for synchronize web service invocation</a></li></ul></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="full"/&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 "full" 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>
+<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></br> </strong>Start the Synapse configuration numbered 0: e.g. synapse -sample 0
+<br></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>
+<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="http://ws.apache.org/ns/synapse"&gt;
+<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="get-property('To')" regex=".*/StockQuote.*"&gt;
+    &lt;filter source=&quot;get-property('To')&quot; regex=&quot;.*/StockQuote.*&quot;&gt;
         &lt;send&gt;
             &lt;endpoint&gt;
-                &lt;address uri="http://localhost:9000/services/SimpleStockQuoteService"/&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<br/>
-    </p>
-    <p>
-      Execute the Dumb Client as:
-    </p>
-<pre xml:space="preserve">ant stockquote -Dtrpurl=http://localhost:8280/services/StockQuote<br/></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 implicit 'send' mediator forwards the
-      response back to the client.
-    </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="http://ws.apache.org/ns/synapse"&gt;
-    &lt;switch source="//m0:getQuote/m0:request/m0:symbol" xmlns:m0="http://services.samples/xsd"&gt;
-        &lt;case regex="IBM"&gt;
+<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></br> Start the Synapse configuration numbered 1: i.e. synapse -sample 1
+<br></br> Start the Axis2 server and deploy the SimpleStockQuoteService if not already deployed
+<br></br> </p>
+<p>Execute the Dumb Client as: </p>
+<pre xml:space="preserve">ant stockquote -Dtrpurl=http://localhost:8280/services/StockQuote
+<br></br></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 implicit 'send' mediator forwards the response back to the client. </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/xsd&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="symbol" value="Great stock - IBM"/&gt;
+            &lt;property name=&quot;symbol&quot; value=&quot;Great stock - IBM&quot;/&gt;
         &lt;/case&gt;
-        &lt;case regex="MSFT"&gt;
-            &lt;property name="symbol" value="Are you sure? - MSFT"/&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="symbol"
-                  expression="fn:concat('Normal Stock - ', //m0:getQuote/m0:request/m0:symbol)"
-                  xmlns:m0="http://services.samples/xsd"/&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/xsd&quot;/&gt;
         &lt;/default&gt;
     &lt;/switch&gt;
 
-    &lt;log level="custom"&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="symbol" expression="get-property('symbol')"/&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="epr" expression="get-property('To')"/&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="http://ws.apache.org/ns/synapse"&gt;
+<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></br> Start the Synapse configuration numbered 2: i.e. synapse -sample 2
+<br></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="version"&gt;0.1&lt;/localEntry&gt;
+    &lt;localEntry key=&quot;version&quot;&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 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="stockquote"&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="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 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 "simple" endpoint definition --&gt;
+        &lt;!-- send message to real endpoint referenced by key &quot;simple&quot; endpoint definition --&gt;
         &lt;send&gt;
-            &lt;endpoint key="simple"/&gt;
+            &lt;endpoint key=&quot;simple&quot;/&gt;
         &lt;/send&gt;
     &lt;/sequence&gt;
 
-    &lt;sequence name="main"&gt;
+    &lt;sequence name=&quot;main&quot;&gt;
         &lt;in&gt;
-            &lt;property name="direction" value="incoming"/&gt;
-            &lt;sequence key="stockquote"/&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 "main" 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 "main" is executed. Then for the incoming message flow the &lt;in&gt;
-      mediator executes, and it calls the sequence named "stockquote".
-    </p>
+<p>
+<strong>Objective: Illustrates local registry entry definitions, reusable endpoints and sequences</strong> </p>
+<p>
+<strong>Prerequisites:</strong>
+<br></br> Start the Synapse configuration numbered 3: i.e. synapse -sample 3
+<br></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 "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 &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 "version" defines a simple text/string registry entry
-      for that which is visible to all messages that pass through Synapse.
-    </p>
+<pre xml:space="preserve">DEBUG SequenceMediator - Sequence mediator &lt;main&gt; :: mediate()
+<br></br>DEBUG InMediator - In mediator mediate()
+<br></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="http://ws.apache.org/ns/synapse"&gt;
+<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="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;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="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;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="main"&gt;
+    &lt;sequence name=&quot;main&quot;&gt;
         &lt;in&gt;
-            &lt;switch source="//m0:getQuote/m0:request/m0:symbol" xmlns:m0="http://services.samples/xsd"&gt;
-                &lt;case regex="IBM"&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;IBM&quot;&gt;
                     &lt;send&gt;
-                        &lt;endpoint&gt;&lt;address uri="http://localhost:9000/services/SimpleStockQuoteService"/&gt;&lt;/endpoint&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="MSFT"&gt;
+                &lt;case regex=&quot;MSFT&quot;&gt;
                     &lt;send&gt;
-                        &lt;endpoint key="bogus"/&gt;
+                        &lt;endpoint key=&quot;bogus&quot;/&gt;
                     &lt;/send&gt;
                 &lt;/case&gt;
-                &lt;case regex="SUN"&gt;
-                    &lt;sequence key="sunSequence"/&gt;
+                &lt;case regex=&quot;SUN&quot;&gt;
+                    &lt;sequence key=&quot;sunSequence&quot;/&gt;
                 &lt;/case&gt;
             &lt;/switch&gt;
             &lt;drop/&gt;
@@ -762,38 +484,21 @@
         &lt;/out&gt;
     &lt;/sequence&gt;
 
-&lt;sequence name="sunSequence" onError="sunErrorHandler"&gt;
+&lt;sequence name=&quot;sunSequence&quot; onError=&quot;sunErrorHandler&quot;&gt;
         &lt;send&gt;
-            &lt;endpoint key="sunPort"/&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>
+<p>
+<strong>Objective: Introduction to error handling with the 'fault' sequence</strong> </p>
+<p>
+<strong>Prerequisites:</strong>
+<br></br> Start the Synapse configuration numbered 4: i.e. synapse -sample 4
+<br></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
@@ -801,12 +506,7 @@
 [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 = Reference to non-existent endpoint for 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>
+<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
@@ -818,32 +518,30 @@
 [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 = Reference to non-existent endpoint for 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="http://ws.apache.org/ns/synapse"&gt;
-
-    &lt;sequence name="myFaultHandler"&gt;
-        &lt;makefault response="true"&gt;
-            &lt;code value="tns:Receiver" xmlns:tns="http://www.w3.org/2003/05/soap-envelope"/&gt;
-            &lt;reason expression="get-property('ERROR_MESSAGE')"/&gt;
+<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="main" onError="myFaultHandler"&gt;
+    &lt;sequence name=&quot;main&quot; onError=&quot;myFaultHandler&quot;&gt;
         &lt;in&gt;
-            &lt;switch source="//m0:getQuote/m0:request/m0:symbol"
-                    xmlns:m0="http://services.samples/xsd"&gt;
-                &lt;case regex="MSFT"&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="http://bogus:9000/services/NonExistentStockQuoteService"/&gt;&lt;/endpoint&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="SUN"&gt;
+                &lt;case regex=&quot;SUN&quot;&gt;
                     &lt;send&gt;
-                        &lt;endpoint&gt;&lt;address uri="http://localhost:9009/services/NonExistentStockQuoteService"/&gt;&lt;/endpoint&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;
@@ -856,80 +554,54 @@
     &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>
+<p>
+<strong>Objective: Makefault mediator and sending back error responses </strong> </p>
+<p>
+<strong>Prerequisites:</strong>
+<br></br> Start the Synapse configuration numbered 5: i.e. synapse -sample 5
+<br></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="http://schemas.xmlsoap.org/soap/envelope/"&gt;&lt;faultcode&gt;soapenv:Client&lt;/faultcode&gt;
+<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>
+<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="http://schemas.xmlsoap.org/soap/envelope/"&gt;&lt;faultcode&gt;soapenv:Client&lt;/faultcode&gt;
+<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="http://ws.apache.org/ns/synapse"&gt;
+<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="To" value="http://localhost:9000/services/SimpleStockQuoteService"/&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>
+<p>
+<strong>Objective: Introduction to header, in (out) mediators</strong> </p>
+<p>
+<strong>Prerequisites:</strong>
+<br></br> Start the Synapse configuration numbered 6: i.e. synapse -sample 6
+<br></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="http://ws.apache.org/ns/synapse"&gt;
-
-    &lt;localEntry key="validate_schema"&gt;
-        &lt;xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
-                    xmlns="http://www.apache-synapse.org/test" elementFormDefault="qualified"
-                    attributeFormDefault="unqualified"
-                    targetNamespace="http://services.samples/xsd"&gt;
-            &lt;xs:element name="getQuote"&gt;
+<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://www.apache-synapse.org/test&quot; elementFormDefault=&quot;qualified&quot;
+                    attributeFormDefault=&quot;unqualified&quot;
+                    targetNamespace=&quot;http://services.samples/xsd&quot;&gt;
+            &lt;xs:element name=&quot;getQuote&quot;&gt;
                 &lt;xs:complexType&gt;
                     &lt;xs:sequence&gt;
-                        &lt;xs:element name="request"&gt;
+                        &lt;xs:element name=&quot;request&quot;&gt;
                             &lt;xs:complexType&gt;
                                 &lt;xs:sequence&gt;
-                                    &lt;xs:element name="stocksymbol" type="xs:string"/&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;
@@ -941,537 +613,299 @@
 
     &lt;in&gt;
         &lt;validate&gt;
-            &lt;schema key="validate_schema"/&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="true"&gt;
-                    &lt;code value="tns:Receiver"
-                            xmlns:tns="http://www.w3.org/2003/05/soap-envelope"/&gt;
-                    &lt;reason value="Invalid custom quote request"/&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>
+<p>
+<strong>Objective: Introduction to local (static) registry entries and the validate mediator</strong> </p>
+<p>
+<strong>Prerequisites:</strong>
+<br></br> Start the Synapse configuration numbered 7: i.e. synapse -sample 7
+<br></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="http://ws.apache.org/ns/synapse"&gt;
+<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="org.apache.synapse.registry.url.SimpleURLRegistry"&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="root"&gt;file:./repository/conf/sample/resources/&lt;/parameter&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="cachableDuration"&gt;15000&lt;/parameter&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="xslt-key-req" src="file:repository/conf/sample/resources/transform/transform.xslt"/&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="xslt-key-req"/&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="transform/transform_back.xslt"/&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>
+<p>
+<strong>Objective: Introduction to static and dynamic registry resources and the XSLT mediator</strong> </p>
+<p>
+<strong>Prerequisites:</strong>
+<br></br> Start the Synapse configuration numbered 8: i.e. synapse -sample 8
+<br></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 ==> 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>
+<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>
+<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="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;
+<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 key="sequence/dynamic_seq_1.xml"/&gt;
+    &lt;sequence key=&quot;sequence/dynamic_seq_1.xml&quot;/&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>
+<p>
+<strong>Objective: Introduction to dynamic sequences with a registry</strong> </p>
+<p>
+<strong>Prerequisites:</strong>
+<br></br> Start the Synapse configuration numbered 9: i.e. synapse -sample 9
+<br></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 "*** 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>
+<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="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;
+<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="endpoint/dynamic_endpt_1.xml"/&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>
+<p>
+<strong>Objective: Introduction to dynamic endpoints with the Registry</strong> </p>
+<p>
+<strong>Prerequisites:</strong>
+<br></br> Start the Synapse configuration numbered 10: i.e. synapse -sample 10
+<br></br> Start the Axis2 server and deploy the SimpleStockQuoteService if not already done
+<br></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>
+<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
-      "http://localhost:9001/services/SimpleStockQuoteService". 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>

[... 5860 lines stripped ...]