Added: synapse/site/3_0_2/userguide/samples/sample154.html
URL: 
http://svn.apache.org/viewvc/synapse/site/3_0_2/userguide/samples/sample154.html?rev=1909775&view=auto
==============================================================================
--- synapse/site/3_0_2/userguide/samples/sample154.html (added)
+++ synapse/site/3_0_2/userguide/samples/sample154.html Fri May 12 16:09:34 2023
@@ -0,0 +1,235 @@
+<!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 154</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_154:_Load_Balancing_with_Proxy_Services"></a>Sample 154: 
Load Balancing with Proxy Services</h2>
+            
+<div class="xmlConf">&lt;definitions 
xmlns=&quot;http://ws.apache.org/ns/synapse&quot;&gt;
+
+    &lt;proxy name=&quot;LBProxy&quot; transports=&quot;http&quot; 
startOnLoad=&quot;true&quot;&gt;
+        &lt;target faultSequence=&quot;errorHandler&quot;&gt;
+            &lt;inSequence&gt;
+                &lt;send&gt;
+                    &lt;endpoint&gt;
+                        &lt;session type=&quot;simpleClientSession&quot;/&gt;
+                        &lt;loadbalance 
algorithm=&quot;org.apache.synapse.endpoints.algorithms.RoundRobin&quot;&gt;
+                            &lt;endpoint&gt;
+                                &lt;address 
uri=&quot;http://localhost:9001/services/LBService1&quot;&gt;
+                                    &lt;enableAddressing/&gt;
+                                    
&lt;suspendDurationOnFailure&gt;20&lt;/suspendDurationOnFailure&gt;
+                                &lt;/address&gt;
+                            &lt;/endpoint&gt;
+                            &lt;endpoint&gt;
+                                &lt;address 
uri=&quot;http://localhost:9002/services/LBService1&quot;&gt;
+                                    &lt;enableAddressing/&gt;
+                                    
&lt;suspendDurationOnFailure&gt;20&lt;/suspendDurationOnFailure&gt;
+                                &lt;/address&gt;
+                            &lt;/endpoint&gt;
+                            &lt;endpoint&gt;
+                                &lt;address 
uri=&quot;http://localhost:9003/services/LBService1&quot;&gt;
+                                    &lt;enableAddressing/&gt;
+                                    
&lt;suspendDurationOnFailure&gt;20&lt;/suspendDurationOnFailure&gt;
+                                &lt;/address&gt;
+                            &lt;/endpoint&gt;
+                        &lt;/loadbalance&gt;
+                    &lt;/endpoint&gt;
+                &lt;/send&gt;
+                &lt;drop/&gt;
+            &lt;/inSequence&gt;
+            &lt;outSequence&gt;
+                &lt;send/&gt;
+            &lt;/outSequence&gt;
+        &lt;/target&gt;
+        &lt;publishWSDL 
uri=&quot;file:repository/conf/sample/resources/proxy/sample_proxy_2.wsdl&quot;/&gt;
+    &lt;/proxy&gt;
+
+    &lt;sequence name=&quot;errorHandler&quot;&gt;
+        &lt;makefault response=&quot;true&quot;&gt;
+            &lt;code 
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 how to use a proxy service as a load balancer
+                </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 154 
(repository/conf/sample/synapse_sample_154.xml)
+                            
+<div class="command">
+                                Unix/Linux: sh synapse.sh -sample 154<br />
+                                Windows: synapse.bat -sample 154
+                            </div>
+                        </li>
+                    </ul>
+                
+            </div>
+            
+<div class="section">
+<h3><a name="Executing_the_Client"></a>Executing the Client</h3>
+                
+<p>
+                    This sample is similar to <a href="sample54.html">sample 
54</a>. The only
+                    notable difference is the use of a proxy service.
+                </p>
+                
+<p>
+                    Execute the client as follows.
+                </p>
+                
+<div class="command">ant loadbalancefailover -Dmode=session 
-Dtrpurl=http://localhost:8280/services/LBProxy</div>
+                
+<p>
+                    You will get an output similar to the following.
+                </p>
+                
+<div class="consoleOutput">[java] Request: 1 Session number: 1 Response from 
server: MyServer3
+[java] Request: 2 Session number: 2 Response from server: MyServer2
+[java] Request: 3 Session number: 0 Response from server: MyServer1
+[java] Request: 4 Session number: 2 Response from server: MyServer2
+[java] Request: 5 Session number: 1 Response from server: MyServer3
+[java] Request: 6 Session number: 2 Response from server: MyServer2
+[java] Request: 7 Session number: 2 Response from server: MyServer2
+[java] Request: 8 Session number: 1 Response from server: MyServer3
+[java] Request: 9 Session number: 0 Response from server: MyServer1
+[java] Request: 10 Session number: 0 Response from server: MyServer1
+... </div>
+                
+<p>
+                    You can see that session ID 0 is always directed to the 
server named MyServer1.
+                    That means session ID 0 is bound to MyServer1. Similarly 
session 1 and 2 are bound
+                    to MyServer3 and MyServer2 respectively.
+                </p>
+            </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/sample155.html
URL: 
http://svn.apache.org/viewvc/synapse/site/3_0_2/userguide/samples/sample155.html?rev=1909775&view=auto
==============================================================================
--- synapse/site/3_0_2/userguide/samples/sample155.html (added)
+++ synapse/site/3_0_2/userguide/samples/sample155.html Fri May 12 16:09:34 2023
@@ -0,0 +1,194 @@
+<!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 155</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_155:_Dual_Channel_Invocation_on_Client_Side_and_Server_Side"></a>Sample
 155: Dual Channel Invocation on Client Side and Server Side</h2>
