synapse-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From va...@apache.org
Subject svn commit: r1817077 [21/34] - in /synapse/site/3_0_1: ./ css/ dev/ fonts/ images/ images/logos/ images/profiles/ img/ js/ userguide/ userguide/samples/ userguide/samples/setup/ userguide/transports/
Date Mon, 04 Dec 2017 09:54:01 GMT
Added: synapse/site/3_0_1/userguide/samples/sample451.html
URL: http://svn.apache.org/viewvc/synapse/site/3_0_1/userguide/samples/sample451.html?rev=1817077&view=auto
==============================================================================
--- synapse/site/3_0_1/userguide/samples/sample451.html (added)
+++ synapse/site/3_0_1/userguide/samples/sample451.html Mon Dec  4 09:53:57 2017
@@ -0,0 +1,195 @@
+<!DOCTYPE html>
+<!--
+ | Generated by Apache Maven Doxia Site Renderer 1.7.4 at 2017-12-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="20171204" />
+    <meta http-equiv="Content-Language" content="en" />
+    <title>Apache Synapse &#x2013; Apache Synapse - Sample 451</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: 2017-12-04<span class="divider">|</span>
+</li>
+          <li id="projectVersion">Version: 3.0.1</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_451:_Conditional_URL_Rewriting"></a>Sample 451: Conditional URL Rewriting</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;rewrite&gt;
+                &lt;rule&gt;
+                    &lt;condition&gt;
+                        &lt;and&gt;
+                            &lt;equal type=&quot;url&quot; source=&quot;host&quot; value=&quot;localhost&quot;/&gt;
+                            &lt;not&gt;
+                                &lt;equal type=&quot;url&quot; source=&quot;protocol&quot; value=&quot;https&quot;/&gt;
+                            &lt;/not&gt;
+                        &lt;/and&gt;
+                    &lt;/condition&gt;
+                    &lt;action fragment=&quot;protocol&quot; value=&quot;https&quot;/&gt;
+                    &lt;action fragment=&quot;port&quot; value=&quot;9002&quot;/&gt;
+                &lt;/rule&gt;
+            &lt;/rewrite&gt;
+            &lt;send/&gt;
+        &lt;/in&gt;
+        &lt;out&gt;
+            &lt;send/&gt;
+        &lt;/out&gt;
+    &lt;/sequence&gt;
+
+&lt;/definitions&gt;</div>
+            
+<div class="section">
+<h3><a name="Objective"></a>Objective</h3>
+                
+<p>
+                    Demonstrate the ability of the URL rewrite mediator to evaluate conditions on
+                    messages and perform rewrites based on the results                                        
+                </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 451 (repository/conf/sample/synapse_sample_451.xml)
+                            
+<div class="command">
+                                Unix/Linux: sh synapse.sh -sample 451<br />
+                                Windows: synapse.bat -sample 451
+                            </div>
+                        </li>
+                    </ul>
+                
+            </div>
+            
+<div class="section">
+<h3><a name="Executing_the_Client"></a>Executing the Client</h3>
+                
+<p>
+                    Invoke the Axis2 client and send some requests to Synapse with different address
+                    URL values. If the address URL value contains 'localhost' as the hostname and 'https'
+                    as the protocol prefix, Synapse will route the message as it is. But if the
+                    hostname is 'localhost' and the protocol is not https, Synapse will rewrite the
+                    URL by setting 'https' as the protocol. The port number will also be set to the
+                    HTTPS port of the Axis2 server.
+                </p>
+                
+<p>
+                    If you invoke the client as follows, Synapse will rewrite the 'To' header and
+                    forward the message to Axis2 over HTTPS.
+                </p>
+                
+<div class="command">ant stockquote -Daddurl=http://localhost:9000/services/SimpleStockQuoteService -Dtrpurl=http://localhost:8280/</div>
+                
+<p>
+                    The condition evaluation feature is provided by the Synapse evaluator framework.
+                    Currently one can evaluate expressions on URL values, query parameters, transport
+                    headers, properties and SOAP envelope content using this framework. Hence URL
+                    rewriting can be done based on any of these aspects.
+                </p>                
+            </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;2017
+<a href="http://www.apache.org/">Apache Software Foundation</a>.
+All rights reserved.</p>
+        </div>
+        </div>
+    </footer>
+    </body>
+</html>

