Added: synapse/site/3_0_2/userguide/samples/sample500.html
URL: 
http://svn.apache.org/viewvc/synapse/site/3_0_2/userguide/samples/sample500.html?rev=1909775&view=auto
==============================================================================
--- synapse/site/3_0_2/userguide/samples/sample500.html (added)
+++ synapse/site/3_0_2/userguide/samples/sample500.html Fri May 12 16:09:34 2023
@@ -0,0 +1,232 @@
+<!DOCTYPE html>
+<!--
+ | Generated by Apache Maven Doxia Site Renderer 1.7.4 at 2023-05-04 
+ | Rendered using Apache Maven Fluido Skin 1.6
+-->
+<html xmlns="http://www.w3.org/1999/xhtml"; xml:lang="en" lang="en">
+  <head>
+    <meta charset="UTF-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+    <meta name="Date-Revision-yyyymmdd" content="20230504" />
+    <meta http-equiv="Content-Language" content="en" />
+    <title>Apache Synapse &#x2013; Apache Synapse - Sample 500</title>
+    <link rel="stylesheet" href="../../css/apache-maven-fluido-1.6.min.css" />
+    <link rel="stylesheet" href="../../css/site.css" />
+    <link rel="stylesheet" href="../../css/print.css" media="print" />
+      <script type="text/javascript" 
src="../../js/apache-maven-fluido-1.6.min.js"></script>
+      </head>
+    <body class="topBarDisabled">
+      <div class="container-fluid">
+      <div id="banner">
+        <div class="pull-left"><div id="bannerLeft"><h2>Apache Synapse</h2>
+</div>
+</div>
+        <div class="pull-right"></div>
+        <div class="clear"><hr/></div>
+      </div>
+
+      <div id="breadcrumbs">
+        <ul class="breadcrumb">
+        <li id="publishDate">Last Published: 2023-05-04<span 
class="divider">|</span>
+</li>
+          <li id="projectVersion">Version: 3.0.2</li>
+        </ul>
+      </div>
+      <div class="row-fluid">
+        <div id="leftColumn" class="span2">
+          <div class="well sidebar-nav">
+<ul class="nav nav-list">
+          <li class="nav-header">Main Menu</li>
+    <li><a href="../../index.html" title="Home"><span 
class="none"></span>Home</a>  </li>
+    <li><a href="../../download.html" title="Download"><span 
class="none"></span>Download</a>  </li>
+    <li><a href="../../history.html" title="History"><span 
class="none"></span>History</a>  </li>
+    <li><a href="http://www.apache.org/licenses/LICENSE-2.0"; 
class="externalLink" title="License"><span class="none"></span>License</a>  
</li>
+    <li><a href="http://www.apache.org/foundation/thanks.html"; 
class="externalLink" title="Thanks"><span class="none"></span>Thanks</a>  </li>
+    <li><a href="http://www.apache.org/foundation/sponsorship.html"; 
class="externalLink" title="Sponsorship"><span 
class="none"></span>Sponsorship</a>  </li>
+    <li><a href="http://www.apache.org/security/"; class="externalLink" 
title="Security"><span class="none"></span>Security</a>  </li>
+          <li class="nav-header">Documentation</li>
+    <li><a href="../../userguide/installation.html" title="Installation 
Guide"><span class="none"></span>Installation Guide</a>  </li>
+    <li><a href="../../userguide/quick_start.html" title="Quick Start 
Guide"><span class="none"></span>Quick Start Guide</a>  </li>
+    <li><a href="../../userguide/samples/setup/index.html" title="Samples 
Setup Guide"><span class="none"></span>Samples Setup Guide</a>  </li>
+    <li><a href="../../userguide/samples.html" title="Samples Catalog"><span 
class="none"></span>Samples Catalog</a>  </li>
+    <li><a href="../../userguide/config.html" title="Configuration 
Language"><span class="none"></span>Configuration Language</a>  </li>
+    <li><a href="../../userguide/mediators.html" title="Mediators 
Catalog"><span class="none"></span>Mediators Catalog</a>  </li>
+    <li><a href="../../userguide/transports.html" title="Transports 
Catalog"><span class="none"></span>Transports Catalog</a>  </li>
+    <li><a href="../../userguide/properties.html" title="Properties 
Catalog"><span class="none"></span>Properties Catalog</a>  </li>
+    <li><a href="../../userguide/xpath.html" title="XPath functions and 
Variables"><span class="none"></span>XPath functions and Variables</a>  </li>
+    <li><a href="../../userguide/extending.html" title="Extending 
Synapse"><span class="none"></span>Extending Synapse</a>  </li>
+    <li><a href="../../userguide/template_library.html" title="Synapse 
Template Libraries"><span class="none"></span>Synapse Template Libraries</a>  
</li>
+    <li><a href="../../userguide/upgrading.html" title="Upgrading"><span 
class="none"></span>Upgrading</a>  </li>
+    <li><a href="../../userguide/deployment.html" title="Deployment"><span 
class="none"></span>Deployment</a>  </li>
+    <li><a href="../../apidocs/" title="Javadocs"><span 
class="none"></span>Javadocs</a>  </li>
+    <li><a href="../../userguide/faq.html" title="FAQ"><span 
class="none"></span>FAQ</a>  </li>
+          <li class="nav-header">Developer Resources</li>
+    <li><a href="../../dev/developer-guide.html" title="Developer Guide"><span 
class="none"></span>Developer Guide</a>  </li>
+    <li><a href="../../dev/best-practices.html" title="Development Best 
Practices"><span class="none"></span>Development Best Practices</a>  </li>
+    <li><a href="../../dev/release-process.html" title="Release Process"><span 
class="none"></span>Release Process</a>  </li>
+          <li class="nav-header">Project Details</li>
+    <li><a href="../../project-info.html" title="Overview"><span 
class="none"></span>Overview</a>  </li>
+    <li><a href="../../mail-lists.html" title="Mailing Lists"><span 
class="none"></span>Mailing Lists</a>  </li>
+    <li><a href="../../source-repository.html" title="Source Repository"><span 
class="none"></span>Source Repository</a>  </li>
+    <li><a href="../../issue-tracking.html" title="Issue Tracking"><span 
class="none"></span>Issue Tracking</a>  </li>
+    <li><a href="../../dependency-management.html" title="Dependencies"><span 
class="none"></span>Dependencies</a>  </li>
+    <li><a href="../../team-list.html" title="Project Team"><span 
class="none"></span>Project Team</a>  </li>
+  </ul>
+          <hr />
+          <div id="poweredBy">
+              <div class="clear"></div>
+              <div class="clear"></div>
+              <div class="clear"></div>
+              <div class="clear"></div>
+  <a href="http://maven.apache.org/"; title="Built by Maven" 
class="poweredBy"><img class="builtBy" alt="Built by Maven" 
src="../../images/logos/maven-feather.png" /></a>
+              </div>
+          </div>
+        </div>
+        <div id="bodyColumn"  class="span10" >
+
+    
+        <div class="section">
+<h2><a name="Sample_500:_Introduction_to_Eventing"></a>Sample 500: 
Introduction to Eventing</h2>
+            
+<div class="xmlConf">&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;registryURL&quot; 
value=&quot;http://localhost:8180/wso2registry&quot;/&gt;
+          &lt;property name=&quot;username&quot; value=&quot;admin&quot;/&gt;
+          &lt;property name=&quot;password&quot; value=&quot;admin&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;</div>
+            
+<div class="section">
+<h3><a name="Objective"></a>Objective</h3>
+                
+<p>
+                    Demonstrate the use of the Eventing functionality built 
into Synapse
+                </p>
+            </div>
+            
+<div class="section">
+<h3><a name="Pre-requisites"></a>Pre-requisites</h3>
+                
+<p>
+                    </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>
+                
+            </div>
+            
+<div class="section">
+<h3><a name="Executing_the_Client"></a>Executing the Client</h3>
+                
+<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=&quot;http://apache.org/aip&quot;&gt;synapse/event/test&lt;/aip:Topic&gt;</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&gt;</i></div>
+                
+<p>
+                    To renew the subscription, invoke the client as follows.
+                </p>
+                
+<div class="command">ant eventsubscriber -Dmode=renew 
-Didentifier=<i>&lt;identifier&gt;</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&gt;</i></div>
+            </div>
+        </div>
+        
+<p><a href="../samples.html">Back to Catalog</a></p>        
+    
+
+        </div>
+      </div>
+    </div>
+    <hr/>
+    <footer>
+      <div class="container-fluid">
+        <div class="row-fluid">
+            <p>Copyright &copy;2005&#x2013;2023
+<a href="http://www.apache.org/";>Apache Software Foundation</a>.
+All rights reserved.</p>
+        </div>
+        </div>
+    </footer>
+    </body>
+</html>

