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 |
---|
...
- 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.
- 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
Use a SOAP client like SoapUI to send the following request to the
ScatterGatherProxy
service.Code Block language html/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>
- 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:
- In SoapUI, you will get the response from the vendor providing the best quote as follows:
- 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
...