Table of Contents

Search

  1. Preface
  2. Web Services
  3. SOAP Web Services
  4. WSDL Data Object
  5. Schema Object
  6. How to Create a SOAP Web Service
  7. Operation Mappings
  8. Parsing Web Service SOAP Messages
  9. Generating Web Service SOAP Messages
  10. Web Service Consumer Transformation
  11. REST Web Services
  12. How to Create a REST Web Service
  13. REST Web Service Consumer Transformation
  14. REST Web Service Consumer Transformation Use Cases
  15. REST and SOAP Web Service Administration
  16. Appendix A: Datatype Compatibility

Web Services Guide

Web Services Guide

Multiple-Occurring Data in the REST Output Transformation

Multiple-Occurring Data in the REST Output Transformation

The REST Output transformation can receive multiple groups of data and return multiple levels of output data in the response message. Each group of data in the response message is linked by a key.
The following image shows an output mapping that returns multiple orders for a customer:
The input ports include a Customer_Order group and an Orders group. Customer number appears in each group . The Output area shows the same fields as nodes in the output hierarchy. Customer number is a primary key in Customer_Order and a foreign key in Orders.
The
Ports
area of the output mapping has two groups: Customer_Order and Orders. Each group contains a customer number. The customer number becomes the key to link customer data and order data in the response message.
The primary key in the resource definition is Customer_No. Customer_No is a key in Customer_Order. It is a foreign key in Orders. The primary key must contain unique values. When the Data Integration Service processes multiple-occurring orders, it can return all the orders for one customer based on the key. The primary key and the foreign key do not appear in the response message.
The
Output
area of the output mapping contains the response message. You must link an input port to each key in the output.
When the REST Output transformation receives duplicate primary key values, the preview fails with an error.

0 COMMENTS

We’d like to hear from you!