Using the For Each action to process a collection

This recipe will show we can loop over a collection of information by using the For Each action. We will implement a proxy service accepting a Customer element through a one-way interface. The proxy service will use the For Each action in its message flow to loop over the single addresses inside the addresses collection.

Each address will then be sent to an Address Checking Service which would check the address for correctness. In our case, this service is a mock service implemented in soapUI. To better see the sequential nature of the processing, the Address Checking Service is written so that it takes four seconds to respond.

Getting ready

You can import the OSB project containing the base setup ...

Get Oracle Service Bus 11g Development Cookbook now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.