Versions Compared

Key

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

This section explains, through an example scenario, how the Scatter-Gather EIP can be implemented using WSO2 ESB. The following topics are covered:

Table of Contents

...

  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, refer to Getting Started Installation Guide in the WSO2 ESB documentation.
  2. Start three sample Axis2 server instances on ports 9000, 9001, and 9002. For instructions, refer to the section Setting Upp the ESB Samples Setup - Starting Sample Back-End Servicesthe Axis2 server in the WSO2 ESB documentation.

...

Simulating the sample scenario

  1. Use a SOAP client like SoapUI to send the following request to the ScatterGatherProxy service.

    Code Block
    languagehtml/xml
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ser="http://services.samples">  
       <soapenv:Header/>  
       <soapenv:Body>  
          <ser:getSimpleQuote>  
             <ser:symbol>foo</ser:symbol>  
          </ser:getSimpleQuote>  
       </soapenv:Body>  
    </soapenv:Envelope>  
  2. Because the log mediator is enabled inside the outSequence, there will be three responses from the three vendors. The logs will be similar to the following:

    Image Modified

  3. In SoapUI, you will get the response from the vendor providing the best quote as follows:

    Image Modified

  4. Compare the logged response messages with the response received by the client to see that the ScatterGatherProxy service returns the best quote to the client.

How the implementation works

...