+            
+<div class="xmlConf">&lt;definitions 
xmlns=&quot;http://ws.apache.org/ns/synapse&quot;&gt;
+
+    &lt;proxy name=&quot;StockQuoteProxy&quot;&gt;
+        &lt;target&gt;
+            &lt;endpoint&gt;
+                &lt;address 
uri=&quot;http://localhost:9000/services/SimpleStockQuoteService&quot;&gt;
+                    &lt;enableAddressing separateListener=&quot;true&quot;/&gt;
+                &lt;/address&gt;
+            &lt;/endpoint&gt;
+            &lt;outSequence&gt;
+                &lt;send/&gt;
+            &lt;/outSequence&gt;
+        &lt;/target&gt;
+        &lt;publishWSDL 
uri=&quot;file:repository/conf/sample/resources/proxy/sample_proxy_1.wsdl&quot;/&gt;
+    &lt;/proxy&gt;
+
+&lt;/definitions&gt;</div>
+            
+<div class="section">
+<h3><a name="Objective"></a>Objective</h3>
+                
+<p>
+                    <a href="sample13.html">Sample 13</a> show cased how to 
perform dual channel
+                    invocations on the client side. This sample demonstrates 
how to perform dual
+                    channel invocations on both client side and server side, 
using proxy services.
+                </p>
+            </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 155 
(repository/conf/sample/synapse_sample_155.xml)
+                            
+<div class="command">
+                                Unix/Linux: sh synapse.sh -sample 155<br />
+                                Windows: synapse.bat -sample 155
+                            </div>
+                        </li>
+                    </ul>
+                
+            </div>
+            
+<div class="section">
+<h3><a name="Executing_the_Client"></a>Executing the Client</h3>
+                
+<p>
+                    This sample will show the action of the dual channel 
invocation between client
+                    and Synapse as well as between Synapse and the Axis2 
server. Note that if you
+                    want to enable dual channel invocation you need to set the 
separateListener
+                    attribute to true on the enableAddressing element of the 
endpoint.
+                </p>
+                
+<p>
+                    Execute the stock quote client in the dual channel mode as 
follows:
+                </p>
+                
+<div class="command">ant stockquote 
-Daddurl=http://localhost:8280/services/StockQuoteProxy -Dmode=dualquote</div>
+                
+<p>
+                    In the above example, the request received is forwarded to 
the sample service
+                    hosted on Axis2 and the endpoint specifies to enable 
addressing and do the
+                    invocation in dual channel mode. If you observe the 
message flow using TCPmon,
+                    you will see that on the channel you send the request to 
Synapse, the response has 
+                    been written as HTTP 202 Accepted, where as the real 
response from Synapse
+                    comes over a different channel which cannot be obsesrved 
unless you use tcpdump
+                    to dump all the TCP level messages.
+                </p>
+                
+<p>
+                    At the same time you can observe the behaviour of the 
invocation between Synapse
+                    and the actual Axis2 service, where you can see a 202 
Accepted message being
+                    delivered to Synapse as the response to the request. The 
actual response will be
+                    delivered to Synapse over a different channel.
+                </p>                
+            </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/sample156.html
URL: 
http://svn.apache.org/viewvc/synapse/site/3_0_2/userguide/samples/sample156.html?rev=1909775&view=auto
==============================================================================
--- synapse/site/3_0_2/userguide/samples/sample156.html (added)
+++ synapse/site/3_0_2/userguide/samples/sample156.html Fri May 12 16:09:34 2023
@@ -0,0 +1,266 @@
+<!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 156</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_156:_Service_Integration_with_Specifying_the_Receiving_Sequence"></a>Sample
 156: Service Integration with Specifying the Receiving Sequence</h2>
