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. Datatype Compatibility

Web Services Guide

Web Services Guide

Custom Resource Mappings

Custom Resource Mappings

A custom resource mapping can contain a Read transformation with different ports than the Output transformation. A custom resource mapping can contain more transformations than the Read transformation and the Output transformation.
You can create a custom resource mapping by modifying a default resource mapping or by manually creating a REST web service.
The following image shows a custom resource mapping:
The image shows a mapping with a Read transformation, a Sorter transformation, an Aggregator transformation, and an Output transformation. The Output transformation contains a Customer_ID and Total_Orders.
The mapping contains the following transformations:
Read transformation
Reads a file of orders. Each order contains the customer ID. Customer ID can occur multiple times.
Sorter transformation
Sorts the orders by customer ID.
Aggregator transformation
Sums the total order amount for each customer.
Output transformation
Returns the total amount of the orders by customer.
To create this custom resource mapping, manually define the REST web service resource definition. When you manually define the resource definition, you define the elements in the response message. For this example, the response message contains just the customer ID and the total order amount.
After you define the resource definition, the Developer tool creates a resource mapping that contains an Output transformation. You then add the Read transformation and the other transformations to the mapping.
The customer ID in the previous image is the key. A web service client might request the number of orders for a specific customer. The Data Integration Service filters the output data by the key. The mapping does not contain a Filter transformation.

0 COMMENTS

We’d like to hear from you!