Author: isudana
Date: Wed Dec 28 16:57:20 2016
New Revision: 1776304
URL: http://svn.apache.org/viewvc?rev=1776304&view=rev
Log:
Apply a patch by Chanaka to fix SYNAPSE-1080
Added:
synapse/trunk/java/modules/documentation/src/site/xdoc/userguide/samples/sample15.xml
synapse/trunk/java/modules/documentation/src/site/xdoc/userguide/samples/sample16.xml
synapse/trunk/java/modules/documentation/src/site/xdoc/userguide/samples/sample17.xml
synapse/trunk/java/modules/documentation/src/site/xdoc/userguide/samples/sample59.xml
synapse/trunk/java/modules/documentation/src/site/xdoc/userguide/samples/sample61.xml
synapse/trunk/java/modules/documentation/src/site/xdoc/userguide/samples/sample62.xml
Removed:
synapse/trunk/java/modules/documentation/src/site/xdoc/userguide/samples/sample13.xml
Modified:
synapse/trunk/java/modules/documentation/src/site/xdoc/userguide/samples.xml
synapse/trunk/java/modules/documentation/src/site/xdoc/userguide/samples/sample14.xml
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=1776304&r1=1776303&r2=1776304&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
Wed Dec 28 16:57:20 2016
@@ -50,7 +50,10 @@
<li><a href="samples/sample10.html">Sample 10:
Introduction to dynamic endpoints with registry</a></li>
<li><a href="samples/sample11.html">Sample 11: A full
registry based configuration, and sharing a configuration between multiple
instances</a></li>
<li><a href="samples/sample12.html">Sample 12: One-way
messaging / fire-and-forget through Synapse</a></li>
- <li><a href="samples/sample13.html">Sample 13: Dual
channel invocation through Synapse</a></li>
+ <li><a href="samples/sample14.html">Sample 14:
Sequences and Endpoints as local registry items</a></li>
+ <li><a href="samples/sample15.html">Sample 15: Message
Copying and Content Enriching with Enrich Mediator</a></li>
+ <li><a href="samples/sample16.html">Sample 16:
Introduction to dynamic and static keys</a></li>
+ <li><a href="samples/sample17.html">Sample 17:
Introduction to the payloadFactory mediator</a></li>
</ul>
</p>
</subsection>
@@ -66,6 +69,9 @@
<li><a href="samples/sample56.html">Sample 56: WSDL
endpoint</a></li>
<li><a href="samples/sample57.html">Sample 57: Dynamic
load balancing between 3 nodes</a></li>
<li><a href="samples/sample58.html">Sample 58: Static
load balancing between 3 nodes</a></li>
+ <li><a href="samples/sample59.html">Sample 59:
Weighted Round-Robin loadbalancing between 3 endpoints</a></li>
+ <li><a href="samples/sample61.html">Sample 61: Routing
message to 3 static recipients</a></li>
+ <li><a href="samples/sample62.html">Sample 62: Routing
message to dynamic recipients</a></li>
</ul>
</p>
</subsection>
Modified:
synapse/trunk/java/modules/documentation/src/site/xdoc/userguide/samples/sample14.xml
URL:
http://svn.apache.org/viewvc/synapse/trunk/java/modules/documentation/src/site/xdoc/userguide/samples/sample14.xml?rev=1776304&r1=1776303&r2=1776304&view=diff
==============================================================================
---
synapse/trunk/java/modules/documentation/src/site/xdoc/userguide/samples/sample14.xml
(original)
+++
synapse/trunk/java/modules/documentation/src/site/xdoc/userguide/samples/sample14.xml
Wed Dec 28 16:57:20 2016
@@ -17,7 +17,7 @@
</properties>
<body>
<section name="Sample 14: Sequences and Endpoints as local
registry items">
- <div class="xmlConf"><pre
xml:space="preserve"><definitions
xmlns="http://ws.apache.org/ns/synapse"
+ <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">
@@ -44,7 +44,7 @@
</out>
</sequence>
-</definitions></pre></div>
+</definitions></div>
<subsection name="Objective">
<p>
Objective: Sequence and Endpoints as
local registry entries
Added:
synapse/trunk/java/modules/documentation/src/site/xdoc/userguide/samples/sample15.xml
URL:
http://svn.apache.org/viewvc/synapse/trunk/java/modules/documentation/src/site/xdoc/userguide/samples/sample15.xml?rev=1776304&view=auto
==============================================================================
---
synapse/trunk/java/modules/documentation/src/site/xdoc/userguide/samples/sample15.xml
(added)
+++
synapse/trunk/java/modules/documentation/src/site/xdoc/userguide/samples/sample15.xml
Wed Dec 28 16:57:20 2016
@@ -0,0 +1,110 @@
+<?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 15</title>
+ </properties>
+ <body>
+ <section name="Sample 15: Message Copying and Content Enriching with
Enrich Mediator">
+ <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>
+ <subsection name="Objective">
+ <p>
+ Objective: Introduction to Message Copying and Content
Enriching with Enrich Mediator
+ </p>
+ </subsection>
+
+ <subsection name="Pre-requisites">
+ <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>
+ </p>
+ </subsection>
+ <subsection name="Executing the Client">
+ <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>
+
+ </subsection>
+
+ </section>
+ <p>
+ <a href="../samples.html">Back to Catalog</a>
+ </p>
+ </body>
+</document>
\ No newline at end of file
Added:
synapse/trunk/java/modules/documentation/src/site/xdoc/userguide/samples/sample16.xml
URL:
http://svn.apache.org/viewvc/synapse/trunk/java/modules/documentation/src/site/xdoc/userguide/samples/sample16.xml?rev=1776304&view=auto
==============================================================================
---
synapse/trunk/java/modules/documentation/src/site/xdoc/userguide/samples/sample16.xml
(added)
+++
synapse/trunk/java/modules/documentation/src/site/xdoc/userguide/samples/sample16.xml
Wed Dec 28 16:57:20 2016
@@ -0,0 +1,94 @@
+<?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 16</title>
+ </properties>
+ <body>
+ <section name="Sample 16: Introduction to dynamic and static registry
keys">
+ <div class="xmlConf"><definitions
xmlns="http://ws.apache.org/ns/synapse">
+
+ <!-- the SimpleURLRegistry allows access to a URL based registry (e.g.
file:/// or http://) -->
+ <registry provider="org.wso2.carbon.mediation.registry.ESBRegistry">
+ <!-- the root property of the simple URL registry helps resolve a
resource URL as root + key -->
+ <parameter
name="root">file:repository/samples/resources/</parameter>
+ <!-- all resources loaded from the URL registry would be cached for
this number of milli seconds -->
+ <parameter name="cachableDuration">15000</parameter>
+ </registry>
+
+ <sequence name="main">
+ <in>
+ <!-- define the request processing XSLT resource as a property
value -->
+ <property name="symbol" value="transform/transform.xslt"/>
+ <!-- {} denotes that this key is a dynamic one and it is not a
static key -->
+ <!-- use Xpath expression "get-property()" to evaluate real key
from property -->
+ <xslt key="{get-property('symbol')}"/>
+ </in>
+ <out>
+ <!-- transform the standard response back into the custom
format the client expects -->
+ <!-- the key is looked up in the remote registry using a static
key -->
+ <xslt key="transform/transform_back.xslt"/>
+ </out>
+ <send/>
+ </sequence>
+
+</definitions></div>
+ <subsection name="Objective">
+ <p>
+ Objective: Introduction to dynamic and static keys
+ </p>
+ </subsection>
+
+ <subsection name="Pre-requisites">
+ <p>
+ <ul>
+ <li>
+ Start the Synapse configuration numbered 16: i.e.
synapse -sample 16
+ </li>
+ <li>
+ Start the Axis2 server and deploy the
SimpleStockQuoteService if
+ not already done
+ </li>
+ </ul>
+ </p>
+ </subsection>
+ <subsection name="Executing the Client">
+ <p>
+ Execute the client as follows.
+ </p>
+ <div class="command">ant stockquote
-Dtrpurl=http://localhost:8280/services/StockQuote</div>
+ <p>This Sample demonstrates the use of dynamic keys with
mediators. XSLT mediator is used as an
+ example for that and deference between static and dynamic
usage of keys are shown with that.
+ </p>
+ <p>The first registry resource "transform/transform.xslt" is
set as a property value. Inside the
+ XSLT mediator the local property value is lookup using the
Xpath expression "get-property()".
+ Likewise any Xpath expression can be enclosed inside "{ }"
to denote that it is a dynamic key.
+ Then the mediator will evaluate the real value for that
expression.
+ </p>
+ <p>The second XSLT resource "transform/transform_back.xslt" is
used simply as a static key as
+ usual. It is not included inside "{ }" and because of the
mediator directly use the static
+ value as the key.
+ </p>
+ <p>Execute the custom quote client as 'ant stockquote
-Dmode=customquote' and analys the output
+ which is similar to the Sample 8.
+ </p>
+
+ </subsection>
+
+ </section>
+ <p>
+ <a href="../samples.html">Back to Catalog</a>
+ </p>
+ </body>
+</document>
\ No newline at end of file
Added:
synapse/trunk/java/modules/documentation/src/site/xdoc/userguide/samples/sample17.xml
URL:
http://svn.apache.org/viewvc/synapse/trunk/java/modules/documentation/src/site/xdoc/userguide/samples/sample17.xml?rev=1776304&view=auto
==============================================================================
---
synapse/trunk/java/modules/documentation/src/site/xdoc/userguide/samples/sample17.xml
(added)
+++
synapse/trunk/java/modules/documentation/src/site/xdoc/userguide/samples/sample17.xml
Wed Dec 28 16:57:20 2016
@@ -0,0 +1,91 @@
+<?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 17</title>
+ </properties>
+ <body>
+ <section name="Sample 17: Introduction to the payloadFactory mediator">
+ <div class="xmlConf"><definitions
xmlns="http://ws.apache.org/ns/synapse">
+<sequence name="main">
+ <in>
+ <!-- using payloadFactory mediator to transform the request message
-->
+ <payloadFactory media-type="xml">
+ <format>
+ <m:getQuote xmlns:m="http://services.samples">
+ <m:request>
+ <m:symbol>$1</m:symbol>
+ </m:request>
+ </m:getQuote>
+ </format>
+ <args>
+ <arg xmlns:m0="http://services.samples"
expression="//m0:Code"/></args>
+ </payloadFactory>
+ </in>
+ <out>
+ <!-- using payloadFactory mediator to transform the response
message -->
+ <payloadFactory media-type="xml">
+ <format>
+ <m:CheckPriceResponse
xmlns:m="http://services.samples/xsd">
+ <m:Code>$1</m:Code>
+ <m:Price>$2</m:Price>
+ </m:CheckPriceResponse>
+ </format>
+ <args>
+ <arg xmlns:m0="http://services.samples/xsd"
expression="//m0:symbol"/>
+ <arg xmlns:m0="http://services.samples/xsd"
expression="//m0:last"/>
+ </args>
+ </payloadFactory>
+ </out>
+ <send/>
+ </sequence>
+</definitions></div>
+ <subsection name="Objective">
+ <p>
+ Objective: Introduction to the payloadFactory mediator
+ </p>
+ </subsection>
+
+ <subsection name="Pre-requisites">
+ <p>
+ <ul>
+ <li>
+ Start the Synapse configuration numbered 17: i.e.
synapse -sample 17
+ </li>
+ <li>
+ Start the Axis2 server and deploy the
SimpleStockQuoteService if
+ not already done
+ </li>
+ </ul>
+ </p>
+ </subsection>
+ <subsection name="Executing the Client">
+ <p>
+ Execute the client as follows.
+ </p>
+ <div class="command">ant stockquote
-Daddurl=http://localhost:9000/services/SimpleStockQuoteService
-Dtrpurl=http://localhost:8280/ -Dmode=customquote
+ </div>
+ <p>This Sample demonstrates how the PayloadFactory Mediator
can be used to perform transformations
+ as an alternative to the XSLT mediator, which is
demonstrated in Sample 8: Introduction to
+ Static and Dynamic Registry Resources and Using XSLT
Transformations
+ </p>
+
+ </subsection>
+
+ </section>
+ <p>
+ <a href="../samples.html">Back to Catalog</a>
+ </p>
+ </body>
+</document>
Added:
synapse/trunk/java/modules/documentation/src/site/xdoc/userguide/samples/sample59.xml
URL:
http://svn.apache.org/viewvc/synapse/trunk/java/modules/documentation/src/site/xdoc/userguide/samples/sample59.xml?rev=1776304&view=auto
==============================================================================
---
synapse/trunk/java/modules/documentation/src/site/xdoc/userguide/samples/sample59.xml
(added)
+++
synapse/trunk/java/modules/documentation/src/site/xdoc/userguide/samples/sample59.xml
Wed Dec 28 16:57:20 2016
@@ -0,0 +1,135 @@
+<?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 59</title>
+ </properties>
+ <body>
+ <section name="Sample 59: Weighted Round-Robin loadbalancing between 3
endpoints">
+ <div class="xmlConf"><?xml version="1.0" encoding="UTF-8"?>
+<definitions xmlns="http://ws.apache.org/ns/synapse">
+ <sequence name="main" onError="errorHandler">
+ <in>
+ <send>
+ <endpoint>
+ <loadbalance
+
algorithm="org.apache.synapse.endpoints.algorithms.WeightedRoundRobin">
+ <endpoint>
+ <address
uri="http://localhost:9001/services/LBService1">
+ <enableAddressing/>
+ <suspendOnFailure>
+
<initialDuration>20000</initialDuration>
+
<progressionFactor>1.0</progressionFactor>
+ </suspendOnFailure>
+ </address>
+ <property name="loadbalance.weight"
value="1"/>
+ </endpoint>
+ <endpoint>
+ <address
uri="http://localhost:9002/services/LBService1">
+ <enableAddressing/>
+ <suspendOnFailure>
+
<initialDuration>20000</initialDuration>
+
<progressionFactor>1.0</progressionFactor>
+ </suspendOnFailure>
+ </address>
+ <property name="loadbalance.weight"
value="2"/>
+ </endpoint>
+ <endpoint>
+ <address
uri="http://localhost:9003/services/LBService1">
+ <enableAddressing/>
+ <suspendOnFailure>
+
<initialDuration>20000</initialDuration>
+
<progressionFactor>1.0</progressionFactor>
+ </suspendOnFailure>
+ </address>
+ <property name="loadbalance.weight"
value="3"/>
+ </endpoint>
+ </loadbalance>
+ </endpoint>
+ </send>
+ <drop/>
+ </in>
+ <out>
+ <send/>
+ </out>
+ </sequence>
+ <sequence name="errorHandler">
+ <makefault response="true">
+ <code xmlns:tns="http://www.w3.org/2003/05/soap-envelope"
value="tns:Receiver"/>
+ <reason value="COULDN'T SEND THE MESSAGE TO THE SERVER."/>
+ </makefault>
+ <send/>
+ </sequence>
+</definitions></div>
+ <subsection name="Objective">
+ <p>
+ Objective: Demonstrate the weighted load balancing among a
set of
+endpoints
+ </p>
+ </subsection>
+ <subsection name="Pre-requisites">
+ <p>
+ <ul>
+ <li>Start ESB with sample configuration 59. (i.e.
wso2esb-samples -sn 59) </li>
+
+ <li>Deploy the LoadbalanceFailoverService and start three
instances of sample Axis2 server as mentioned in sample 52.</li>
+
+ <li>Above configuration sends messages with the weighted
loadbalance behaviour. Weight of each leaf
+ address endpoint is defined by integer value of
"loadbalance.weight" property associated with each endpoint.
+ If weight of a endpoint is x, x number of requests
will send to that endpoint before switch to next active endpoint.
+ <br/>To test this, run the loadbalancefailover client
to send 100 requests as follows: </li>
+ </ul>
+ </p>
+ </subsection>
+ <subsection name="Executing the Client">
+ <p>
+ Invoke the sample client as follows
+ </p>
+ <div class="command">ant loadbalancefailover -Di=100</div>
+ <p>This client sends 100 requests to the
LoadbalanceFailoverService through
+ ESB. ESB will distribute the load among the three
endpoints mentioned in the
+ configuration in weighted round-robin manner.
LoadbalanceFailoverService appends the
+ name of the server to the response, so that client can
determine which server
+ has processed the message. If you examine the console
output of the client,
+ you can see that requests are processed by three servers
as follows: </p>
+ <div class="consoleOutput">[java] Request: 1 ==> Response
from server: MyServer1
+ [java] Request: 2 ==> Response from server: MyServer2
+ [java] Request: 3 ==> Response from server: MyServer2
+ [java] Request: 4 ==> Response from server: MyServer3
+ [java] Request: 5 ==> Response from server: MyServer3
+ [java] Request: 6 ==> Response from server: MyServer3
+ [java] Request: 7 ==> Response from server: MyServer1
+ [java] Request: 8 ==> Response from server: MyServer2
+ [java] Request: 9 ==> Response from server: MyServer2
+ [java] Request: 10 ==> Response from server: MyServer3
+ [java] Request: 11 ==> Response from server: MyServer3
+ [java] Request: 12 ==> Response from server: MyServer3
+ ...
+ </div>
+ <p>As logs, endpoint with weight 1 received a 1 request and
endpoint with weight 2 received 2
+ requests and etc... in a cycle</p>
+ </subsection>
+ </section>
+ <p>
+ <a href="../samples.html">Back to Catalog</a>
+ </p>
+ </body>
+</document>
Added:
synapse/trunk/java/modules/documentation/src/site/xdoc/userguide/samples/sample61.xml
URL:
http://svn.apache.org/viewvc/synapse/trunk/java/modules/documentation/src/site/xdoc/userguide/samples/sample61.xml?rev=1776304&view=auto
==============================================================================
---
synapse/trunk/java/modules/documentation/src/site/xdoc/userguide/samples/sample61.xml
(added)
+++
synapse/trunk/java/modules/documentation/src/site/xdoc/userguide/samples/sample61.xml
Wed Dec 28 16:57:20 2016
@@ -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 61</title>
+ </properties>
+ <body>
+ <section name="Sample 61: Routing message to 3 static recipients">
+ <div class="xmlConf"><definitions
xmlns="http://ws.apache.org/ns/synapse">
+ <sequence name="errorHandler">
+ <makefault response="true">
+ <code
xmlns:tns="http://www.w3.org/2003/05/soap-envelope"
value="tns:Receiver" />
+ <reason value="COULDN'T SEND THE MESSAGE TO THE
SERVER." />
+ </makefault>
+ <send />
+ </sequence>
+ <sequence name="fault">
+ <log level="full">
+ <property name="MESSAGE" value="Executing default
&quot;fault&quot; sequence" />
+ <property name="ERROR_CODE"
expression="get-property('ERROR_CODE')" />
+ <property name="ERROR_MESSAGE"
expression="get-property('ERROR_MESSAGE')" />
+ </log>
+ <drop />
+ </sequence>
+ <sequence name="main" onError="errorHandler">
+ <in>
+ <property name="EP_LIST"
value="http://localhost:9001/services/SimpleStockQuoteService,http://localhost:9002/services/SimpleStockQuoteService,http://localhost:9003/services/SimpleStockQuoteService"/>
+ <property name="OUT_ONLY" value="true" />
+ <property name="FORCE_SC_ACCEPTED"
value="true" scope="axis2" />
+ <send>
+ <endpoint>
+ <recipientlist>
+ <endpoints
value="{get-property('EP_LIST')}" max-cache="20"
/>
+ </recipientlist>
+ </endpoint>
+ </send>
+ <drop/>
+ </in>
+ </sequence>
+</definitions></div>
+ <subsection name="Objective">
+ <p>
+ Objective: Routing message to 3 static recipients
+ </p>
+ </subsection>
+ <subsection name="Pre-requisites">
+ <p>
+ <ul>
+ <li>Start ESB with sample configuration 61. (i.e.
wso2esb-samples -sn 61) </li>
+
+ <li>Start three instances of the sample Axis2 server
on HTTP ports 9001, 9002 and 9003 and give unique names to each server. For
instructions on starting the Axis2 server, see Starting the Axis2 server </li>
+
+ </ul>
+ </p>
+ </subsection>
+ <subsection name="Executing the Client">
+ <p>
+ Invoke the sample client as follows
+ </p>
+ <div class="command">ant stockquote -Dmode=placeorder
-Dtrpurl=http://localhost:8280/</div>
+
+ </subsection>
+ </section>
+ <p>
+ <a href="../samples.html">Back to Catalog</a>
+ </p>
+ </body>
+</document>
Added:
synapse/trunk/java/modules/documentation/src/site/xdoc/userguide/samples/sample62.xml
URL:
http://svn.apache.org/viewvc/synapse/trunk/java/modules/documentation/src/site/xdoc/userguide/samples/sample62.xml?rev=1776304&view=auto
==============================================================================
---
synapse/trunk/java/modules/documentation/src/site/xdoc/userguide/samples/sample62.xml
(added)
+++
synapse/trunk/java/modules/documentation/src/site/xdoc/userguide/samples/sample62.xml
Wed Dec 28 16:57:20 2016
@@ -0,0 +1,94 @@
+<?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 62</title>
+ </properties>
+ <body>
+ <section name="Sample 62: Routing message to dynamic recipients">
+ <div class="xmlConf"><definitions
xmlns="http://ws.apache.org/ns/synapse">
+ <sequence name="errorHandler">
+ <makefault response="true">
+ <code
xmlns:tns="http://www.w3.org/2003/05/soap-envelope"
value="tns:Receiver" />
+ <reason value="COULDN'T SEND THE MESSAGE TO THE
SERVER." />
+ </makefault>
+ <send />
+ </sequence>
+ <sequence name="fault">
+ <log level="full">
+ <property name="MESSAGE" value="Executing default
&quot;fault&quot; sequence" />
+ <property name="ERROR_CODE"
expression="get-property('ERROR_CODE')" />
+ <property name="ERROR_MESSAGE"
expression="get-property('ERROR_MESSAGE')" />
+ </log>
+ <drop />
+ </sequence>
+ <sequence name="main" onError="errorHandler">
+ <in>
+ <property name="EP_LIST"
value="http://localhost:9001/services/SimpleStockQuoteService,http://localhost:9002/services/SimpleStockQuoteService,http://localhost:9003/services/SimpleStockQuoteService"/>
+ <send>
+ <endpoint>
+ <recipientlist>
+ <endpoints
value="{get-property('EP_LIST')}" max-cache="20"
/>
+ </recipientlist>
+ </endpoint>
+ </send>
+ <drop/>
+ </in>
+ <out>
+ <!--Aggregate responses-->
+ <aggregate>
+ <onComplete xmlns:m0="http://services.samples"
+ expression="//m0:getQuoteResponse">
+ <log level="full"/>
+ <send/>
+ </onComplete>
+ </aggregate>
+ </out>
+ </sequence>
+</definitions></div>
+ <subsection name="Objective">
+ <p>
+ Objective: Routing message to dynamic recipients
+ </p>
+ </subsection>
+ <subsection name="Pre-requisites">
+ <p>
+ <ul>
+ <li>Start ESB with sample configuration 62. (i.e.
wso2esb-samples -sn 62) </li>
+
+ <li>Start three instances of the sample Axis2 server
on HTTP ports 9001, 9002 and 9003 and give unique names to each server. For
instructions on starting the Axis2 server, see Starting the Axis2 server </li>
+
+ </ul>
+ </p>
+ </subsection>
+ <subsection name="Executing the Client">
+ <p>
+ Invoke the sample 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>