You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@synapse.apache.org by ve...@apache.org on 2012/09/18 08:56:53 UTC

svn commit: r1387006 - in /synapse/trunk/java/modules/documentation/src/site: ./ xdoc/userguide/ xdoc/userguide/samples/

Author: veithen
Date: Tue Sep 18 06:56:52 2012
New Revision: 1387006

URL: http://svn.apache.org/viewvc?rev=1387006&view=rev
Log:
SYNAPSE-745: Committed EIPLibraryDocumentation.patch. Note that I didn't review the documentation; I just need it to validate the samples with respect to SYNAPSE-905.

Added:
    synapse/trunk/java/modules/documentation/src/site/xdoc/userguide/samples/sample850.xml   (with props)
    synapse/trunk/java/modules/documentation/src/site/xdoc/userguide/samples/sample851.xml   (with props)
    synapse/trunk/java/modules/documentation/src/site/xdoc/userguide/samples/sample852.xml   (with props)
    synapse/trunk/java/modules/documentation/src/site/xdoc/userguide/samples/sample853.xml   (with props)
    synapse/trunk/java/modules/documentation/src/site/xdoc/userguide/samples/sample854.xml   (with props)
    synapse/trunk/java/modules/documentation/src/site/xdoc/userguide/samples/sample855.xml   (with props)
    synapse/trunk/java/modules/documentation/src/site/xdoc/userguide/samples/sample856.xml   (with props)
    synapse/trunk/java/modules/documentation/src/site/xdoc/userguide/samples/sample857.xml   (with props)
    synapse/trunk/java/modules/documentation/src/site/xdoc/userguide/template_library.xml   (with props)
Modified:
    synapse/trunk/java/modules/documentation/src/site/site.xml
    synapse/trunk/java/modules/documentation/src/site/xdoc/userguide/samples.xml

Modified: synapse/trunk/java/modules/documentation/src/site/site.xml
URL: http://svn.apache.org/viewvc/synapse/trunk/java/modules/documentation/src/site/site.xml?rev=1387006&r1=1387005&r2=1387006&view=diff
==============================================================================
--- synapse/trunk/java/modules/documentation/src/site/site.xml (original)
+++ synapse/trunk/java/modules/documentation/src/site/site.xml Tue Sep 18 06:56:52 2012
@@ -43,6 +43,7 @@
             <item name="Mediators Catalog" href="userguide/mediators.html"/>
             <item name="Transports Catalog" href="userguide/transports.html"/>
             <item name="Extending Synapse" href="userguide/extending.html"/>
+            <item name="Synapse Template Libraries" href="userguide/template_library.html"/>
             <item name="Upgrading" href="userguide/upgrading.html"/>
             <item name="Deployment" href="userguide/deployment.html"/>
             <item name="Javadocs" href="apidocs/"/>

Modified: synapse/trunk/java/modules/documentation/src/site/xdoc/userguide/samples.xml
URL: http://svn.apache.org/viewvc/synapse/trunk/java/modules/documentation/src/site/xdoc/userguide/samples.xml?rev=1387006&r1=1387005&r2=1387006&view=diff
==============================================================================
--- synapse/trunk/java/modules/documentation/src/site/xdoc/userguide/samples.xml (original)
+++ synapse/trunk/java/modules/documentation/src/site/xdoc/userguide/samples.xml Tue Sep 18 06:56:52 2012
@@ -260,6 +260,20 @@
                     </ul>
                 </p>
             </subsection>
+            <subsection name="Synapse EIP Library">
+                <p>
+                    <ul>
+                        <li><a href="samples/sample850.html">Sample 850: Introduction to Synapse Callout Block function template</a></li>
+                        <li><a href="samples/sample851.html">Sample 851: Introduction to Synapse Splitter and Aggregator eip function templates</a></li>
+                        <li><a href="samples/sample852.html">Sample 852: Introduction to Synapse Splitter-Agrregator combined function template</a></li>
+                        <li><a href="samples/sample853.html">Sample 853: Introduction to Synapse Scatter-Gather eip function template</a></li>
+<li><a href="samples/sample854.html">Sample 854: Introduction to Synapse Wire Tap eip function template</a></li>
+<li><a href="samples/sample855.html">Sample 855: Introduction to Synapse Content Based Router eip function template</a></li>
+<li><a href="samples/sample856.html">Sample 856: Introduction to Synapse Dynamic Router eip function template</a></li>
+<li><a href="samples/sample857.html">Sample 857: Introduction to Synapse Recipient List eip function template</a></li>
+                    </ul>
+                </p>
+            </subsection>
         </section>
     </body>
 </document>

Added: synapse/trunk/java/modules/documentation/src/site/xdoc/userguide/samples/sample850.xml
URL: http://svn.apache.org/viewvc/synapse/trunk/java/modules/documentation/src/site/xdoc/userguide/samples/sample850.xml?rev=1387006&view=auto
==============================================================================
--- synapse/trunk/java/modules/documentation/src/site/xdoc/userguide/samples/sample850.xml (added)
+++ synapse/trunk/java/modules/documentation/src/site/xdoc/userguide/samples/sample850.xml Tue Sep 18 06:56:52 2012
@@ -0,0 +1,78 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+  ~  Licensed to the Apache Software Foundation (ASF) under one
+  ~  or more contributor license agreements.  See the NOTICE file
+  ~  distributed with this work for additional information
+  ~  regarding copyright ownership.  The ASF licenses this file
+  ~  to you under the Apache License, Version 2.0 (the
+  ~  "License"); you may not use this file except in compliance
+  ~  with the License.  You may obtain a copy of the License at
+  ~
+  ~   http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~  Unless required by applicable law or agreed to in writing,
+  ~  software distributed under the License is distributed on an
+  ~   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~  KIND, either express or implied.  See the License for the
+  ~  specific language governing permissions and limitations
+  ~  under the License.
+  -->
+
+<document>
+    <properties>
+        <title>Apache Synapse - Sample 850</title>
+    </properties>
+    <body>
+        <section name="Sample 850: Introduction to Synapse Callout Block function template">
+            <div class="xmlConf">&lt;!-- Introduction to Synapse Callout Block function template --&gt;
+&lt;definitions xmlns="http://ws.apache.org/ns/synapse"&gt;
+&lt;import xmlns="http://ws.apache.org/ns/synapse" name="EipLibrary" package="synapse.lang.eip" /&gt;
+   &lt;sequence name="main"&gt;
+    &lt;call-template target="synapse.lang.eip.callout_block"&gt;
+        &lt;with-param name="action" value="urn:getQuote"/&gt;
+        &lt;with-param name="service_URL" value="http://localhost:9000/services/SimpleStockQuoteService"/&gt;
+        &lt;with-param xmlns:s11="http://schemas.xmlsoap.org/soap/envelope/" xmlns:s12="http://www.w3.org/2003/05/soap-envelope" name="source_xpath" value="{{s11:Body/child::*[fn:position()=1] | s12:Body/child::*[fn:position()=1]}}"/&gt;
+        &lt;with-param xmlns:s11="http://schemas.xmlsoap.org/soap/envelope/" xmlns:s12="http://www.w3.org/2003/05/soap-envelope" name="target_xpath" value="{{s11:Body/child::*[fn:position()=1] | s12:Body/child::*[fn:position()=1]}}"/&gt;
+    &lt;/call-template&gt;
+     &lt;property name="RESPONSE" value="true"/&gt;
+        &lt;header name="To" action="remove"/&gt;
+        &lt;send/&gt;
+        &lt;drop/&gt;
+&lt;/sequence&gt;
+&lt;/definitions&gt;</div>
+            <subsection name="Objective">
+                <p>
+This pattern is pretty much identical to the Routing slip pattern and this blocks external service invocation during mediation. And useful in scenarios such as service chaining. As default values are assigned to source and target xpaths, one can simply utilize this pattern by just defining serviceURL. This sample is an introduction to Synapse Callout Block function template. 
+                </p>
+            </subsection>
+            <subsection name="Pre-requisites">
+                <p>
+                    <ul>
+                        <li>
+                            Deploy the SimpleStockQuoteService in the sample Axis2 server and start Axis2
+                        </li>
+                        <li>
+                            Start Synapse using the configuration numbered 850 (repository/conf/sample/synapse_sample_850.xml)
+                            <div class="command">
+                                Unix/Linux: sh synapse.sh -sample 850<br/>
+                                Windows: synapse.bat -sample 850
+                            </div>
+                        </li>
+                    </ul>
+                </p>
+            </subsection>
+            <subsection name="Executing the Client">
+<p>
+                    In this sample, the callout block pattern does a synchronized service invocation to the
+                    StockQuoteService using the client request, gets the response and then using the send mediator, the message
+                    is sent back to the client.
+                </p>
+                <p>
+                    Invoke the client as follows.
+                </p>
+                <div class="command">ant stockquote -Daddurl=http://localhost:9000/services/SimpleStockQuoteService -Dtrpurl=http://localhost:8280/</div>
+            </subsection>
+        </section>
+        <p><a href="../samples.html">Back to Catalog</a></p>        
+    </body>
+</document>

