About the Multiple WebService Requests sample

This sample demonstrates how you can use an HTTPHeader node in a flow that has multiple Web service requests.

The first HTTPHeader node is used to configure a SOAPAction for the first request. The response to the first request is used as the input to the second request. The second HTTPHeader node is used to reset the SOAPAction header to send a new request to second Web service.

The following message flow is imported by the sample:

A screen capture of the HTTPHeader Node Multiple Request message flow

How the flow works:

  1. A request is sent to http://localhost:7080/getMiles.WS
  2. The flow receives the request on an HTTPInput node (GetMilesWS).
  3. The message is passed to an HTTPHeader node (AddSOAPAction) to set the SOAPAction header value to http://localhost:7080/ConvertToMeters in the HTTPRequest header.
  4. The modified message is passed to an HTTPRequest node (GetMeters), which calls the first Web service flow to convert yards to meters.
  5. The first Web service flow receives the request on an HTTPInput node (ConvertToMetersWS).
  6. The request is passed to a JavaCompute node (ConvertToMeters), which converts yards to meters.
  7. An HTTPReply node (ReplyMetersResult) sends back the result.
  8. The output message from the first Web service is passed to an HTTPHeader node (ResetSOAPAction) to reset the SOAPAction header value to http://localhost:7080/ConvertToMiles in the HTTPRequest header.
  9. The message is then passed to an HTTPRequest node (GetMiles), which calls the second Web service flow to convert meters to miles.
  10. The second Web service flow receives the request on an HTTPInput node (ConvertToMilesWS).
  11. The request is passed to a JavaCompute node (ConvertToMiles), which converts meters to miles.
  12. An HTTPReply node (ReplyMilesResult) sends back the result.
  13. The output from the second Web service is sent back to you by using an HTTPReply node (ReplyResult).

Back to Read about the HTTPHeader node sample

Back to sample home