Added: synapse/site/3_0_2/userguide/samples/sample501.html
URL: 
http://svn.apache.org/viewvc/synapse/site/3_0_2/userguide/samples/sample501.html?rev=1909775&view=auto
==============================================================================
--- synapse/site/3_0_2/userguide/samples/sample501.html (added)
+++ synapse/site/3_0_2/userguide/samples/sample501.html Fri May 12 16:09:34 2023
@@ -0,0 +1,196 @@
+<!DOCTYPE html>
+<!--
+ | Generated by Apache Maven Doxia Site Renderer 1.7.4 at 2023-05-04 
+ | Rendered using Apache Maven Fluido Skin 1.6
+-->
+<html xmlns="http://www.w3.org/1999/xhtml"; xml:lang="en" lang="en">
+  <head>
+    <meta charset="UTF-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+    <meta name="Date-Revision-yyyymmdd" content="20230504" />
+    <meta http-equiv="Content-Language" content="en" />
+    <title>Apache Synapse &#x2013; Apache Synapse - Sample 501</title>
+    <link rel="stylesheet" href="../../css/apache-maven-fluido-1.6.min.css" />
+    <link rel="stylesheet" href="../../css/site.css" />
+    <link rel="stylesheet" href="../../css/print.css" media="print" />
+      <script type="text/javascript" 
src="../../js/apache-maven-fluido-1.6.min.js"></script>
+      </head>
+    <body class="topBarDisabled">
+      <div class="container-fluid">
+      <div id="banner">
+        <div class="pull-left"><div id="bannerLeft"><h2>Apache Synapse</h2>
+</div>
+</div>
+        <div class="pull-right"></div>
+        <div class="clear"><hr/></div>
+      </div>
+
+      <div id="breadcrumbs">
+        <ul class="breadcrumb">
+        <li id="publishDate">Last Published: 2023-05-04<span 
class="divider">|</span>
+</li>
+          <li id="projectVersion">Version: 3.0.2</li>
+        </ul>
+      </div>
+      <div class="row-fluid">
+        <div id="leftColumn" class="span2">
+          <div class="well sidebar-nav">
+<ul class="nav nav-list">
+          <li class="nav-header">Main Menu</li>
+    <li><a href="../../index.html" title="Home"><span 
class="none"></span>Home</a>  </li>
+    <li><a href="../../download.html" title="Download"><span 
class="none"></span>Download</a>  </li>
+    <li><a href="../../history.html" title="History"><span 
class="none"></span>History</a>  </li>
+    <li><a href="http://www.apache.org/licenses/LICENSE-2.0"; 
class="externalLink" title="License"><span class="none"></span>License</a>  
</li>
+    <li><a href="http://www.apache.org/foundation/thanks.html"; 
class="externalLink" title="Thanks"><span class="none"></span>Thanks</a>  </li>
+    <li><a href="http://www.apache.org/foundation/sponsorship.html"; 
class="externalLink" title="Sponsorship"><span 
class="none"></span>Sponsorship</a>  </li>
+    <li><a href="http://www.apache.org/security/"; class="externalLink" 
title="Security"><span class="none"></span>Security</a>  </li>
+          <li class="nav-header">Documentation</li>
+    <li><a href="../../userguide/installation.html" title="Installation 
Guide"><span class="none"></span>Installation Guide</a>  </li>
+    <li><a href="../../userguide/quick_start.html" title="Quick Start 
Guide"><span class="none"></span>Quick Start Guide</a>  </li>
+    <li><a href="../../userguide/samples/setup/index.html" title="Samples 
Setup Guide"><span class="none"></span>Samples Setup Guide</a>  </li>
+    <li><a href="../../userguide/samples.html" title="Samples Catalog"><span 
class="none"></span>Samples Catalog</a>  </li>
+    <li><a href="../../userguide/config.html" title="Configuration 
Language"><span class="none"></span>Configuration Language</a>  </li>
+    <li><a href="../../userguide/mediators.html" title="Mediators 
Catalog"><span class="none"></span>Mediators Catalog</a>  </li>
+    <li><a href="../../userguide/transports.html" title="Transports 
Catalog"><span class="none"></span>Transports Catalog</a>  </li>
+    <li><a href="../../userguide/properties.html" title="Properties 
Catalog"><span class="none"></span>Properties Catalog</a>  </li>
+    <li><a href="../../userguide/xpath.html" title="XPath functions and 
Variables"><span class="none"></span>XPath functions and Variables</a>  </li>
+    <li><a href="../../userguide/extending.html" title="Extending 
Synapse"><span class="none"></span>Extending Synapse</a>  </li>
+    <li><a href="../../userguide/template_library.html" title="Synapse 
Template Libraries"><span class="none"></span>Synapse Template Libraries</a>  
</li>
+    <li><a href="../../userguide/upgrading.html" title="Upgrading"><span 
class="none"></span>Upgrading</a>  </li>
+    <li><a href="../../userguide/deployment.html" title="Deployment"><span 
class="none"></span>Deployment</a>  </li>
+    <li><a href="../../apidocs/" title="Javadocs"><span 
class="none"></span>Javadocs</a>  </li>
+    <li><a href="../../userguide/faq.html" title="FAQ"><span 
class="none"></span>FAQ</a>  </li>
+          <li class="nav-header">Developer Resources</li>
+    <li><a href="../../dev/developer-guide.html" title="Developer Guide"><span 
class="none"></span>Developer Guide</a>  </li>
+    <li><a href="../../dev/best-practices.html" title="Development Best 
Practices"><span class="none"></span>Development Best Practices</a>  </li>
+    <li><a href="../../dev/release-process.html" title="Release Process"><span 
class="none"></span>Release Process</a>  </li>
+          <li class="nav-header">Project Details</li>
+    <li><a href="../../project-info.html" title="Overview"><span 
class="none"></span>Overview</a>  </li>
+    <li><a href="../../mail-lists.html" title="Mailing Lists"><span 
class="none"></span>Mailing Lists</a>  </li>
+    <li><a href="../../source-repository.html" title="Source Repository"><span 
class="none"></span>Source Repository</a>  </li>
+    <li><a href="../../issue-tracking.html" title="Issue Tracking"><span 
class="none"></span>Issue Tracking</a>  </li>
+    <li><a href="../../dependency-management.html" title="Dependencies"><span 
class="none"></span>Dependencies</a>  </li>
+    <li><a href="../../team-list.html" title="Project Team"><span 
class="none"></span>Project Team</a>  </li>
+  </ul>
+          <hr />
+          <div id="poweredBy">
+              <div class="clear"></div>
+              <div class="clear"></div>
+              <div class="clear"></div>
+              <div class="clear"></div>
+  <a href="http://maven.apache.org/"; title="Built by Maven" 
class="poweredBy"><img class="builtBy" alt="Built by Maven" 
src="../../images/logos/maven-feather.png" /></a>
+              </div>
+          </div>
+        </div>
+        <div id="bodyColumn"  class="span10" >
+
+    
+        <div class="section">
+<h2><a name="Sample_501:_Event_Source_with_Static_Subscriptions"></a>Sample 
501: Event Source with Static Subscriptions</h2>
+            
+<div class="xmlConf">&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;registryURL&quot; 
value=&quot;http://localhost:8180/wso2registry&quot;/&gt;
+          &lt;property name=&quot;username&quot; value=&quot;admin&quot;/&gt;
+          &lt;property name=&quot;password&quot; value=&quot;admin&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;</div>
+            
+<div class="section">
+<h3><a name="Objective"></a>Objective</h3>
+                
+<p>
+                    Showcase how to use a predefined set of static 
subscriptions with Synapse
+                </p>
+            </div>
+            
+<div class="section">
+<h3><a name="Pre-requisites"></a>Pre-requisites</h3>
+                
+<p>
+                    </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>
+                
+            </div>
+            
+<div class="section">
+<h3><a name="Executing_the_Client"></a>Executing the Client</h3>
+                
+<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>
+            </div>
+        </div>
+        
+<p><a href="../samples.html">Back to Catalog</a></p>        
+    
+
+        </div>
+      </div>
+    </div>
+    <hr/>
+    <footer>
+      <div class="container-fluid">
+        <div class="row-fluid">
+            <p>Copyright &copy;2005&#x2013;2023
+<a href="http://www.apache.org/";>Apache Software Foundation</a>.
+All rights reserved.</p>
+        </div>
+        </div>
+    </footer>
+    </body>
+</html>