Propchange: synapse/trunk/java/modules/documentation/src/site/xdoc/userguide/samples/sample850.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: synapse/trunk/java/modules/documentation/src/site/xdoc/userguide/samples/sample851.xml
URL: http://svn.apache.org/viewvc/synapse/trunk/java/modules/documentation/src/site/xdoc/userguide/samples/sample851.xml?rev=1387006&view=auto
==============================================================================
--- synapse/trunk/java/modules/documentation/src/site/xdoc/userguide/samples/sample851.xml (added)
+++ synapse/trunk/java/modules/documentation/src/site/xdoc/userguide/samples/sample851.xml Tue Sep 18 06:56:52 2012
@@ -0,0 +1,101 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+  ~  Licensed to the Apache Software Foundation (ASF) under one
+  ~  or more contributor license agreements.  See the NOTICE file
+  ~  distributed with this work for additional information
+  ~  regarding copyright ownership.  The ASF licenses this file
+  ~  to you under the Apache License, Version 2.0 (the
+  ~  "License"); you may not use this file except in compliance
+  ~  with the License.  You may obtain a copy of the License at
+  ~
+  ~   http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~  Unless required by applicable law or agreed to in writing,
+  ~  software distributed under the License is distributed on an
+  ~   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~  KIND, either express or implied.  See the License for the
+  ~  specific language governing permissions and limitations
+  ~  under the License.
+  -->
+
+<document>
+    <properties>
+        <title>Apache Synapse - Sample 851</title>
+    </properties>
+    <body>
+        <section name="Sample 851: Introduction to Synapse Splitter and Aggregator eip function templates">
+            <div class="xmlConf">&lt;!-- Introduction to Synapse Splitter and Aggregator eip function templates --&gt;
+&lt;definitions xmlns="http://ws.apache.org/ns/synapse"&gt;
+&lt;import xmlns="http://ws.apache.org/ns/synapse" name="EipLibrary" package="synapse.lang.eip" /&gt;
+ &lt;proxy name="StockQuoteProxy" transports="https http" startOnLoad="true" trace="disable"&gt;
+        &lt;target&gt;
+        &lt;inSequence&gt;
+            &lt;log level="custom"&gt;
+                &lt;property name="text" value="splitterAggrigator"/&gt;
+            &lt;/log&gt;
+            &lt;call-template target="synapse.lang.eip.splitter"&gt;
+                &lt;with-param xmlns:m0="http://services.samples" name="iterate_exp" value="{{//m0:getQuote/m0:request}}"/&gt;
+                &lt;with-param xmlns:m0="http://services.samples" name="attach_path" value="{{//m0:getQuote}}"/&gt;
+                &lt;with-param name="attach_path_enabled" value="true"/&gt;
+                &lt;with-param name="endpoint_uri" value="http://localhost:9000/services/SimpleStockQuoteService"/&gt;
+            &lt;/call-template&gt;
+        &lt;/inSequence&gt;
+        &lt;outSequence&gt;
+            &lt;call-template target="synapse.lang.eip.aggregator"&gt;
+                &lt;with-param name="sequence_ref" value="enr"/&gt;
+                &lt;with-param xmlns:m0="http://services.samples" name="aggregator_exp" value="{{//m0:return}}"/&gt;
+                &lt;with-param name="oncomplete_seq_enabled" value="true"/&gt;
+            &lt;/call-template&gt;
+        &lt;/outSequence&gt;
+    &lt;/target&gt;
+    &lt;/proxy&gt;
+&lt;sequence xmlns="http://ws.apache.org/ns/synapse" name="enr"&gt;
+    &lt;log level="custom"&gt;
+        &lt;property name="text" value="seqhit"/&gt;
+    &lt;/log&gt;
+    &lt;enrich&gt;
+        &lt;source xmlns:m1="http://services.samples/xsd" xmlns:m0="http://services.samples" clone="true"
+                xpath="//m0:return[not(preceding-sibling::m0:return/m1:last &lt;= m1:last) and not(following-sibling::m0:return/m1:last &lt; m1:last)]"/&gt;
+        &lt;target type="body"/&gt;
+    &lt;/enrich&gt;
+    &lt;send/&gt;
+&lt;/sequence&gt;
+&lt;/definitions&gt;</div>
+            <subsection name="Objective">
+                <p>
+This sample is an introduction to Synapse Splitter and Aggregator eip function templates. This showcase the combined functionality of Splitter and Aggregator patterns.
+                </p>
+            </subsection>
+            <subsection name="Pre-requisites">
+                <p>
+                    <ul>
+                        <li>
+                            Deploy the SimpleStockQuoteService in the sample Axis2 server and start Axis2
+                        </li>
+                        <li>
+                            Start Synapse using the configuration numbered 851 (repository/conf/sample/synapse_sample_851.xml)
+                            <div class="command">
+                                Unix/Linux: sh synapse.sh -sample 851<br/>
+                                Windows: synapse.bat -sample 851
+                            </div>
+                        </li>
+                    </ul>
+                </p>
+            </subsection>
+            <subsection name="Executing the Client">
+<p>
+In this sample, the message sent to Synapse will be splitted according to the given Xpath expression and does a synchronized call for the given endpoint and aggregates replies. Then mediates to the defined target sequence which filter the response which contains the best quote and send back to the client. Here it uses Splitter and Aggregator function templates.
+</p> 
+<p>
+                    Invoke the client as follows.
+                </p>
+                <div class="command">ant stockquote -Dtrpurl=http://localhost:8280/services/StockQuoteProxy -Ditr=4</div>
+<p>
+The above command will send a request containing four fragments in it.
+</p>
+                
+            </subsection>
+        </section>
+        <p><a href="../samples.html">Back to Catalog</a></p>        
+    </body>
+</document>

