Added: synapse/site/3_0_2/userguide/samples/sample12.html URL: http://svn.apache.org/viewvc/synapse/site/3_0_2/userguide/samples/sample12.html?rev=1909775&view=auto ============================================================================== --- synapse/site/3_0_2/userguide/samples/sample12.html (added) +++ synapse/site/3_0_2/userguide/samples/sample12.html Fri May 12 16:09:34 2023 @@ -0,0 +1,189 @@ +<!DOCTYPE html> +<!-- + | Generated by Apache Maven Doxia Site Renderer 1.7.4 at 2023-05-04 + | Rendered using Apache Maven Fluido Skin 1.6 +--> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> + <head> + <meta charset="UTF-8" /> + <meta name="viewport" content="width=device-width, initial-scale=1.0" /> + <meta name="Date-Revision-yyyymmdd" content="20230504" /> + <meta http-equiv="Content-Language" content="en" /> + <title>Apache Synapse – Apache Synapse - Sample 12</title> + <link rel="stylesheet" href="../../css/apache-maven-fluido-1.6.min.css" /> + <link rel="stylesheet" href="../../css/site.css" /> + <link rel="stylesheet" href="../../css/print.css" media="print" /> + <script type="text/javascript" src="../../js/apache-maven-fluido-1.6.min.js"></script> + </head> + <body class="topBarDisabled"> + <div class="container-fluid"> + <div id="banner"> + <div class="pull-left"><div id="bannerLeft"><h2>Apache Synapse</h2> +</div> +</div> + <div class="pull-right"></div> + <div class="clear"><hr/></div> + </div> + + <div id="breadcrumbs"> + <ul class="breadcrumb"> + <li id="publishDate">Last Published: 2023-05-04<span class="divider">|</span> +</li> + <li id="projectVersion">Version: 3.0.2</li> + </ul> + </div> + <div class="row-fluid"> + <div id="leftColumn" class="span2"> + <div class="well sidebar-nav"> +<ul class="nav nav-list"> + <li class="nav-header">Main Menu</li> + <li><a href="../../index.html" title="Home"><span class="none"></span>Home</a> </li> + <li><a href="../../download.html" title="Download"><span class="none"></span>Download</a> </li> + <li><a href="../../history.html" title="History"><span class="none"></span>History</a> </li> + <li><a href="http://www.apache.org/licenses/LICENSE-2.0" class="externalLink" title="License"><span class="none"></span>License</a> </li> + <li><a href="http://www.apache.org/foundation/thanks.html" class="externalLink" title="Thanks"><span class="none"></span>Thanks</a> </li> + <li><a href="http://www.apache.org/foundation/sponsorship.html" class="externalLink" title="Sponsorship"><span class="none"></span>Sponsorship</a> </li> + <li><a href="http://www.apache.org/security/" class="externalLink" title="Security"><span class="none"></span>Security</a> </li> + <li class="nav-header">Documentation</li> + <li><a href="../../userguide/installation.html" title="Installation Guide"><span class="none"></span>Installation Guide</a> </li> + <li><a href="../../userguide/quick_start.html" title="Quick Start Guide"><span class="none"></span>Quick Start Guide</a> </li> + <li><a href="../../userguide/samples/setup/index.html" title="Samples Setup Guide"><span class="none"></span>Samples Setup Guide</a> </li> + <li><a href="../../userguide/samples.html" title="Samples Catalog"><span class="none"></span>Samples Catalog</a> </li> + <li><a href="../../userguide/config.html" title="Configuration Language"><span class="none"></span>Configuration Language</a> </li> + <li><a href="../../userguide/mediators.html" title="Mediators Catalog"><span class="none"></span>Mediators Catalog</a> </li> + <li><a href="../../userguide/transports.html" title="Transports Catalog"><span class="none"></span>Transports Catalog</a> </li> + <li><a href="../../userguide/properties.html" title="Properties Catalog"><span class="none"></span>Properties Catalog</a> </li> + <li><a href="../../userguide/xpath.html" title="XPath functions and Variables"><span class="none"></span>XPath functions and Variables</a> </li> + <li><a href="../../userguide/extending.html" title="Extending Synapse"><span class="none"></span>Extending Synapse</a> </li> + <li><a href="../../userguide/template_library.html" title="Synapse Template Libraries"><span class="none"></span>Synapse Template Libraries</a> </li> + <li><a href="../../userguide/upgrading.html" title="Upgrading"><span class="none"></span>Upgrading</a> </li> + <li><a href="../../userguide/deployment.html" title="Deployment"><span class="none"></span>Deployment</a> </li> + <li><a href="../../apidocs/" title="Javadocs"><span class="none"></span>Javadocs</a> </li> + <li><a href="../../userguide/faq.html" title="FAQ"><span class="none"></span>FAQ</a> </li> + <li class="nav-header">Developer Resources</li> + <li><a href="../../dev/developer-guide.html" title="Developer Guide"><span class="none"></span>Developer Guide</a> </li> + <li><a href="../../dev/best-practices.html" title="Development Best Practices"><span class="none"></span>Development Best Practices</a> </li> + <li><a href="../../dev/release-process.html" title="Release Process"><span class="none"></span>Release Process</a> </li> + <li class="nav-header">Project Details</li> + <li><a href="../../project-info.html" title="Overview"><span class="none"></span>Overview</a> </li> + <li><a href="../../mail-lists.html" title="Mailing Lists"><span class="none"></span>Mailing Lists</a> </li> + <li><a href="../../source-repository.html" title="Source Repository"><span class="none"></span>Source Repository</a> </li> + <li><a href="../../issue-tracking.html" title="Issue Tracking"><span class="none"></span>Issue Tracking</a> </li> + <li><a href="../../dependency-management.html" title="Dependencies"><span class="none"></span>Dependencies</a> </li> + <li><a href="../../team-list.html" title="Project Team"><span class="none"></span>Project Team</a> </li> + </ul> + <hr /> + <div id="poweredBy"> + <div class="clear"></div> + <div class="clear"></div> + <div class="clear"></div> + <div class="clear"></div> + <a href="http://maven.apache.org/" title="Built by Maven" class="poweredBy"><img class="builtBy" alt="Built by Maven" src="../../images/logos/maven-feather.png" /></a> + </div> + </div> + </div> + <div id="bodyColumn" class="span10" > + + + <div class="section"> +<h2><a name="Sample_12:_One-way_Messaging__Fire-and-Forget_Through_Synapse"></a>Sample 12: One-way Messaging / Fire-and-Forget Through Synapse</h2> + +<div class="xmlConf"><definitions xmlns="http://ws.apache.org/ns/synapse"> + + <sequence name="main"> + <!-- filtering of messages with XPath and regex matches --> + <filter source="get-property('To')" regex=".*/StockQuote.*"> + <then> + <send> + <endpoint> + <address uri="http://localhost:9000/services/SimpleStockQuoteService"/> + </endpoint> + </send> + <drop/> + </then> + </filter> + <send/> + </sequence> + +</definitions></div> + +<div class="section"> +<h3><a name="Objective"></a>Objective</h3> + +<p> + Demonstrate the ability to perform one-way invocations (out-only) through + Synapse. + </p> + </div> + +<div class="section"> +<h3><a name="Pre-requisites"></a>Pre-requisites</h3> + +<p> + </p> +<ul> + +<li> + Deploy the SimpleStockQuoteService in the sample Axis2 server and start Axis2 + </li> + +<li> + This sample makes use of the configuration used in <a href="sample1.html">sample 1</a>. + So start Synapse using the configuration numbered 1 (repository/conf/sample/synapse_sample_1.xml) + +<div class="command"> + Unix/Linux: sh synapse.sh -sample 1<br /> + Windows: synapse.bat -sample 1 + </div> + </li> + </ul> + + </div> + +<div class="section"> +<h3><a name="Executing_the_Client"></a>Executing the Client</h3> + +<p> + In this example we will invoke the one-way 'placeOrder' operation on the + SimpleStockQuoteService using the sample client which uses the Axis2 + ServiceClient.fireAndForget() API. To send a placeOrder request from the sample + client, execute the following command. + </p> + +<div class="command">ant stockquote -Daddurl=http://localhost:9000/services/SimpleStockQuoteService -Dtrpurl=http://localhost:8280/ -Dmode=placeorder</div> + + +<p> + Going through the Axis2 server logs, you will notice the following entry, which + confirms that Axis2 accepted the in-only request. + </p> + +<div class="consoleOutput">SimpleStockQuoteService :: Accepted order for : 7482 stocks of IBM at $ 169.27205579038733</div> + + +<p> + If you send your client request through TCPmon, you will notice that the + SimpleStockQuoteService replies to Synapse with a HTTP 202 reply, and that Synapse + in turns replies to the client with a HTTP 202 acknowledgment. + </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 ©2005–2023 +<a href="http://www.apache.org/">Apache Software Foundation</a>. +All rights reserved.</p> + </div> + </div> + </footer> + </body> +</html>
Added: synapse/site/3_0_2/userguide/samples/sample14.html URL: http://svn.apache.org/viewvc/synapse/site/3_0_2/userguide/samples/sample14.html?rev=1909775&view=auto ============================================================================== --- synapse/site/3_0_2/userguide/samples/sample14.html (added) +++ synapse/site/3_0_2/userguide/samples/sample14.html Fri May 12 16:09:34 2023 @@ -0,0 +1,190 @@ +<!DOCTYPE html> +<!-- + | Generated by Apache Maven Doxia Site Renderer 1.7.4 at 2023-05-04 + | Rendered using Apache Maven Fluido Skin 1.6 +--> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> + <head> + <meta charset="UTF-8" /> + <meta name="viewport" content="width=device-width, initial-scale=1.0" /> + <meta name="Date-Revision-yyyymmdd" content="20230504" /> + <meta http-equiv="Content-Language" content="en" /> + <title>Apache Synapse – Apache Synapse - Sample 14</title> + <link rel="stylesheet" href="../../css/apache-maven-fluido-1.6.min.css" /> + <link rel="stylesheet" href="../../css/site.css" /> + <link rel="stylesheet" href="../../css/print.css" media="print" /> + <script type="text/javascript" src="../../js/apache-maven-fluido-1.6.min.js"></script> + </head> + <body class="topBarDisabled"> + <div class="container-fluid"> + <div id="banner"> + <div class="pull-left"><div id="bannerLeft"><h2>Apache Synapse</h2> +</div> +</div> + <div class="pull-right"></div> + <div class="clear"><hr/></div> + </div> + + <div id="breadcrumbs"> + <ul class="breadcrumb"> + <li id="publishDate">Last Published: 2023-05-04<span class="divider">|</span> +</li> + <li id="projectVersion">Version: 3.0.2</li> + </ul> + </div> + <div class="row-fluid"> + <div id="leftColumn" class="span2"> + <div class="well sidebar-nav"> +<ul class="nav nav-list"> + <li class="nav-header">Main Menu</li> + <li><a href="../../index.html" title="Home"><span class="none"></span>Home</a> </li> + <li><a href="../../download.html" title="Download"><span class="none"></span>Download</a> </li> + <li><a href="../../history.html" title="History"><span class="none"></span>History</a> </li> + <li><a href="http://www.apache.org/licenses/LICENSE-2.0" class="externalLink" title="License"><span class="none"></span>License</a> </li> + <li><a href="http://www.apache.org/foundation/thanks.html" class="externalLink" title="Thanks"><span class="none"></span>Thanks</a> </li> + <li><a href="http://www.apache.org/foundation/sponsorship.html" class="externalLink" title="Sponsorship"><span class="none"></span>Sponsorship</a> </li> + <li><a href="http://www.apache.org/security/" class="externalLink" title="Security"><span class="none"></span>Security</a> </li> + <li class="nav-header">Documentation</li> + <li><a href="../../userguide/installation.html" title="Installation Guide"><span class="none"></span>Installation Guide</a> </li> + <li><a href="../../userguide/quick_start.html" title="Quick Start Guide"><span class="none"></span>Quick Start Guide</a> </li> + <li><a href="../../userguide/samples/setup/index.html" title="Samples Setup Guide"><span class="none"></span>Samples Setup Guide</a> </li> + <li><a href="../../userguide/samples.html" title="Samples Catalog"><span class="none"></span>Samples Catalog</a> </li> + <li><a href="../../userguide/config.html" title="Configuration Language"><span class="none"></span>Configuration Language</a> </li> + <li><a href="../../userguide/mediators.html" title="Mediators Catalog"><span class="none"></span>Mediators Catalog</a> </li> + <li><a href="../../userguide/transports.html" title="Transports Catalog"><span class="none"></span>Transports Catalog</a> </li> + <li><a href="../../userguide/properties.html" title="Properties Catalog"><span class="none"></span>Properties Catalog</a> </li> + <li><a href="../../userguide/xpath.html" title="XPath functions and Variables"><span class="none"></span>XPath functions and Variables</a> </li> + <li><a href="../../userguide/extending.html" title="Extending Synapse"><span class="none"></span>Extending Synapse</a> </li> + <li><a href="../../userguide/template_library.html" title="Synapse Template Libraries"><span class="none"></span>Synapse Template Libraries</a> </li> + <li><a href="../../userguide/upgrading.html" title="Upgrading"><span class="none"></span>Upgrading</a> </li> + <li><a href="../../userguide/deployment.html" title="Deployment"><span class="none"></span>Deployment</a> </li> + <li><a href="../../apidocs/" title="Javadocs"><span class="none"></span>Javadocs</a> </li> + <li><a href="../../userguide/faq.html" title="FAQ"><span class="none"></span>FAQ</a> </li> + <li class="nav-header">Developer Resources</li> + <li><a href="../../dev/developer-guide.html" title="Developer Guide"><span class="none"></span>Developer Guide</a> </li> + <li><a href="../../dev/best-practices.html" title="Development Best Practices"><span class="none"></span>Development Best Practices</a> </li> + <li><a href="../../dev/release-process.html" title="Release Process"><span class="none"></span>Release Process</a> </li> + <li class="nav-header">Project Details</li> + <li><a href="../../project-info.html" title="Overview"><span class="none"></span>Overview</a> </li> + <li><a href="../../mail-lists.html" title="Mailing Lists"><span class="none"></span>Mailing Lists</a> </li> + <li><a href="../../source-repository.html" title="Source Repository"><span class="none"></span>Source Repository</a> </li> + <li><a href="../../issue-tracking.html" title="Issue Tracking"><span class="none"></span>Issue Tracking</a> </li> + <li><a href="../../dependency-management.html" title="Dependencies"><span class="none"></span>Dependencies</a> </li> + <li><a href="../../team-list.html" title="Project Team"><span class="none"></span>Project Team</a> </li> + </ul> + <hr /> + <div id="poweredBy"> + <div class="clear"></div> + <div class="clear"></div> + <div class="clear"></div> + <div class="clear"></div> + <a href="http://maven.apache.org/" title="Built by Maven" class="poweredBy"><img class="builtBy" alt="Built by Maven" src="../../images/logos/maven-feather.png" /></a> + </div> + </div> + </div> + <div id="bodyColumn" class="span10" > + + + <div class="section"> +<h2><a name="Sample_14:_Sequences_and_Endpoints_as_local_registry_items"></a>Sample 14: Sequences and Endpoints as local registry items</h2> + +<div class="xmlConf"><definitions xmlns="http://ws.apache.org/ns/synapse" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://ws.apache.org/ns/synapse http://synapse.apache.org/ns/2010/04/configuration/synapse_config.xsd"> + + <localEntry key="local-enrty-ep-key" + src="file:repository/conf/sample/resources/endpoint/dynamic_endpt_1.xml"/> + + <localEntry key="local-enrty-sequence-key"> + <sequence name="dynamic_sequence"> + <log level="custom"> + <property name="message" value="*** Test Message 1 ***"/> + </log> + </sequence> + </localEntry> + + <sequence name="main"> + <in> + <sequence key="local-enrty-sequence-key"/> + <send> + <endpoint key="local-enrty-ep-key"/> + </send> + </in> + <out> + <send/> + </out> + </sequence> + +</definitions></div> + +<div class="section"> +<h3><a name="Objective"></a>Objective</h3> + +<p> + Objective: Sequence and Endpoints as local registry entries + </p> + </div> + + +<div class="section"> +<h3><a name="Pre-requisites"></a>Pre-requisites</h3> + +<p> + </p> +<ul> + +<li> + Start the Synapse configuration numbered 14: i.e. synapse + -sample 14 + </li> + +<li> + Start the Axis2 server and deploy the SimpleStockQuoteService if + not already done + </li> + </ul> + + </div> + +<div class="section"> +<h3><a name="Executing_the_Client"></a>Executing the Client</h3> + +<p> + Execute the client as follows. + </p> + +<div class="command">ant stockquote -Dtrpurl=http://localhost:8280/</div> + +<p>This example shows sequences and endpoints fetched from local + registry. Thus it is possible to have endpoints sequences as + local registry entries including file entries.Execute the + following command to see the sample working, where you will be + able to see the log statement from the fetched sequence from the + local entry and the endpoint will be fetched from the specified + file at runtime and be cached in the system + </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 ©2005–2023 +<a href="http://www.apache.org/">Apache Software Foundation</a>. +All rights reserved.</p> + </div> + </div> + </footer> + </body> +</html> Added: synapse/site/3_0_2/userguide/samples/sample15.html URL: http://svn.apache.org/viewvc/synapse/site/3_0_2/userguide/samples/sample15.html?rev=1909775&view=auto ============================================================================== --- synapse/site/3_0_2/userguide/samples/sample15.html (added) +++ synapse/site/3_0_2/userguide/samples/sample15.html Fri May 12 16:09:34 2023 @@ -0,0 +1,211 @@ +<!DOCTYPE html> +<!-- + | Generated by Apache Maven Doxia Site Renderer 1.7.4 at 2023-05-04 + | Rendered using Apache Maven Fluido Skin 1.6 +--> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> + <head> + <meta charset="UTF-8" /> + <meta name="viewport" content="width=device-width, initial-scale=1.0" /> + <meta name="Date-Revision-yyyymmdd" content="20230504" /> + <meta http-equiv="Content-Language" content="en" /> + <title>Apache Synapse – Apache Synapse - Sample 15</title> + <link rel="stylesheet" href="../../css/apache-maven-fluido-1.6.min.css" /> + <link rel="stylesheet" href="../../css/site.css" /> + <link rel="stylesheet" href="../../css/print.css" media="print" /> + <script type="text/javascript" src="../../js/apache-maven-fluido-1.6.min.js"></script> + </head> + <body class="topBarDisabled"> + <div class="container-fluid"> + <div id="banner"> + <div class="pull-left"><div id="bannerLeft"><h2>Apache Synapse</h2> +</div> +</div> + <div class="pull-right"></div> + <div class="clear"><hr/></div> + </div> + + <div id="breadcrumbs"> + <ul class="breadcrumb"> + <li id="publishDate">Last Published: 2023-05-04<span class="divider">|</span> +</li> + <li id="projectVersion">Version: 3.0.2</li> + </ul> + </div> + <div class="row-fluid"> + <div id="leftColumn" class="span2"> + <div class="well sidebar-nav"> +<ul class="nav nav-list"> + <li class="nav-header">Main Menu</li> + <li><a href="../../index.html" title="Home"><span class="none"></span>Home</a> </li> + <li><a href="../../download.html" title="Download"><span class="none"></span>Download</a> </li> + <li><a href="../../history.html" title="History"><span class="none"></span>History</a> </li> + <li><a href="http://www.apache.org/licenses/LICENSE-2.0" class="externalLink" title="License"><span class="none"></span>License</a> </li> + <li><a href="http://www.apache.org/foundation/thanks.html" class="externalLink" title="Thanks"><span class="none"></span>Thanks</a> </li> + <li><a href="http://www.apache.org/foundation/sponsorship.html" class="externalLink" title="Sponsorship"><span class="none"></span>Sponsorship</a> </li> + <li><a href="http://www.apache.org/security/" class="externalLink" title="Security"><span class="none"></span>Security</a> </li> + <li class="nav-header">Documentation</li> + <li><a href="../../userguide/installation.html" title="Installation Guide"><span class="none"></span>Installation Guide</a> </li> + <li><a href="../../userguide/quick_start.html" title="Quick Start Guide"><span class="none"></span>Quick Start Guide</a> </li> + <li><a href="../../userguide/samples/setup/index.html" title="Samples Setup Guide"><span class="none"></span>Samples Setup Guide</a> </li> + <li><a href="../../userguide/samples.html" title="Samples Catalog"><span class="none"></span>Samples Catalog</a> </li> + <li><a href="../../userguide/config.html" title="Configuration Language"><span class="none"></span>Configuration Language</a> </li> + <li><a href="../../userguide/mediators.html" title="Mediators Catalog"><span class="none"></span>Mediators Catalog</a> </li> + <li><a href="../../userguide/transports.html" title="Transports Catalog"><span class="none"></span>Transports Catalog</a> </li> + <li><a href="../../userguide/properties.html" title="Properties Catalog"><span class="none"></span>Properties Catalog</a> </li> + <li><a href="../../userguide/xpath.html" title="XPath functions and Variables"><span class="none"></span>XPath functions and Variables</a> </li> + <li><a href="../../userguide/extending.html" title="Extending Synapse"><span class="none"></span>Extending Synapse</a> </li> + <li><a href="../../userguide/template_library.html" title="Synapse Template Libraries"><span class="none"></span>Synapse Template Libraries</a> </li> + <li><a href="../../userguide/upgrading.html" title="Upgrading"><span class="none"></span>Upgrading</a> </li> + <li><a href="../../userguide/deployment.html" title="Deployment"><span class="none"></span>Deployment</a> </li> + <li><a href="../../apidocs/" title="Javadocs"><span class="none"></span>Javadocs</a> </li> + <li><a href="../../userguide/faq.html" title="FAQ"><span class="none"></span>FAQ</a> </li> + <li class="nav-header">Developer Resources</li> + <li><a href="../../dev/developer-guide.html" title="Developer Guide"><span class="none"></span>Developer Guide</a> </li> + <li><a href="../../dev/best-practices.html" title="Development Best Practices"><span class="none"></span>Development Best Practices</a> </li> + <li><a href="../../dev/release-process.html" title="Release Process"><span class="none"></span>Release Process</a> </li> + <li class="nav-header">Project Details</li> + <li><a href="../../project-info.html" title="Overview"><span class="none"></span>Overview</a> </li> + <li><a href="../../mail-lists.html" title="Mailing Lists"><span class="none"></span>Mailing Lists</a> </li> + <li><a href="../../source-repository.html" title="Source Repository"><span class="none"></span>Source Repository</a> </li> + <li><a href="../../issue-tracking.html" title="Issue Tracking"><span class="none"></span>Issue Tracking</a> </li> + <li><a href="../../dependency-management.html" title="Dependencies"><span class="none"></span>Dependencies</a> </li> + <li><a href="../../team-list.html" title="Project Team"><span class="none"></span>Project Team</a> </li> + </ul> + <hr /> + <div id="poweredBy"> + <div class="clear"></div> + <div class="clear"></div> + <div class="clear"></div> + <div class="clear"></div> + <a href="http://maven.apache.org/" title="Built by Maven" class="poweredBy"><img class="builtBy" alt="Built by Maven" src="../../images/logos/maven-feather.png" /></a> + </div> + </div> + </div> + <div id="bodyColumn" class="span10" > + + + <div class="section"> +<h2><a name="Sample_15:_Message_Copying_and_Content_Enriching_with_Enrich_Mediator"></a>Sample 15: Message Copying and Content Enriching with Enrich Mediator</h2> + +<div class="xmlConf"><definitions xmlns="http://synapse.apache.org/ns/2010/04/configuration"> + <sequence name="main"> + <in> + <enrich> + <source type="custom" + xpath="//m0:getQuote/m0:request/m0:symbol/text()" + xmlns:m0="http://services.samples"/> + <target type="property" property="ORIGINAL_REQ"/> + </enrich> + <enrich> + <source type="body"/> + <target type="property" property="REQUEST_PAYLOAD"/> + </enrich> + + <enrich> + <source type="inline" key="init_req"/> + <target xmlns:m0="http://services.samples" + xpath="//m0:getQuote/m0:request/m0:symbol/text()"/> + </enrich> + + <send> + <endpoint> + <address uri="http://localhost:9000/services/SimpleStockQuoteService"/> + </endpoint> + </send> + <drop/> + </in> + <out> + <header xmlns:urn="http://synapse.apache.org" name="urn:lastTradeTimestamp" value="foo"/> + <enrich> + <source type="custom" + xpath="//ns:getQuoteResponse/ns:return/ax21:lastTradeTimestamp" + xmlns:ns="http://services.samples" + xmlns:ax21="http://services.samples/xsd"/> + <target xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" + xmlns:urn="http://synapse.apache.org" + xpath="/soapenv:Envelope/soapenv:Header/urn:lastTradeTimestamp"/> + </enrich> + <log level="full"/> + <log> + <property name="Original Request Symbol" expression="get-property('ORIGINAL_REQ')"/> + <property name="Request Payload" expression="get-property('REQUEST_PAYLOAD')"/> + </log> + <send/> + </out> + + </sequence> + <localEntry key="init_req">MSFT</localEntry> + <localEntry key="price_req"> + <m0:symbol xmlns:m0="http://services.samples">MSFT</m0:symbol> + </localEntry> + +</definitions></div> + +<div class="section"> +<h3><a name="Objective"></a>Objective</h3> + +<p> + Objective: Introduction to Message Copying and Content Enriching with Enrich Mediator + </p> + </div> + + +<div class="section"> +<h3><a name="Pre-requisites"></a>Pre-requisites</h3> + +<p> + </p> +<ul> + +<li> + Start the Synapse configuration numbered 15: i.e. synapse -sample 15 + </li> + +<li> + Start the Axis2 server and deploy the SimpleStockQuoteService if + not already done + </li> + </ul> + + </div> + +<div class="section"> +<h3><a name="Executing_the_Client"></a>Executing the Client</h3> + +<p> + Execute the client as follows. + </p> + +<div class="command">ant stockquote -Dtrpurl=http://localhost:8280/services/StockQuote</div> + +<p>This sample demonstrate the various capabilities of Enrich Mediator. Inside the in-sequence we store/copy different + parts of the message to properties and just before sending the message to the StockQuoteService, we modify the + request value based on the local entry value-init_req. Then in the out-sequence, the enrich mediator is used + to enrich a soap header based on the 'lastTradeTimestamp' value of the response. + </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 ©2005–2023 +<a href="http://www.apache.org/">Apache Software Foundation</a>. +All rights reserved.</p> + </div> + </div> + </footer> + </body> +</html> Added: synapse/site/3_0_2/userguide/samples/sample150.html URL: http://svn.apache.org/viewvc/synapse/site/3_0_2/userguide/samples/sample150.html?rev=1909775&view=auto ============================================================================== --- synapse/site/3_0_2/userguide/samples/sample150.html (added) +++ synapse/site/3_0_2/userguide/samples/sample150.html Fri May 12 16:09:34 2023 @@ -0,0 +1,185 @@ +<!DOCTYPE html> +<!-- + | Generated by Apache Maven Doxia Site Renderer 1.7.4 at 2023-05-04 + | Rendered using Apache Maven Fluido Skin 1.6 +--> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> + <head> + <meta charset="UTF-8" /> + <meta name="viewport" content="width=device-width, initial-scale=1.0" /> + <meta name="Date-Revision-yyyymmdd" content="20230504" /> + <meta http-equiv="Content-Language" content="en" /> + <title>Apache Synapse – Apache Synapse - Sample 150</title> + <link rel="stylesheet" href="../../css/apache-maven-fluido-1.6.min.css" /> + <link rel="stylesheet" href="../../css/site.css" /> + <link rel="stylesheet" href="../../css/print.css" media="print" /> + <script type="text/javascript" src="../../js/apache-maven-fluido-1.6.min.js"></script> + </head> + <body class="topBarDisabled"> + <div class="container-fluid"> + <div id="banner"> + <div class="pull-left"><div id="bannerLeft"><h2>Apache Synapse</h2> +</div> +</div> + <div class="pull-right"></div> + <div class="clear"><hr/></div> + </div> + + <div id="breadcrumbs"> + <ul class="breadcrumb"> + <li id="publishDate">Last Published: 2023-05-04<span class="divider">|</span> +</li> + <li id="projectVersion">Version: 3.0.2</li> + </ul> + </div> + <div class="row-fluid"> + <div id="leftColumn" class="span2"> + <div class="well sidebar-nav"> +<ul class="nav nav-list"> + <li class="nav-header">Main Menu</li> + <li><a href="../../index.html" title="Home"><span class="none"></span>Home</a> </li> + <li><a href="../../download.html" title="Download"><span class="none"></span>Download</a> </li> + <li><a href="../../history.html" title="History"><span class="none"></span>History</a> </li> + <li><a href="http://www.apache.org/licenses/LICENSE-2.0" class="externalLink" title="License"><span class="none"></span>License</a> </li> + <li><a href="http://www.apache.org/foundation/thanks.html" class="externalLink" title="Thanks"><span class="none"></span>Thanks</a> </li> + <li><a href="http://www.apache.org/foundation/sponsorship.html" class="externalLink" title="Sponsorship"><span class="none"></span>Sponsorship</a> </li> + <li><a href="http://www.apache.org/security/" class="externalLink" title="Security"><span class="none"></span>Security</a> </li> + <li class="nav-header">Documentation</li> + <li><a href="../../userguide/installation.html" title="Installation Guide"><span class="none"></span>Installation Guide</a> </li> + <li><a href="../../userguide/quick_start.html" title="Quick Start Guide"><span class="none"></span>Quick Start Guide</a> </li> + <li><a href="../../userguide/samples/setup/index.html" title="Samples Setup Guide"><span class="none"></span>Samples Setup Guide</a> </li> + <li><a href="../../userguide/samples.html" title="Samples Catalog"><span class="none"></span>Samples Catalog</a> </li> + <li><a href="../../userguide/config.html" title="Configuration Language"><span class="none"></span>Configuration Language</a> </li> + <li><a href="../../userguide/mediators.html" title="Mediators Catalog"><span class="none"></span>Mediators Catalog</a> </li> + <li><a href="../../userguide/transports.html" title="Transports Catalog"><span class="none"></span>Transports Catalog</a> </li> + <li><a href="../../userguide/properties.html" title="Properties Catalog"><span class="none"></span>Properties Catalog</a> </li> + <li><a href="../../userguide/xpath.html" title="XPath functions and Variables"><span class="none"></span>XPath functions and Variables</a> </li> + <li><a href="../../userguide/extending.html" title="Extending Synapse"><span class="none"></span>Extending Synapse</a> </li> + <li><a href="../../userguide/template_library.html" title="Synapse Template Libraries"><span class="none"></span>Synapse Template Libraries</a> </li> + <li><a href="../../userguide/upgrading.html" title="Upgrading"><span class="none"></span>Upgrading</a> </li> + <li><a href="../../userguide/deployment.html" title="Deployment"><span class="none"></span>Deployment</a> </li> + <li><a href="../../apidocs/" title="Javadocs"><span class="none"></span>Javadocs</a> </li> + <li><a href="../../userguide/faq.html" title="FAQ"><span class="none"></span>FAQ</a> </li> + <li class="nav-header">Developer Resources</li> + <li><a href="../../dev/developer-guide.html" title="Developer Guide"><span class="none"></span>Developer Guide</a> </li> + <li><a href="../../dev/best-practices.html" title="Development Best Practices"><span class="none"></span>Development Best Practices</a> </li> + <li><a href="../../dev/release-process.html" title="Release Process"><span class="none"></span>Release Process</a> </li> + <li class="nav-header">Project Details</li> + <li><a href="../../project-info.html" title="Overview"><span class="none"></span>Overview</a> </li> + <li><a href="../../mail-lists.html" title="Mailing Lists"><span class="none"></span>Mailing Lists</a> </li> + <li><a href="../../source-repository.html" title="Source Repository"><span class="none"></span>Source Repository</a> </li> + <li><a href="../../issue-tracking.html" title="Issue Tracking"><span class="none"></span>Issue Tracking</a> </li> + <li><a href="../../dependency-management.html" title="Dependencies"><span class="none"></span>Dependencies</a> </li> + <li><a href="../../team-list.html" title="Project Team"><span class="none"></span>Project Team</a> </li> + </ul> + <hr /> + <div id="poweredBy"> + <div class="clear"></div> + <div class="clear"></div> + <div class="clear"></div> + <div class="clear"></div> + <a href="http://maven.apache.org/" title="Built by Maven" class="poweredBy"><img class="builtBy" alt="Built by Maven" src="../../images/logos/maven-feather.png" /></a> + </div> + </div> + </div> + <div id="bodyColumn" class="span10" > + + + <div class="section"> +<h2><a name="Sample_150:_Introduction_to_Proxy_Services"></a>Sample 150: Introduction to Proxy Services</h2> + +<div class="xmlConf"><definitions xmlns="http://ws.apache.org/ns/synapse"> + + <proxy name="StockQuoteProxy"> + <target> + <endpoint> + <address uri="http://localhost:9000/services/SimpleStockQuoteService"/> + </endpoint> + <outSequence> + <send/> + </outSequence> + </target> + <publishWSDL uri="file:repository/conf/sample/resources/proxy/sample_proxy_1.wsdl"/> + </proxy> + +</definitions></div> + +<div class="section"> +<h3><a name="Objective"></a>Objective</h3> + +<p> + Introduce the concept of proxy services in Synapse + </p> + </div> + +<div class="section"> +<h3><a name="Pre-requisites"></a>Pre-requisites</h3> + +<p> + </p> +<ul> + +<li> + Deploy the SimpleStockQuoteService in the sample Axis2 server and start Axis2 + </li> + +<li> + Start Synapse using the configuration numbered 150 (repository/conf/sample/synapse_sample_150.xml) + +<div class="command"> + Unix/Linux: sh synapse.sh -sample 150<br /> + Windows: synapse.bat -sample 150 + </div> + </li> + </ul> + + </div> + +<div class="section"> +<h3><a name="Executing_the_Client"></a>Executing the Client</h3> + +<p> + Execute the stock quote client as follows and invoke the proxy service: + </p> + +<div class="command">ant stockquote -Daddurl=http://localhost:8280/services/StockQuoteProxy</div> + + +<p> + The 'inSequence' or 'endpoint' or both of these would decide how the message + would be handled after the proxy service receives the message. In the above + example, the request received is forwarded to the sample service hosted on Axis2. + The 'outSequence' defines how the response is handled before it is sent back to + the client. By default, a proxy service is exposed over all transportss + configured for Synapse, unless these are specifically mentioned through the + 'transports' attribute. + </p> + +<p> + You can also view the WSDL of the proxy service by launching a web browser and + navigating to the following URL: + </p> + +<div class="command">http://localhost:8280/services/StockQuoteProxy?wsdl</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 ©2005–2023 +<a href="http://www.apache.org/">Apache Software Foundation</a>. +All rights reserved.</p> + </div> + </div> + </footer> + </body> +</html> Added: synapse/site/3_0_2/userguide/samples/sample151.html URL: http://svn.apache.org/viewvc/synapse/site/3_0_2/userguide/samples/sample151.html?rev=1909775&view=auto ============================================================================== --- synapse/site/3_0_2/userguide/samples/sample151.html (added) +++ synapse/site/3_0_2/userguide/samples/sample151.html Fri May 12 16:09:34 2023 @@ -0,0 +1,193 @@ +<!DOCTYPE html> +<!-- + | Generated by Apache Maven Doxia Site Renderer 1.7.4 at 2023-05-04 + | Rendered using Apache Maven Fluido Skin 1.6 +--> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> + <head> + <meta charset="UTF-8" /> + <meta name="viewport" content="width=device-width, initial-scale=1.0" /> + <meta name="Date-Revision-yyyymmdd" content="20230504" /> + <meta http-equiv="Content-Language" content="en" /> + <title>Apache Synapse – Apache Synapse - Sample 151</title> + <link rel="stylesheet" href="../../css/apache-maven-fluido-1.6.min.css" /> + <link rel="stylesheet" href="../../css/site.css" /> + <link rel="stylesheet" href="../../css/print.css" media="print" /> + <script type="text/javascript" src="../../js/apache-maven-fluido-1.6.min.js"></script> + </head> + <body class="topBarDisabled"> + <div class="container-fluid"> + <div id="banner"> + <div class="pull-left"><div id="bannerLeft"><h2>Apache Synapse</h2> +</div> +</div> + <div class="pull-right"></div> + <div class="clear"><hr/></div> + </div> + + <div id="breadcrumbs"> + <ul class="breadcrumb"> + <li id="publishDate">Last Published: 2023-05-04<span class="divider">|</span> +</li> + <li id="projectVersion">Version: 3.0.2</li> + </ul> + </div> + <div class="row-fluid"> + <div id="leftColumn" class="span2"> + <div class="well sidebar-nav"> +<ul class="nav nav-list"> + <li class="nav-header">Main Menu</li> + <li><a href="../../index.html" title="Home"><span class="none"></span>Home</a> </li> + <li><a href="../../download.html" title="Download"><span class="none"></span>Download</a> </li> + <li><a href="../../history.html" title="History"><span class="none"></span>History</a> </li> + <li><a href="http://www.apache.org/licenses/LICENSE-2.0" class="externalLink" title="License"><span class="none"></span>License</a> </li> + <li><a href="http://www.apache.org/foundation/thanks.html" class="externalLink" title="Thanks"><span class="none"></span>Thanks</a> </li> + <li><a href="http://www.apache.org/foundation/sponsorship.html" class="externalLink" title="Sponsorship"><span class="none"></span>Sponsorship</a> </li> + <li><a href="http://www.apache.org/security/" class="externalLink" title="Security"><span class="none"></span>Security</a> </li> + <li class="nav-header">Documentation</li> + <li><a href="../../userguide/installation.html" title="Installation Guide"><span class="none"></span>Installation Guide</a> </li> + <li><a href="../../userguide/quick_start.html" title="Quick Start Guide"><span class="none"></span>Quick Start Guide</a> </li> + <li><a href="../../userguide/samples/setup/index.html" title="Samples Setup Guide"><span class="none"></span>Samples Setup Guide</a> </li> + <li><a href="../../userguide/samples.html" title="Samples Catalog"><span class="none"></span>Samples Catalog</a> </li> + <li><a href="../../userguide/config.html" title="Configuration Language"><span class="none"></span>Configuration Language</a> </li> + <li><a href="../../userguide/mediators.html" title="Mediators Catalog"><span class="none"></span>Mediators Catalog</a> </li> + <li><a href="../../userguide/transports.html" title="Transports Catalog"><span class="none"></span>Transports Catalog</a> </li> + <li><a href="../../userguide/properties.html" title="Properties Catalog"><span class="none"></span>Properties Catalog</a> </li> + <li><a href="../../userguide/xpath.html" title="XPath functions and Variables"><span class="none"></span>XPath functions and Variables</a> </li> + <li><a href="../../userguide/extending.html" title="Extending Synapse"><span class="none"></span>Extending Synapse</a> </li> + <li><a href="../../userguide/template_library.html" title="Synapse Template Libraries"><span class="none"></span>Synapse Template Libraries</a> </li> + <li><a href="../../userguide/upgrading.html" title="Upgrading"><span class="none"></span>Upgrading</a> </li> + <li><a href="../../userguide/deployment.html" title="Deployment"><span class="none"></span>Deployment</a> </li> + <li><a href="../../apidocs/" title="Javadocs"><span class="none"></span>Javadocs</a> </li> + <li><a href="../../userguide/faq.html" title="FAQ"><span class="none"></span>FAQ</a> </li> + <li class="nav-header">Developer Resources</li> + <li><a href="../../dev/developer-guide.html" title="Developer Guide"><span class="none"></span>Developer Guide</a> </li> + <li><a href="../../dev/best-practices.html" title="Development Best Practices"><span class="none"></span>Development Best Practices</a> </li> + <li><a href="../../dev/release-process.html" title="Release Process"><span class="none"></span>Release Process</a> </li> + <li class="nav-header">Project Details</li> + <li><a href="../../project-info.html" title="Overview"><span class="none"></span>Overview</a> </li> + <li><a href="../../mail-lists.html" title="Mailing Lists"><span class="none"></span>Mailing Lists</a> </li> + <li><a href="../../source-repository.html" title="Source Repository"><span class="none"></span>Source Repository</a> </li> + <li><a href="../../issue-tracking.html" title="Issue Tracking"><span class="none"></span>Issue Tracking</a> </li> + <li><a href="../../dependency-management.html" title="Dependencies"><span class="none"></span>Dependencies</a> </li> + <li><a href="../../team-list.html" title="Project Team"><span class="none"></span>Project Team</a> </li> + </ul> + <hr /> + <div id="poweredBy"> + <div class="clear"></div> + <div class="clear"></div> + <div class="clear"></div> + <div class="clear"></div> + <a href="http://maven.apache.org/" title="Built by Maven" class="poweredBy"><img class="builtBy" alt="Built by Maven" src="../../images/logos/maven-feather.png" /></a> + </div> + </div> + </div> + <div id="bodyColumn" class="span10" > + + + <div class="section"> +<h2><a name="Sample_151:_Custom_Sequences_and_Endpoints_with_Proxy_Services"></a>Sample 151: Custom Sequences and Endpoints with Proxy Services</h2> + +<div class="xmlConf"><definitions xmlns="http://ws.apache.org/ns/synapse"> + + <localEntry key="proxy_wsdl" + src="file:repository/conf/sample/resources/proxy/sample_proxy_1.wsdl"/> + + <endpoint name="proxy_2_endpoint"> + <address uri="http://localhost:9000/services/SimpleStockQuoteService"/> + </endpoint> + + <sequence name="proxy_1"> + <send> + <endpoint> + <address uri="http://localhost:9000/services/SimpleStockQuoteService"/> + </endpoint> + </send> + </sequence> + + <sequence name="out"> + <send/> + </sequence> + + <proxy name="StockQuoteProxy1"> + <target inSequence="proxy_1" outSequence="out"/> + <publishWSDL key="proxy_wsdl"/> + </proxy> + + <proxy name="StockQuoteProxy2"> + <target endpoint="proxy_2_endpoint" outSequence="out"/> + <publishWSDL key="proxy_wsdl"/> + </proxy> + +</definitions></div> + +<div class="section"> +<h3><a name="Objective"></a>Objective</h3> + +<p> + Demonstrate how to use predefined endpoints and sequences in a proxy service + </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 151 (repository/conf/sample/synapse_sample_151.xml) + +<div class="command"> + Unix/Linux: sh synapse.sh -sample 151<br /> + Windows: synapse.bat -sample 151 + </div> + </li> + </ul> + + </div> + +<div class="section"> +<h3><a name="Executing_the_Client"></a>Executing the Client</h3> + +<p> + This configuration creates two proxy services. The first proxy service + 'StockQuoteProxy1' uses the sequence named 'proxy_1' to process incoming + messages and the sequence named 'out' to process outgoing responses. The second + proxy service, 'StockQuoteProxy2' is set to directly forward messages to the + endpoint named 'proxy_2_endpoint' without any mediation. + </p> + +<p> + You can send a stock quote request to each of these proxy services and receive + the reply generated by the actual service hosted on the Axis2 server instance. + </p> + +<div class="command">ant stockquote -Daddurl=http://localhost:8280/services/StockQuoteProxy1 +<br />ant stockquote -Daddurl=http://localhost:8280/services/StockQuoteProxy2</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 ©2005–2023 +<a href="http://www.apache.org/">Apache Software Foundation</a>. +All rights reserved.</p> + </div> + </div> + </footer> + </body> +</html> Added: synapse/site/3_0_2/userguide/samples/sample152.html URL: http://svn.apache.org/viewvc/synapse/site/3_0_2/userguide/samples/sample152.html?rev=1909775&view=auto ============================================================================== --- synapse/site/3_0_2/userguide/samples/sample152.html (added) +++ synapse/site/3_0_2/userguide/samples/sample152.html Fri May 12 16:09:34 2023 @@ -0,0 +1,231 @@ +<!DOCTYPE html> +<!-- + | Generated by Apache Maven Doxia Site Renderer 1.7.4 at 2023-05-04 + | Rendered using Apache Maven Fluido Skin 1.6 +--> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> + <head> + <meta charset="UTF-8" /> + <meta name="viewport" content="width=device-width, initial-scale=1.0" /> + <meta name="Date-Revision-yyyymmdd" content="20230504" /> + <meta http-equiv="Content-Language" content="en" /> + <title>Apache Synapse – Apache Synapse - Sample 152</title> + <link rel="stylesheet" href="../../css/apache-maven-fluido-1.6.min.css" /> + <link rel="stylesheet" href="../../css/site.css" /> + <link rel="stylesheet" href="../../css/print.css" media="print" /> + <script type="text/javascript" src="../../js/apache-maven-fluido-1.6.min.js"></script> + </head> + <body class="topBarDisabled"> + <div class="container-fluid"> + <div id="banner"> + <div class="pull-left"><div id="bannerLeft"><h2>Apache Synapse</h2> +</div> +</div> + <div class="pull-right"></div> + <div class="clear"><hr/></div> + </div> + + <div id="breadcrumbs"> + <ul class="breadcrumb"> + <li id="publishDate">Last Published: 2023-05-04<span class="divider">|</span> +</li> + <li id="projectVersion">Version: 3.0.2</li> + </ul> + </div> + <div class="row-fluid"> + <div id="leftColumn" class="span2"> + <div class="well sidebar-nav"> +<ul class="nav nav-list"> + <li class="nav-header">Main Menu</li> + <li><a href="../../index.html" title="Home"><span class="none"></span>Home</a> </li> + <li><a href="../../download.html" title="Download"><span class="none"></span>Download</a> </li> + <li><a href="../../history.html" title="History"><span class="none"></span>History</a> </li> + <li><a href="http://www.apache.org/licenses/LICENSE-2.0" class="externalLink" title="License"><span class="none"></span>License</a> </li> + <li><a href="http://www.apache.org/foundation/thanks.html" class="externalLink" title="Thanks"><span class="none"></span>Thanks</a> </li> + <li><a href="http://www.apache.org/foundation/sponsorship.html" class="externalLink" title="Sponsorship"><span class="none"></span>Sponsorship</a> </li> + <li><a href="http://www.apache.org/security/" class="externalLink" title="Security"><span class="none"></span>Security</a> </li> + <li class="nav-header">Documentation</li> + <li><a href="../../userguide/installation.html" title="Installation Guide"><span class="none"></span>Installation Guide</a> </li> + <li><a href="../../userguide/quick_start.html" title="Quick Start Guide"><span class="none"></span>Quick Start Guide</a> </li> + <li><a href="../../userguide/samples/setup/index.html" title="Samples Setup Guide"><span class="none"></span>Samples Setup Guide</a> </li> + <li><a href="../../userguide/samples.html" title="Samples Catalog"><span class="none"></span>Samples Catalog</a> </li> + <li><a href="../../userguide/config.html" title="Configuration Language"><span class="none"></span>Configuration Language</a> </li> + <li><a href="../../userguide/mediators.html" title="Mediators Catalog"><span class="none"></span>Mediators Catalog</a> </li> + <li><a href="../../userguide/transports.html" title="Transports Catalog"><span class="none"></span>Transports Catalog</a> </li> + <li><a href="../../userguide/properties.html" title="Properties Catalog"><span class="none"></span>Properties Catalog</a> </li> + <li><a href="../../userguide/xpath.html" title="XPath functions and Variables"><span class="none"></span>XPath functions and Variables</a> </li> + <li><a href="../../userguide/extending.html" title="Extending Synapse"><span class="none"></span>Extending Synapse</a> </li> + <li><a href="../../userguide/template_library.html" title="Synapse Template Libraries"><span class="none"></span>Synapse Template Libraries</a> </li> + <li><a href="../../userguide/upgrading.html" title="Upgrading"><span class="none"></span>Upgrading</a> </li> + <li><a href="../../userguide/deployment.html" title="Deployment"><span class="none"></span>Deployment</a> </li> + <li><a href="../../apidocs/" title="Javadocs"><span class="none"></span>Javadocs</a> </li> + <li><a href="../../userguide/faq.html" title="FAQ"><span class="none"></span>FAQ</a> </li> + <li class="nav-header">Developer Resources</li> + <li><a href="../../dev/developer-guide.html" title="Developer Guide"><span class="none"></span>Developer Guide</a> </li> + <li><a href="../../dev/best-practices.html" title="Development Best Practices"><span class="none"></span>Development Best Practices</a> </li> + <li><a href="../../dev/release-process.html" title="Release Process"><span class="none"></span>Release Process</a> </li> + <li class="nav-header">Project Details</li> + <li><a href="../../project-info.html" title="Overview"><span class="none"></span>Overview</a> </li> + <li><a href="../../mail-lists.html" title="Mailing Lists"><span class="none"></span>Mailing Lists</a> </li> + <li><a href="../../source-repository.html" title="Source Repository"><span class="none"></span>Source Repository</a> </li> + <li><a href="../../issue-tracking.html" title="Issue Tracking"><span class="none"></span>Issue Tracking</a> </li> + <li><a href="../../dependency-management.html" title="Dependencies"><span class="none"></span>Dependencies</a> </li> + <li><a href="../../team-list.html" title="Project Team"><span class="none"></span>Project Team</a> </li> + </ul> + <hr /> + <div id="poweredBy"> + <div class="clear"></div> + <div class="clear"></div> + <div class="clear"></div> + <div class="clear"></div> + <a href="http://maven.apache.org/" title="Built by Maven" class="poweredBy"><img class="builtBy" alt="Built by Maven" src="../../images/logos/maven-feather.png" /></a> + </div> + </div> + </div> + <div id="bodyColumn" class="span10" > + + + <div class="section"> +<h2><a name="Sample_152:_Switching_Transports_and_Message_Format_from_SOAP_to_RESTPOX"></a>Sample 152: Switching Transports and Message Format from SOAP to REST/POX</h2> + +<div class="xmlConf"><definitions xmlns="http://ws.apache.org/ns/synapse"> + + <proxy name="StockQuoteProxy" transports="https"> + <target> + <endpoint> + <address uri="http://localhost:9000/services/SimpleStockQuoteService" format="pox"/> + </endpoint> + <outSequence> + <send/> + </outSequence> + </target> + <publishWSDL uri="file:repository/conf/sample/resources/proxy/sample_proxy_1.wsdl"/> + </proxy> + +</definitions></div> + +<div class="section"> +<h3><a name="Objective"></a>Objective</h3> + +<p> + Demonstrate implementing simple transport switching and message format switching + scenarios using proxy services + </p> + </div> + +<div class="section"> +<h3><a name="Pre-requisites"></a>Pre-requisites</h3> + +<p> + </p> +<ul> + +<li> + Deploy the SimpleStockQuoteService in the sample Axis2 server and start Axis2 + </li> + +<li> + Start Synapse using the configuration numbered 152 (repository/conf/sample/synapse_sample_152.xml) + +<div class="command"> + Unix/Linux: sh synapse.sh -sample 152<br /> + Windows: synapse.bat -sample 152 + </div> + </li> + </ul> + + </div> + +<div class="section"> +<h3><a name="Executing_the_Client"></a>Executing the Client</h3> + +<p> + This configuration demonstrates how a proxy service can be exposed on a subset + of available transports, and how it could switch from one transport to another. + This example exposes the created proxy service only on HTTPS, and thus if the + user tries to access it over HTTP, it would result in a fault. + </p> + +<div class="consoleOutput">ant stockquote -Dtrpurl=http://localhost:8280/services/StockQuoteProxy +... + [java] org.apache.axis2.AxisFault: The service cannot be found for the endpoint reference (EPR) /soap/StockQuoteProxy</div> + + +<p> + Accessing this over HTTPS causes the proxy service to access the SimpleStockQuoteService + on the sample Axis2 server using REST/POX. + </p> + +<div class="command">ant stockquote -Dtrpurl=https://localhost:8243/services/StockQuoteProxy</div> + + +<p> + TCPMon can be used to trace the actual REST/POX messages exchanged between Synapse + and the sample Axis2 server. Synapse converts the POX response back to SOAP before + sending it back to the client. + </p> + +<div class="consoleOutput">POST /services/SimpleStockQuoteService HTTP/1.1 +Host: 127.0.0.1 +SOAPAction: urn:getQuote +Content-Type: application/xml; charset=UTF-8;action="urn:getQuote"; +Transfer-Encoding: chunked +Connection: Keep-Alive +User-Agent: Synapse-HttpComponents-NIO + +75 +<m0:getQuote xmlns:m0="http://services.samples"> + <m0:request> + <m0:symbol>IBM</m0:symbol> + </m0:request> +</m0:getQuote></div> + + +<div class="consoleOutput">HTTP/1.1 200 OK +Content-Type: application/xml; charset=UTF-8;action="http://services.samples/SimpleStockQuoteServicePortType/getQuoteResponse"; +Date: Tue, 24 Apr 2007 14:42:11 GMT +Server: Synapse-HttpComponents-NIO +Transfer-Encoding: chunked +Connection: Keep-Alive + +2b3 +<ns:getQuoteResponse xmlns:ns="http://services.samples"> + <ns:return> + <ns:change>3.7730036841862384</ns:change> + <ns:earnings>-9.950236235550818</ns:earnings> + <ns:high>-80.23868444613285</ns:high> + <ns:last>80.50750970812187</ns:last> + <ns:lastTradeTimestamp>Tue Apr 24 20:42:11 LKT 2007</ns:lastTradeTimestamp> + <ns:low>-79.67368355714606</ns:low> + <ns:marketCap>4.502043663670823E7</ns:marketCap> + <ns:name>IBM Company</ns:name> + <ns:open>-80.02229531286982</ns:open> + <ns:peRatio>25.089295161182022</ns:peRatio> + <ns:percentageChange>4.28842665653824</ns:percentageChange> + <ns:prevClose>87.98107059692451</ns:prevClose> + <ns:symbol>IBM</ns:symbol> + <ns:volume>19941</ns:volume> + </ns:return> +</ns:getQuoteResponse></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 ©2005–2023 +<a href="http://www.apache.org/">Apache Software Foundation</a>. +All rights reserved.</p> + </div> + </div> + </footer> + </body> +</html> Added: synapse/site/3_0_2/userguide/samples/sample153.html URL: http://svn.apache.org/viewvc/synapse/site/3_0_2/userguide/samples/sample153.html?rev=1909775&view=auto ============================================================================== --- synapse/site/3_0_2/userguide/samples/sample153.html (added) +++ synapse/site/3_0_2/userguide/samples/sample153.html Fri May 12 16:09:34 2023 @@ -0,0 +1,200 @@ +<!DOCTYPE html> +<!-- + | Generated by Apache Maven Doxia Site Renderer 1.7.4 at 2023-05-04 + | Rendered using Apache Maven Fluido Skin 1.6 +--> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> + <head> + <meta charset="UTF-8" /> + <meta name="viewport" content="width=device-width, initial-scale=1.0" /> + <meta name="Date-Revision-yyyymmdd" content="20230504" /> + <meta http-equiv="Content-Language" content="en" /> + <title>Apache Synapse – Apache Synapse - Sample 153</title> + <link rel="stylesheet" href="../../css/apache-maven-fluido-1.6.min.css" /> + <link rel="stylesheet" href="../../css/site.css" /> + <link rel="stylesheet" href="../../css/print.css" media="print" /> + <script type="text/javascript" src="../../js/apache-maven-fluido-1.6.min.js"></script> + </head> + <body class="topBarDisabled"> + <div class="container-fluid"> + <div id="banner"> + <div class="pull-left"><div id="bannerLeft"><h2>Apache Synapse</h2> +</div> +</div> + <div class="pull-right"></div> + <div class="clear"><hr/></div> + </div> + + <div id="breadcrumbs"> + <ul class="breadcrumb"> + <li id="publishDate">Last Published: 2023-05-04<span class="divider">|</span> +</li> + <li id="projectVersion">Version: 3.0.2</li> + </ul> + </div> + <div class="row-fluid"> + <div id="leftColumn" class="span2"> + <div class="well sidebar-nav"> +<ul class="nav nav-list"> + <li class="nav-header">Main Menu</li> + <li><a href="../../index.html" title="Home"><span class="none"></span>Home</a> </li> + <li><a href="../../download.html" title="Download"><span class="none"></span>Download</a> </li> + <li><a href="../../history.html" title="History"><span class="none"></span>History</a> </li> + <li><a href="http://www.apache.org/licenses/LICENSE-2.0" class="externalLink" title="License"><span class="none"></span>License</a> </li> + <li><a href="http://www.apache.org/foundation/thanks.html" class="externalLink" title="Thanks"><span class="none"></span>Thanks</a> </li> + <li><a href="http://www.apache.org/foundation/sponsorship.html" class="externalLink" title="Sponsorship"><span class="none"></span>Sponsorship</a> </li> + <li><a href="http://www.apache.org/security/" class="externalLink" title="Security"><span class="none"></span>Security</a> </li> + <li class="nav-header">Documentation</li> + <li><a href="../../userguide/installation.html" title="Installation Guide"><span class="none"></span>Installation Guide</a> </li> + <li><a href="../../userguide/quick_start.html" title="Quick Start Guide"><span class="none"></span>Quick Start Guide</a> </li> + <li><a href="../../userguide/samples/setup/index.html" title="Samples Setup Guide"><span class="none"></span>Samples Setup Guide</a> </li> + <li><a href="../../userguide/samples.html" title="Samples Catalog"><span class="none"></span>Samples Catalog</a> </li> + <li><a href="../../userguide/config.html" title="Configuration Language"><span class="none"></span>Configuration Language</a> </li> + <li><a href="../../userguide/mediators.html" title="Mediators Catalog"><span class="none"></span>Mediators Catalog</a> </li> + <li><a href="../../userguide/transports.html" title="Transports Catalog"><span class="none"></span>Transports Catalog</a> </li> + <li><a href="../../userguide/properties.html" title="Properties Catalog"><span class="none"></span>Properties Catalog</a> </li> + <li><a href="../../userguide/xpath.html" title="XPath functions and Variables"><span class="none"></span>XPath functions and Variables</a> </li> + <li><a href="../../userguide/extending.html" title="Extending Synapse"><span class="none"></span>Extending Synapse</a> </li> + <li><a href="../../userguide/template_library.html" title="Synapse Template Libraries"><span class="none"></span>Synapse Template Libraries</a> </li> + <li><a href="../../userguide/upgrading.html" title="Upgrading"><span class="none"></span>Upgrading</a> </li> + <li><a href="../../userguide/deployment.html" title="Deployment"><span class="none"></span>Deployment</a> </li> + <li><a href="../../apidocs/" title="Javadocs"><span class="none"></span>Javadocs</a> </li> + <li><a href="../../userguide/faq.html" title="FAQ"><span class="none"></span>FAQ</a> </li> + <li class="nav-header">Developer Resources</li> + <li><a href="../../dev/developer-guide.html" title="Developer Guide"><span class="none"></span>Developer Guide</a> </li> + <li><a href="../../dev/best-practices.html" title="Development Best Practices"><span class="none"></span>Development Best Practices</a> </li> + <li><a href="../../dev/release-process.html" title="Release Process"><span class="none"></span>Release Process</a> </li> + <li class="nav-header">Project Details</li> + <li><a href="../../project-info.html" title="Overview"><span class="none"></span>Overview</a> </li> + <li><a href="../../mail-lists.html" title="Mailing Lists"><span class="none"></span>Mailing Lists</a> </li> + <li><a href="../../source-repository.html" title="Source Repository"><span class="none"></span>Source Repository</a> </li> + <li><a href="../../issue-tracking.html" title="Issue Tracking"><span class="none"></span>Issue Tracking</a> </li> + <li><a href="../../dependency-management.html" title="Dependencies"><span class="none"></span>Dependencies</a> </li> + <li><a href="../../team-list.html" title="Project Team"><span class="none"></span>Project Team</a> </li> + </ul> + <hr /> + <div id="poweredBy"> + <div class="clear"></div> + <div class="clear"></div> + <div class="clear"></div> + <div class="clear"></div> + <a href="http://maven.apache.org/" title="Built by Maven" class="poweredBy"><img class="builtBy" alt="Built by Maven" src="../../images/logos/maven-feather.png" /></a> + </div> + </div> + </div> + <div id="bodyColumn" class="span10" > + + + <div class="section"> +<h2><a name="Sample_153:_Routing_the_Messages_without_Processing_the_Security_Headers"></a>Sample 153: Routing the Messages without Processing the Security Headers</h2> + +<div class="xmlConf"><definitions xmlns="http://ws.apache.org/ns/synapse"> + + <proxy name="StockQuoteProxy"> + <target> + <inSequence> + <property name="preserveProcessedHeaders" value="true"/> + <send> + <endpoint> + <address uri="http://localhost:9000/services/SecureStockQuoteService"/> + </endpoint> + </send> + </inSequence> + <outSequence> + <send/> + </outSequence> + </target> + <publishWSDL uri="file:repository/conf/sample/resources/proxy/sample_proxy_1.wsdl"/> + </proxy> + +</definitions></div> + +<div class="section"> +<h3><a name="Objective"></a>Objective</h3> + +<p> + Demonstrate the ability of Synapse to pass SOAP messages through without removing + already processed headers + </p> + </div> + +<div class="section"> +<h3><a name="Pre-requisites"></a>Pre-requisites</h3> + +<p> + </p> +<ul> + +<li> + Download and install the Java Cryptography Extension (JCE) unlimited + strength policy files for your JDK + </li> + +<li> + Deploy the SecureStockQuoteService in the sample Axis2 server and start Axis2 + </li> + +<li> + Start Synapse using the configuration numbered 153 (repository/conf/sample/synapse_sample_153.xml) + +<div class="command"> + Unix/Linux: sh synapse.sh -sample 153<br /> + Windows: synapse.bat -sample 153 + </div> + </li> + </ul> + + </div> + +<div class="section"> +<h3><a name="Executing_the_Client"></a>Executing the Client</h3> + +<p> + In this sample the proxy service will receive secured messages with security + headers which are flagged 'MustUnderstand'. But since the element 'enableSec' + is not present in the proxy configuration, Synapse will not engage Apache Rampart + on this proxy service. It is expected that a MustUnderstand failure exception + on the AxisEngine would occur before the message arrives at mediation engine. + But Synapse handles this message and gets it through by setting all the + MustUnderstand headers which are not processed as processed. This will enable + Synapse to route the messages without reading the Security headers (just routing + the messages from client to service, both of which are secured). To execute the + client, send a stock quote request to the proxy service, and sign and encrypt + the request by specifying the client side security policy as follows: + </p> + +<div class="command">ant stockquote -Dtrpurl=http://localhost:8280/services/StockQuoteProxy -Dpolicy=./../../repository/conf/sample/resources/policy/client_policy_3.xml</div> + +<p> + By following through the debug logs or TCPMon output, you can see that the + request received by the proxy service was signed and encrypted. Also, looking + up the WSDL of the proxy service by requesting the URL http://localhost:8280/services/StockQuoteProxy?wsdl + reveals that the security policy attachments are not there and security is not engaged. + When sending the message to the backend service, you can verify that the security + headers were there as in the original message to Synapse from client, and that + the response received does use WS-Security, and forwarded back to the client + without any modification. You should note that this won't be a security hole + because the message inside Synapse is signed and encrypted and can only be + forwarded to a secure service. + </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 ©2005–2023 +<a href="http://www.apache.org/">Apache Software Foundation</a>. +All rights reserved.</p> + </div> + </div> + </footer> + </body> +</html>