Added: synapse/site/3_0_2/userguide/samples/sample502.html
URL: 
http://svn.apache.org/viewvc/synapse/site/3_0_2/userguide/samples/sample502.html?rev=1909775&view=auto
==============================================================================
--- synapse/site/3_0_2/userguide/samples/sample502.html (added)
+++ synapse/site/3_0_2/userguide/samples/sample502.html Fri May 12 16:09:34 2023
@@ -0,0 +1,193 @@
+<!DOCTYPE html>
+<!--
+ | Generated by Apache Maven Doxia Site Renderer 1.7.4 at 2023-05-04 
+ | Rendered using Apache Maven Fluido Skin 1.6
+-->
+<html xmlns="http://www.w3.org/1999/xhtml"; xml:lang="en" lang="en">
+  <head>
+    <meta charset="UTF-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+    <meta name="Date-Revision-yyyymmdd" content="20230504" />
+    <meta http-equiv="Content-Language" content="en" />
+    <title>Apache Synapse &#x2013; Apache Synapse - Sample 502</title>
+    <link rel="stylesheet" href="../../css/apache-maven-fluido-1.6.min.css" />
+    <link rel="stylesheet" href="../../css/site.css" />
+    <link rel="stylesheet" href="../../css/print.css" media="print" />
+      <script type="text/javascript" 
src="../../js/apache-maven-fluido-1.6.min.js"></script>
+      </head>
+    <body class="topBarDisabled">
+      <div class="container-fluid">
+      <div id="banner">
+        <div class="pull-left"><div id="bannerLeft"><h2>Apache Synapse</h2>
+</div>
+</div>
+        <div class="pull-right"></div>
+        <div class="clear"><hr/></div>
+      </div>
+
+      <div id="breadcrumbs">
+        <ul class="breadcrumb">
+        <li id="publishDate">Last Published: 2023-05-04<span 
class="divider">|</span>
+</li>
+          <li id="projectVersion">Version: 3.0.2</li>
+        </ul>
+      </div>
+      <div class="row-fluid">
+        <div id="leftColumn" class="span2">
+          <div class="well sidebar-nav">
+<ul class="nav nav-list">
+          <li class="nav-header">Main Menu</li>
+    <li><a href="../../index.html" title="Home"><span 
class="none"></span>Home</a>  </li>
+    <li><a href="../../download.html" title="Download"><span 
class="none"></span>Download</a>  </li>
+    <li><a href="../../history.html" title="History"><span 
class="none"></span>History</a>  </li>
+    <li><a href="http://www.apache.org/licenses/LICENSE-2.0"; 
class="externalLink" title="License"><span class="none"></span>License</a>  
</li>
+    <li><a href="http://www.apache.org/foundation/thanks.html"; 
class="externalLink" title="Thanks"><span class="none"></span>Thanks</a>  </li>
+    <li><a href="http://www.apache.org/foundation/sponsorship.html"; 
class="externalLink" title="Sponsorship"><span 
class="none"></span>Sponsorship</a>  </li>
+    <li><a href="http://www.apache.org/security/"; class="externalLink" 
title="Security"><span class="none"></span>Security</a>  </li>
+          <li class="nav-header">Documentation</li>
+    <li><a href="../../userguide/installation.html" title="Installation 
Guide"><span class="none"></span>Installation Guide</a>  </li>
+    <li><a href="../../userguide/quick_start.html" title="Quick Start 
Guide"><span class="none"></span>Quick Start Guide</a>  </li>
+    <li><a href="../../userguide/samples/setup/index.html" title="Samples 
Setup Guide"><span class="none"></span>Samples Setup Guide</a>  </li>
+    <li><a href="../../userguide/samples.html" title="Samples Catalog"><span 
class="none"></span>Samples Catalog</a>  </li>
+    <li><a href="../../userguide/config.html" title="Configuration 
Language"><span class="none"></span>Configuration Language</a>  </li>
+    <li><a href="../../userguide/mediators.html" title="Mediators 
Catalog"><span class="none"></span>Mediators Catalog</a>  </li>
+    <li><a href="../../userguide/transports.html" title="Transports 
Catalog"><span class="none"></span>Transports Catalog</a>  </li>
+    <li><a href="../../userguide/properties.html" title="Properties 
Catalog"><span class="none"></span>Properties Catalog</a>  </li>
+    <li><a href="../../userguide/xpath.html" title="XPath functions and 
Variables"><span class="none"></span>XPath functions and Variables</a>  </li>
+    <li><a href="../../userguide/extending.html" title="Extending 
Synapse"><span class="none"></span>Extending Synapse</a>  </li>
+    <li><a href="../../userguide/template_library.html" title="Synapse 
Template Libraries"><span class="none"></span>Synapse Template Libraries</a>  
</li>
+    <li><a href="../../userguide/upgrading.html" title="Upgrading"><span 
class="none"></span>Upgrading</a>  </li>
+    <li><a href="../../userguide/deployment.html" title="Deployment"><span 
class="none"></span>Deployment</a>  </li>
+    <li><a href="../../apidocs/" title="Javadocs"><span 
class="none"></span>Javadocs</a>  </li>
+    <li><a href="../../userguide/faq.html" title="FAQ"><span 
class="none"></span>FAQ</a>  </li>
+          <li class="nav-header">Developer Resources</li>
+    <li><a href="../../dev/developer-guide.html" title="Developer Guide"><span 
class="none"></span>Developer Guide</a>  </li>
+    <li><a href="../../dev/best-practices.html" title="Development Best 
Practices"><span class="none"></span>Development Best Practices</a>  </li>
+    <li><a href="../../dev/release-process.html" title="Release Process"><span 
class="none"></span>Release Process</a>  </li>
+          <li class="nav-header">Project Details</li>
+    <li><a href="../../project-info.html" title="Overview"><span 
class="none"></span>Overview</a>  </li>
+    <li><a href="../../mail-lists.html" title="Mailing Lists"><span 
class="none"></span>Mailing Lists</a>  </li>
+    <li><a href="../../source-repository.html" title="Source Repository"><span 
class="none"></span>Source Repository</a>  </li>
+    <li><a href="../../issue-tracking.html" title="Issue Tracking"><span 
class="none"></span>Issue Tracking</a>  </li>
+    <li><a href="../../dependency-management.html" title="Dependencies"><span 
class="none"></span>Dependencies</a>  </li>
+    <li><a href="../../team-list.html" title="Project Team"><span 
class="none"></span>Project Team</a>  </li>
+  </ul>
+          <hr />
+          <div id="poweredBy">
+              <div class="clear"></div>
+              <div class="clear"></div>
+              <div class="clear"></div>
+              <div class="clear"></div>
+  <a href="http://maven.apache.org/"; title="Built by Maven" 
class="poweredBy"><img class="builtBy" alt="Built by Maven" 
src="../../images/logos/maven-feather.png" /></a>
+              </div>
+          </div>
+        </div>
+        <div id="bodyColumn"  class="span10" >
+
+    
+        <div class="section">
+<h2><a name="Sample_502:_Transforming_Events_Before_Publish"></a>Sample 502: 
Transforming Events Before Publish</h2>
+            
+<div class="xmlConf">&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;registryURL&quot; 
value=&quot;http://localhost:8180/wso2registry&quot;/&gt;
+          &lt;property name=&quot;username&quot; value=&quot;admin&quot;/&gt;
+          &lt;property name=&quot;password&quot; value=&quot;admin&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;</div>
+            
+<div class="section">
+<h3><a name="Objective"></a>Objective</h3>
+                
+<p>
+                    Demonstrate how to mediate and transform events before 
they are sent to the
+                    target event sinks
+                </p>
+            </div>
+            
+<div class="section">
+<h3><a name="Pre-requisites"></a>Pre-requisites</h3>
+                
+<p>
+                    </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>
+                
+            </div>
+            
+<div class="section">
+<h3><a name="Executing_the_Client"></a>Executing the Client</h3>
+                
+<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>
+            </div>
+        </div>
+        
+<p><a href="../samples.html">Back to Catalog</a></p>        
+    
+
+        </div>
+      </div>
+    </div>
+    <hr/>
+    <footer>
+      <div class="container-fluid">
+        <div class="row-fluid">
+            <p>Copyright &copy;2005&#x2013;2023
+<a href="http://www.apache.org/";>Apache Software Foundation</a>.
+All rights reserved.</p>
+        </div>
+        </div>
+    </footer>
+    </body>
+</html>