Propchange: synapse/trunk/java/modules/documentation/src/site/xdoc/userguide/samples/sample851.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: synapse/trunk/java/modules/documentation/src/site/xdoc/userguide/samples/sample852.xml
URL: http://svn.apache.org/viewvc/synapse/trunk/java/modules/documentation/src/site/xdoc/userguide/samples/sample852.xml?rev=1387006&view=auto
==============================================================================
--- synapse/trunk/java/modules/documentation/src/site/xdoc/userguide/samples/sample852.xml (added)
+++ synapse/trunk/java/modules/documentation/src/site/xdoc/userguide/samples/sample852.xml Tue Sep 18 06:56:52 2012
@@ -0,0 +1,89 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+  ~  Licensed to the Apache Software Foundation (ASF) under one
+  ~  or more contributor license agreements.  See the NOTICE file
+  ~  distributed with this work for additional information
+  ~  regarding copyright ownership.  The ASF licenses this file
+  ~  to you under the Apache License, Version 2.0 (the
+  ~  "License"); you may not use this file except in compliance
+  ~  with the License.  You may obtain a copy of the License at
+  ~
+  ~   http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~  Unless required by applicable law or agreed to in writing,
+  ~  software distributed under the License is distributed on an
+  ~   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~  KIND, either express or implied.  See the License for the
+  ~  specific language governing permissions and limitations
+  ~  under the License.
+  -->
+
+<document>
+    <properties>
+        <title>Apache Synapse - Sample 852</title>
+    </properties>
+    <body>
+        <section name="Sample 852: Introduction to Synapse Splitter-Agrregator eip function template">
+            <div class="xmlConf">&lt;!-- Introduction to Synapse Splitter-Agrregator eip function template --&gt;
+&lt;definitions xmlns="http://ws.apache.org/ns/synapse"&gt;
+&lt;import xmlns="http://ws.apache.org/ns/synapse" name="EipLibrary" package="synapse.lang.eip" /&gt;
+   &lt;sequence name="main"&gt;
+      &lt;call-template target="synapse.lang.eip.splitter_aggregator"&gt;
+        &lt;with-param name="attach_path_enabled" value="true"/&gt;
+        &lt;with-param name="endpoint_uri" value="http://localhost:9000/services/SimpleStockQuoteService"/&gt;
+        &lt;with-param xmlns:m0="http://services.samples" name="iterate_exp" value="{{//m0:getQuote/m0:request}}"/&gt;
+        &lt;with-param xmlns:m0="http://services.samples" name="attach_path" value="{{//m0:getQuote}}"/&gt;
+        &lt;with-param name="sequence_ref" value="enr"/&gt;
+        &lt;with-param xmlns:m0="http://services.samples" name="aggregator_exp" value="{{//m0:return}}"/&gt;
+        &lt;with-param name="oncomplete_seq_enabled" value="true"/&gt;
+    &lt;/call-template&gt;
+&lt;/sequence&gt;
+&lt;sequence xmlns="http://ws.apache.org/ns/synapse" name="enr"&gt;
+    &lt;log level="custom"&gt;
+        &lt;property name="text" value="seqhit"/&gt;
+    &lt;/log&gt;
+    &lt;enrich&gt;
+        &lt;source xmlns:m1="http://services.samples/xsd" xmlns:m0="http://services.samples" clone="true"
+                xpath="//m0:return[not(preceding-sibling::m0:return/m1:last &lt;= m1:last) and not(following-sibling::m0:return/m1:last &lt; m1:last)]"/&gt;
+        &lt;target type="body"/&gt;
+    &lt;/enrich&gt;
+    &lt;send/&gt;
+&lt;/sequence&gt;
+&lt;/definitions&gt;</div>
+            <subsection name="Objective">
+                <p>
+This sample is an introduction to Synapse Splitter-Aggregator combined function template.
+                </p>
+            </subsection>
+            <subsection name="Pre-requisites">
+                <p>
+                    <ul>
+                        <li>
+                            Deploy the SimpleStockQuoteService in the sample Axis2 server and start Axis2
+                        </li>
+                        <li>
+                            Start Synapse using the configuration numbered 852 (repository/conf/sample/synapse_sample_852.xml)
+                            <div class="command">
+                                Unix/Linux: sh synapse.sh -sample 852<br/>
+                                Windows: synapse.bat -sample 852
+                            </div>
+                        </li>
+                    </ul>
+                </p>
+            </subsection>
+            <subsection name="Executing the Client">
+<p>
+In this sample, the message sent to Synapse will be splitted according to the given Xpath expression and does a synchronized call for the given endpoint and aggregates replies. Then mediates to the defined target sequence which filter the response which contains the best quote and send back to the client. Here it only uses Splitter-Aggregator template.
+</p> 
+<p>
+                    Invoke the client as follows.
+                </p>
+                <div class="command">ant stockquote -Dtrpurl=http://localhost:8280/ -Ditr=4</div>
+<p>
+The above command will send a request containing four fragments in it.
+</p>          
+            </subsection>
+        </section>
+        <p><a href="../samples.html">Back to Catalog</a></p>        
+    </body>
+</document>

Propchange: synapse/trunk/java/modules/documentation/src/site/xdoc/userguide/samples/sample852.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: synapse/trunk/java/modules/documentation/src/site/xdoc/userguide/samples/sample853.xml
URL: http://svn.apache.org/viewvc/synapse/trunk/java/modules/documentation/src/site/xdoc/userguide/samples/sample853.xml?rev=1387006&view=auto
==============================================================================
--- synapse/trunk/java/modules/documentation/src/site/xdoc/userguide/samples/sample853.xml (added)
+++ synapse/trunk/java/modules/documentation/src/site/xdoc/userguide/samples/sample853.xml Tue Sep 18 06:56:52 2012
@@ -0,0 +1,86 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+  ~  Licensed to the Apache Software Foundation (ASF) under one
+  ~  or more contributor license agreements.  See the NOTICE file
+  ~  distributed with this work for additional information
+  ~  regarding copyright ownership.  The ASF licenses this file
+  ~  to you under the Apache License, Version 2.0 (the
+  ~  "License"); you may not use this file except in compliance
+  ~  with the License.  You may obtain a copy of the License at
+  ~
+  ~   http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~  Unless required by applicable law or agreed to in writing,
+  ~  software distributed under the License is distributed on an
+  ~   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~  KIND, either express or implied.  See the License for the
+  ~  specific language governing permissions and limitations
+  ~  under the License.
+  -->
+
+<document>
+    <properties>
+        <title>Apache Synapse - Sample 853</title>
+    </properties>
+    <body>
+        <section name="Sample 853: Introduction to Synapse Scatter-Gather eip function template">
+            <div class="xmlConf">&lt;!-- Introduction to Synapse Scatter-Gather eip function template --&gt;
+&lt;definitions xmlns="http://ws.apache.org/ns/synapse"&gt;
+&lt;import xmlns="http://ws.apache.org/ns/synapse" name="EipLibrary" package="synapse.lang.eip" /&gt;
+&lt;sequence name="enr"&gt;
+        &lt;log level="custom"&gt;
+            &lt;property name="text" value="seqhit"/&gt;
+        &lt;/log&gt;
+        &lt;enrich&gt;
+            &lt;source xmlns:m1="http://services.samples/xsd" xmlns:m0="http://services.samples" clone="true" xpath="//m0:return[not(preceding-sibling::m0:return/m1:last &lt;= m1:last) and not(following-sibling::m0:return/m1:last &lt; m1:last)]"/&gt;
+            &lt;target type="body"/&gt;
+        &lt;/enrich&gt;
+        &lt;send/&gt;
+    &lt;/sequence&gt;
+    &lt;sequence name="main"&gt;
+        &lt;call-template target="synapse.lang.eip.scatter_gather"&gt;
+            &lt;with-param name="sequence_ref" value="enr"/&gt;
+            &lt;with-param xmlns:m0="http://services.samples" name="aggregator_exp" value="{{//m0:return}}"/&gt;
+            &lt;with-param name="oncomplete_seq_enabled" value="true"/&gt;
+            &lt;with-param name="recipient_list" value="http://localhost:9001/services/SimpleStockQuoteService,http://localhost:9002/services/SimpleStockQuoteService,http://localhost:9003/services/SimpleStockQuoteService"/&gt;
+        &lt;/call-template&gt;
+    &lt;/sequence&gt;
+&lt;/definitions&gt;</div>
+            <subsection name="Objective">
+                <p>
+This sample is an introduction to Synapse Scatter-Gather eip function template. Scatter-Gather pattern broadcasts a message to multiple recipients and re-aggregates the responses back into a single message and send back to client or mediates to the defined target sequence.
+                </p>
+            </subsection>
+            <subsection name="Pre-requisites">
+                <p>
+                    <ul>
+                        <li>
+                            Start three instances of sample Axis2 server on HTTP ports 9001,9002,9003. And deploy the SimpleStockQuoteService in all of them.
+                        </li>
+                        <li>
+                            Deploy the SimpleStockQuoteService in the sample Axis2 server and start Axis2
+                        </li>
+                        <li>
+                            Start Synapse using the configuration numbered 853 (repository/conf/sample/synapse_sample_853.xml)
+                            <div class="command">
+                                Unix/Linux: sh synapse.sh -sample 853<br/>
+                                Windows: synapse.bat -sample 853
+                            </div>
+                        </li>
+                    </ul>
+                </p>
+            </subsection>
+            <subsection name="Executing the Client">
+<p>
+In this sample, the message sent to Synapse will be broadcast to the specified recipients. Then aggregates replies and mediates to the defined target sequence which filter the response which contains the best quote and send back to the client.
+</p> 
+<p>
+                    Invoke the client as follows.
+                </p>
+                <div class="command">ant stockquote -Dtrpurl=http://localhost:8280/</div>
+
+            </subsection>
+        </section>
+        <p><a href="../samples.html">Back to Catalog</a></p>        
+    </body>
+</document>

