...
Info | ||
---|---|---|
| ||
You can configure the mediator using XML. Click switch to source view in the Mediator window. |
...
Example
In this example, the rule script is picked from the registry with key rule/sample.xml
. There is one fact and it is a string variable. Its value is calculated from the current SOAP message using an expression. The Rule engine uses these facts to decide what rules should be applied.
Code Block | ||||
---|---|---|---|---|
| ||||
<rule> <ruleset> <source key="rule/sample.xml"/> </ruleset> <facts> <fact name="symbol" type="java.lang.String" expression="//m0:getQuote/m0:request/m0:symbol/child::text()" xmlns:m0="http://services.samples"/> </facts> <childMediators> <send> <endpoint> <address uri="http://localhost:9000/services/SimpleStockQuoteService"/> </endpoint> </send> <drop/> </childMediators> </rule> |
...
Excerpt | ||
---|---|---|
| ||
Description of the Rule Mediator in WSO2 ESB. |