Added: synapse/site/3_0_1/userguide/samples/sample452.html
URL: http://svn.apache.org/viewvc/synapse/site/3_0_1/userguide/samples/sample452.html?rev=1817077&view=auto
==============================================================================
--- synapse/site/3_0_1/userguide/samples/sample452.html (added)
+++ synapse/site/3_0_1/userguide/samples/sample452.html Mon Dec  4 09:53:57 2017
@@ -0,0 +1,202 @@
+<!DOCTYPE html>
+<!--
+ | Generated by Apache Maven Doxia Site Renderer 1.7.4 at 2017-12-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="20171204" />
+    <meta http-equiv="Content-Language" content="en" />
+    <title>Apache Synapse &#x2013; Apache Synapse - Sample 452</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: 2017-12-04<span class="divider">|</span>
+</li>
+          <li id="projectVersion">Version: 3.0.1</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_452:_Conditional_URL_Rewriting_with_Multiple_Rules"></a>Sample 452: Conditional URL Rewriting with Multiple Rules</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;property name=&quot;http.port&quot; value=&quot;9000&quot;/&gt;
+            &lt;property name=&quot;https.port&quot; value=&quot;9002&quot;/&gt;
+            &lt;rewrite&gt;
+                &lt;rule&gt;
+                    &lt;action fragment=&quot;host&quot; value=&quot;localhost&quot;/&gt;
+                    &lt;action fragment=&quot;path&quot; type=&quot;prepend&quot; value=&quot;/services&quot;/&gt;
+                &lt;/rule&gt;
+                &lt;rule&gt;
+                    &lt;condition&gt;
+                        &lt;equal type=&quot;url&quot; source=&quot;protocol&quot; value=&quot;http&quot;/&gt;
+                    &lt;/condition&gt;
+                    &lt;action fragment=&quot;port&quot; xpath=&quot;get-property('http.port')&quot;/&gt;
+                &lt;/rule&gt;
+                &lt;rule&gt;
+                    &lt;condition&gt;
+                        &lt;equal type=&quot;url&quot; source=&quot;protocol&quot; value=&quot;https&quot;/&gt;
+                    &lt;/condition&gt;
+                    &lt;action fragment=&quot;port&quot; xpath=&quot;get-property('https.port')&quot;/&gt;
+                &lt;/rule&gt;
+            &lt;/rewrite&gt;
+            &lt;log level=&quot;full&quot;/&gt;
+            &lt;send/&gt;
+        &lt;/in&gt;
+        &lt;out&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 ability of the URL rewrite mediator to perform rewrites based
+                    on multiple rules
+                </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 452 (repository/conf/sample/synapse_sample_452.xml)
+                            
+<div class="command">
+                                Unix/Linux: sh synapse.sh -sample 452<br />
+                                Windows: synapse.bat -sample 452
+                            </div>
+                        </li>
+                    </ul>
+                
+            </div>
+            
+<div class="section">
+<h3><a name="Executing_the_Client"></a>Executing the Client</h3>
+                
+<p>
+                    One may specify multiple rewrite rules for a URL rewrite mediator instance. In
+                    that case Synapse will execute all the rules on each message, in the order they
+                    appear. This particular sample lists 3 rewrite rules. To try it out, invoke the
+                    client as follows.
+                </p>
+                
+<div class="command">ant stockquote -Dtrpurl=http://localhost:8280 -Daddurl=http://test.com/SimpleStockQuoteService</div>
+                
+<p>
+                    The provided address URL does not contain a port number and the context. The URL
+                    rewrite mediator will replace the hostname (test.com) with 'localhost' and add the
+                    context '/services' to the path. Then it will add the appropriate port number to
+                    the URL by looking at the protocol prefix. Ultimately the service request will be
+                    routed the sample Axis2 server and the client will receive a valid response.
+                </p>
+                
+<p>
+                    Another important aspect shown by this sample is the ability of the URL rewirte
+                    mediator to obtain the necessary values by executing XPath expressions. The port
+                    numbers are calculated by executing an XPath on the messages.
+                </p>
+            </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;2017
+<a href="http://www.apache.org/">Apache Software Foundation</a>.
+All rights reserved.</p>
+        </div>
+        </div>
+    </footer>
+    </body>
+</html>

Added: synapse/site/3_0_1/userguide/samples/sample460.html
URL: http://svn.apache.org/viewvc/synapse/site/3_0_1/userguide/samples/sample460.html?rev=1817077&view=auto
==============================================================================
--- synapse/site/3_0_1/userguide/samples/sample460.html (added)
+++ synapse/site/3_0_1/userguide/samples/sample460.html Mon Dec  4 09:53:57 2017
@@ -0,0 +1,203 @@
+<!DOCTYPE html>
+<!--
+ | Generated by Apache Maven Doxia Site Renderer 1.7.4 at 2017-12-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="20171204" />
+    <meta http-equiv="Content-Language" content="en" />
+    <title>Apache Synapse &#x2013; Apache Synapse - Sample 460</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: 2017-12-04<span class="divider">|</span>
+</li>
+          <li id="projectVersion">Version: 3.0.1</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_460:_Introduction_to_the_Spring_Mediator"></a>Sample 460: Introduction to the Spring Mediator</h2>
+            
+<div class="xmlConf">&lt;definitions xmlns=&quot;http://ws.apache.org/ns/synapse&quot;&gt;
+
+    &lt;registry provider=&quot;org.apache.synapse.registry.url.SimpleURLRegistry&quot;&gt;
+        &lt;parameter name=&quot;root&quot;&gt;file:repository/conf/sample/resources/&lt;/parameter&gt;
+        &lt;parameter name=&quot;cachableDuration&quot;&gt;15000&lt;/parameter&gt;
+    &lt;/registry&gt;
+
+    &lt;sequence name=&quot;main&quot;&gt;
+        &lt;!--Setting the Spring Mediator and its Spring Beans xml file location --&gt;
+        &lt;!--Note that springtest is the bean id used in springCustomLogger.xml --&gt;
+        &lt;spring bean=&quot;springtest&quot; key=&quot;spring/springCustomLogger.xml&quot;/&gt;
+        &lt;send/&gt;
+    &lt;/sequence&gt;
+
+&lt;/definitions&gt;</div>
+            
+<p>
+                This sample configuration loads an external SpringBean from a file named
+                springCustomLogger.xml. Contents of this file are as follows.
+            </p>
+            
+<div class="xmlConf">&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
+&lt;!DOCTYPE beans PUBLIC  &quot;-//SPRING//DTD BEAN//EN&quot;
+    &quot;http://www.springframework.org/dtd/spring-beans.dtd&quot;&gt;
+
+&lt;beans&gt;
+
+   &lt;bean id=&quot;springtest&quot; class=&quot;samples.mediators.extentions.SpringCustomLogger&quot; singleton=&quot;false&quot;&gt;
+	   &lt;property name=&quot;userName&quot;&gt;&lt;value&gt;&quot;Synapse User&quot;&lt;/value&gt;&lt;/property&gt;
+	   &lt;property name=&quot;email&quot;&gt;&lt;value&gt;&quot;usr@synapse.org&quot;&lt;/value&gt;&lt;/property&gt;
+   &lt;/bean&gt;
+
+&lt;/beans&gt;</div>
+            
+            
+<div class="section">
+<h3><a name="Objective"></a>Objective</h3>
+                
+<p>
+                    Demonstrate how to initialize and use a SpringBean as a mediator
+                </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 460 (repository/conf/sample/synapse_sample_460.xml)
+                            
+<div class="command">
+                                Unix/Linux: sh synapse.sh -sample 460<br />
+                                Windows: synapse.bat -sample 460
+                            </div>
+                        </li>
+                    </ul>
+                
+            </div>
+            
+<div class="section">
+<h3><a name="Executing_the_Client"></a>Executing the Client</h3>
+                
+<p>
+                    In this sample, the Spring Bean named 'SpringCustomLogger' gets loaded from the
+                    springCustomLogger.xml file and then it is used to log the message ID of each
+                    message being mediated. To see it in action, invoke the sample client as follows.
+                </p>
+                
+<div class="command">ant stockquote -Daddurl=http://localhost:9000/services/SimpleStockQuoteService -Dtrpurl=http://localhost:8280/</div>
+                
+<p>
+                    If you have enabled logging for the samples.mediators package in the log4j.properties
+                    file, you will see an output similar to the following, on the console.
+                </p>
+                
+<div class="consoleOutput">2010-09-26 20:46:57,946 [-] [HttpServerWorker-1]  INFO SpringCustomLogger Starting Spring Meditor
+2010-09-26 20:46:57,946 [-] [HttpServerWorker-1]  INFO SpringCustomLogger Bean in Initialized with User:[&quot;Synapse User&quot;]
+2010-09-26 20:46:57,946 [-] [HttpServerWorker-1]  INFO SpringCustomLogger E-MAIL:[&quot;usr@synapse.org&quot;]
+2010-09-26 20:46:57,946 [-] [HttpServerWorker-1]  INFO SpringCustomLogger Massage Id:  urn:uuid:383FA8B27D7CC549D91285514217720
+2010-09-26 20:46:57,946 [-] [HttpServerWorker-1]  INFO SpringCustomLogger Logged....</div>
+                
+<p>
+                    Similarly you can import any SpringBean into the Synapse runtime using the
+                    spring mediator, and use Spring to execute mediation rules.
+                </p>
+            </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;2017
+<a href="http://www.apache.org/">Apache Software Foundation</a>.
+All rights reserved.</p>
+        </div>
+        </div>
+    </footer>
+    </body>
+</html>