+            
+<div class="xmlConf">&lt;definitions 
xmlns=&quot;http://ws.apache.org/ns/synapse&quot;&gt;
+
+    &lt;localEntry key=&quot;sec_policy&quot; 
src=&quot;file:repository/conf/sample/resources/policy/policy_3.xml&quot;/&gt;
+
+    &lt;proxy name=&quot;StockQuoteProxy&quot;&gt;
+        &lt;target&gt;
+            &lt;inSequence&gt;
+                &lt;enrich&gt;
+                    &lt;source type=&quot;body&quot;/&gt;
+                    &lt;target type=&quot;property&quot; 
property=&quot;REQUEST&quot;/&gt;
+                &lt;/enrich&gt;
+
+                &lt;send receive=&quot;SimpleServiceSeq&quot;&gt;
+                    &lt;endpoint name=&quot;secure&quot;&gt;
+                        &lt;address 
uri=&quot;http://localhost:9000/services/SecureStockQuoteService&quot;&gt;
+                            &lt;enableSec policy=&quot;sec_policy&quot;/&gt;
+                        &lt;/address&gt;
+                    &lt;/endpoint&gt;
+                &lt;/send&gt;
+            &lt;/inSequence&gt;
+            &lt;outSequence&gt;
+                &lt;drop/&gt;
+            &lt;/outSequence&gt;
+        &lt;/target&gt;
+    &lt;/proxy&gt;
+
+
+    &lt;sequence name=&quot;SimpleServiceSeq&quot;&gt;
+        &lt;property name=&quot;SECURE_SER_AMT&quot; 
expression=&quot;//ns:getQuoteResponse/ns:return/ns:last&quot;
+                xmlns:ns=&quot;http://services.samples&quot;/&gt;
+        &lt;log level=&quot;custom&quot;&gt;
+            &lt;property name=&quot;SecureStockQuoteService-Amount&quot; 
expression=&quot;get-property('SECURE_SER_AMT')&quot;/&gt;
+        &lt;/log&gt;
+        &lt;enrich&gt;
+            &lt;source type=&quot;body&quot;/&gt;
+            &lt;target type=&quot;property&quot; 
property=&quot;SecureService_Res&quot;/&gt;
+        &lt;/enrich&gt;
+        &lt;enrich&gt;
+            &lt;source type=&quot;property&quot; 
property=&quot;REQUEST&quot;/&gt;
+            &lt;target type=&quot;body&quot;/&gt;
+        &lt;/enrich&gt;
+        &lt;send receive=&quot;ClientOutSeq&quot;&gt;
+            &lt;endpoint name=&quot;SimpleStockQuoteService&quot;&gt;
+                &lt;address 
uri=&quot;http://localhost:9000/services/SimpleStockQuoteService&quot;/&gt;
+            &lt;/endpoint&gt;
+        &lt;/send&gt;
+    &lt;/sequence&gt;
+
+    &lt;sequence name=&quot;ClientOutSeq&quot;&gt;
+        &lt;property name=&quot;SIMPLE_SER_AMT&quot; 
expression=&quot;//ns:getQuoteResponse/ns:return/ns:last&quot;
+                       xmlns:ns=&quot;http://services.samples&quot;/&gt;
+        &lt;log level=&quot;custom&quot;&gt;
+            &lt;property name=&quot;SimpleStockQuoteService-Amount&quot; 
expression=&quot;get-property('SIMPLE_SER_AMT')&quot;/&gt;
+        &lt;/log&gt;
+        &lt;enrich&gt;
+            &lt;source type=&quot;body&quot;/&gt;
+            &lt;target type=&quot;property&quot; 
property=&quot;SimpleService_Res&quot;/&gt;
+        &lt;/enrich&gt;
+
+        &lt;filter xpath=&quot;fn:number(get-property('SIMPLE_SER_AMT')) &gt; 
fn:number(get-property('SECURE_SER_AMT'))&quot;&gt;
+            &lt;then&gt;
+                &lt;log&gt;
+                    &lt;property name=&quot;StockQuote&quot; 
value=&quot;SecureStockQuoteService&quot;/&gt;
+                &lt;/log&gt;
+                &lt;enrich&gt;
+                    &lt;source type=&quot;property&quot; 
property=&quot;SecureService_Res&quot;/&gt;
+                    &lt;target type=&quot;body&quot;/&gt;
+                &lt;/enrich&gt;
+            &lt;/then&gt;
+            &lt;else&gt;
+                &lt;log&gt;
+                    &lt;property name=&quot;StockQuote&quot; 
value=&quot;SimpleStockQuoteService&quot;/&gt;
+                &lt;/log&gt;
+            &lt;/else&gt;
+        &lt;/filter&gt;
+
+        &lt;send/&gt;
+    &lt;/sequence&gt;
+
+&lt;/definitions&gt;</div>
+            
+<div class="section">
+<h3><a name="Objective"></a>Objective</h3>
+                
+<p>
+                    Synapse is capable of mediating requests among multiple 
services and managing
+                    complex message flows thereby acting as a lightweight 
orchestration engine. This
+                    sample demonstrates how to easily integrate multiple 
services with Synapse using
+                    the 'receiving sequence' feature of Synapse.
+                </p>
+            </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
+                        </li>
+                        
+<li>
+                            Deploy the SecureStockQuoteService in the sample 
Axis2 server and start Axis2
+                        </li>
+                        
+<li>
+                            Start Synapse using the configuration numbered 156 
(repository/conf/sample/synapse_sample_156.xml)
+                            
+<div class="command">
+                                Unix/Linux: sh synapse.sh -sample 156<br />
+                                Windows: synapse.bat -sample 156
+                            </div>
+                        </li>
+                    </ul>
+                
+            </div>
+            
+<div class="section">
+<h3><a name="Executing_the_Client"></a>Executing the Client</h3>
+                
+<p>
+                    This sample includes a proxy service which first forwards 
the client request to
+                    the SecureStockQuoteService. Once a response has been 
received from this service,
+                    Synapse will turn around and invoke the 
SimpleStockQuoteService. To do this proxy
+                    service must hold on to the original request in memory. 
This is done using an
+                    enrich mediator. Once Synapse has received a response from 
the SimpleStockQuoteService
+                    it will compare the two responses received from the two 
services and select the
+                    one with the lower stock quote value. This response will 
be then sent to the
+                    client.
+                </p>
+                
+<p>
+                    The important feature to note here is the 'receive' 
attribute set on the 'send'
+                    mediators. This tells Synapse that responses of those send 
operations should be
+                    directed to the sequences referred by the 'receive' 
attribute. Therefore the
+                    response from the SecureStockQuoteService is directed to 
the sequence named
+                    'SimpleServiceSeq'. Similarly the response from the 
SimpleStockQuoteService will
+                    be handled by the sequence named 'ClientOutSeq'.
+                </p>
+                
+<p>
+                    To try this out, execute the stock quote client as follows:
+                </p>
+                
+<div class="command">ant stockquote 
-Daddurl=http://localhost:8280/services/StockQuoteProxy</div>
+                
+<p>
+                    You can confirm that Synapse invokes both services by 
going through the console
+                    output of the Axis2 server. However Axis2 client will 
receive only one response
+                    back. As far as  the client is concerned, only one HTTP 
transaction is taking place.
+                    But Synapse does multiple service invocations with the 
back-end to make the whole
+                    integration scenario tick.
+                </p>
+            </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/sample157.html
URL: 
http://svn.apache.org/viewvc/synapse/site/3_0_2/userguide/samples/sample157.html?rev=1909775&view=auto
==============================================================================
--- synapse/site/3_0_2/userguide/samples/sample157.html (added)
+++ synapse/site/3_0_2/userguide/samples/sample157.html Fri May 12 16:09:34 2023
@@ -0,0 +1,276 @@
+<!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 157</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_157:_Conditional_Router_Mediator_for_Implementing_Complex_Routing_Scenarios"></a>Sample
 157: Conditional Router Mediator for Implementing Complex Routing 