Propchange: synapse/trunk/java/modules/documentation/src/site/xdoc/userguide/samples/sample853.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: synapse/trunk/java/modules/documentation/src/site/xdoc/userguide/samples/sample854.xml
URL: http://svn.apache.org/viewvc/synapse/trunk/java/modules/documentation/src/site/xdoc/userguide/samples/sample854.xml?rev=1387006&view=auto
==============================================================================
--- synapse/trunk/java/modules/documentation/src/site/xdoc/userguide/samples/sample854.xml (added)
+++ synapse/trunk/java/modules/documentation/src/site/xdoc/userguide/samples/sample854.xml Tue Sep 18 06:56:52 2012
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+  ~  Licensed to the Apache Software Foundation (ASF) under one
+  ~  or more contributor license agreements.  See the NOTICE file
+  ~  distributed with this work for additional information
+  ~  regarding copyright ownership.  The ASF licenses this file
+  ~  to you under the Apache License, Version 2.0 (the
+  ~  "License"); you may not use this file except in compliance
+  ~  with the License.  You may obtain a copy of the License at
+  ~
+  ~   http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~  Unless required by applicable law or agreed to in writing,
+  ~  software distributed under the License is distributed on an
+  ~   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~  KIND, either express or implied.  See the License for the
+  ~  specific language governing permissions and limitations
+  ~  under the License.
+  -->
+
+<document>
+    <properties>
+        <title>Apache Synapse - Sample 854</title>
+    </properties>
+    <body>
+        <section name="Sample 854: Introduction to Synapse Wire Tap eip function template">
+            <div class="xmlConf">&lt;!-- Introduction to Synapse Wire Tap eip function template --&gt;
+&lt;definitions xmlns="http://ws.apache.org/ns/synapse"&gt;
+&lt;import xmlns="http://ws.apache.org/ns/synapse" name="EipLibrary" package="synapse.lang.eip" /&gt;
+    &lt;sequence name="main"&gt;
+&lt;property name="OUT_ONLY" value="true"/&gt;
+        &lt;property name="FORCE_SC_ACCEPTED" value="true" scope="axis2"/&gt;
+        &lt;call-template target="synapse.lang.eip.wire_tap"&gt;
+&lt;with-param name="wiretap_uri" value="http://localhost:9000/services/SimpleStockQuoteService"/&gt;
+            &lt;with-param name="destination_uri" value="http://localhost:9001/services/SimpleStockQuoteService"/&gt;          
+        &lt;/call-template&gt;
+    &lt;/sequence&gt;
+&lt;/definitions&gt;</div>
+            <subsection name="Objective">
+                <p>
+This sample is an introduction to Synapse Wire Tap eip function template. 
+                </p>
+            </subsection>
+            <subsection name="Pre-requisites">
+                <p>
+                    <ul>
+                        <li>
+                            Start two instances of sample Axis2 server on HTTP ports 9000,9001. And deploy the SimpleStockQuoteService in all of them.
+                        </li>
+                        <li>
+                            Start Synapse using the configuration numbered 854 (repository/conf/sample/synapse_sample_854.xml)
+                            <div class="command">
+                                Unix/Linux: sh synapse.sh -sample 854<br/>
+                                Windows: synapse.bat -sample 854
+                            </div>
+                        </li>
+                    </ul>
+                </p>
+            </subsection>
+            <subsection name="Executing the Client">
+<p>
+In this sample, the messages sent to Synapse will be route to a secondary channel(wiretap_uri) while they are being forwarded to the main channel(destination_uri).
+</p> 
+<p>
+                    Invoke the client as follows.
+                </p>
+                <div class="command">ant stockquote -Dtrpurl=http://localhost:8280/</div>
+            </subsection>
+        </section>
+        <p><a href="../samples.html">Back to Catalog</a></p>        
+    </body>
+</document>

