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

REST Web Service Consumer Transformation Overview

REST Web Service Consumer Transformation Overview

The REST Web Service Consumer Transformation is an active transformation that connects to a REST web service as a web service client to access or transform data. Use a REST Web Service Consumer transformation to connect to a REST web service. The REST Web Service Consumer transformation can send a request to a REST web service and receive a response from a REST web service.
The REST Web Service Consumer transformation connects to a web service through a URL that you define in the transformation or in an HTTP connection. You can also use an HTTPS connection. REST Web Service Consumer transformations can use TLS 1.2, TLS 1.1, or TLS 1.0.
A REST web service contains an HTTP method for each action that the web service supports. When the Data Integration Service connects to a REST web service, it can send a request to get, post, put, or delete data. The request can act upon individual resources or collections of resources. After the Data Integration Service sends a request message, it receives a response message from the web service.
The request and the response messages contain XML or JSON data with elements that can form a hierarchy. When a request or a response message contains multiple-occurring elements, groups of elements form levels in the XML or JSON hierarchy. Groups are related when one level is nested within another.
In the REST Web Service Consumer transformation, the method input and method output define the structure of the request and the response messages. The method input and method output include mappings that define how to map the message elements to the input and output ports.
The REST Web Service Consumer transformation supports proxy server. You can also connect to a Microsoft SharePoint application with the REST Web Service Consumer transformation.

Example

An online store defines resources for a products database. The database identifies each product by part number.
Web service clients access the product details through a REST web service. The web service uses the following URL:
http://www.HypoStores.com/products/ProductDetails
You need to retrieve details about a specific product, such as the description and the unit price, and pass the details to a transformation downstream in a mapping. Create a REST Web Service Consumer transformation to retrieve details about a product and pass them to another transformation..
The following table shows the transformation details that you configure:
Transformation Detail
Value
HTTP method
Get
Base URL
http://www.HypoStores.com/products/ProductDetails
Input argument port
Part_No
Output ports
Description, Unit_Price
Method output
<The structure of the response message.>
The method output includes an output mapping that defines how the elements in the response message map to the output ports.
When the Data Integration Service sends the request to the web service, it appends the value in the argument port to the base URL. For example, to retrieve details about part 0716, the Data Integration Service uses the following URL:
http://www.HypoStores.com/products/ProductDetails?Part_No=0716
When the Data Integration Service receives a response, it converts the product description and the unit price in the response message to data for the output ports.
You can also pass Part_No as a parameter and substitute the value mid-stream when you run the mapping.

0 COMMENTS

We’d like to hear from you!