Added: synapse/site/3_0_2/userguide/samples/sample51.html
URL: 
http://svn.apache.org/viewvc/synapse/site/3_0_2/userguide/samples/sample51.html?rev=1909775&view=auto
==============================================================================
--- synapse/site/3_0_2/userguide/samples/sample51.html (added)
+++ synapse/site/3_0_2/userguide/samples/sample51.html Fri May 12 16:09:34 2023
@@ -0,0 +1,302 @@
+<!DOCTYPE html>
+<!--
+ | Generated by Apache Maven Doxia Site Renderer 1.7.4 at 2023-05-04 
+ | Rendered using Apache Maven Fluido Skin 1.6
+-->
+<html xmlns="http://www.w3.org/1999/xhtml"; xml:lang="en" lang="en">
+  <head>
+    <meta charset="UTF-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+    <meta name="Date-Revision-yyyymmdd" content="20230504" />
+    <meta http-equiv="Content-Language" content="en" />
+    <title>Apache Synapse &#x2013; Apache Synapse - Sample 51</title>
+    <link rel="stylesheet" href="../../css/apache-maven-fluido-1.6.min.css" />
+    <link rel="stylesheet" href="../../css/site.css" />
+    <link rel="stylesheet" href="../../css/print.css" media="print" />
+      <script type="text/javascript" 
src="../../js/apache-maven-fluido-1.6.min.js"></script>
+      </head>
+    <body class="topBarDisabled">
+      <div class="container-fluid">
+      <div id="banner">
+        <div class="pull-left"><div id="bannerLeft"><h2>Apache Synapse</h2>
+</div>
+</div>
+        <div class="pull-right"></div>
+        <div class="clear"><hr/></div>
+      </div>
+
+      <div id="breadcrumbs">
+        <ul class="breadcrumb">
+        <li id="publishDate">Last Published: 2023-05-04<span 
class="divider">|</span>
+</li>
+          <li id="projectVersion">Version: 3.0.2</li>
+        </ul>
+      </div>
+      <div class="row-fluid">
+        <div id="leftColumn" class="span2">
+          <div class="well sidebar-nav">
+<ul class="nav nav-list">
+          <li class="nav-header">Main Menu</li>
+    <li><a href="../../index.html" title="Home"><span 
class="none"></span>Home</a>  </li>
+    <li><a href="../../download.html" title="Download"><span 
class="none"></span>Download</a>  </li>
+    <li><a href="../../history.html" title="History"><span 
class="none"></span>History</a>  </li>
+    <li><a href="http://www.apache.org/licenses/LICENSE-2.0"; 
class="externalLink" title="License"><span class="none"></span>License</a>  
</li>
+    <li><a href="http://www.apache.org/foundation/thanks.html"; 
class="externalLink" title="Thanks"><span class="none"></span>Thanks</a>  </li>
+    <li><a href="http://www.apache.org/foundation/sponsorship.html"; 
class="externalLink" title="Sponsorship"><span 
class="none"></span>Sponsorship</a>  </li>
+    <li><a href="http://www.apache.org/security/"; class="externalLink" 
title="Security"><span class="none"></span>Security</a>  </li>
+          <li class="nav-header">Documentation</li>
+    <li><a href="../../userguide/installation.html" title="Installation 
Guide"><span class="none"></span>Installation Guide</a>  </li>
+    <li><a href="../../userguide/quick_start.html" title="Quick Start 
Guide"><span class="none"></span>Quick Start Guide</a>  </li>
+    <li><a href="../../userguide/samples/setup/index.html" title="Samples 
Setup Guide"><span class="none"></span>Samples Setup Guide</a>  </li>
+    <li><a href="../../userguide/samples.html" title="Samples Catalog"><span 
class="none"></span>Samples Catalog</a>  </li>
+    <li><a href="../../userguide/config.html" title="Configuration 
Language"><span class="none"></span>Configuration Language</a>  </li>
+    <li><a href="../../userguide/mediators.html" title="Mediators 
Catalog"><span class="none"></span>Mediators Catalog</a>  </li>
+    <li><a href="../../userguide/transports.html" title="Transports 
Catalog"><span class="none"></span>Transports Catalog</a>  </li>
+    <li><a href="../../userguide/properties.html" title="Properties 
Catalog"><span class="none"></span>Properties Catalog</a>  </li>
+    <li><a href="../../userguide/xpath.html" title="XPath functions and 
Variables"><span class="none"></span>XPath functions and Variables</a>  </li>
+    <li><a href="../../userguide/extending.html" title="Extending 
Synapse"><span class="none"></span>Extending Synapse</a>  </li>
+    <li><a href="../../userguide/template_library.html" title="Synapse 
Template Libraries"><span class="none"></span>Synapse Template Libraries</a>  
</li>
+    <li><a href="../../userguide/upgrading.html" title="Upgrading"><span 
class="none"></span>Upgrading</a>  </li>
+    <li><a href="../../userguide/deployment.html" title="Deployment"><span 
class="none"></span>Deployment</a>  </li>
+    <li><a href="../../apidocs/" title="Javadocs"><span 
class="none"></span>Javadocs</a>  </li>
+    <li><a href="../../userguide/faq.html" title="FAQ"><span 
class="none"></span>FAQ</a>  </li>
+          <li class="nav-header">Developer Resources</li>
+    <li><a href="../../dev/developer-guide.html" title="Developer Guide"><span 
class="none"></span>Developer Guide</a>  </li>
+    <li><a href="../../dev/best-practices.html" title="Development Best 
Practices"><span class="none"></span>Development Best Practices</a>  </li>
+    <li><a href="../../dev/release-process.html" title="Release Process"><span 
class="none"></span>Release Process</a>  </li>
+          <li class="nav-header">Project Details</li>
+    <li><a href="../../project-info.html" title="Overview"><span 
class="none"></span>Overview</a>  </li>
+    <li><a href="../../mail-lists.html" title="Mailing Lists"><span 
class="none"></span>Mailing Lists</a>  </li>
+    <li><a href="../../source-repository.html" title="Source Repository"><span 
class="none"></span>Source Repository</a>  </li>
+    <li><a href="../../issue-tracking.html" title="Issue Tracking"><span 
class="none"></span>Issue Tracking</a>  </li>
+    <li><a href="../../dependency-management.html" title="Dependencies"><span 
class="none"></span>Dependencies</a>  </li>
+    <li><a href="../../team-list.html" title="Project Team"><span 
class="none"></span>Project Team</a>  </li>
+  </ul>
+          <hr />
+          <div id="poweredBy">
+              <div class="clear"></div>
+              <div class="clear"></div>
+              <div class="clear"></div>
+              <div class="clear"></div>
+  <a href="http://maven.apache.org/"; title="Built by Maven" 
class="poweredBy"><img class="builtBy" alt="Built by Maven" 
src="../../images/logos/maven-feather.png" /></a>
+              </div>
+          </div>
+        </div>
+        <div id="bodyColumn"  class="span10" >
+
+    
+        <div class="section">
+<h2><a 
name="Sample_51:_MTOM_and_SwA_Optimizations_and_RequestResponse_Correlation"></a>Sample
 51: MTOM and SwA Optimizations and Request/Response Correlation</h2>
