This documentation is for WSO2 Enterprise Service Bus version 4.7.0 . View documentation for the latest release.

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

...

Code Block
languagehtml/xml
<definitions xmlns="http://ws.apache.org/ns/synapse">
    <sequence name="main">
        <in>
            <!-- filtering of messages with XPath and regex matches -->
            <filter source="get-property('To')" regex=".*/StockQuote.*">
                <send>
                    <endpoint>
                        <address uri="http://localhost:9000/services/SimpleStockQuoteService"/>
                    </endpoint>
                </send>
                <drop/>
            </filter>
     
      <send/>         </in>
        <out>
            <send/>
        </out>
    </sequence>
</definitions>

...

 As the request matches the XPath expression of the Filter Mediator, the Filter Mediator's child mediators execute. It sends the message to a different endpoint as specified by the endpoint definition. The Drop Mediator terminates further processing of the current message in a configuration. During response processing, the filter condition fails. Therefore, the implicit Send Mediator forwards the response back to the client.

...