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 and SOAP Web Service Administration
  15. Datatype Compatibility

Web Services Guide

Web Services Guide

Step 3. Configure the Output Mapping

Step 3. Configure the Output Mapping

The REST Output transformation receives data from the Customer and Orders transformations and it returns a JSON file.
In the Orders_Resource mapping, the REST Output transformation contains two groups of output data. The parent group contains customer information and it occurs once for each customer. The child group contains the orders. The orders group is multiple-occurring.
When the REST Output transformation contains more than one group of ports, the Developer tool creates keys to link the groups. The Developer tool creates a primary key in each group. The Developer tool creates a foreign key for each child group. The foreign key in the Orders group contains the customer number for each order.
When you view the ports in the REST Output transformation, you do not see the keys. The keys do not have ports. However, you must link data to the keys to define the key values. To view the keys, show the output mapping in the
Ports
view of the REST Output transformation
Properties
tab. The
Ports
view shows the input ports or the output mapping depending on which option you choose to show.
The following image shows the
Output Mapping
view:
The Ports view of the Output transformation is showing the output mapping between the input ports and the elements of the output response message. The left panel shows the Ports and the right panel shows the elements. Each panel shows two groups of fields, the Orders_Resource group and the Orders group.. In the right panel the Orders_Resource group has the Key_Orders_Resource key. The Orders group has a key called Key_Orders and a foreign key called FKey_Orders_Resource. No ports are linked to these keys.
The Developer tool creates the following keys in the output:
Key Name
Description
Key_Orders_Resource
The primary key for the Orders_Resource group.
Key_Orders
The primary key for the Orders group.
FKey_Orders_Resource
The foreign key to link the Orders group to the Orders_Resource group.
You must link input ports to the output keys or the mapping is not valid.
You can link a port to more than one element on the
Output
panel. However, you cannot link a field from one group on the
Ports
panel to an element in more than one group on the
Output
panel. All fields in the same
Ports
group must link to elements in the same
Output
group.