+            
+<div class="xmlConf">&lt;definitions 
xmlns=&quot;http://ws.apache.org/ns/synapse&quot;&gt;
+
+    &lt;sequence name=&quot;main&quot;&gt;
+        &lt;in&gt;
+            &lt;filter source=&quot;get-property('Action')&quot; 
regex=&quot;urn:uploadFileUsingMTOM&quot;&gt;
+                &lt;then&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;/then&gt;
+            &lt;/filter&gt;
+            &lt;filter source=&quot;get-property('Action')&quot; 
regex=&quot;urn:uploadFileUsingSwA&quot;&gt;
+                &lt;then&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;/then&gt;
+            &lt;/filter&gt;
+        &lt;/in&gt;
+        &lt;out&gt;
+            &lt;filter source=&quot;get-property('example')&quot; 
regex=&quot;mtom&quot;&gt;
+                &lt;then&gt;
+                    &lt;property name=&quot;enableMTOM&quot; 
value=&quot;true&quot; scope=&quot;axis2&quot;/&gt;
+                &lt;/then&gt;
+            &lt;/filter&gt;
+            &lt;filter source=&quot;get-property('example')&quot; 
regex=&quot;swa&quot;&gt;
+                &lt;then&gt;
+                    &lt;property name=&quot;enableSwA&quot; 
value=&quot;true&quot; scope=&quot;axis2&quot;/&gt;
+                &lt;/then&gt;
+            &lt;/filter&gt;
+            &lt;send/&gt;
+        &lt;/out&gt;
+    &lt;/sequence&gt;
+
+&lt;/definitions&gt;</div>
+            
+<div class="section">
+<h3><a name="Objective"></a>Objective</h3>
+                
+<p>
+                    Demonstrate the use of content optimization mechanisms 
like MTOM and SwA with
+                    Synapse.
+                </p>
+            </div>
+            
+<div class="section">
+<h3><a name="Pre-requisites"></a>Pre-requisites</h3>
+                
+<p>
+                    </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>
+                
+            </div>
+            
+<div class="section">
+<h3><a name="Executing_the_Client"></a>Executing the Client</h3>
+                
+<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:b94996494e1dd5f9b51177413845...@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:b94996494e1dd5f9b51177413845...@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:78f94bc50b68d76fb41177413845...@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:78f94bc50b68d76fb41177413845...@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:b94996494e1dd5f9b51177414170...@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:b94996494e1dd5f9b51177414170...@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>
+                
+            </div>
+        </div>
+        
+<p><a href="../samples.html">Back to Catalog</a></p>        
+    
+
+        </div>
+      </div>
+    </div>
+    <hr/>
+    <footer>
+      <div class="container-fluid">
+        <div class="row-fluid">
+            <p>Copyright &copy;2005&#x2013;2023
+<a href="http://www.apache.org/";>Apache Software Foundation</a>.
+All rights reserved.</p>
+        </div>
+        </div>
+    </footer>
+    </body>
+</html>

