Author: supun Date: Wed Jun 24 03:00:59 2009 New Revision: 39806 URL: http://wso2.org/svn/browse/wso2?view=rev&revision=39806
Log: Added: branches/esb/java/2.1/product/docs/xdoc/mediators/aggregate.xml branches/esb/java/2.1/product/docs/xdoc/mediators/cache.xml branches/esb/java/2.1/product/docs/xdoc/mediators/clone.xml branches/esb/java/2.1/product/docs/xdoc/mediators/fault.xml branches/esb/java/2.1/product/docs/xdoc/mediators/router.xml branches/esb/java/2.1/product/docs/xdoc/mediators/send.xml branches/esb/java/2.1/product/docs/xdoc/mediators/switch.xml branches/esb/java/2.1/product/docs/xdoc/mediators/target.xml Added: branches/esb/java/2.1/product/docs/xdoc/mediators/aggregate.xml URL: http://wso2.org/svn/browse/wso2/branches/esb/java/2.1/product/docs/xdoc/mediators/aggregate.xml?pathrev=39806 ============================================================================== --- (empty file) +++ branches/esb/java/2.1/product/docs/xdoc/mediators/aggregate.xml Wed Jun 24 03:00:59 2009 @@ -0,0 +1,90 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" + "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> + <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" /> + <title>WSO2 ESB - Aggregate Mediator </title> + <link href="css/esb-docs.css" rel="stylesheet" /> + <link href="styles/dist-docs.css" rel="stylesheet" type="text/css" + media="all" /> +</head> + +<body> +<h2>Aggregate Mediator</h2> + +<p>The aggregate mediator implements the Message Aggregator EIP and will +aggregate the messages or responses for splitted messages using either the +clone or iterate mediators. At the same time it can aggregate messages on the +presence of matching elements specified by the correlateOn XPATH expression. +Aggregate will collect the messages coming into it until the messages collected +on the aggregation satisfies the complete condition. The completion condition +can specify a minimum or maximum number of messages to be collected, or a +timeout value in seconds, after which the aggregation terminates. On completion +of the aggregation it will merge all of the collected messages and invoke the +onComplete sequence on it. The merged message would be created using the XPath +expression specified by the attribute 'expression' on the 'onComplete' element. +</p> + +<h3>Syntax</h3> +<pre xml:space="preserve"> <aggregate> + <correlateOn expression="xpath"/>? + <completeCondition [timeout="time-in-seconds"]> + <messageCount min="int-min" max="int-max"/>? + </completeCondition>? + <onComplete expression="xpath" [sequence="sequence-ref"]> + (mediator +)? + </onComplete> + </aggregate></pre> + +<h3>UI Configuration</h3> + +<p>After adding an aggregate mediator, clicking on it will open up the +aggregator specific options below the sequence editor. Figure 2 shows all the +aggregator specific options.</p> + +<div class="image"> +<img src="../aggregate-mediator/docs/images/aggregator-options.png" alt="" /> + +<p>Figure 2: Aggregator specific options </p> +</div> + +<p>Aggregate mediator field descriptions,</p> + +<table border="1"> + <tbody> + <tr> + <td style="font-weight: bold;">Field name</td> + <td style="font-weight: bold;">Description</td> + </tr> + <tr> + <td>Aggregation Expression</td> + <td>An XPath expression specifying based on which elements to aggregate. + Set of messages that's taken for aggregation is determined through + <span style="font-weight: bold;">Correlation Expression </span>. </td> + </tr> + <tr> + <td>Completion Timeout</td> + <td>Time that the aggregator waits for messages.</td> + </tr> + <tr> + <td>Completion Max-messages</td> + <td>Maximum number of messages that can exist in an aggregation. </td> + </tr> + <tr> + <td>Completion Min-messages</td> + <td>Minimum number of messages required for the aggregation to complete. + </td> + </tr> + <tr> + <td>Correlation Expression </td> + <td>An XPath expression specifying the pattern messages will be collected + for aggregation. Specific aggregation condition will be set through + <span style="font-weight: bold;">Aggregation Expression </span>. </td> + </tr> + </tbody> +</table> + +<h3>Example</h3> +</body> +</html> Added: branches/esb/java/2.1/product/docs/xdoc/mediators/cache.xml URL: http://wso2.org/svn/browse/wso2/branches/esb/java/2.1/product/docs/xdoc/mediators/cache.xml?pathrev=39806 ============================================================================== --- (empty file) +++ branches/esb/java/2.1/product/docs/xdoc/mediators/cache.xml Wed Jun 24 03:00:59 2009 @@ -0,0 +1,87 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" + "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> + <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" /> + <title>WSO2 ESB - Cache Mediator </title> + <link href="css/esb-docs.css" rel="stylesheet" /> + <link href="styles/dist-docs.css" rel="stylesheet" type="text/css" + media="all" /> +</head> + +<body> +<h2>Cache Mediator</h2> + +<p>Cache mediator checks weather a message is seen before. If the message is +seen before it will execute a specified sequence. </p> + +<h3>Syntax</h3> +<pre xml:space="preserve"> <cache [id="string"] [hashGenerator="class"] [timeout="seconds"] [scope=(per-host | per-mediator)] + collector=(true | false) [maxMessageSize="in-bytes"]> + <onCacheHit [sequence="key"]> + (mediator)+ + </onCacheHit>? + <implementation type=(memory | disk) maxSize="int"/> + </cache></pre> + +<p>The cache mediator will evaluate the hash value of an incoming message as +described in the optional hash generator implementation (which should be a +class implementing the org.wso2.caching.digest.DigestGenerator interface). The +default hash generator is 'org.wso2.caching.digest.DOMHashGenerator'. If the +generated hash value has been found in the cache then the cache mediator will +execute the onCacheHit sequence which can be specified inline or referenced. +The cache mediator must be specified with an 'id' and two instances with this +same 'id' that correlates the response message into the cache for the request +message hash. The optional 'timeout' specifies the valid duration for cached +elements, and the scope defines if mediator instances share a common cache per +every host instance, or per every cache mediator pair (i.e. 'id') instance. The +'collector' attribute 'true' specifies that the mediator instance is a response +collection instance, and 'false' specifies that its a cache serving instance. +The maximum size of a message to be cached could be specified with the optional +'maxMessageSize' attributes in bytes and defaults to unlimited. Finally the +'implementation' element may define if the cache is disk or memory based, and +the 'maxSize' attribute defines the maximum number of elements to be cached. +</p> + +<p></p> + +<h3>UI Configuration</h3> +<img src="../cache-mediator/docs/images/cache_mediator_screenshot.jpg" alt="" +/> +<ul> + <li>Cache Id: Id for the cache configuration. You should have same id for a + cache mediator instance in incoming path and the corresponding mediator + instance in outgoing message path. </li> + <li>Cache Scope: Scope of the cache. This is important if the service is + deployed in a cluster. + <ul> + <li>Per-Host: The cache is kept only for the current host in a cluster. + </li> + <li>Per-Mediator: The cache is kept once for the whole cluster. </li> + </ul> + </li> + <li>Cache Type: Whether the mediator is in the incoming path (check request) + or the outgoing path (cache the response). + <ul> + <li>Finder: Set if the message is incoming path. This indicate the + mediator find for the request hash of each incoming message. </li> + <li>Collector: Set if the message is in outgoing path. This indicate the + mediator collect the response message in the cache. </li> + </ul> + </li> + <li>Hash Generator: The logic for finding the hash which check against each + incoming message. Default to org.wso2.caching.digest.DOMHASHGenerator </li> + <li>Cache Timeout: The cache timeout(The time to keep the cache before + expiring) in seconds. </li> + <li>Maximum Message Size: The limit of the message to cache in bytes. </li> + <li>Implementation Type: Currently only "In-Memory" is available. </li> + <li>On Cache Hit: Specify the sequence to follow when the cache mediator is + hit. You can either specify it as anonymous where you can define child + mediators for the Cache mediator or you can refer a named sequence of + mediators from the registry. </li> +</ul> + +<h3>Example</h3> +</body> +</html> Added: branches/esb/java/2.1/product/docs/xdoc/mediators/clone.xml URL: http://wso2.org/svn/browse/wso2/branches/esb/java/2.1/product/docs/xdoc/mediators/clone.xml?pathrev=39806 ============================================================================== --- (empty file) +++ branches/esb/java/2.1/product/docs/xdoc/mediators/clone.xml Wed Jun 24 03:00:59 2009 @@ -0,0 +1,77 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" + "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> + <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" /> + <title>WSO2 ESB - Clone Mediator </title> + <link href="css/esb-docs.css" rel="stylesheet" /> + <link href="styles/dist-docs.css" rel="stylesheet" type="text/css" + media="all" /> +</head> + +<body> +<h2>Clone Mediator</h2> + +<p>As the name suggests clone meditor can be used to clone a message in to +several messages.</p> + +<p>The clone mediator closely resembles the Message Splitter EIP and will split +the message into number of identical messages which will be processed in +parallel. The original message cloned can be continued or dropped depending on +the boolean value of the optional 'continueParent' attribute. Optionally a +custom 'To' address and/or a 'Action' may be specified for cloned messages.</p> + +<h3>Syntax</h3> +<pre xml:space="preserve"> <clone [continueParent=(true | false)]> + <target [to="uri"] [soapAction="qname"] [sequence="sequence_ref"] [endpoint="endpoint_ref"]> + <sequence> + (mediator)+ + </sequence>? + <endpoint> + endpoint + </endpoint>? + </target>+ + </clone></pre> + +<h3>UI Configuration</h3> + <div class="image"> + <img src="../clone-mediator/docs/images/add-clone.png" alt=""/> + <p> + Figure 1: Adding a clone mediator + </p> + </div> + <p> + Clicking on the clone mediator created as shown in figure 1 will open + up the clone mediator specific options. Figure 2 shows clone + mediator options,</p> + <div class="image"> + <img src="../clone-mediator/docs/images/clone-options.png" alt=""/> + <p> + Figure 2: Clone mediator options + </p> + </div> + <p> + Clone mediator field descriptions, + </p> + <ul> + <li> + Continue Parent - If "Yes" the original message will be + continued. If "No" the original message will be dropped. + </li> + <li> + Number of clones - Number of clones created. This can be + controlled by adding one or more clone targets by clicking <span style="font-weight: bold;">Add Clone Target</span>. + Figure 3 shows the screen after clicking <span style="font-weight: bold;">Add Clone Target</span>. Targets can then have it's own set of mediators. + </li> + </ul> + <p> + <img src="../clone-mediator/docs/images/clone-target.png" alt=""/> + </p> + <p> + Figure 3: Adding a clone target + </p> + <p>For more information about target refer Target.</p> + <p></p> +</body> +</html> Added: branches/esb/java/2.1/product/docs/xdoc/mediators/fault.xml URL: http://wso2.org/svn/browse/wso2/branches/esb/java/2.1/product/docs/xdoc/mediators/fault.xml?pathrev=39806 ============================================================================== --- (empty file) +++ branches/esb/java/2.1/product/docs/xdoc/mediators/fault.xml Wed Jun 24 03:00:59 2009 @@ -0,0 +1,99 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" + "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> + <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" /> + <title>WSO2 ESB - Fault Mediator </title> + <link href="css/esb-docs.css" rel="stylesheet" /> + <link href="styles/dist-docs.css" rel="stylesheet" type="text/css" + media="all" /> +</head> + +<body> +<h2>Fault Mediator</h2> + +<p>The fault mediator transforms the current message into a fault message, but +does NOT send it. The <send> mediator needs to be invoked to send a fault +message created this way. The fault message "To" header is set to the +"Fault-To" of the original message if such a header exists on the original +message. If a 'version' attribute is specified, the created fault message will +be created as a selected SOAP 1.1, SOAP 1.2 or POX fault.</p> + +<h3>Syntax</h3> +<pre xml:space="preserve"> <makefault [version="soap11|soap12|pox"]> + <code (value="literal" | expression="xpath")/> + <reason (value="literal" | expression="xpath")> + <node>? + <role>? + <detail>? + </makefault></pre> + +<p></p> + +<h3>UI Configuration</h3> + +<p><img alt="Fault Mediator" src="../makefault-mediator/docs/images/fault.png" /> +</p> + +<p><strong>Figure1: Fault Mediator</strong> </p> + +<h4>Version</h4> + +<p>You can select the version of the SOAP fault message that you want to +create. Options are SOAP 1.1 and SOAP 1.2. </p> + +<h4>Fault Code</h4> + +<p>You can specify a fault code</p> +<ul> + <li>versiomMismatch: SOAP version mismtach error</li> + <li>mustUnderstand: A soap error regarding must understand error</li> + <li>Client: Client side error</li> + <li>Server: Server side error</li> +</ul> + +<h4>Fault String</h4> + +<p>The detailed fault string of the fault code can specify here. It can be give +either as a string value or as an expression. NSEditor: You can click this link +to add namespaces if you are providing an expression. You will be provided +another panel named 'Namespace Editor' where you can provide any number of +namespace prefixes and url that you have used in the xpath expression. Here is +an example of the use of namespaces in an expression. </p> + +<h4>Fault Actor</h4> + +<p>SOAP 1.1 fault actor(if you select SOAP 1.1) </p> + +<p><img alt="SOAP 11 fault meditor" +src="../makefault-mediator/docs/images/fault.png" /> </p> + +<p><strong>Figure2: SOAP 1.1 with fault expression selected </strong> </p> + +<h4>Detail</h4> + +<p>Some information about the fault can be added here</p> + +<p>If you select SOAP 1.2, you can see the followings</p> + +<p><img alt="SOAP 12 fault meditor" +src="../makefault-mediator/docs/images/fault12.png" /> </p> + +<p><strong>Figure2: SOAP 1.2 with fault expression selected </strong> </p> + +<h4>Reason</h4> + +<p>Reason is the fault reason describing the fault code</p> + +<h4>Role</h4> + +<p>SOAP 1.2 role names</p> + +<h4>Node</h4> + +<p>SOAP 1.2 node name</p> + +<h3>Example</h3> +</body> +</html> Added: branches/esb/java/2.1/product/docs/xdoc/mediators/router.xml URL: http://wso2.org/svn/browse/wso2/branches/esb/java/2.1/product/docs/xdoc/mediators/router.xml?pathrev=39806 ============================================================================== --- (empty file) +++ branches/esb/java/2.1/product/docs/xdoc/mediators/router.xml Wed Jun 24 03:00:59 2009 @@ -0,0 +1,91 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" + "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> + <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" /> + <title>WSO2 ESB - Router Mediator </title> + <link href="css/esb-docs.css" rel="stylesheet" /> + <link href="styles/dist-docs.css" rel="stylesheet" type="text/css" + media="all" /> +</head> + +<body> +<h2>Router Mediator</h2> + +<p>Router is specifically designed for what it name suggests. Routing +messages.</p> + +<p>Router mediator can contain any number of routes. Router mediator can be +configured to continue or to stop the mediation after the routing by setting +the 'continueAfter' attribute value to be 'true' and 'false' respectively. Each +and every route must contain an 'expression' attribute which is to specify the +XPath over which the roting condition is evaluated. Apart from that there can +be an optional 'match' attribute as well. If both expression and the match +attirbutes are specified in a particualr route, the evaluated string value of +the XPath over the current message will be campared with the reular expression +provided as the value of the match attribute to see whether this route is +matching for the current message. Where as if only the expression is specified, +presence of the element specified by this XPath is considered as the routing +condition.</p> + +<p>One can configure a route to break routing or continue evaluating further +routes to see any further matchings by setting the 'breakRoute' attribute to +'true' or 'false' respectively. For all the routes there has to be a 'target' +element which contains the information about the routing path as a sequence or +an endpoint both can be inlined as well as refered. If both an endpoint and a +sequence is specified message will be first mediated through the sequence and +sent to the endpoint after mediation. Particular target cannot contain an +inline sequence and a refered sequence at the same time. The same applies to +endpoit of the target as well.</p> + +<h3>Syntax</h3> +<pre xml:space="preserve"><router [continueAfter=(true | false)]> + <route expression="xpath" [match="regEx"] [breakRouter=(true | false)]> + <target [sequence="string"] [endpoint="string"]> + <sequence ....../>? + <endpoint ....../>? + </target> + </route>+ +</router></pre> + +<h3>UI Configuration</h3> + +<h4>Router</h4> + +<p><img src="../router-mediator/docs/images/router_mediator_screenshot.jpg" +alt="" /> </p> + +<p><strong>Figure 1: Router Mediator</strong> </p> + +<p>The router mediator has the following configuration options. </p> +<ul> + <li>Continue after routing: (Yes/No), Whether to continue the routing if any + of the child routes are executed. The default value is No. </li> + <li>Number of clones: Show you the number of child routes that router + mediator has. You can add child routes by clicking the 'Add Route' link in + the right hand side of the text field. </li> +</ul> + +<h4>Route</h4> + +<p><img src="../route-mediator/docs/images/route_mediator_screenshot.jpg" +alt="" /> </p> + +<p><strong>Route Mediator</strong> </p> + +<p>Here are the options available in the Route mediator configurations. </p> +<ul> + <li>Break After Route: (Yes/No) Specify whether to continue with the sibling + routes or stop from the current route, if the routing condition is + successful. </li> + <li>Route Expression: An xpath expression to execute on the message </li> + <li>Route Pattern: A regular expression to compare with the value retrieved + from the above xpath expression. </li> +</ul> + +<h3>Example</h3> + +<p></p> +</body> +</html> Added: branches/esb/java/2.1/product/docs/xdoc/mediators/send.xml URL: http://wso2.org/svn/browse/wso2/branches/esb/java/2.1/product/docs/xdoc/mediators/send.xml?pathrev=39806 ============================================================================== --- (empty file) +++ branches/esb/java/2.1/product/docs/xdoc/mediators/send.xml Wed Jun 24 03:00:59 2009 @@ -0,0 +1,110 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" + "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> + <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" /> + <title>WSO2 ESB - Send Mediator </title> + <link href="css/esb-docs.css" rel="stylesheet" /> + <link href="styles/dist-docs.css" rel="stylesheet" type="text/css" + media="all" /> +</head> + +<body> +<h2>Send Mediator</h2> + +<p>Send is considered as one of the most widely used mediators in ESB. It is +built in to the core of the ESB. It performs a fundamental task of any ESB. +This fundamental task is to send a message out from ESB.</p> + +<p>There are two modes of operation in a send mediator.</p> +<ol> + <li>Sending the message using message level information</li> + <li>Sending the message to a predefined endpoint</li> +</ol> + +<p>If we don't provide an Endpoint it will try to send the message using the +wsa:to address of the message. Also if we use a send mediator in the out path +of the ESB, without specifying an Endpoint it will send the message as a +reply.</p> + +<p>If we provide an Endpoint, it will send the message according to the +information in the Endpoint. Have a look at the endpoint guide for more +details.</p> + +<p>Send mediator is the only way to send a message out from the ESB. If you +want to forward the message to an Endpoint or to send the reply back this +mediator must be used.</p> + +<p>The send mediator copies any message context properties from the current +message context to the reply message received on the execution of the send +operation so that the response could be correlated back to the request. +Messages may be correlated by WS-A Message-ID, or even simple custom text +labels (see the property mediator and samples).</p> + +<p>Note: A send operation may be blocking or non-blocking depending on the +actual transport implementation used. As the default NIO based http/s +implementation does not block on a send, care must be taken if the same message +must be sent and then further processed (e.g. transformed). In such a scenario, +it maybe required to first clone the message into two copies and then perform +processing to avoid conflicts.</p> + +<h3>Syntax</h3> +<pre xml:space="preserve"> <send/></pre> + +<p>If the message is to be sent to one or more endpoints, then the following is +used: </p> +<pre xml:space="preserve"> <send> + (endpointref | endpoint)+ + </send></pre> + +<p>where the endpointref token refers to the following: </p> +<pre xml:space="preserve"> <endpoint key="name"/></pre> + +<p>and the endpoint token refers to an anonymous endpoint definition. </p> + +<h3>UI Configuration</h3> + +<p><img src="../send-mediator/docs/images/send_mediator_screenshot.jpg" alt="" +/> </p> + +<p>Figure 1: Send Mediator Options</p> + +<p>You can select the endpoint to be one of the following value. </p> +<ul> + <li>None </li> + <li>Anonymous </li> + <li>Pick from Registry </li> + <li>Import </li> +</ul> +<em>Note: You can manage endpoints from the "Manage Endoint" panel which can be +accessed from the Manage-> Mediation-> Endpoints menu from the left hand +side bar.</em> + +<h3>Usage Scenario</h3> + +<p>Send mediator used in in-path and out path</p> +<pre xml:space="preserve"><definitions xmlns="http://ws.apache.org/ns/synapse"> + <in> + <send> + <endpoint> + <address uri="http://localhost:9000/services/SimpleStockQuoteService"/> + </endpoint> + </send> + <drop/> + </in> + <out> + <send/> + </out> +</definitions> </pre> + +<p>In this configuration first send is used inside a in mediator. As I have +mentioned earlier, both request and response will go through the main sequence. +But only request messages will go through the child mediators of in and only +response messages will go through the out mediator. So the request will be +forward to the endpoint with the given address. Response will go through the +second send and this send mediator will send it back to the requester.</p> + +<p></p> +</body> +</html> Added: branches/esb/java/2.1/product/docs/xdoc/mediators/switch.xml URL: http://wso2.org/svn/browse/wso2/branches/esb/java/2.1/product/docs/xdoc/mediators/switch.xml?pathrev=39806 ============================================================================== --- (empty file) +++ branches/esb/java/2.1/product/docs/xdoc/mediators/switch.xml Wed Jun 24 03:00:59 2009 @@ -0,0 +1,99 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" + "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> + <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" /> + <title>WSO2 ESB - Switch Mediator </title> + <link href="css/esb-docs.css" rel="stylesheet" /> + <link href="styles/dist-docs.css" rel="stylesheet" type="text/css" + media="all" /> +</head> + +<body> +<h2>Switch Mediator</h2> + +<p>Switch mediator is another XPath filter. The XPath will be evaluated and +will return a string. This string is matched against the regular expression in +each of cases in the specified order. If a matchig case is found it will be +executed. Further proccessing of the case statements won't happen after a +matching is found. If none of the case statements are matching and default case +is specified, it will be executed.</p> + +<h3>Syntax</h3> +<pre xml:space="preserve"> <switch source="xpath"> + <case regex="string"> + mediator+ + </case>+ + <default> + mediator+ + </default>? + </switch></pre> + +<p>The <switch> mediator will evaluate the given source XPath expression +into its string value, and match it against the given regular expressions. If +the specified cases does not match and a default case exists, it will be +executed.</p> + +<h3>UI Configuration</h3> + +<h4>Switch</h4> + +<p><img src="../switch-mediator/images/switch_mediator_screenshot.jpg" alt="" +/> </p> + +<p> Here are the options to configure the Switch Mediator. </p> +<ul> + <li>Source XPath: Here you can specify the source xpath to be evaluated. </li> + <li>Number of cases: The number of cases specified. You can add cases by + clicking the "Add Case" link. </li> + <li>Specify default case: The link to add the default case. (This case is to + execute when all the other cases are failed.) </li> +</ul> + +<h4>Case</h4> + +<p><img src="../case-mediator/images/switch_case_mediator_screenshot.jpg" +alt="" /> </p> + +<p>Switch Case Mediator</p> + +<p>Here are the options to configure the Switch Case Mediator. </p> +<ul> + <li>Case Value (Regular Expression): A regular expression to match with + switching value. </li> +</ul> + +<h4>Default</h4> + +<p>The Switch Default Mediator will be a child mediator for the Switch +Mediator. It is to define a defalut case for the current routing switch. If all +the cases were not matched with the switch value, the sequence defined as +children to the default mediator will be taken as the route of the message. </p> + +<p></p> + +<h3>Example</h3> +<pre xml:space="preserve"> <switch source="//m0:getQuote/m0:request/m0:symbol" xmlns:m0="http://services.samples/xsd"> + <case regex="IBM"> + <!-- the property mediator sets a local property on the *current* message --> + <property name="symbol" value="Great stock - IBM"/> + </case> + <case regex="MSFT"> + <property name="symbol" value="Are you sure? - MSFT"/> + </case> + <default> + <!-- it is possible to assign the result of an XPath expression as well --> + <property name="symbol" + expression="fn:concat('Normal Stock - ', //m0:getQuote/m0:request/m0:symbol)" + xmlns:m0="http://services.samples/xsd"/> + </default> + </switch> + </pre> + +<p>In this scenario it will get the text of symbol element and match it against +values MSFT and IBM.</p> + +<p></p> +</body> +</html> Added: branches/esb/java/2.1/product/docs/xdoc/mediators/target.xml URL: http://wso2.org/svn/browse/wso2/branches/esb/java/2.1/product/docs/xdoc/mediators/target.xml?pathrev=39806 ============================================================================== --- (empty file) +++ branches/esb/java/2.1/product/docs/xdoc/mediators/target.xml Wed Jun 24 03:00:59 2009 @@ -0,0 +1,53 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" + "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> + <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" /> + <title>WSO2 ESB - Target</title> + <link href="css/esb-docs.css" rel="stylesheet" /> + <link href="styles/dist-docs.css" rel="stylesheet" type="text/css" + media="all" /> +</head> + +<body> +<h2>Target</h2> + +<p>Target is a common configuration used across many ESB conofugrations. Some +mediators that uses this configuration are Clone, Iterate and Router. </p> + +<p>A target specifies a mediation sequence, and endpoint or both. If a sequnce +is specified it will be executed. If a endpoint is specified message will be +sent to the endpoint. If both sequence and endpoint are specified, first +sequence will be executed and then endpoint will be executed.</p> + +<h3>Syntax</h3> +<pre xml:space="preserve"> <target [sequence="string"] [endpoint="string"]> + <sequence ....../>? + <endpoint ....../>? + </target> </pre> + +<h3>UI Configuration</h3> + +<p><img src="../target-mediator/docs/images/target_mediator_screenshot.jpg" +alt="" /> </p> + +<p>Here you can prepare a message to send to an endpoint or mediate through +some more sequences. </p> +<ul> + <li>SOAP Action: The SOAP action of the message. </li> + <li>To Address: Then target endpoint address. </li> + <li>Sequence: Mediate the message through a sequence. You can either pick a + named sequence from the registry or define an anonymous sequence by adding + mediators to the current Target mediator as children. </li> + <li>Endpoint: Send the message to an endpoint. Here you can pick a named + endpoint from the registry (which you can add in the Endpoint panel that + can be accessed from the Manage-> Mediation-> Endpoints menu in the + left hand side menu bar.) or keep the endpoint as anonymous. </li> +</ul> + +<h3>Example</h3> + +<p>Please go to the specific mediators for examples.</p> +</body> +</html> _______________________________________________ Esb-java-dev mailing list [email protected] https://wso2.org/cgi-bin/mailman/listinfo/esb-java-dev
