Author: ruwan
Date: Tue Nov 6 19:29:03 2007
New Revision: 592599
URL: http://svn.apache.org/viewvc?rev=592599&view=rev
Log:
Adding the sample text to the guide
Modified:
webservices/synapse/branches/1.1/src/site/resources/Synapse_Samples.html
Modified:
webservices/synapse/branches/1.1/src/site/resources/Synapse_Samples.html
URL:
http://svn.apache.org/viewvc/webservices/synapse/branches/1.1/src/site/resources/Synapse_Samples.html?rev=592599&r1=592598&r2=592599&view=diff
==============================================================================
--- webservices/synapse/branches/1.1/src/site/resources/Synapse_Samples.html
(original)
+++ webservices/synapse/branches/1.1/src/site/resources/Synapse_Samples.html
Tue Nov 6 19:29:03 2007
@@ -3997,6 +3997,58 @@
<!-- TODO: splitter declaration -->
<h2><a name="Sample400">Sample 400: Message splitting and aggregating the
responses</a></h2>
+<pre><definitions xmlns="http://ws.apache.org/ns/synapse">
+
+ <proxy name="SplitAggregateProxy">
+ <target>
+ <inSequence>
+ <iterate expression="//m0:getQuote/m0:request"
preservePayload="true"
+ attachPath="//m0:getQuote"
+ xmlns:m0="http://services.samples/xsd">
+ <target>
+ <sequence>
+ <send>
+ <endpoint>
+ <address
+
uri="http://localhost:9000/soap/SimpleStockQuoteService"/>
+ </endpoint>
+ </send>
+ </sequence>
+ </target>
+ </iterate>
+ </inSequence>
+ <outSequence>
+ <aggregate>
+ <onComplete expression="//m0:getQuoteResponse"
+ xmlns:m0="http://services.samples/xsd">
+ <send/>
+ </onComplete>
+ <invalidate>
+ <log level="full"/>
+ <drop/>
+ </invalidate>
+ </aggregate>
+ </outSequence>
+ </target>
+ </proxy>
+</definitions></pre>
+
+<p><b><strong>Objective: Demonstrate the use of Iterate mediator to split the
messages in to
+parts and process them asynchronously and then aggreagate the responses coming
in to synapse</strong></b></p>
+
+<p><strong>Prerequisites:</strong>Deploy the SimpleStockQuoteService in
+sample Axis2 server and start it on port 9000.</p>
+
+<p>Start Synapse with the sample configuration 400 (i.e. synapse -sample
+400).</p>
+
+<p>In this sample, the message sent to synapse has embeded with a number of
elements of the same type
+in one message. When synapse received this message it will iterate through
those elements and then sent
+to the specified endpoint. When all the responses appear in to synapse then
those messages will be
+aggregated to form the resultant response and sent back to the client.</p>
+
+<p>Invoke the client as follows. </p>
+<pre>ant stockquote -Daddurl=http://localhost:8080/soap/SplitAggregateProxy
-Ditr=4</pre>
<h2><a name="Aggregator">Aggregating messages and process in batch (Aggregate
Mediator)</a></h2>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]