Scenarios</h2>
+            
+<div class="xmlConf">&lt;definitions 
xmlns=&quot;http://ws.apache.org/ns/synapse&quot;&gt;
+    &lt;proxy name=&quot;StockQuoteProxy&quot; transports=&quot;https 
http&quot; startOnLoad=&quot;true&quot; trace=&quot;disable&quot;&gt;
+        &lt;target&gt;
+            &lt;inSequence&gt;
+                &lt;conditionalRouter continueAfter=&quot;false&quot;&gt;
+                    &lt;conditionalRoute breakRoute=&quot;false&quot;&gt;
+                        &lt;condition&gt;
+                            &lt;match xmlns=&quot;&quot; 
type=&quot;header&quot; source=&quot;foo&quot; regex=&quot;bar.*&quot;/&gt;
+                        &lt;/condition&gt;
+                        &lt;target sequence=&quot;cnd1_seq&quot;/&gt;
+                    &lt;/conditionalRoute&gt;
+
+                    &lt;conditionalRoute breakRoute=&quot;false&quot;&gt;
+                        &lt;condition&gt;
+                            &lt;and xmlns=&quot;&quot;&gt;
+                                &lt;match type=&quot;header&quot; 
source=&quot;my_custom_header1&quot; regex=&quot;foo.*&quot;/&gt;
+                                &lt;match type=&quot;url&quot; 
regex=&quot;/services/StockQuoteProxy.*&quot;/&gt;
+                            &lt;/and&gt;
+                        &lt;/condition&gt;
+                        &lt;target sequence=&quot;cnd2_seq&quot;/&gt;
+                    &lt;/conditionalRoute&gt;
+
+                    &lt;conditionalRoute breakRoute=&quot;false&quot;&gt;
+                        &lt;condition&gt;
+                            &lt;and xmlns=&quot;&quot;&gt;
+                                &lt;match type=&quot;header&quot; 
source=&quot;my_custom_header2&quot; regex=&quot;bar.*&quot;/&gt;
+                                &lt;equal type=&quot;param&quot; 
source=&quot;qparam1&quot; value=&quot;qpv_foo&quot;/&gt;
+                                &lt;or&gt;
+                                    &lt;match type=&quot;url&quot; 
regex=&quot;/services/StockQuoteProxy.*&quot;/&gt;
+                                    &lt;match type=&quot;header&quot; 
source=&quot;my_custom_header3&quot; regex=&quot;foo.*&quot;/&gt;
+                                &lt;/or&gt;
+                                &lt;not&gt;
+                                    &lt;equal type=&quot;param&quot; 
source=&quot;qparam2&quot; value=&quot;qpv_bar&quot;/&gt;
+                                &lt;/not&gt;
+                            &lt;/and&gt;
+                        &lt;/condition&gt;
+                        &lt;target sequence=&quot;cnd3_seq&quot;/&gt;
+                    &lt;/conditionalRoute&gt;
+                &lt;/conditionalRouter&gt;
+            &lt;/inSequence&gt;
+            &lt;outSequence&gt;
+                &lt;send/&gt;
+            &lt;/outSequence&gt;
+        &lt;/target&gt;
+    &lt;/proxy&gt;
+
+    &lt;sequence name=&quot;cnd1_seq&quot;&gt;
+        &lt;log level=&quot;custom&quot;&gt;
+            &lt;property name=&quot;MSG_FLOW&quot; value=&quot;Condition (I) 
Satisfied&quot;/&gt;
+        &lt;/log&gt;
+        &lt;sequence key=&quot;send_seq&quot;/&gt;
+    &lt;/sequence&gt;
+    &lt;sequence name=&quot;cnd2_seq&quot;&gt;
+        &lt;log level=&quot;custom&quot;&gt;
+            &lt;property name=&quot;MSG_FLOW&quot; value=&quot;Condition (II) 
Satisfied&quot;/&gt;
+        &lt;/log&gt;
+        &lt;sequence key=&quot;send_seq&quot;/&gt;
+    &lt;/sequence&gt;
+    &lt;sequence name=&quot;cnd3_seq&quot;&gt;
+        &lt;log level=&quot;custom&quot;&gt;
+            &lt;property name=&quot;MSG_FLOW&quot; value=&quot;Condition (III) 
Satisfied&quot;/&gt;
+        &lt;/log&gt;
+        &lt;sequence key=&quot;send_seq&quot;/&gt;
+    &lt;/sequence&gt;
+
+    &lt;sequence name=&quot;send_seq&quot;&gt;
+        &lt;log level=&quot;custom&quot;&gt;
+            &lt;property name=&quot;DEBUG&quot; value=&quot;Condition 
Satisfied&quot;/&gt;
+        &lt;/log&gt;
+        &lt;send&gt;
+            &lt;endpoint name=&quot;simple&quot;&gt;
+                &lt;address 
uri=&quot;http://localhost:9000/services/SimpleStockQuoteService&quot;/&gt;
+            &lt;/endpoint&gt;
+        &lt;/send&gt;
+    &lt;/sequence&gt;
+&lt;/definitions&gt;</div>
+            
+<div class="section">
+<h3><a name="Objective"></a>Objective</h3>
+                
+<p>
+                    Conditional router mediator can be used to implement 
complex routing rules in
+                    Synapse. It can route messages to various endpoints based 
on URLs, query parameters
+                    and transport headers. This sample demonstrates how to use 
the conditional router
+                    mediator within a proxy service to build a smart routing 
proxy.
+                </p>
+            </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 a d start
+                            Axis2 server.
+                        </li>
+                        
+<li>
+                            Start Synapse using the configuration numbered 157 
(repository/conf/sample/synapse_sample_157.xml)
+                            
+<div class="command">
+                                Unix/Linux: sh synapse.sh -sample 157<br />
+                                Windows: synapse.bat -sample 157
+                            </div>
+                        </li>
+                    </ul>
+                
+            </div>
+            
+<div class="section">
+<h3><a name="Executing_the_Client"></a>Executing the Client</h3>
+                
+<p>
+                    We will be using 'curl' as the client in this scenario. <a 
class="externalLink" href="http://curl.haxx.se/";>Curl</a>
+                    is a neat little command line tool that can be used to 
generate various types
+                    of HTTP requests (among other things).
+                </p>
+                
+<p>
+                    First create a sample input file named stockQuoteReq.xml 
with the following
+                    content.
+                </p>
+                
+<div class="xmlConf">&lt;soap:Envelope 
xmlns:soap=&quot;http://www.w3.org/2003/05/soap-envelope&quot; 
xmlns:ser=&quot;http://services.samples&quot;&gt;
+   &lt;soap:Header/&gt;
+   &lt;soap:Body&gt;
+      &lt;ser:getQuote&gt;
+         &lt;ser:request&gt;
+            &lt;ser:symbol&gt;IBM&lt;/ser:symbol&gt;
+         &lt;/ser:request&gt;
+      &lt;/ser:getQuote&gt;
+   &lt;/soap:Body&gt;
+&lt;/soap:Envelope&gt;</div>
+                
+<p>
+                    Invoke curl as follows to see header based routing feature 
in action.
+                </p>
+                
+<div class="command">curl -d @stockQuoteReq.xml -H &quot;Content-Type: 
application/soap+xml;charset=UTF-8&quot; -H &quot;foo:bar&quot; 
&quot;http://localhost:8280/services/StockQuoteProxy&quot;</div>
+                
+<p>
+                    This sends a HTTP request with a custom header named 
'foo'. Proxy service will
+                    detect this header and print a custom log message 
confirming the receipt of the
+                    request.
+                </p>
+                
+<p>
+                    Now invoke curl as follows to test a combination header 
and URL based routing.
+                </p>
+                
+<div class="command">curl -d @stockQuoteReq.xml -H &quot;Content-Type: 
application/soap+xml;charset=UTF-8&quot; -H &quot;my_custom_header1:foo1&quot; 
&quot;http://localhost:8280/services/StockQuoteProxy&quot;</div>
+                
+<p>
+                    Finally invoke curl as follows to test routing based on 
complex conditions.
+                </p>
+                
+<div class="command">curl -d @stockQuoteReq.xml -H &quot;Content-Type: 
application/soap+xml;charset=UTF-8&quot; -H &quot;my_custom_header2:bar&quot; 
-H &quot;my_custom_header3:foo&quot; 
&quot;http://localhost:8280/services/StockQuoteProxy?qparam1=qpv_foo&amp;qparam2=qpv_foo2&quot;</div>
+                
+<p>
+                    In each case Synapse will log a different log entry 
because the conditional router
+                    mediator uses different sequences to process the three 
messages.
+                </p>
+            </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/sample158.html
URL: 
http://svn.apache.org/viewvc/synapse/site/3_0_2/userguide/samples/sample158.html?rev=1909775&view=auto
==============================================================================
--- synapse/site/3_0_2/userguide/samples/sample158.html (added)
+++ synapse/site/3_0_2/userguide/samples/sample158.html Fri May 12 16:09:34 2023
@@ -0,0 +1,207 @@
+<!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 158</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_158:_Exposing_a_SOAP_service_over_JSON"></a>Sample 158: 
Exposing a SOAP service over JSON</h2>
+            
+<div class="xmlConf">&lt;definitions 
xmlns=&quot;http://ws.apache.org/ns/synapse&quot;&gt;
+
+    &lt;proxy name=&quot;JSONProxy&quot; transports=&quot;http https&quot;&gt;
+        &lt;target&gt;
+            &lt;endpoint&gt;
+                &lt;address 
uri=&quot;http://localhost:9000/services/SimpleStockQuoteService&quot; 
format=&quot;soap11&quot;/&gt;
+            &lt;/endpoint&gt;
+            &lt;inSequence&gt;
+                &lt;log level=&quot;full&quot;/&gt;
+                &lt;xslt key=&quot;in_transform&quot;/&gt;
+            &lt;/inSequence&gt;
+            &lt;outSequence&gt;
+                &lt;log level=&quot;full&quot;/&gt;
+                &lt;xslt key=&quot;out_transform&quot;/&gt;
+                &lt;send/&gt;
+            &lt;/outSequence&gt;
+        &lt;/target&gt;
+    &lt;/proxy&gt;
+
+    &lt;localEntry key=&quot;in_transform&quot;&gt;
+        &lt;xsl:stylesheet 
xmlns:xsl=&quot;http://www.w3.org/1999/XSL/Transform&quot;
+                        
xmlns:fn=&quot;http://www.w3.org/2005/02/xpath-functions&quot;
+                        xmlns:m0=&quot;http://services.samples&quot; 
version=&quot;2.0&quot; exclude-result-prefixes=&quot;m0 fn&quot;&gt;
+            &lt;xsl:output method=&quot;xml&quot; 
omit-xml-declaration=&quot;yes&quot; indent=&quot;yes&quot;/&gt;
+            &lt;xsl:template match=&quot;*&quot;&gt;
+                &lt;xsl:element name=&quot;{local-name()}&quot; 
namespace=&quot;http://services.samples&quot;&gt;
+                    &lt;xsl:copy-of select=&quot;attribute::*&quot;/&gt;
+                    &lt;xsl:apply-templates/&gt;
+                &lt;/xsl:element&gt;
+            &lt;/xsl:template&gt;
+        &lt;/xsl:stylesheet&gt;
+    &lt;/localEntry&gt;
+
+    &lt;localEntry key=&quot;out_transform&quot;&gt;
+        &lt;xsl:stylesheet 
xmlns:xsl=&quot;http://www.w3.org/1999/XSL/Transform&quot; 
version=&quot;1.0&quot;&gt;
+            &lt;xsl:output method=&quot;xml&quot; version=&quot;1.0&quot; 
encoding=&quot;UTF-8&quot;/&gt;
+            &lt;xsl:template match=&quot;*&quot;&gt;
+                &lt;xsl:element name=&quot;{local-name()}&quot;&gt;
+                    &lt;xsl:apply-templates/&gt;
+                &lt;/xsl:element&gt;
+            &lt;/xsl:template&gt;
+        &lt;/xsl:stylesheet&gt;
+    &lt;/localEntry&gt;
+
+&lt;/definitions&gt;</div>
+            
+<div class="section">
+<h3><a name="Objective"></a>Objective</h3>
+                
+<p>
+                                       Demonstrate the ability to switch 
between JSON and XML/SOAP content interchange formats
+                </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 158 
(repository/conf/sample/synapse_sample_158.xml)
+                            
+<div class="command">
+                                Unix/Linux: sh synapse.sh -sample 158<br />
+                                Windows: synapse.bat -sample 158
+                            </div>
+                        </li>
+                    </ul>
+                
+            </div>
+            
+<div class="section">
+<h3><a name="Executing_the_Client"></a>Executing the Client</h3>
+                
+<div class="command">ant jsonclient 
-Daddurl=http://localhost:9000/services/SimpleStockQuoteService 
-Dtrpurl=http://localhost:8280/services/JSONProxy</div>
+                               
+<p>JSON client will send a stockquote request to Synapse using the
+                                       JSON content interchange format. 
Synapse will transform it into a SOAP
+                                       request and forward to the Axis2 
server. The SOAP response from the
+                                       Axis2 server will be converted into a 
JSON message and sent back to the
+                                       JSON client.</p>
+                               
+<p>You may use a tool like TCPMon to monitor the JSON requests sent
+                                               over the wire. A sample JSON 
request and response is shown below:</p>
+
+                
+<div 
class="consoleOutput">{&quot;getQuote&quot;:{&quot;request&quot;:{&quot;symbol&quot;:&quot;IBM&quot;}}}</div>
+
+                
+<div 
class="consoleOutput">{&quot;getQuoteResponse&quot;:{&quot;return&quot;:{&quot;change&quot;:3.853593376681722,&quot;earnings&quot;:12.802850763714854,&quot;high&quot;:67.92488310190126,&quot;last&quot;:66.14619264746406,&quot;lastTradeTimestamp&quot;:&quot;Mon
 Aug 23 16:48:40 IST 
2010&quot;,&quot;low&quot;:-66.04000424423522,&quot;marketCap&quot;:-9334516.42324327,&quot;name&quot;:&quot;IBM
 
Company&quot;,&quot;open&quot;:-64.61950137150009,&quot;peRatio&quot;:-19.78600441437058,&quot;percentageChange&quot;:5.411779328273005,&quot;prevClose&quot;:71.2075112994578,&quot;symbol&quot;:&quot;IBM&quot;,&quot;volume&quot;:16842}}}</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/sample16.html
URL: 
http://svn.apache.org/viewvc/synapse/site/3_0_2/userguide/samples/sample16.html?rev=1909775&view=auto
==============================================================================
--- synapse/site/3_0_2/userguide/samples/sample16.html (added)
+++ synapse/site/3_0_2/userguide/samples/sample16.html Fri May 12 16:09:34 2023
@@ -0,0 +1,198 @@
+<!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 16</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_16:_Introduction_to_dynamic_and_static_registry_keys"></a>Sample 
16: Introduction to dynamic and static registry keys</h2>
+            
+<div class="xmlConf">&lt;definitions 
xmlns=&quot;http://ws.apache.org/ns/synapse&quot;&gt;
+
+    &lt;!-- the SimpleURLRegistry allows access to a URL based registry (e.g. 
file:/// or http://) --&gt;
+    &lt;registry 
provider=&quot;org.wso2.carbon.mediation.registry.ESBRegistry&quot;&gt;
+        &lt;!-- the root property of the simple URL registry helps resolve a 
resource URL as root + key --&gt;
+        &lt;parameter 
name=&quot;root&quot;&gt;file:repository/samples/resources/&lt;/parameter&gt;
+        &lt;!-- all resources loaded from the URL registry would be cached for 
this number of milli seconds --&gt;
+        &lt;parameter 
name=&quot;cachableDuration&quot;&gt;15000&lt;/parameter&gt;
+    &lt;/registry&gt;
+
+    &lt;sequence name=&quot;main&quot;&gt;
+        &lt;in&gt;
+            &lt;!-- define the request processing XSLT resource as a property 
value --&gt;
+            &lt;property name=&quot;symbol&quot; 
value=&quot;transform/transform.xslt&quot;/&gt;
+            &lt;!-- {} denotes that this key is a dynamic one and it is not a 
static key --&gt;
+            &lt;!-- use Xpath expression &quot;get-property()&quot; to 
evaluate real key from property --&gt;
+            &lt;xslt key=&quot;{get-property('symbol')}&quot;/&gt;
+        &lt;/in&gt;
+        &lt;out&gt;
+            &lt;!-- transform the standard response back into the custom 
format the client expects --&gt;
+            &lt;!-- the key is looked up in the remote registry using a static 
key --&gt;
+            &lt;xslt key=&quot;transform/transform_back.xslt&quot;/&gt;
+        &lt;/out&gt;
+        &lt;send/&gt;
+    &lt;/sequence&gt;
+
+&lt;/definitions&gt;</div>
+            
+<div class="section">
+<h3><a name="Objective"></a>Objective</h3>
+                
+<p>
+                    Objective: Introduction to dynamic and static keys
+                </p>
+            </div>
+
+            
+<div class="section">
+<h3><a name="Pre-requisites"></a>Pre-requisites</h3>
+                
+<p>
+                    </p>
+<ul>
+                        
+<li>
+                            Start the Synapse configuration numbered 16: i.e. 
synapse -sample 16
+                        </li>
+                        
+<li>
+                            Start the Axis2 server and deploy the 
SimpleStockQuoteService if
+                            not already done
+                        </li>
+                    </ul>
+                
+            </div>
+            
+<div class="section">
+<h3><a name="Executing_the_Client"></a>Executing the Client</h3>
+                
+<p>
+                    Execute the client as follows.
+                </p>
+                
+<div class="command">ant stockquote 
-Dtrpurl=http://localhost:8280/services/StockQuote</div>
+                
+<p>This Sample demonstrates the use of dynamic keys with mediators. XSLT 
mediator is used as an
+                    example for that and deference between static and dynamic 
usage of keys are shown with that.
+                </p>
+                
+<p>The first registry resource &quot;transform/transform.xslt&quot; is set as 
a property value. Inside the
+                    XSLT mediator the local property value is lookup using the 
Xpath expression &quot;get-property()&quot;.
+                    Likewise any Xpath expression can be enclosed inside 
&quot;{ }&quot; to denote that it is a dynamic key.
+                    Then the mediator will evaluate the real value for that 
expression.
+                </p>
+                
+<p>The second XSLT resource &quot;transform/transform_back.xslt&quot; is used 
simply as a static key as
+                    usual. It is not included inside &quot;{ }&quot; and 
because of the mediator directly use the static
+                    value as the key.
+                </p>
+                
+<p>Execute the custom quote client as 'ant stockquote -Dmode=customquote' and 
analys the output
+                    which is similar to the Sample 8.
+                </p>
+
+            </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/sample17.html
URL: 
http://svn.apache.org/viewvc/synapse/site/3_0_2/userguide/samples/sample17.html?rev=1909775&view=auto
==============================================================================
--- synapse/site/3_0_2/userguide/samples/sample17.html (added)
+++ synapse/site/3_0_2/userguide/samples/sample17.html Fri May 12 16:09:34 2023
@@ -0,0 +1,192 @@
+<!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 17</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_17:_Introduction_to_the_payloadFactory_mediator"></a>Sample 17: 
Introduction to the payloadFactory mediator</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;!-- using payloadFactory mediator to transform the request message 
--&gt;
+        &lt;payloadFactory media-type=&quot;xml&quot;&gt;
+            &lt;format&gt;
+                &lt;m:getQuote xmlns:m=&quot;http://services.samples&quot;&gt;
+                &lt;m:request&gt;
+                &lt;m:symbol&gt;$1&lt;/m:symbol&gt;
+                &lt;/m:request&gt;
+                &lt;/m:getQuote&gt;
+            &lt;/format&gt;
+            &lt;args&gt;
+                &lt;arg xmlns:m0=&quot;http://services.samples&quot; 
expression=&quot;//m0:Code&quot;/&gt;&lt;/args&gt;
+            &lt;/payloadFactory&gt;
+    &lt;/in&gt;
+    &lt;out&gt;
+        &lt;!-- using payloadFactory mediator to transform the response 
message --&gt;
+        &lt;payloadFactory media-type=&quot;xml&quot;&gt;
+            &lt;format&gt;
+                &lt;m:CheckPriceResponse 
xmlns:m=&quot;http://services.samples/xsd&quot;&gt;
+                &lt;m:Code&gt;$1&lt;/m:Code&gt;
+                &lt;m:Price&gt;$2&lt;/m:Price&gt;
+                &lt;/m:CheckPriceResponse&gt;
+            &lt;/format&gt;
+            &lt;args&gt;
+                &lt;arg xmlns:m0=&quot;http://services.samples/xsd&quot; 
expression=&quot;//m0:symbol&quot;/&gt;
+                &lt;arg xmlns:m0=&quot;http://services.samples/xsd&quot; 
expression=&quot;//m0:last&quot;/&gt;
+            &lt;/args&gt;
+        &lt;/payloadFactory&gt;
+    &lt;/out&gt;
+    &lt;send/&gt;
+    &lt;/sequence&gt;
+&lt;/definitions&gt;</div>
+            
+<div class="section">
+<h3><a name="Objective"></a>Objective</h3>
+                
+<p>
+                    Objective: Introduction to the payloadFactory mediator
+                </p>
+            </div>
+
+            
+<div class="section">
+<h3><a name="Pre-requisites"></a>Pre-requisites</h3>
+                
+<p>
+                    </p>
+<ul>
+                        
+<li>
+                            Start the Synapse configuration numbered 17: i.e. 
synapse -sample 17
+                        </li>
+                        
+<li>
+                            Start the Axis2 server and deploy the 
SimpleStockQuoteService if
+                            not already done
+                        </li>
+                    </ul>
+                
+            </div>
+            
+<div class="section">
+<h3><a name="Executing_the_Client"></a>Executing the Client</h3>
+                
+<p>
+                    Execute the client as follows.
+                </p>
+                
+<div class="command">ant stockquote 
-Daddurl=http://localhost:9000/services/SimpleStockQuoteService 
-Dtrpurl=http://localhost:8280/ -Dmode=customquote
+                </div>
+                
+<p>This Sample demonstrates how the PayloadFactory Mediator can be used to 
perform transformations
+                    as an alternative to the XSLT mediator, which is 
demonstrated in Sample 8: Introduction to
+                    Static and Dynamic Registry Resources and Using XSLT 
Transformations
+                </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