Author: indika
Date: Mon Dec 17 08:03:33 2007
New Revision: 604904
URL: http://svn.apache.org/viewvc?rev=604904&view=rev
Log:
update the samples document
include loadbalance with in proxy service
Modified:
webservices/synapse/trunk/java/src/site/resources/Synapse_Samples.html
Modified: webservices/synapse/trunk/java/src/site/resources/Synapse_Samples.html
URL:
http://svn.apache.org/viewvc/webservices/synapse/trunk/java/src/site/resources/Synapse_Samples.html?rev=604904&r1=604903&r2=604904&view=diff
==============================================================================
--- webservices/synapse/trunk/java/src/site/resources/Synapse_Samples.html
(original)
+++ webservices/synapse/trunk/java/src/site/resources/Synapse_Samples.html Mon
Dec 17 08:03:33 2007
@@ -188,6 +188,8 @@
format from SOAP to REST/POX</a></li>
<li><a href="#Sample153">Sample 153: Routing the messages arrived to a
proxy service without processing the security headers</a></li>
+ <li><a href="#Sample154">Sample 154: Load Balancing with Proxy Service
+ </a></li>
</ul>
</li>
<li><a href="#ProxyServiceQoS">QoS addition and deduction for service
@@ -235,7 +237,8 @@
context API methods using scripting language</a></li>
<li><a href="#Sample353">Sample 353: Using Ruby scripts for
mediation</a></li>
-<li><a href="#Sample354">Sample 354: Using In-lined Ruby scripts for
mediation</a></li>
+ <li><a href="#Sample354">Sample 354: Using In-lined Ruby scripts
+ for mediation</a></li>
</ul>
</li>
<li><a href="#DBMediators">Database interactions in mediation (DBLookup
@@ -1253,6 +1256,7 @@
</loadbalance>
</endpoint>
</send>
+<drop/>
</in>
<out>
@@ -1367,6 +1371,7 @@
</failover>
</endpoint>
</send>
+<drop/>
</in>
<out>
@@ -1468,6 +1473,7 @@
</loadbalance>
</endpoint>
</send>
+<drop/>
</in>
<out>
@@ -1578,6 +1584,7 @@
</loadbalance>
</endpoint>
</send>
+<drop/>
</in>
<out>
@@ -2235,6 +2242,77 @@
without any modification. You should note that this wont be a security hole
because the message inside synapse is signed and encrypted and can only be
forwarded to a secure service to be useful.</p>
+
+<h2><a name="Sample154">Sample 154: Load Balancing with Proxy Service
+</a></h2>
+
+<div>
+<pre> <!-- A proxy service with a loadbalace endpoint -->
+<definitions xmlns="http://ws.apache.org/ns/synapse">
+ <proxy name="LBProxy" transports="https http" startOnLoad="true">
+ <target faultSequence="errorHandler">
+ <inSequence>
+ <send>
+ <endpoint>
+ <session type="simpleClientSession"/>
+ <loadbalance algorithm="roundRobin">
+ <endpoint>
+ <address
uri="http://localhost:9001/soap/LBService1">
+ <enableAddressing/>
+
<suspendDurationOnFailure>20</suspendDurationOnFailure>
+ </address>
+ </endpoint>
+ <endpoint>
+ <address
uri="http://localhost:9002/soap/LBService1">
+ <enableAddressing/>
+
<suspendDurationOnFailure>20</suspendDurationOnFailure>
+ </address>
+ </endpoint>
+ <endpoint>
+ <address
uri="http://localhost:9003/soap/LBService1">
+ <enableAddressing/>
+
<suspendDurationOnFailure>20</suspendDurationOnFailure>
+ </address>
+ </endpoint>
+ </loadbalance>
+ </endpoint>
+ </send>
+ <drop/>
+ </inSequence>
+ <outSequence>
+ <send/>
+ </outSequence>
+ </target>
+ <publishWSDL
uri="file:repository/conf/sample/resources/proxy/sample_proxy_2.wsdl"/>
+ </proxy>
+ <sequence name="errorHandler">
+
+ <makefault>
+ <code value="tns:Receiver"
xmlns:tns="http://www.w3.org/2003/05/soap-envelope"/>
+ <reason value="COULDN'T SEND THE MESSAGE TO THE SERVER."/>
+ </makefault>
+
+ <header name="To" action="remove"/>
+ <property name="RESPONSE" value="true"/>
+
+ <send/>
+ </sequence>
+</definitions> </pre>
+
+<p><strong>Objective: Load Balancing with Proxy Service </strong></p>
+
+<p><strong>Prerequisites:</strong> Sample setup is same as LoadBalance
+endpoints (#53 to #54).</p>
+
+<p>Start the Synapse configuration numbered 154: i.e. synapse -sample 154<br>
+Start the Axis2 server and deploy the SecureStockQuoteService if not already
+done</p>
+
+<p>Runs the client with </p>
+<pre> ant loadbalancefailover -Dmode=session
-Dtrpurl=http://localhost:8080/soap/LBProxy </pre>
+
+<p>Functionality is similar to the sample #54. </p>
+</div>
<h1><a name="ProxyServiceQoS">QoS addition and deduction for service
mediation (proxy) samples</a></h1>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]