WebSphere Enterprise Service Bus for z/OS, Version 6.2.0 Operating Systems: z/OS


The iteration aggregation sample

The WebSphere® ESB aggregation sample demonstrates the use of iteration to achieve aggregation of data.

About this task

The iteration aggregation sample is based on a user submitting a batch of orders within a single request. Each order contains a customer identifier, an item identifier and a quantity. Time can be saved by submitting multiple orders in a single batch, identified by an identifier. The system will handle the batch and return the status information back to the user.

Before the batch can be submitted to the dispatch backend service, each order in the batch must be enriched with customer mailing information from a customer service. What is not shown below is that the response flow, which simply translates the status information returned by the dispatch system to the store response format.

Procedure
  1. Store the batch identifier.
  2. For each order, build a message to send to the Customer service. If there are no orders in the batch, to save unnecessary calls to the dispatch backend service, build and return an empty response.
  3. Call the Customer service to retrieve mailing information for the customer. If there are any errors, stop processing.
  4. Store the result in the shared aggregation context.
  5. Add the result to the list of orders already enriched.
  6. Return to step 2 to process the next order.
  7. When all orders are completed, build the message to send to the dispatch system, including the newly enriched order batch.
  8. Send the new message to the dispatch system.

Results

In the iteration aggregation sample, the customer and dispatch services are implemented as Java™ objects exposed as SOAP/HTTP web services, while the mediation itself is exposed as a SOAP/HTTP web service. Shared interfaces and business objects are held in a separate library called StoreLib. The whole system can be tested by using the included StoreClient web application which allows a user to build a batch, submit it to the mediation, and view the returned results.

task Task topic

Terms of use | Feedback


Timestamp icon Last updated: 21 June 2010


http://publib.boulder.ibm.com/infocenter/dmndhelp/v6r2mx/topic//com.ibm.websphere.wesb620.zseries.doc/samples/webservices/tsam_aggregation.html
Copyright IBM Corporation 2005, 2010. All Rights Reserved.
This information center is powered by Eclipse technology (http://www.eclipse.org).