Added: synapse/site/3_0_2/userguide/samples/sample52.html
URL: 
http://svn.apache.org/viewvc/synapse/site/3_0_2/userguide/samples/sample52.html?rev=1909775&view=auto
==============================================================================
--- synapse/site/3_0_2/userguide/samples/sample52.html (added)
+++ synapse/site/3_0_2/userguide/samples/sample52.html Fri May 12 16:09:34 2023
@@ -0,0 +1,251 @@
+<!DOCTYPE html>
+<!--
+ | Generated by Apache Maven Doxia Site Renderer 1.7.4 at 2023-05-04 
+ | Rendered using Apache Maven Fluido Skin 1.6
+-->
+<html xmlns="http://www.w3.org/1999/xhtml"; xml:lang="en" lang="en">
+  <head>
+    <meta charset="UTF-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+    <meta name="Date-Revision-yyyymmdd" content="20230504" />
+    <meta http-equiv="Content-Language" content="en" />
+    <title>Apache Synapse &#x2013; Apache Synapse - Sample 52</title>
+    <link rel="stylesheet" href="../../css/apache-maven-fluido-1.6.min.css" />
+    <link rel="stylesheet" href="../../css/site.css" />
+    <link rel="stylesheet" href="../../css/print.css" media="print" />
+      <script type="text/javascript" 
src="../../js/apache-maven-fluido-1.6.min.js"></script>
+      </head>
+    <body class="topBarDisabled">
+      <div class="container-fluid">
+      <div id="banner">
+        <div class="pull-left"><div id="bannerLeft"><h2>Apache Synapse</h2>
+</div>
+</div>
+        <div class="pull-right"></div>
+        <div class="clear"><hr/></div>
+      </div>
+
+      <div id="breadcrumbs">
+        <ul class="breadcrumb">
+        <li id="publishDate">Last Published: 2023-05-04<span 
class="divider">|</span>
+</li>
+          <li id="projectVersion">Version: 3.0.2</li>
+        </ul>
+      </div>
+      <div class="row-fluid">
+        <div id="leftColumn" class="span2">
+          <div class="well sidebar-nav">
+<ul class="nav nav-list">
+          <li class="nav-header">Main Menu</li>
+    <li><a href="../../index.html" title="Home"><span 
class="none"></span>Home</a>  </li>
+    <li><a href="../../download.html" title="Download"><span 
class="none"></span>Download</a>  </li>
+    <li><a href="../../history.html" title="History"><span 
class="none"></span>History</a>  </li>
+    <li><a href="http://www.apache.org/licenses/LICENSE-2.0"; 
class="externalLink" title="License"><span class="none"></span>License</a>  
</li>
+    <li><a href="http://www.apache.org/foundation/thanks.html"; 
class="externalLink" title="Thanks"><span class="none"></span>Thanks</a>  </li>
+    <li><a href="http://www.apache.org/foundation/sponsorship.html"; 
class="externalLink" title="Sponsorship"><span 
class="none"></span>Sponsorship</a>  </li>
+    <li><a href="http://www.apache.org/security/"; class="externalLink" 
title="Security"><span class="none"></span>Security</a>  </li>
+          <li class="nav-header">Documentation</li>
+    <li><a href="../../userguide/installation.html" title="Installation 
Guide"><span class="none"></span>Installation Guide</a>  </li>
+    <li><a href="../../userguide/quick_start.html" title="Quick Start 
Guide"><span class="none"></span>Quick Start Guide</a>  </li>
+    <li><a href="../../userguide/samples/setup/index.html" title="Samples 
Setup Guide"><span class="none"></span>Samples Setup Guide</a>  </li>
+    <li><a href="../../userguide/samples.html" title="Samples Catalog"><span 
class="none"></span>Samples Catalog</a>  </li>
+    <li><a href="../../userguide/config.html" title="Configuration 
Language"><span class="none"></span>Configuration Language</a>  </li>
+    <li><a href="../../userguide/mediators.html" title="Mediators 
Catalog"><span class="none"></span>Mediators Catalog</a>  </li>
+    <li><a href="../../userguide/transports.html" title="Transports 
Catalog"><span class="none"></span>Transports Catalog</a>  </li>
+    <li><a href="../../userguide/properties.html" title="Properties 
Catalog"><span class="none"></span>Properties Catalog</a>  </li>
+    <li><a href="../../userguide/xpath.html" title="XPath functions and 
Variables"><span class="none"></span>XPath functions and Variables</a>  </li>
+    <li><a href="../../userguide/extending.html" title="Extending 
Synapse"><span class="none"></span>Extending Synapse</a>  </li>
+    <li><a href="../../userguide/template_library.html" title="Synapse 
Template Libraries"><span class="none"></span>Synapse Template Libraries</a>  
</li>
+    <li><a href="../../userguide/upgrading.html" title="Upgrading"><span 
class="none"></span>Upgrading</a>  </li>
+    <li><a href="../../userguide/deployment.html" title="Deployment"><span 
class="none"></span>Deployment</a>  </li>
+    <li><a href="../../apidocs/" title="Javadocs"><span 
class="none"></span>Javadocs</a>  </li>
+    <li><a href="../../userguide/faq.html" title="FAQ"><span 
class="none"></span>FAQ</a>  </li>
+          <li class="nav-header">Developer Resources</li>
+    <li><a href="../../dev/developer-guide.html" title="Developer Guide"><span 
class="none"></span>Developer Guide</a>  </li>
+    <li><a href="../../dev/best-practices.html" title="Development Best 
Practices"><span class="none"></span>Development Best Practices</a>  </li>
+    <li><a href="../../dev/release-process.html" title="Release Process"><span 
class="none"></span>Release Process</a>  </li>
+          <li class="nav-header">Project Details</li>
+    <li><a href="../../project-info.html" title="Overview"><span 
class="none"></span>Overview</a>  </li>
+    <li><a href="../../mail-lists.html" title="Mailing Lists"><span 
class="none"></span>Mailing Lists</a>  </li>
+    <li><a href="../../source-repository.html" title="Source Repository"><span 
class="none"></span>Source Repository</a>  </li>
+    <li><a href="../../issue-tracking.html" title="Issue Tracking"><span 
class="none"></span>Issue Tracking</a>  </li>
+    <li><a href="../../dependency-management.html" title="Dependencies"><span 
class="none"></span>Dependencies</a>  </li>
+    <li><a href="../../team-list.html" title="Project Team"><span 
class="none"></span>Project Team</a>  </li>
+  </ul>
+          <hr />
+          <div id="poweredBy">
+              <div class="clear"></div>
+              <div class="clear"></div>
+              <div class="clear"></div>
+              <div class="clear"></div>
+  <a href="http://maven.apache.org/"; title="Built by Maven" 
class="poweredBy"><img class="builtBy" alt="Built by Maven" 
src="../../images/logos/maven-feather.png" /></a>
+              </div>
+          </div>
+        </div>
+        <div id="bodyColumn"  class="span10" >
+
+    
+        <div class="section">
+<h2><a 
name="Sample_52:_Session-less_Load_Balancing_Between_3_Endpoints"></a>Sample 
52: Session-less Load Balancing Between 3 Endpoints</h2>
+            
+<div class="xmlConf">&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 
xmlns:tns=&quot;http://www.w3.org/2003/05/soap-envelope&quot; 
value=&quot;tns:Receiver&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;</div>
+            
+<div class="section">
+<h3><a name="Objective"></a>Objective</h3>
+                
+<p>
+                    Demonstrate the ability of Synapse to act as a load 
balancer for a set of
+                    servers hosting stateless services
+                </p>
+            </div>
+            
+<div class="section">
+<h3><a name="Pre-requisites"></a>Pre-requisites</h3>
+                
+<p>
+                    </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>
+                
+            </div>
+            
+<div class="section">
+<h3><a name="Executing_the_Client"></a>Executing the Client</h3>
+                
+<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>
+            </div>
+        </div>
+        
+<p><a href="../samples.html">Back to Catalog</a></p>        
+    
+
+        </div>
+      </div>
+    </div>
+    <hr/>
+    <footer>
+      <div class="container-fluid">
+        <div class="row-fluid">
+            <p>Copyright &copy;2005&#x2013;2023
+<a href="http://www.apache.org/";>Apache Software Foundation</a>.
+All rights reserved.</p>
+        </div>
+        </div>
+    </footer>
+    </body>
+</html>