Propchange: synapse/trunk/java/modules/documentation/src/site/xdoc/userguide/samples/sample854.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: synapse/trunk/java/modules/documentation/src/site/xdoc/userguide/samples/sample855.xml
URL: http://svn.apache.org/viewvc/synapse/trunk/java/modules/documentation/src/site/xdoc/userguide/samples/sample855.xml?rev=1387006&view=auto
==============================================================================
--- synapse/trunk/java/modules/documentation/src/site/xdoc/userguide/samples/sample855.xml (added)
+++ synapse/trunk/java/modules/documentation/src/site/xdoc/userguide/samples/sample855.xml Tue Sep 18 06:56:52 2012
@@ -0,0 +1,109 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+  ~  Licensed to the Apache Software Foundation (ASF) under one
+  ~  or more contributor license agreements.  See the NOTICE file
+  ~  distributed with this work for additional information
+  ~  regarding copyright ownership.  The ASF licenses this file
+  ~  to you under the Apache License, Version 2.0 (the
+  ~  "License"); you may not use this file except in compliance
+  ~  with the License.  You may obtain a copy of the License at
+  ~
+  ~   http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~  Unless required by applicable law or agreed to in writing,
+  ~  software distributed under the License is distributed on an
+  ~   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~  KIND, either express or implied.  See the License for the
+  ~  specific language governing permissions and limitations
+  ~  under the License.
+  -->
+
+<document>
+    <properties>
+        <title>Apache Synapse - Sample 855</title>
+    </properties>
+    <body>
+        <section name="Sample 855: Introduction to Synapse Content Based Router eip function template">
+            <div class="xmlConf">&lt;!-- Introduction to Synapse Content Based Router eip function template --&gt;
+&lt;definitions xmlns="http://ws.apache.org/ns/synapse"&gt;
+&lt;import xmlns="http://ws.apache.org/ns/synapse" name="EipLibrary" package="synapse.lang.eip" /&gt;
+&lt;proxy name="StockQuoteProxy" transports="https http" startOnLoad="true" trace="disable"&gt;
+        &lt;target&gt;
+        &lt;inSequence&gt;		
+               &lt;call-template target="synapse.lang.eip.content_based_router"&gt;
+&lt;with-param name="routing_exp" value="{{//m0:getQuote/m0:request/m0:symbol}}" xmlns:m0="http://services.samples"/&gt;
+&lt;with-param name="match_content" value="IBM:cnd1_seq,MSFT:cnd2_seq;cnd3_seq"/&gt;
+    &lt;/call-template&gt;
+&lt;/inSequence&gt;
+&lt;outSequence&gt;
+&lt;send/&gt;
+   &lt;/outSequence&gt;
+    &lt;/target&gt;
+    &lt;/proxy&gt;
+&lt;sequence name="send_seq"&gt;
+        &lt;log level="custom"&gt;
+            &lt;property name="DEBUG" value="Condition Satisfied"/&gt;
+        &lt;/log&gt;
+        &lt;send&gt;
+            &lt;endpoint name="simple"&gt;
+                &lt;address uri="http://localhost:9000/services/SimpleStockQuoteService"/&gt;
+            &lt;/endpoint&gt;
+        &lt;/send&gt;
+    &lt;/sequence&gt;
+
+    &lt;sequence name="cnd1_seq"&gt;
+        &lt;log level="custom"&gt;
+            &lt;property name="MSG_FLOW" value="Condition (I) Satisfied"/&gt;
+        &lt;/log&gt;
+        &lt;sequence key="send_seq"/&gt;
+    &lt;/sequence&gt;
+    &lt;sequence name="cnd2_seq"&gt;
+        &lt;log level="custom"&gt;
+            &lt;property name="MSG_FLOW" value="Condition (II) Satisfied"/&gt;
+        &lt;/log&gt;
+        &lt;sequence key="send_seq"/&gt;
+    &lt;/sequence&gt;
+    &lt;sequence name="cnd3_seq"&gt;
+        &lt;log level="custom"&gt;
+            &lt;property name="MSG_FLOW" value="Condition (III) Satisfied"/&gt;
+        &lt;/log&gt;
+        &lt;sequence key="send_seq"/&gt;
+    &lt;/sequence&gt;
+&lt;/definitions&gt;</div>
+            <subsection name="Objective">
+                <p>
+This sample is an introduction Synapse Content Based Router eip function template.
+                </p>
+            </subsection>
+            <subsection name="Pre-requisites">
+                <p>
+                    <ul>
+                        <li>
+                            Deploy the SimpleStockQuoteService in the sample Axis2 server and start Axis2
+                        </li>
+                        <li>
+                            Start Synapse using the configuration numbered 855 (repository/conf/sample/synapse_sample_855.xml)
+                            <div class="command">
+                                Unix/Linux: sh synapse.sh -sample 855<br/>
+                                Windows: synapse.bat -sample 855
+                            </div>
+                        </li>
+                    </ul>
+                </p>
+            </subsection>
+            <subsection name="Executing the Client">
+<p>
+In this sample, it routes the message by matching the specified Xpath to the regular expression. Execute the StockQuote client in the dumb client mode, specifying 'IBM', 'MSFT' and 'DELL' as the stock symbols.
+</p>
+<p>When the symbol IBM is requested, you will see cnd1_seq sequence is getting executed.</p>
+                <div class="command">ant stockquote -Dtrpurl=http://localhost:8280/services/StockQuoteProxy -Dsymbol=IBM</div>
+<p>When the symbol MSFT is requested, you will see cnd2_seq sequence is getting executed.</p>
+<div class="command">ant stockquote -Dtrpurl=http://localhost:8280/services/StockQuoteProxy -Dsymbol=MSFT</div>
+<p>When the symbol DELL is requested, you will see cnd3_seq sequence is getting executed , which is the default sequence.</p>
+<div class="command">ant stockquote -Dtrpurl=http://localhost:8280/services/StockQuoteProxy -Dsymbol=DELL</div>
+
+            </subsection>
+        </section>
+        <p><a href="../samples.html">Back to Catalog</a></p>        
+    </body>
+</document>

Propchange: synapse/trunk/java/modules/documentation/src/site/xdoc/userguide/samples/sample855.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: synapse/trunk/java/modules/documentation/src/site/xdoc/userguide/samples/sample856.xml
URL: http://svn.apache.org/viewvc/synapse/trunk/java/modules/documentation/src/site/xdoc/userguide/samples/sample856.xml?rev=1387006&view=auto
==============================================================================
--- synapse/trunk/java/modules/documentation/src/site/xdoc/userguide/samples/sample856.xml (added)
+++ synapse/trunk/java/modules/documentation/src/site/xdoc/userguide/samples/sample856.xml Tue Sep 18 06:56:52 2012
@@ -0,0 +1,111 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+  ~  Licensed to the Apache Software Foundation (ASF) under one
+  ~  or more contributor license agreements.  See the NOTICE file
+  ~  distributed with this work for additional information
+  ~  regarding copyright ownership.  The ASF licenses this file
+  ~  to you under the Apache License, Version 2.0 (the
+  ~  "License"); you may not use this file except in compliance
+  ~  with the License.  You may obtain a copy of the License at
+  ~
+  ~   http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~  Unless required by applicable law or agreed to in writing,
+  ~  software distributed under the License is distributed on an
+  ~   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~  KIND, either express or implied.  See the License for the
+  ~  specific language governing permissions and limitations
+  ~  under the License.
+  -->
+
+<document>
+    <properties>
+        <title>Apache Synapse - Sample 856</title>
+    </properties>
+    <body>
+        <section name="Sample 856: Introduction to Synapse Dynamic Router eip function template">
+            <div class="xmlConf">&lt;!-- Introduction to Synapse Dynamic Router eip function template --&gt;
+&lt;definitions xmlns="http://ws.apache.org/ns/synapse"&gt;
+&lt;import xmlns="http://ws.apache.org/ns/synapse" name="EipLibrary" package="synapse.lang.eip" /&gt;
+ &lt;proxy name="StockQuoteProxy" transports="https http" startOnLoad="true" trace="disable"&gt;
+        &lt;target&gt;
+            &lt;inSequence&gt;
+               &lt;call-template target="synapse.lang.eip.dynamic_router"&gt;
+&lt;with-param name="conditions" value="header=foo:bar.*{AND}url=/services/StockQuoteProxy.*;seq=cnd1_seq,header=custom_header1:bar.*{OR}header=custom_header1:foo.*;seq=cnd2_seq,header=custom_header2:foo.*;seq=cnd3_seq"/&gt;
+    &lt;/call-template&gt;
+     &lt;/inSequence&gt;
+            &lt;outSequence&gt;
+                &lt;send/&gt;
+            &lt;/outSequence&gt;
+        &lt;/target&gt;
+    &lt;/proxy&gt;
+&lt;sequence name="send_seq"&gt;
+        &lt;log level="custom"&gt;
+            &lt;property name="DEBUG" value="Condition Satisfied"/&gt;
+        &lt;/log&gt;
+        &lt;send&gt;
+            &lt;endpoint name="simple"&gt;
+                &lt;address uri="http://localhost:9000/services/SimpleStockQuoteService"/&gt;
+            &lt;/endpoint&gt;
+        &lt;/send&gt;
+    &lt;/sequence&gt;
+
+    &lt;sequence name="cnd1_seq"&gt;
+        &lt;log level="custom"&gt;
+            &lt;property name="MSG_FLOW" value="Condition (I) Satisfied"/&gt;
+        &lt;/log&gt;
+        &lt;sequence key="send_seq"/&gt;
+    &lt;/sequence&gt;
+    &lt;sequence name="cnd2_seq"&gt;
+        &lt;log level="custom"&gt;
+            &lt;property name="MSG_FLOW" value="Condition (II) Satisfied"/&gt;
+        &lt;/log&gt;
+        &lt;sequence key="send_seq"/&gt;
+    &lt;/sequence&gt;
+    &lt;sequence name="cnd3_seq"&gt;
+        &lt;log level="custom"&gt;
+            &lt;property name="MSG_FLOW" value="Condition (III) Satisfied"/&gt;
+        &lt;/log&gt;
+        &lt;sequence key="send_seq"/&gt;
+    &lt;/sequence&gt;
+&lt;/definitions&gt;</div>
+            <subsection name="Objective">
+                <p>
+This sample is an introduction to Synapse Dynamic Router eip function template.
+                </p>
+            </subsection>
+            <subsection name="Pre-requisites">
+                <p>
+                    <ul>
+                        <li>
+                            Deploy the SimpleStockQuoteService in the sample Axis2 server and start Axis2
+                        </li>
+                        <li>
+                            Start Synapse using the configuration numbered 856 (repository/conf/sample/synapse_sample_856.xml)
+                            <div class="command">
+                                Unix/Linux: sh synapse.sh -sample 856<br/>
+                                Windows: synapse.bat -sample 856
+                            </div>
+                        </li>
+                    </ul>
+                </p>
+            </subsection>
+            <subsection name="Executing the Client">
+<p>
+In this sample, it checks whether the route condition based on HTTP url,HTTP headers evaluates to true and mediates using the given sequence. We will be using 'curl' as the client in this scenario. 
+</p>
+<p>Invoke curl commands as follows to see dynamic routing in action.</p>
+                <div class="command">curl -d @stockQuoteReq.xml -H "Content-Type: application/soap+xml;charset=UTF-8" -H "foo:bar" "http://localhost:8280/services/StockQuoteProxy</div>
+<p>You will see logs according to cnd1_seq in console.</p>
+ <div class="command">curl -d @stockQuoteReq.xml -H "Content-Type: application/soap+xml;charset=UTF-8" -H "custom_header1:foo" "http://localhost:8280/services/StockQuoteProxy"</div>
+<p>or</p>
+<div class="command">curl -d @stockQuoteReq.xml -H "Content-Type: application/soap+xml;charset=UTF-8" -H "custom_header1:bar" "http://localhost:8280/services/StockQuoteProxy"</div>
+<p>You will see logs according to cnd2_seq in console.</p>
+<div class="command">curl -d @stockQuoteReq.xml -H "Content-Type: application/soap+xml;charset=UTF-8" -H "custom_header2:foo" "http://localhost:8280/services/StockQuoteProxy"</div>
+<p>You will see logs according to cnd3_seq in console.</p>
+
+            </subsection>
+        </section>
+        <p><a href="../samples.html">Back to Catalog</a></p>        
+    </body>
+</document>

