Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Before digging into implementation details, let's take a look at the co-relation of the example scenario and the Message Filter EIP by comparing their core components.

Message Filter EIP (Figure 1)Message Filter Example Scenario (Figure 2)
QuoteStock Quote Request
Message FilterFilter Mediator is used to filter the content of the incoming message

Environment setup

  1. Download and install WSO2 ESB from http://wso2.com/products/enterprise-service-bus. For a list of prerequisites and step-by-step installation instructions, see Getting Started Installation Guide in the WSO2 ESB documentation.
  2. Start a sample Axis2 server instance on port 9000. For instructions, see Setting up the ESB Samples Setup - Starting Sample Back-End Servicesthe Axis2 server in the WSO2 ESB documentation.

...

  1. Send a request using the Stock Quote client to WSO2 ESB in the following manner. For information about the Stock Quote client, see Sample Clients in the WSO2 ESB Documentation.
    ant stockquote -Dtrpurl=http://localhost:8280/services/MessageFilterProxy -Dsymbol=foo
  2. After executing the above command through the client, observe that the request is transferred to the foo inventory service and a response is received. If the -Dsymbol parameter was changed to another value, there will be no response. 

    The structure of the request is as follows:

    Code Block
    languagehtml/xml
    linenumberstrue
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ser="http://services.samples" xmlns:xsd="http://services.samples/xsd">
       <soapenv:Header/>
       <soapenv:Body>
          <ser:getQuote>
             <!--Optional:-->
             <ser:request>
                <!--Optional:-->
                <ser:symbol>foo</ser:symbol>
             </ser:request>
          </ser:getQuote>
       </soapenv:Body>
    </soapenv:Envelope>

...