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

REST Web Service Resources

REST Web Service Resources

A resource contains the definition of the REST response message and the data access method to return the response. When you create an Informatica REST web service, you can manually define the resource or you can create a resource from a data object.
You can create a resource from a relational data object or a flat file data object. When you create a resource from a data object, the Developer tool creates a default resource mapping with a Read transformation and an Output transformation. The Output transformation contains the same ports as the Read transformation.
You can manually define the structure of the output response message. When you manually create a resource, you define the elements in the response message. Then you define the mapping that returns the data to the response message.
A REST web service can have multiple resources. Each resource has a resource mapping to retrieve the data and a definition of the output response. You can choose the resources to view in the Resources tab. Right-click in the editor and select
Show Resources
.
The following image shows the Select Resources dialog box:
The Select Resources dialog box lists all resources for a web service. You can select which resources to view in the editor canvas.
You can view the components of a resource on the
Resources
tab.
The following image shows the components of a resource on the
Resources
tab of the REST web service:
The web service resource appears in the editing canvas. It has three components, the Key, the Definition, and the mapping resource. You can expand each component to view the details.
The resource contains the following components:
Key
An index to the data in the response message. A web service client can request data for a specific key. You can set any simple type element as a key in the output.
Definition
The elements in the output response message. You can view the elements by expanding the definition in the resource or by navigating to the
Schema
view of the
Resources
properties.
Resource Mappings
The mapping that retrieves the data, transforms it, and returns it in a response message. By default, a resource mapping contains a Read transformation and an Output transformation. You can add any transformation to the mapping. View the resource mapping by clicking the link in the resource.