Propchange: synapse/trunk/java/modules/documentation/src/site/xdoc/userguide/samples/sample856.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: synapse/trunk/java/modules/documentation/src/site/xdoc/userguide/samples/sample857.xml
URL: http://svn.apache.org/viewvc/synapse/trunk/java/modules/documentation/src/site/xdoc/userguide/samples/sample857.xml?rev=1387006&view=auto
==============================================================================
--- synapse/trunk/java/modules/documentation/src/site/xdoc/userguide/samples/sample857.xml (added)
+++ synapse/trunk/java/modules/documentation/src/site/xdoc/userguide/samples/sample857.xml Tue Sep 18 06:56:52 2012
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+  ~  Licensed to the Apache Software Foundation (ASF) under one
+  ~  or more contributor license agreements.  See the NOTICE file
+  ~  distributed with this work for additional information
+  ~  regarding copyright ownership.  The ASF licenses this file
+  ~  to you under the Apache License, Version 2.0 (the
+  ~  "License"); you may not use this file except in compliance
+  ~  with the License.  You may obtain a copy of the License at
+  ~
+  ~   http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~  Unless required by applicable law or agreed to in writing,
+  ~  software distributed under the License is distributed on an
+  ~   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~  KIND, either express or implied.  See the License for the
+  ~  specific language governing permissions and limitations
+  ~  under the License.
+  -->
+
+<document>
+    <properties>
+        <title>Apache Synapse - Sample 857</title>
+    </properties>
+    <body>
+        <section name="Sample 857: Introduction to Synapse Recipient List eip function template">
+            <div class="xmlConf">&lt;!-- Introduction to Synapse Recipient List eip function template --&gt;
+&lt;definitions xmlns="http://ws.apache.org/ns/synapse"&gt;
+&lt;import xmlns="http://ws.apache.org/ns/synapse" name="EipLibrary" package="synapse.lang.eip" /&gt;
+   &lt;sequence name="main"&gt;
+    &lt;property name="OUT_ONLY" value="true"/&gt;
+                &lt;property name="FORCE_SC_ACCEPTED" value="true" scope="axis2"/&gt;
+    &lt;call-template target="synapse.lang.eip.recipient_list"&gt;
+        &lt;with-param name="recipient_list" value="http://localhost:9000/services/SimpleStockQuoteService,http://localhost:9001/services/SimpleStockQuoteService"/&gt;
+    &lt;/call-template&gt;
+    &lt;drop/&gt;
+&lt;/sequence&gt;
+&lt;/definitions&gt;</div>
+            <subsection name="Objective">
+                <p>
+This sample is an introduction to Synapse Recipient List eip function template. 
+                </p>
+            </subsection>
+            <subsection name="Pre-requisites">
+                <p>
+                    <ul>
+                        <li>
+                           Start two instances of sample Axis2 server on HTTP ports 9000,9001. And deploy the SimpleStockQuoteService in all of them.
+                        </li>
+                        <li>
+                            Start Synapse using the configuration numbered 857 (repository/conf/sample/synapse_sample_857.xml)
+                            <div class="command">
+                                Unix/Linux: sh synapse.sh -sample 857<br/>
+                                Windows: synapse.bat -sample 857
+                            </div>
+                        </li>
+                    </ul>
+                </p>
+            </subsection>
+            <subsection name="Executing the Client">
+<p>
+In this sample, the messages sent to Synapse will be route to the endpoints defined under recipient_list parameter.
+</p>
+<p>
+                    Invoke the client as follows.
+                </p>
+                <div class="command">ant stockquote -Dtrpurl=http://localhost:8280/</div>
+            </subsection>
+        </section>
+        <p><a href="../samples.html">Back to Catalog</a></p>        
+    </body>
+</document>