Added: synapse/site/3_0_2/userguide/samples/sample53.html
URL: 
http://svn.apache.org/viewvc/synapse/site/3_0_2/userguide/samples/sample53.html?rev=1909775&view=auto
==============================================================================
--- synapse/site/3_0_2/userguide/samples/sample53.html (added)
+++ synapse/site/3_0_2/userguide/samples/sample53.html Fri May 12 16:09:34 2023
@@ -0,0 +1,243 @@
+<!DOCTYPE html>
+<!--
+ | Generated by Apache Maven Doxia Site Renderer 1.7.4 at 2023-05-04 
+ | Rendered using Apache Maven Fluido Skin 1.6
+-->
+<html xmlns="http://www.w3.org/1999/xhtml"; xml:lang="en" lang="en">
+  <head>
+    <meta charset="UTF-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+    <meta name="Date-Revision-yyyymmdd" content="20230504" />
+    <meta http-equiv="Content-Language" content="en" />
+    <title>Apache Synapse &#x2013; Apache Synapse - Sample 53</title>
+    <link rel="stylesheet" href="../../css/apache-maven-fluido-1.6.min.css" />
+    <link rel="stylesheet" href="../../css/site.css" />
+    <link rel="stylesheet" href="../../css/print.css" media="print" />
+      <script type="text/javascript" 
src="../../js/apache-maven-fluido-1.6.min.js"></script>
+      </head>
+    <body class="topBarDisabled">
+      <div class="container-fluid">
+      <div id="banner">
+        <div class="pull-left"><div id="bannerLeft"><h2>Apache Synapse</h2>
+</div>
+</div>
+        <div class="pull-right"></div>
+        <div class="clear"><hr/></div>
+      </div>
+
+      <div id="breadcrumbs">
+        <ul class="breadcrumb">
+        <li id="publishDate">Last Published: 2023-05-04<span 
class="divider">|</span>
+</li>
+          <li id="projectVersion">Version: 3.0.2</li>
+        </ul>
+      </div>
+      <div class="row-fluid">
+        <div id="leftColumn" class="span2">
+          <div class="well sidebar-nav">
+<ul class="nav nav-list">
+          <li class="nav-header">Main Menu</li>
+    <li><a href="../../index.html" title="Home"><span 
class="none"></span>Home</a>  </li>
+    <li><a href="../../download.html" title="Download"><span 
class="none"></span>Download</a>  </li>
+    <li><a href="../../history.html" title="History"><span 
class="none"></span>History</a>  </li>
+    <li><a href="http://www.apache.org/licenses/LICENSE-2.0"; 
class="externalLink" title="License"><span class="none"></span>License</a>  
</li>
+    <li><a href="http://www.apache.org/foundation/thanks.html"; 
class="externalLink" title="Thanks"><span class="none"></span>Thanks</a>  </li>
+    <li><a href="http://www.apache.org/foundation/sponsorship.html"; 
class="externalLink" title="Sponsorship"><span 
class="none"></span>Sponsorship</a>  </li>
+    <li><a href="http://www.apache.org/security/"; class="externalLink" 
title="Security"><span class="none"></span>Security</a>  </li>
+          <li class="nav-header">Documentation</li>
+    <li><a href="../../userguide/installation.html" title="Installation 
Guide"><span class="none"></span>Installation Guide</a>  </li>
+    <li><a href="../../userguide/quick_start.html" title="Quick Start 
Guide"><span class="none"></span>Quick Start Guide</a>  </li>
+    <li><a href="../../userguide/samples/setup/index.html" title="Samples 
Setup Guide"><span class="none"></span>Samples Setup Guide</a>  </li>
+    <li><a href="../../userguide/samples.html" title="Samples Catalog"><span 
class="none"></span>Samples Catalog</a>  </li>
+    <li><a href="../../userguide/config.html" title="Configuration 
Language"><span class="none"></span>Configuration Language</a>  </li>
+    <li><a href="../../userguide/mediators.html" title="Mediators 
Catalog"><span class="none"></span>Mediators Catalog</a>  </li>
+    <li><a href="../../userguide/transports.html" title="Transports 
Catalog"><span class="none"></span>Transports Catalog</a>  </li>
+    <li><a href="../../userguide/properties.html" title="Properties 
Catalog"><span class="none"></span>Properties Catalog</a>  </li>
+    <li><a href="../../userguide/xpath.html" title="XPath functions and 
Variables"><span class="none"></span>XPath functions and Variables</a>  </li>
+    <li><a href="../../userguide/extending.html" title="Extending 
Synapse"><span class="none"></span>Extending Synapse</a>  </li>
+    <li><a href="../../userguide/template_library.html" title="Synapse 
Template Libraries"><span class="none"></span>Synapse Template Libraries</a>  
</li>
+    <li><a href="../../userguide/upgrading.html" title="Upgrading"><span 
class="none"></span>Upgrading</a>  </li>
+    <li><a href="../../userguide/deployment.html" title="Deployment"><span 
class="none"></span>Deployment</a>  </li>
+    <li><a href="../../apidocs/" title="Javadocs"><span 
class="none"></span>Javadocs</a>  </li>
+    <li><a href="../../userguide/faq.html" title="FAQ"><span 
class="none"></span>FAQ</a>  </li>
+          <li class="nav-header">Developer Resources</li>
+    <li><a href="../../dev/developer-guide.html" title="Developer Guide"><span 
class="none"></span>Developer Guide</a>  </li>
+    <li><a href="../../dev/best-practices.html" title="Development Best 
Practices"><span class="none"></span>Development Best Practices</a>  </li>
+    <li><a href="../../dev/release-process.html" title="Release Process"><span 
class="none"></span>Release Process</a>  </li>
+          <li class="nav-header">Project Details</li>
+    <li><a href="../../project-info.html" title="Overview"><span 
class="none"></span>Overview</a>  </li>
+    <li><a href="../../mail-lists.html" title="Mailing Lists"><span 
class="none"></span>Mailing Lists</a>  </li>
+    <li><a href="../../source-repository.html" title="Source Repository"><span 
class="none"></span>Source Repository</a>  </li>
+    <li><a href="../../issue-tracking.html" title="Issue Tracking"><span 
class="none"></span>Issue Tracking</a>  </li>
+    <li><a href="../../dependency-management.html" title="Dependencies"><span 
class="none"></span>Dependencies</a>  </li>
+    <li><a href="../../team-list.html" title="Project Team"><span 
class="none"></span>Project Team</a>  </li>
+  </ul>
+          <hr />
+          <div id="poweredBy">
+              <div class="clear"></div>
+              <div class="clear"></div>
+              <div class="clear"></div>
+              <div class="clear"></div>
+  <a href="http://maven.apache.org/"; title="Built by Maven" 
class="poweredBy"><img class="builtBy" alt="Built by Maven" 
src="../../images/logos/maven-feather.png" /></a>
+              </div>
+          </div>
+        </div>
+        <div id="bodyColumn"  class="span10" >
+
+    
+        <div class="section">
+<h2><a name="Sample_53:_Fail-over_Routing_Among_3_Endpoints"></a>Sample 53: 
Fail-over Routing Among 3 Endpoints</h2>
+            
+<div class="xmlConf">&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 
xmlns:tns=&quot;http://www.w3.org/2003/05/soap-envelope&quot; 
value=&quot;tns:Receiver&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;</div>
+            
+<div class="section">
+<h3><a name="Objective"></a>Objective</h3>
+                
+<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>
+            </div>
+            
+<div class="section">
+<h3><a name="Pre-requisites"></a>Pre-requisites</h3>
+                
+<p>
+                    </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>
+                
+            </div>
+            
+<div class="section">
+<h3><a name="Executing_the_Client"></a>Executing the Client</h3>
+                
+<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 until
+                    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>
+            </div>
+        </div>
+        
+<p><a href="../samples.html">Back to Catalog</a></p>        
+    
+
+        </div>
+      </div>
+    </div>
+    <hr/>
+    <footer>
+      <div class="container-fluid">
+        <div class="row-fluid">
+            <p>Copyright &copy;2005&#x2013;2023
+<a href="http://www.apache.org/";>Apache Software Foundation</a>.
+All rights reserved.</p>
+        </div>
+        </div>
+    </footer>
+    </body>
+</html>


Reply via email to