Running the Web Service Aggregation sample

The Web Service Aggregation sample includes an example of an input test message and a corresponding expected output message, so that you can confirm that the sample has worked.

The sample is designed to fan out to two web services by using two AggregateRequest nodes. For simplicity, the sample has one target web service, so that both objects in the fan out target the same web service.

The target web service is a message flow in the sample.

Input test message

Input to this sample is a SOAP message; the entire sample is a web service. The SOAP message is found in the SampleInputMessage1.xml file in the WebServiceAggregationMFP Integration project.

Sample Message

You can vary the number of web services that are called. In the message data field <Quantity> determines how many pairs of web services are run.

A second test message is provided with this sample in the SampleInputMessage2.xml file. For this message, the <PartNumber> field is set to ABC1235 and the <Quantity> field is set to 2. The message results in different values for the overall response message.

Order of message flows

The web service that comprises this sample uses five message flows:

  1. WSAggregationFanOut.msgflow which calls
  2. WSAggregationMQtoSOAP.msgflow which calls
  3. WSAggregationTargetWS.msgflow which calls
  4. WSAggregationSOAPtoMQ.msgflow which calls
  5. WSAggregationFanIn.msgflow

These message flows are described in more detail in Exploring the Web Service Aggregation sample.

Using the sample

  1. In the IBM Integration Toolkit, switch to the Integration Development perspective and expand the WebServiceAggregationMFP Integration project.
  2. Open WSAggregationFanOut.mbtest.
  3. Click Invoke in the upper left of the editor.
  4. Ensure that Message flow is set to WSAggregationFanOut.msgflow
  5. Ensure that Input Node is set to SOAP Input.
  6. Set Body to Import from external file.
  7. If prompted to switch to another editor, click Yes.
  8. Click Workspace, then in the WebServiceAggregationMFP project in your workspace, select the SampleInputMessage1.xml file.
  9. Click Send Message. A message is sent to the URL of the SOAPInput node in the WSAggregationFanOut message flow.
  10. The WSAggregationFanOut message flow processes the SOAP message and, by calling the WSAggregationMQtoSOAP, WSAggregationTargetWS, WSAggregationSOAPtoMQ, and WSAggregationFanIn message flows, the flow produces a SOAP reply message.
  11. The message might be shown in the Viewer in a continuous line. To view the message more easily, click the Body list and select View as XML structure.
  12. Compare this message with the expected output message. The words confirmed or rejected in the message indicate whether the sample has run successfully.

If all the steps are successful, the sample is complete.

To look at the message flows and message set project in more detail, see Exploring the Web Service Aggregation sample.

Expected output message

The following message is the expected output XML message for the SampleInputMessage1.xml input message:

Sample Out Message1

The <AMT> field is a cumulative total of the number of web services called since the broker was restarted, or since the last deployment. Therefore, if you use the sample more than once, the value of this field increases in any subsequent iterations.

The following message is the expected output XML message for the SampleInputMessage2.xml input message:

Sample Out Message2

If you encounter any problems when you run the sample, see Resolving problems when running samples in the IBM Integration Bus information center.

Monitoring

For details about how to set up flow monitoring in this sample, see Monitoring the Web Service Aggregation sample.

Back to About the Web Service Aggregation sample

Back to sample home