Propchange: synapse/trunk/java/modules/documentation/src/site/xdoc/userguide/samples/sample857.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: synapse/trunk/java/modules/documentation/src/site/xdoc/userguide/template_library.xml
URL: http://svn.apache.org/viewvc/synapse/trunk/java/modules/documentation/src/site/xdoc/userguide/template_library.xml?rev=1387006&view=auto
==============================================================================
--- synapse/trunk/java/modules/documentation/src/site/xdoc/userguide/template_library.xml (added)
+++ synapse/trunk/java/modules/documentation/src/site/xdoc/userguide/template_library.xml Tue Sep 18 06:56:52 2012
@@ -0,0 +1,454 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+
+<!--
+  ~  Licensed to the Apache Software Foundation (ASF) under one
+  ~  or more contributor license agreements.  See the NOTICE file
+  ~  distributed with this work for additional information
+  ~  regarding copyright ownership.  The ASF licenses this file
+  ~  to you under the Apache License, Version 2.0 (the
+  ~  "License"); you may not use this file except in compliance
+  ~  with the License.  You may obtain a copy of the License at
+  ~
+  ~   http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~  Unless required by applicable law or agreed to in writing,
+  ~  software distributed under the License is distributed on an
+  ~   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~  KIND, either express or implied.  See the License for the
+  ~  specific language governing permissions and limitations
+  ~  under the License.
+  -->
+
+<document>
+    <properties>
+        <title>Apache Synapse - Synapse Template Libraries</title>
+    </properties>
+    <body>
+        <section name="Synapse Template Libraries">
+            <p>
+                Synapse template libraries are a mechanism to group synapse templates and automatically
+                expose it as a self contained set of function modules. It can be considered as a container
+                consisting a set of templates grouped in a particular order. Currently a synapse template
+                library is shipped as a ".zip" file and should be deployed inside
+                {$SYNAPSE_HOME}/repository/conf/synapse-libs .
+                If a given template container is successfully deployed, all
+                templates within the library will be accessible to any Synapse user.
+            </p>
+            <p>Following is a sample skeleton structure of a template library</p>
+            <div class="xmlConf">|-- artifacts.xml
+|-- com
+| `-- synapse
+| `-- sample
+| `-- SynapseLibTestMediator.class
+|-- lib
+| `-- test-mediator-1.0.0.jar
+|-- template_dir-1
+| |-- artifact.xml
+| |-- templ1_ns1.xml
+| `-- templ2_ns1.xml
+`-- template_dir-2
+  |-- artifact.xml
+  |-- templ1_ns2.xml
+  `-- templ2_ns2.xml</div>
+            <p>Following are these components at an overview.</p>
+            <p>
+                <ul>
+                    <li>artifacts.xml
+                        <br/>
+                        This contains synapse library name , package name information and template groupings.
+            <div class="xmlConf">&lt;artifacts&gt;
+    &lt;artifact name="synapse.lib.name" package="synapse.lib.package.name"&gt;
+        &lt;dependency artifact="template.group.name"/&gt;*
+            &lt;description&gt;sample synapse library&lt;/description&gt;?
+    &lt;/artifact&gt;
+&lt;/artifacts&gt;</div></li>
+                    <li>artifact.xml
+                        <br/>
+                        This contains information about each individual template group.
+                        <br/>
+                        ie: - names of the templates in the group , corresponding configuration file ,etc.
+            <div class="xmlConf">&lt;artifact name="template.group.name" type="synapse/template"&gt;
+    &lt;subArtifacts&gt;
+        &lt;artifact name="template.name"&gt;
+            &lt;file&gt;template_file.xml&lt;/file&gt;
+            &lt;description&gt;a sample synapse library function&lt;/description&gt;?
+        &lt;/artifact&gt;*
+    &lt;/subArtifacts&gt;
+&lt;/artifact&gt;</div>
+                    </li>
+                    <li>template_file.xml
+                        <br/>
+                        This contains the implementation of each individual template configuration
+                    </li>
+                    <li>./lib
+                       <br/>
+                       This is the directory to add any classes for class loading or can contain the .class files from
+                       the root
+                       level.
+                   </li>
+               </ul>
+            </p>
+            <p>Also utilizing a synapse library is a three step process.</p>
+            <p>
+                <ul>
+                    <li>Create and deploy the library</li>
+                    <li>Importing the library into synapse
+                        Users should deploy a import_lib_name.xml into
+                        {$SYNAPSE_HOME}/repository/conf/synapse-config/imports
+            <div class="xmlConf">&lt;import xmlns="http://ws.apache.org/ns/synapse" name="SampleLibrary" package="synapse.lib"/&gt;</div>
+                    </li>
+                    <li>Execute functions of library using a template invoker. Target template is a
+                        combination of the package of synapse library and the target template name
+                        target == {synapse_lib_package}.{template name}
+
+                        <div class="xmlConf">&lt;call-template target="synapse.lib.pkg.name.template_name"&gt;
+    &lt;with-param name="..." value="..."/&gt;*
+&lt;/call-template&gt;</div>
+                    </li>
+                </ul>
+            </p>
+        </section>
+        <section name="Synapse Enterprise Integration Patterns library">
+            <p>Synapse Enterprise Integration Patterns library is a container consisting a set of
+                templates grouped in a particular order by implementing commonly used
+                <a href="http://www.eaipatterns.com">Enterprise
+                    Integration Patterns
+                </a>
+                from the set of patterns introduced by Gregor Hohpe and Bobby Woolf.
+                Users can design their solutions using these well-known patterns and then simply configure
+                and use these same patterns in Apache Synapse by calling up the function as required.
+                So this will greatly reduce the effort required when building integrations.
+            </p>
+            <p>Following lists all the built-in patterns of Synapse EIP library currently supports and
+                describes their usage, functionality and configuration syntax.
+                This excludes all generic EIP patterns supported by synapse out of the box.
+            </p>
+            <p>
+                <ul>
+                    <li>
+                        <a href="#CalloutBlock">Callout Block</a>
+                    </li>
+                    <li>
+                        <a href="#Splitter">Splitter</a>
+                    </li>
+                    <li>
+                        <a href="#Aggregator">Aggregator</a>
+                    </li>
+                    <li>
+                        <a href="#SplitterAggregator">Splitter-Aggregator</a>
+                    </li>
+                    <li>
+                        <a href="#ScatterGather">Scatter-Gather</a>
+                    </li>
+                    <li>
+                        <a href="#WireTap">Wire Tap</a>
+                    </li>
+                    <li>
+                        <a href="#ContentBasedRouter">Content-Based Router</a>
+                    </li>
+                    <li>
+                        <a href="#DynamicRouter">Dynamic Router</a>
+                    </li>
+                    <li>
+                        <a href="#RecipientList">Recipient List</a>
+                    </li>
+                </ul>
+            </p>
+            <subsection name="Callout Block" id="CalloutBlock">
+                <p>
+                    This pattern is pretty much identical to the
+                    <a href="http://www.eaipatterns.com/RoutingTable.html">Routing slip pattern</a>
+                    and this blocks
+                    external service invocation during mediation. And useful in scenarios such as service chaining.
+                    As default values are assigned to source and target xpaths,
+                    one can simply utilize this pattern by just defining serviceURL.
+                    <br/>
+                    <br/>
+
+                    Call template target -
+                    <b>synapse.lang.eip.callout_block</b>
+                    <br/>
+                    Parameters
+                    <br/>
+                    <b>service_URL</b>
+                    - URL of the service
+                    <br/>
+                    <b>[action]</b>
+                    - SOAP action(Optional)
+                    <br/>
+                    <b>[source_xpath | source_key]</b>
+                    - Payload of the message( either Xpath or key and Optional)
+                    <br/>
+                    <b>[target_xpath | target_key]</b>
+                    - A node to attach the response element ( either Xpath or key and optional)
+                    <br/>
+                    <br/>
+                    Related Sample - <a href="samples/sample850.html">Sample 850</a>
+                </p>
+            </subsection>
+            <subsection name="Splitter" id="Splitter">
+                <p>
+                    The
+                    <a href="http://www.eaipatterns.com/Sequencer.html">Splitter pattern</a>
+                    breaks out the composite message into a series of individual messages by
+                    finding matching elements for the XPath expression specified and then redirected to the given
+                    endpoint.
+                    <br/>
+                    <br/>
+
+                    Call template target -
+                    <b>synapse.lang.eip.splitter</b>
+                    <br/>
+                    Parameters
+                    <br/>
+                    <b>iterate_exp</b>
+                    - Xpath expression from which element you want to split the message.
+                    <br/>
+                    <b>[attach_path]</b>
+                    - Xpath expression to specify which elements needs to be attached to form new messages.( Optional)
+                    <br/>
+                    <b>endpoint_url</b>
+                    - Endpoint which newly created messages are redirected to.
+                    <br/>
+                    <b>[attach_path_enabled]</b>
+                    - Boolean value to enable attach path. Optional and by default this is false.
+                    <br/>
+                     <br/>
+                    Related Sample - <a href="samples/sample851.html">Sample 851</a>
+                </p>
+            </subsection>
+
+            <subsection name="Aggregator" id="Aggregator">
+                <p>
+                    The
+                    <a href="http://www.eaipatterns.com/Aggregator.html">Aggregator pattern</a>
+                    builds a single message distilled from the individual messages.
+                    And messages will be merged by using the XPath expression specified for aggregator_exp.
+                    <br/>
+                    <br/>
+
+                    Call template target -
+                    <b>synapse.lang.eip.aggregator</b>
+                    <br/>
+                    Parameters
+                    <br/>
+                    <b>aggregator_exp</b>
+                    - An XPath expression specifying based on which elements to aggregate.
+                    <br/>
+                    <b>[sequence_ref]</b>
+                    - target sequence which message should be mediated after aggregation. (Optional and if this is not
+                    specified aggregator will send the aggregated message to the client).
+                    <br/>
+                    <b>[oncomplete_seq_enabled]</b>
+                    - Boolean value to enable target sequence. (Optional and by default this is false)
+                    <br/>
+                     <br/>
+                    Related Sample - <a href="samples/sample851.html">Sample 851</a>
+                </p>
+            </subsection>
+
+            <subsection name="Splitter-Aggregator" id="SplitterAggregator">
+                <p>
+                    This pattern provides the combined functionality of Splitter and Aggregator patterns.
+                    Which is when you specified following parameters this pattern will split the message and
+                    does a synchronized call for the given endpoint and aggregates replies then send back to
+                    client or mediates to the defined target sequence.
+                    <br/>
+                    <br/>
+
+                    Call template target -
+                    <b>synapse.lang.eip.splitter_aggregator</b>
+                    <br/>
+                    Parameters
+                    <br/>
+                    <b>iterate_exp</b>
+                    - An Xpath expression from which element you want to split the message.
+                    <br/>
+                    <b>[attach_path]</b>
+                    - An Xpath expression to specify which elements needs to be attached to form new messages.(
+                    Optional)
+                    <br/>
+                    <b>endpoint_url</b>
+                    - Endpoint which newly created messages are redirected to.
+                    <br/>
+                    <b>[attach_path_enabled]</b>
+                    - Boolean value to enable attach path. Optional and by default this is false.
+                    <br/>
+                    <b>aggregator_exp</b>
+                    - An XPath expression specifying based on which elements to aggregate.
+                    <br/>
+                    <b>[sequence_ref]</b>
+                    - Target sequence which message should be mediated after aggregation. (Optional and if this is not
+                    specified aggregator will send the aggregated message to the client).
+                    <br/>
+                    <b>[oncomplete_seq_enabled]</b>
+                    - Boolean value to enable target sequence. (Optional and by default this is false)
+                    <br/>
+                     <br/>
+                    Related Sample - <a href="samples/sample852.html">Sample 852</a>
+                </p>
+            </subsection>
+
+            <subsection name="Scatter-Gather" id="ScatterGather">
+                <p>
+                    The
+                    <a href="http://www.eaipatterns.com/BroadcastAggregate.html">Scatter-Gather pattern</a>
+                    broadcasts a message to multiple recipients and re-aggregates the
+                    responses back into a single message and send back to client or mediates to the defined
+                    target sequence.
+                    <br/>
+                    <br/>
+
+                    Call template target -
+                    <b>synapse.lang.eip.scatter_gather</b>
+                    <br/>
+                    Parameters
+                    <br/>
+                    <b>aggregator_exp</b>
+                    - An XPath expression specifying based on which elements to aggregate.
+                    <br/>
+                    <b>[sequence_ref]</b>
+                    - Target sequence which message should be mediated after aggregation. (Optional and if this is not
+                    specified aggregator will send the aggregated message to the client).
+                    <br/>
+                    <b>[oncomplete_seq_enabled]</b>
+                    - Boolean value to enable target sequence. (Optional and by default this is false)
+                    <br/>
+                    <b>recipient_list</b>
+                    - Set of recipient endpoints , which should be specified as comma separated values
+                    <br/>
+                     <br/>
+                    Related Sample - <a href="samples/sample853.html">Sample 853</a>
+                </p>
+            </subsection>
+
+            <subsection name="Wire Tap" id="WireTap">
+                <p>
+                    <a href="http://www.eaipatterns.com/WireTap.html">Wire Tap pattern</a>
+                    enables route messages to a secondary channel while they are being forwarded to the main channel.
+                    <br/>
+                    <br/>
+
+                    Call template target -
+                    <b>synapse.lang.eip.wire_tap</b>
+                    <br/>
+                    Parameters
+                    <br/>
+                    <b>destination_uri</b>
+                    - Endpoint of main channel
+                    <br/>
+                    <b>wiretap_uri</b>
+                    - Endpoint of secondary channel
+                    <br/>
+                    <br/>
+                    Related Sample - <a href="samples/sample854.html">Sample 854</a>
+                </p>
+            </subsection>
+
+            <subsection name="Content-Based Router" id="ContentBasedRouter">
+                <p>
+                    The
+                    <a href="http://www.eaipatterns.com/ContentBasedRouter.html">Content Based Router pattern</a>
+                    route messages to the appropriate sequence, according to the message contents.
+                    Routing decision is taken by matching given Xpath expression and Regular Expression.
+                    User can define multiple matching elements as regular expressions and a target sequence where
+                    if any of matching element evaluates to true then it mediates using the target sequence.
+                    If none of the case statements are matching and default case is specified, it will be executed.
+                    <br/>
+                    <br/>
+
+                    Call template target -
+                    <b>synapse.lang.eip.content_base_router</b>
+                    <br/>
+                    Parameters
+                    <br/>
+                    <b>routing_exp</b>
+                    - Here you can specify the source xpath to be evaluated
+                    <br/>
+                    <b>match_content</b>
+                    - This is a String which contains the matching conditions. Following is the syntax of it
+                    <b>"IBM:cnd1_seq,MSFT:cnd2_seq;cnd3_seq"</b>
+                    <br/>
+                    User can define multiple matching conditions using "," splitter. regular expressions and
+                    target sequence should be separated by inserting":". And finally default sequence needs to be
+                    defined
+                    after inserting ";". If there is no any target sequence
+                    defined for a particular regular expression , default it will be mediated to the main sequence.
+                    <br/>
+                    <br/>
+                    Related Sample - <a href="samples/sample855.html">Sample 855</a>
+                </p>
+            </subsection>
+
+            <subsection name="Dynamic Router" id="DynamicRouter">
+                <p>
+                    The
+                    <a href="http://www.eaipatterns.com/DynamicRouter.html">Dynamic Router pattern</a>
+                    route a message consecutively through a series of condition steps,
+                    which is parsed by the “conditions” parameter. The list of sequences through which the message
+                    should pass is decided dynamically at run time.
+                    It checks whether the route condition evaluates to true and mediates using the given sequence and
+                    user can define
+                    routing decision based on the message contents such as HTTP url,HTTP headers or combination of both.
+                    <br/>
+                    <br/>
+
+                    Call template target -
+                    <b>synapse.lang.eip.dynamic_router</b>
+                    <br/>
+                    Parameters
+                    <br/>
+                    <b>conditions</b>
+                    - This is a String which contains the routing rules. Following is the syntax of it.
+                    <br/>
+                    <b>
+                        "header=foo:bar.*{AND}url=/services/;seq=seq1,header=header1:bar.*{OR}header=header1:foo.*;seq=seq2,header=header2:foo.*;seq=seq3"
+                    </b>
+                    <br/>
+                    User can define multiple routing rules by using "," splitter. Routing rule contains following
+                    format,
+                    <br/>
+                    To match HTTP headers , use
+                    <b>header=regEx:seqRef</b>
+                    <br/>
+                    header source and regular expression should be separated by inserting ":"
+                    <br/>
+                    To match HTTP url, use
+                    <b>url=/url</b>
+                    <br/>
+                    Then target sequence needs to be defined after inserting ";"
+                    <br/>
+
+                    Also you can use<b>"{AND}"</b>as to specify logical AND ,
+                    <b>"{OR}"</b>
+                    as to specify logical OR to match
+                    multiple headers and url in your expression.
+                    <br/>
+                    <br/>
+                    Related Sample - <a href="samples/sample856.html">Sample 856</a>
+                </p>
+            </subsection>
+
+            <subsection name="Recipient List" id="RecipientList">
+                <p>
+                    The
+                    <a href="http://www.eaipatterns.com/RecipientList.html">Recipient List pattern</a>
+                    forward the message to all channels associated with the defined set of recipients.
+                    <br/>
+                    <br/>
+
+                    Call template target -
+                    <b>synapse.lang.eip.recipient_list</b>
+                    <br/>
+                    Parameters
+                    <br/>
+                    <b>recipient_list</b>
+                    - set of recipient endpoints , which should be specified as comma separated values
+                    <br/>
+                    <br/>
+                    Related Sample - <a href="samples/sample857.html">Sample 857</a>
+                </p>
+            </subsection>
+        </section>
+    </body>
+</document>

Propchange: synapse/trunk/java/modules/documentation/src/site/xdoc/userguide/template_library.xml
------------------------------------------------------------------------------
    svn:eol-style = native