Added: synapse/site/3_0_1/userguide/samples/sample470.html
URL: http://svn.apache.org/viewvc/synapse/site/3_0_1/userguide/samples/sample470.html?rev=1817077&view=auto
==============================================================================
--- synapse/site/3_0_1/userguide/samples/sample470.html (added)
+++ synapse/site/3_0_1/userguide/samples/sample470.html Mon Dec  4 09:53:57 2017
@@ -0,0 +1,302 @@
+<!DOCTYPE html>
+<!--
+ | Generated by Apache Maven Doxia Site Renderer 1.7.4 at 2017-12-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="20171204" />
+    <meta http-equiv="Content-Language" content="en" />
+    <title>Apache Synapse &#x2013; Apache Synapse - Sample 470</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: 2017-12-04<span class="divider">|</span>
+</li>
+          <li id="projectVersion">Version: 3.0.1</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_470:_Introduction_to_the_EJB_Mediator_I_-_Invoking_Stateless_Session_Beans"></a>Sample 470: Introduction to the EJB Mediator I - Invoking Stateless Session Beans</h2>
+            
+<div class="xmlConf">&lt;definitions xmlns=&quot;http://ws.apache.org/ns/synapse&quot;&gt;
+    &lt;proxy name=&quot;StoreLocatorProxy&quot; transports=&quot;https http&quot; startOnLoad=&quot;true&quot; trace=&quot;disable&quot;&gt;
+        &lt;target&gt;
+            &lt;!-- First call StoreLocator#getClosestStore(), then call StoreRegistry#getStoreById() with the result. --&gt;
+            &lt;inSequence&gt;
+                &lt;bean action=&quot;CREATE&quot; class=&quot;samples.bean.Location&quot; var=&quot;loc&quot;/&gt;
+                &lt;bean action=&quot;SET_PROPERTY&quot; var=&quot;loc&quot; property=&quot;latitude&quot; value=&quot;{//m:latitude}&quot; xmlns:m=&quot;http://services.samples&quot;/&gt;
+                &lt;bean action=&quot;SET_PROPERTY&quot; var=&quot;loc&quot; property=&quot;longitude&quot; value=&quot;{//m:longitude}&quot; xmlns:m=&quot;http://services.samples&quot;/&gt;
+                &lt;ejb class=&quot;samples.ejb.StoreLocator&quot; beanstalk=&quot;demo&quot; method=&quot;getClosestStore&quot; target=&quot;store_id&quot; jndiName=&quot;StoreLocatorBean/remote&quot;&gt;
+                    &lt;args&gt;
+                        &lt;arg value=&quot;{get-property('loc')}&quot;/&gt;
+                    &lt;/args&gt;
+                &lt;/ejb&gt;
+                &lt;ejb class=&quot;samples.ejb.StoreRegistry&quot; beanstalk=&quot;demo&quot; method=&quot;getStoreById&quot; target=&quot;store&quot; jndiName=&quot;StoreRegistryBean/remote&quot;&gt;
+                    &lt;args&gt;
+                        &lt;arg value=&quot;{get-property('store_id')}&quot;/&gt;
+                    &lt;/args&gt;
+                &lt;/ejb&gt;
+                &lt;!-- Prepare the response. --&gt;
+                &lt;enrich&gt;
+                    &lt;source type=&quot;inline&quot; clone=&quot;true&quot;&gt;
+                        &lt;getClosestStoreResponse xmlns=&quot;&quot;&gt;
+                            &lt;store&gt;
+                                &lt;name&gt;?&lt;/name&gt;
+                                &lt;address&gt;?&lt;/address&gt;
+                                &lt;phone&gt;?&lt;/phone&gt;
+                            &lt;/store&gt;
+                        &lt;/getClosestStoreResponse&gt;
+                    &lt;/source&gt;
+                    &lt;target type=&quot;body&quot;/&gt;
+                &lt;/enrich&gt;
+                &lt;bean action=&quot;GET_PROPERTY&quot; var=&quot;store&quot; property=&quot;name&quot; target=&quot;{//store/name/text()}&quot;/&gt;
+                &lt;bean action=&quot;GET_PROPERTY&quot; var=&quot;store&quot; property=&quot;address&quot; target=&quot;{//store/address/text()}&quot;/&gt;
+                &lt;bean action=&quot;GET_PROPERTY&quot; var=&quot;store&quot; property=&quot;phoneNo&quot; target=&quot;{//store/phone/text()}&quot;/&gt;
+                &lt;!-- Send the response back to the client of the ESB. --&gt;
+                &lt;respond/&gt;
+            &lt;/inSequence&gt;
+        &lt;/target&gt;
+    &lt;/proxy&gt;
+&lt;/definitions&gt;</div>
+            
+<div class="section">
+<h3><a name="Objective"></a>Objective</h3>
+                
+<p>
+                    Demonstrate the usage of the EJB mediator for invoking EJB Stateless
+                    Session Beans hosted on a remote EJB Container.
+                </p>
+            </div>
+            
+<div class="section">
+<h3><a name="Pre-requisites"></a>Pre-requisites</h3>
+                
+<p>
+                    </p>
+<ul>
+                        
+<li>
+                            Build the backend EJB jar to be hosted on the EJB Container by changing
+                            the directory to SYNAPSE_HOME/samples/axis2Server/src/EJBSampleBeans
+                            and invoking: 
+<div class="command">mvn clean install</div>
+                        </li>
+                        
+<li>
+                            Deploy the built EJB jar 
+                            (SYNAPSE_HOME/samples/axis2Server/src/EJBSampleBeans/target/synapse-samples-ejb-1.0.0.jar)
+                            in an EJB Container such as JBoss or GlassFish.
+                        </li>
+                        
+<li>
+                            Add minimal client JARs of your EJB Container to SYNAPSE_HOME/lib. 
+                            E.g. If you are using JBoss 7, it is sufficient to add the 
+                            <i>jboss-client.jar</i> file.
+                        </li>
+                        
+<li>
+                            Add the <i>synapse-samples-ejb-1.0.0.jar</i> to SYNAPSE_HOME/lib. (Note: adding
+                            only the remote interfaces of the EJBs will suffice. Here we are using
+                            the complete jar file for simplicity.)
+                        </li>                
+                        
+<li>
+                            Configure a beanstalk named <i>demo</i> in
+                            SYNAPSE_HOME/repository/conf/synapse.properties. You will need to 
+                            specify the JNDI properties of your EJB Container in this configuration.
+                            Some example configurations are shown below. <br /> 
+                            For JBoss 7:
+                            
+<div class="consoleOutput">synapse.beanstalks=demo,foo
+#   JNDI properties
+synapse.beanstalks.demo.java.naming.factory.url.pkgs=org.jboss.ejb.client.naming
+#  Cache settings
+synapse.beanstalks.demo.cache.warn.limit.stateless=256
+synapse.beanstalks.demo.cache.warn.limit.stateful=256
+synapse.beanstalks.demo.cache.timeout.stateless=30
+synapse.beanstalks.demo.cache.timeout.stateful=30
+</div>
+                            <br />                            
+                            For JBoss 6:
+                            
+<div class="consoleOutput">synapse.beanstalks=demo,foo
+#   JNDI properties
+synapse.beanstalks.demo.java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
+synapse.beanstalks.demo.java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
+synapse.beanstalks.demo.java.naming.provider.url=localhost:1099
+#  Cache settings
+synapse.beanstalks.demo.cache.warn.limit.stateless=256
+synapse.beanstalks.demo.cache.warn.limit.stateful=256
+synapse.beanstalks.demo.cache.timeout.stateless=30
+synapse.beanstalks.demo.cache.timeout.stateful=30
+</div>
+                        </li>
+                        
+<li>
+                            If the JNDI names assigned to the EJBs by your EJB Container differ from
+                            the JNDI names specified in the sample 470 configuration file
+                            (repository/conf/sample/synapse_sample_470.xml), edit the <i>jndiName</i>
+                            attribute of all &lt; ejb /&gt; mediator invocations in the 
+                            <i>synapse_sample_470.xml</i> accordingly.
+                        </li>
+                        
+<li>
+                            Start Synapse using the configuration numbered 470 
+                            (repository/conf/sample/synapse_sample_470.xml):
+                            
+<div class="command">
+                                Unix/Linux: sh synapse.sh -sample 470<br />
+                                Windows: synapse.bat -sample 470
+                            </div>
+                        </li>
+                    </ul>
+                
+            </div>
+            
+<div class="section">
+<h3><a name="Executing_the_Client"></a>Executing the Client</h3>                
+                
+<p>
+                    Send the following request to http://localhost:8280/services/StoreLocatorProxy
+                    using a tool such at <a class="externalLink" href="http://ws.apache.org/tcpmon/">TCPMon</a> or curl.
+                </p>
+
+<div class="xmlConf">&lt;soapenv:Envelope xmlns:soapenv=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot;&gt;
+  &lt;soapenv:Body&gt;
+    &lt;getClosestStore xmlns=&quot;http://services.samples&quot;&gt;
+        &lt;latitude&gt;78&lt;/latitude&gt;
+        &lt;longitude&gt;8&lt;/longitude&gt;
+    &lt;/getClosestStore&gt;
+  &lt;/soapenv:Body&gt;
+&lt;/soapenv:Envelope&gt;
+</div>
+                
+<p>
+                    When the <i>StoreLocatorProxy</i> receives the request, it first creates an instance of
+                     <i>samples.bean.Location</i> using the Bean mediator.
+                    Then, it sets the properties of the newly created bean with the values
+                    extracted from the incoming SOAP message, again using the Bean mediator.
+                </p>
+                
+<p>
+                    The subsequent EJB mediator invokes the <i>getClosestStore()</i> method on the remote stateless
+                    session bean, <i>StoreLocator</i>, with the previously populated
+                    Location object as an argument and stores the result in the <i>store_id</i> message context
+                    property. Another EJB mediator that follows calls the <i>getStoreById()</i> method
+                    on a second stateless session bean,<i>StoreRegistry</i>, to obtain store details encapsulated in
+                    a JavaBean (an instance of samples.bean.Store) and stores this resulting bean in a message context
+                    property named <i>store</i>. The <i>demo</i> beanstalk provides all necessary configurations
+                    needed for the two remote EJB invocations.
+                </p>
+                
+<p>
+                    Finally, Enrich and Bean mediators are used to build the response message extracting properties from
+                    the JavaBean stored in the <i>store</i> message context property.
+                </p>
+                
+<p>A sample response is shown below.</p>
+
+
+<div class="xmlConf">&lt;soapenv:Envelope xmlns:soapenv=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot;&gt;
+  &lt;soapenv:Body&gt;
+    &lt;getClosestStoreResponse&gt;
+     &lt;store&gt;
+        &lt;name&gt;Kadawatha&lt;/name&gt;
+        &lt;address&gt;253, Kandy Road, Kadawatha&lt;/address&gt;
+        &lt;phone&gt;0112990789&lt;/phone&gt;
+     &lt;/store&gt;
+     &lt;/getClosestStoreResponse&gt;
+     &lt;/soapenv:Body&gt;
+&lt;/soapenv:Envelope&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;2017
+<a href="http://www.apache.org/">Apache Software Foundation</a>.
+All rights reserved.</p>
+        </div>
+        </div>
+    </footer>
+    </body>
+</html>

Added: synapse/site/3_0_1/userguide/samples/sample471.html
URL: http://svn.apache.org/viewvc/synapse/site/3_0_1/userguide/samples/sample471.html?rev=1817077&view=auto
==============================================================================
--- synapse/site/3_0_1/userguide/samples/sample471.html (added)
+++ synapse/site/3_0_1/userguide/samples/sample471.html Mon Dec  4 09:53:57 2017
@@ -0,0 +1,275 @@
+<!DOCTYPE html>
+<!--
+ | Generated by Apache Maven Doxia Site Renderer 1.7.4 at 2017-12-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="20171204" />
+    <meta http-equiv="Content-Language" content="en" />
+    <title>Apache Synapse &#x2013; Apache Synapse - Sample 471</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: 2017-12-04<span class="divider">|</span>
+</li>
+          <li id="projectVersion">Version: 3.0.1</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_471:_Introduction_to_the_EJB_Mediator_II_-_Invoking_Stateful_Session_Beans"></a>Sample 471: Introduction to the EJB Mediator II - Invoking Stateful Session Beans</h2>
+            
+<div class="xmlConf">&lt;definitions&gt;
+    &lt;proxy name=&quot;BuyAllProxy&quot; transports=&quot;https http&quot; startOnLoad=&quot;true&quot; trace=&quot;disable&quot;&gt;
+        &lt;target&gt;
+            &lt;!-- Iterate over all items in the request and call addItem() on the ShoppingCart EJB for each item. --&gt;
+            &lt;inSequence&gt;
+                &lt;property name=&quot;SESSION_ID&quot; expression=&quot;get-property('MessageID')&quot;/&gt;
+                &lt;iterate xmlns:m0=&quot;http://services.samples&quot; preservePayload=&quot;false&quot;
+                         expression=&quot;//m0:buyItems/m0:items/m0:item&quot;&gt;
+                    &lt;target&gt;
+                        &lt;sequence&gt;
+                            &lt;ejb class=&quot;samples.ejb.ShoppingCart&quot; beanstalk=&quot;demo&quot; method=&quot;addItem&quot; sessionId=&quot;{get-property('SESSION_ID')}&quot; jndiName=&quot;ShoppingCartBean/remote&quot;&gt;
+                                &lt;args&gt;
+                                    &lt;arg value=&quot;{//m:item//m:id}&quot; xmlns:m=&quot;http://services.samples&quot;/&gt;
+                                    &lt;arg value=&quot;{//m:item//m:quantity}&quot; xmlns:m=&quot;http://services.samples&quot;/&gt;
+                                &lt;/args&gt;
+                            &lt;/ejb&gt;
+                            &lt;sequence key=&quot;collector&quot;/&gt;
+                        &lt;/sequence&gt;
+                    &lt;/target&gt;
+                &lt;/iterate&gt;
+            &lt;/inSequence&gt;
+        &lt;/target&gt;
+    &lt;/proxy&gt;
+
+    &lt;!-- Prepare the response once all addItem() calls are finished. --&gt;
+    &lt;sequence name=&quot;collector&quot;&gt;
+        &lt;aggregate&gt;
+            &lt;onComplete&gt;
+                &lt;ejb class=&quot;samples.ejb.ShoppingCart&quot; beanstalk=&quot;demo&quot; method=&quot;getItemCount&quot; sessionId=&quot;{get-property('SESSION_ID')}&quot; target=&quot;ITEM_COUNT&quot;/&gt;
+                &lt;ejb class=&quot;samples.ejb.ShoppingCart&quot; beanstalk=&quot;demo&quot; method=&quot;getTotal&quot; sessionId=&quot;{get-property('SESSION_ID')}&quot; target=&quot;TOTAL&quot; remove=&quot;true&quot;/&gt;
+                &lt;payloadFactory&gt;
+                    &lt;format&gt;
+                        &lt;buyAllResponse xmlns=&quot;&quot;&gt;
+                            &lt;itemCount&gt;$1&lt;/itemCount&gt;
+                            &lt;total&gt;$2&lt;/total&gt;
+                        &lt;/buyAllResponse&gt;
+                    &lt;/format&gt;
+                    &lt;args&gt;
+                        &lt;arg expression=&quot;get-property('ITEM_COUNT')&quot;/&gt;
+                        &lt;arg expression=&quot;get-property('TOTAL')&quot;/&gt;
+                    &lt;/args&gt;
+                &lt;/payloadFactory&gt;
+                &lt;respond/&gt;
+            &lt;/onComplete&gt;
+        &lt;/aggregate&gt;
+    &lt;/sequence&gt;
+
+&lt;/definitions&gt;</div>
+            
+<div class="section">
+<h3><a name="Objective"></a>Objective</h3>
+                
+<p>
+                    Demonstrate the usage of the EJB mediator for invoking EJB Stateful
+                    Session Beans hosted on a remote EJB Container.
+                </p>
+            </div>
+            
+<div class="section">
+<h3><a name="Pre-requisites"></a>Pre-requisites</h3>
+                
+<p>
+                    </p>
+<ul>
+                        
+<li>
+                            Follow steps 1 to 5 in <a href="sample470.html">Sample 470</a> to host the EJBs
+                            in an EJB Container of your choice and to configure the <i>demo</i> beanstalk.
+                        </li>
+                        
+<li>
+                            If the JNDI names assigned to the EJBs by your EJB Container differ from
+                            the JNDI names specified in the sample 471 configuration file
+                            (repository/conf/sample/synapse_sample_471.xml), edit the <i>jndiName</i>
+                            attribute of all &lt; ejb /&gt; mediator invocations in the
+                            <i>synapse_sample_471.xml</i> accordingly.
+                        </li>
+                        
+<li>
+                            Start Synapse using the configuration numbered 471
+                            (repository/conf/sample/synapse_sample_471.xml):
+                            
+<div class="command">
+                                Unix/Linux: sh synapse.sh -sample 471<br />
+                                Windows: synapse.bat -sample 471
+                            </div>
+                        </li>
+                    </ul>
+                
+            </div>
+            
+<div class="section">
+<h3><a name="Executing_the_Client"></a>Executing the Client</h3>                
+                
+<p>
+                    Send the following request to http://localhost:8280/services/BuyAllProxy
+                    using a tool such at <a class="externalLink" href="http://ws.apache.org/tcpmon/">TCPMon</a> or curl.
+                </p>
+
+<div class="xmlConf">&lt;soapenv:Envelope xmlns:soapenv=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot;&gt;
+  &lt;soapenv:Body&gt;
+    &lt;buyItems xmlns=&quot;http://services.samples&quot;&gt;
+        &lt;items&gt;
+            &lt;item&gt;
+                &lt;id&gt;2150&lt;/id&gt;
+                &lt;quantity&gt;1&lt;/quantity&gt;
+            &lt;/item&gt;
+            &lt;item&gt;
+                &lt;id&gt;1189&lt;/id&gt;
+                &lt;quantity&gt;2&lt;/quantity&gt;
+            &lt;/item&gt;
+            &lt;item&gt;
+                &lt;id&gt;890&lt;/id&gt;
+                &lt;quantity&gt;4&lt;/quantity&gt;
+            &lt;/item&gt;
+        &lt;/items&gt;
+    &lt;/buyItems&gt;
+  &lt;/soapenv:Body&gt;
+&lt;/soapenv:Envelope&gt;</div>
+
+                
+<p>
+                    Each instance of the <i>ShoppingCart</i> stateful session bean hosted on the remote EJB container
+                    maintains a state which keeps track of the number and the total price of the items
+                    added via its <i>addItem(String itemId, int count)</i> method. The <i>float getTotal()</i> and
+                    <i>int getItemCount()</i> methods are used to retrieve this state.
+                </p>
+                
+<p>
+                    When the <i>BuyAllProxy</i> receives the above request, it iterates over all &lt;item&gt; elements
+                    in the request and calls the <i>addItem()</i> method on the <i>ShoppingCart</i> bean,
+                    once per each &lt;item&gt;, using the EJB mediator. Since the <i>sessionId</i> used for these
+                    invocations is actually the message ID, each request works on a new <i>ShoppingCart</i> instance
+                    which is created at the first EJB mediator invocation in that request's flow.
+                </p>
+                
+<p>
+                    When all <i>addItem()</i> method calls are finished, <i>getItemCount()</i> and <i>getTotal()</i> methods
+                    are invoked on the same <i>ShoppingCart</i> instance within the <i>collector</i> sequence and
+                    results are stored in two message context properties named <i>ITEM_COUNT</i> and <i>TOTAL</i>.
+                    The last EJB call on the shopping cart sets the EJB mediator attribute <i>remove = &quot;true&quot;</i>
+                    instructing the current stateful bean stub to be removed from the beanstalk. This is because the
+                    same stateful bean instance will not be used again (each request uses a new bean instance). If the
+                    user does not explicitly remove the stub using this attribute, it will be removed automatically
+                    upon timeout as specified by the beanstalk configuration.
+                </p>
+                
+<p>
+                    Finally, the PayloadFactory mediator is used to build the response message which is sent back to the
+                    client.
+                </p>
+                
+<p>A sample response is shown below.</p>
+
+
+<div class="xmlConf">&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
+&lt;soapenv:Envelope xmlns:soapenv=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot;&gt;
+  &lt;soapenv:Body&gt;
+    &lt;buyAllResponse&gt;
+      &lt;itemCount&gt;7&lt;/itemCount&gt;
+      &lt;total&gt;807.0&lt;/total&gt;
+    &lt;/buyAllResponse&gt;
+  &lt;/soapenv:Body&gt;
+&lt;/soapenv:Envelope&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;2017
+<a href="http://www.apache.org/">Apache Software Foundation</a>.
+All rights reserved.</p>
+        </div>
+        </div>
+    </footer>
+    </body>
+</html>

Added: synapse/site/3_0_1/userguide/samples/sample5.html
URL: http://svn.apache.org/viewvc/synapse/site/3_0_1/userguide/samples/sample5.html?rev=1817077&view=auto
==============================================================================
--- synapse/site/3_0_1/userguide/samples/sample5.html (added)
+++ synapse/site/3_0_1/userguide/samples/sample5.html Mon Dec  4 09:53:57 2017
@@ -0,0 +1,214 @@
+<!DOCTYPE html>
+<!--
+ | Generated by Apache Maven Doxia Site Renderer 1.7.4 at 2017-12-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="20171204" />
+    <meta http-equiv="Content-Language" content="en" />
+    <title>Apache Synapse &#x2013; Apache Synapse - Sample 5</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: 2017-12-04<span class="divider">|</span>
+</li>
+          <li id="projectVersion">Version: 3.0.1</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_5:_Creating_SOAP_Faults_and_Changing_the_Direction_of_Messages"></a>Sample 5: Creating SOAP Faults and Changing the Direction of Messages</h2>
+            
+<div class="xmlConf">&lt;definitions xmlns=&quot;http://ws.apache.org/ns/synapse&quot;&gt;
+
+    &lt;sequence name=&quot;myFaultHandler&quot;&gt;
+        &lt;makefault response=&quot;true&quot;&gt;
+            &lt;code xmlns:tns=&quot;http://www.w3.org/2003/05/soap-envelope&quot; value=&quot;tns:Receiver&quot;/&gt;
+            &lt;reason expression=&quot;get-property('ERROR_MESSAGE')&quot;/&gt;
+        &lt;/makefault&gt;
+        &lt;send/&gt;
+    &lt;/sequence&gt;
+
+    &lt;sequence name=&quot;main&quot; onError=&quot;myFaultHandler&quot;&gt;
+        &lt;in&gt;
+            &lt;switch xmlns:m0=&quot;http://services.samples&quot; source=&quot;//m0:getQuote/m0:request/m0:symbol&quot;&gt;
+                &lt;case regex=&quot;MSFT&quot;&gt;
+                    &lt;send&gt;
+                        &lt;endpoint&gt;
+                            &lt;address uri=&quot;http://bogus:9000/services/NonExistentStockQuoteService&quot;/&gt;
+                        &lt;/endpoint&gt;
+                    &lt;/send&gt;
+                &lt;/case&gt;
+                &lt;case regex=&quot;SUN&quot;&gt;
+                    &lt;send&gt;
+                        &lt;endpoint&gt;
+                            &lt;address uri=&quot;http://localhost:9009/services/NonExistentStockQuoteService&quot;/&gt;
+                        &lt;/endpoint&gt;
+                    &lt;/send&gt;
+                &lt;/case&gt;
+            &lt;/switch&gt;
+            &lt;drop/&gt;
+        &lt;/in&gt;
+
+        &lt;out&gt;
+            &lt;send/&gt;
+        &lt;/out&gt;
+    &lt;/sequence&gt;
+
+&lt;/definitions&gt;</div>
+            
+<div class="section">
+<h3><a name="Objective"></a>Objective</h3>
+                
+<p>
+                    Demonstrating how makefault mediator can be used to construct custom SOAP
+                    faults and change the direction (in/out) of messages.
+                </p>
+            </div>
+            
+<div class="section">
+<h3><a name="Pre-requisites"></a>Pre-requisites</h3>
+                
+<p>
+                    </p>
+<ul>                        
+                        
+<li>
+                            Start Synapse using the configuration numbered 5 (repository/conf/sample/synapse_sample_5.xml)
+                            
+<div class="command">
+                                Unix/Linux: sh synapse.sh -sample 5<br />
+                                Windows: synapse.bat -sample 5
+                            </div>
+                        </li>
+                    </ul>
+                
+            </div>
+            
+<div class="section">
+<h3><a name="Executing_the_Client"></a>Executing the Client</h3>
+                
+<p>
+                    When the MSFT stock quote is requested, an unknown host exception would be
+                    generated. A connection refused exception would be generated for the SUN stock
+                    request. These errors are captured and returned to the original client as a SOAP
+                    fault in this example.
+                </p>
+                
+<div class="command">ant stockquote -Daddurl=http://localhost:9000/services/SimpleStockQuoteService -Dtrpurl=http://localhost:8280/ -Dsymbol=MSFT</div>
+                
+<p>returns,</p>
+                
+<div class="consoleOutput">&lt;soapenv:Fault xmlns:soapenv=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot;&gt;
+    &lt;faultcode&gt;soapenv:Client&lt;/faultcode&gt;
+    &lt;faultstring&gt;java.net.UnknownHostException: bogus&lt;/faultstring&gt;
+    &lt;detail /&gt;
+&lt;/soapenv:Fault&gt;</div>
+                
+<p>And </p>
+                
+<div class="command">ant stockquote -Daddurl=http://localhost:9000/services/SimpleStockQuoteService -Dtrpurl=http://localhost:8280/ -Dsymbol=SUN</div>
+                
+<p>returns, </p>
+                
+<div class="consoleOutput">&lt;soapenv:Fault xmlns:soapenv=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot;&gt;
+    &lt;faultcode&gt;soapenv:Client&lt;/faultcode&gt;
+    &lt;faultstring&gt;java.net.ConnectException: Connection refused&lt;/faultstring&gt;
+    &lt;detail /&gt;
+&lt;/soapenv:Fault&gt;</div>
+                
+<p>
+                    Note that the response attribute is set to 'true' on the makefault mediator.
+                    This instructs the mediator to change the direction of messages to 'response'
+                    as messages are transformed into SOAP faults.
+                </p>
+            </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;2017
+<a href="http://www.apache.org/">Apache Software Foundation</a>.
+All rights reserved.</p>
+        </div>
+        </div>
+    </footer>
+    </body>
+</html>

Added: synapse/site/3_0_1/userguide/samples/sample50.html
URL: http://svn.apache.org/viewvc/synapse/site/3_0_1/userguide/samples/sample50.html?rev=1817077&view=auto
==============================================================================
--- synapse/site/3_0_1/userguide/samples/sample50.html (added)
+++ synapse/site/3_0_1/userguide/samples/sample50.html Mon Dec  4 09:53:57 2017
@@ -0,0 +1,199 @@
+<!DOCTYPE html>
+<!--
+ | Generated by Apache Maven Doxia Site Renderer 1.7.4 at 2017-12-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="20171204" />
+    <meta http-equiv="Content-Language" content="en" />
+    <title>Apache Synapse &#x2013; Apache Synapse - Sample 50</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: 2017-12-04<span class="divider">|</span>
+</li>
+          <li id="projectVersion">Version: 3.0.1</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_50:_POX_to_SOAP_Conversion"></a>Sample 50: POX to SOAP Conversion</h2>
+            
+<div class="xmlConf">&lt;definitions xmlns=&quot;http://ws.apache.org/ns/synapse&quot;&gt;
+
+    &lt;sequence name=&quot;main&quot;&gt;
+        &lt;!-- filtering of messages with XPath and regex matches --&gt;
+        &lt;header name=&quot;Action&quot; value=&quot;urn:getQuote&quot;/&gt;
+        &lt;filter source=&quot;get-property('To')&quot; regex=&quot;.*/StockQuote.*&quot;&gt;
+            &lt;then&gt;
+                &lt;send&gt;
+                    &lt;endpoint&gt;
+                        &lt;address uri=&quot;http://localhost:9000/services/SimpleStockQuoteService&quot; format=&quot;soap11&quot;/&gt;
+                    &lt;/endpoint&gt;
+                &lt;/send&gt;
+                &lt;drop/&gt;
+            &lt;/then&gt;
+        &lt;/filter&gt;
+        &lt;send/&gt;
+    &lt;/sequence&gt;
+
+&lt;/definitions&gt;</div>
+            
+<div class="section">
+<h3><a name="Objective"></a>Objective</h3>
+                
+<p>
+                    Demonstrating how to convert a POX (Plain Old XML) message to a standard SOAP 1.1
+                    request.
+                </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 50 (repository/conf/sample/synapse_sample_50.xml)
+                            
+<div class="command">
+                                Unix/Linux: sh synapse.sh -sample 50<br />
+                                Windows: synapse.bat -sample 50
+                            </div>
+                        </li>
+                    </ul>
+                
+            </div>
+            
+<div class="section">
+<h3><a name="Executing_the_Client"></a>Executing the Client</h3>
+                
+<p>
+                    Execute the sample client as follows and send a plain XML getQuote request to
+                    Synapse.
+                </p>
+                
+<div class="command">ant stockquote -Dtrpurl=http://localhost:8280/services/StockQuote -Drest=true</div>
+
+                
+<p>
+                    The request sent by the client will look something like this.
+                </p>
+                
+<div class="consoleOutput">POST /services/StockQuote HTTP/1.1
+Content-Type: application/xml; charset=UTF-8;action=&quot;urn:getQuote&quot;;
+SOAPAction: urn:getQuote
+User-Agent: Axis2
+Host: 127.0.0.1
+Transfer-Encoding: chunked
+
+75
+&lt;m0:getQuote xmlns:m0=&quot;http://services.samples&quot;&gt;
+   &lt;m0:request&gt;
+      &lt;m0:symbol&gt;IBM&lt;/m0:symbol&gt;
+   &lt;/m0:request&gt;
+&lt;/m0:getQuote&gt;0</div>
+                
+<p>
+                    Note that this is simply an XML payload going over the HTTP connection. It is
+                    not a SOAP envelope and hence the content type is set to application/xml. Synapse
+                    will convert the above message to a valid SOAP 1.1 request and send to the sample
+                    Axis2 server. The response from Axis2 will also be a SOAP message, which will
+                    be converted back to POX format before sending back to the client.
+                </p>
+            </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;2017
+<a href="http://www.apache.org/">Apache Software Foundation</a>.
+All rights reserved.</p>
+        </div>
+        </div>
+    </footer>
+    </body>
+</html>



Mime
View raw message