Transformations > Web Services transformation > Configure the Web Services transformation
  

Configure the Web Services transformation

After you have defined the business service, you can configure the Web Services transformation in a mapping to access or transform data from a web service. The requirements and available options depend on whether you are connecting the Web Services transformation to one source object or to more than one source object.

Configuring the transformation

When you configure the web services transformation, you connect a source object, configure properties for the transformation, map incoming fields to requested fields for the web service, and map the response to output fields to create one or more success groups. Data Integration creates a fault group automatically but you can choose whether to map it to the output fields.
  1. 1Create a mapping and add the source objects you want to work with.
  2. 2Add a Web Services transformation to the canvas.
  3. 3Connect the source to the Web Services transformation.
  4. 4Select the business service and operation in the Web Service tab.
  5. 5On the Request Mapping and Response Mapping tabs, create the field mappings between the source fields and the web service request.
  6. For an illustration of the mapping process, see Web Services transformation example.
  7. 6On the Output Fields tab, review the success groups, fault group, and field details. You can edit the field metadata, if needed. The success groups contain the SOAP response from the web service. The fault group contains SOAP faults with the fault code, string, and object name that caused the fault to occur.
  8. 7Define the advanced properties.
  9. 8Save and run the mapping.
For additional information about the mapping process, see the following sections:

Advanced properties

The following table describes the properties available for the Web Services transformation from the Advanced tab:
Property
Description
Cache Size
Memory available for the web service request and response. If the web service request or response contains a large number of rows or columns, you might want to increase the cache size. Default is 100 KB.
Allow Input Flush
The mapping task creates XML when it has all of the data for a group. When enabled, the mapping task flushes the XML after it receives all of the data for the root value. When not enabled, the mapping task stores the XML in memory and creates the XML after it receives data for all the groups.
Note: You cannot select the option to allow input flush if you are connecting to multiple source objects.
Transaction Commit Control
Control to commit or roll back transactions based on the set of rows that pass through the transformation. Enter an IIF function to specify the conditions to determine whether the mapping task commits, rolls back, or makes no transaction changes to the row. Use the transaction commit control if you have a large amount of data and you want to control how it is processed.
Note: You cannot configure a transaction commit control if you are connecting to multiple source objects.

Mapping incoming fields

When you define the request mapping, you can configure relationships between more than one source object. You configure relationships between the response mapping and the output fields separately.
When you map incoming fields, note the following guidelines:
You can map the incoming fields to the request mapping as shown in the following image:
The image shows incoming field "item_int_id" mapped to the "internalid" element in the request structure.
Drag each incoming field onto the node in the request structure where you want to map it.

Working with multiple source objects

If you have multiple sources, note the following requirements:

Mapping outgoing fields

On the Response Mapping tab, you map the response structure to the output fields you want to use. You can choose relational or denormalized format for the output fields.
When you choose Relational, the transformation generates the following output groups:
When you choose Denormalized, the transformation generates the following output groups:
Right-click the node in the node of the response where you want to map the response to output fields. You can choose to map all descendants or only the immediate children, as shown in the following image:
The image shows the choices you have when you right-click a node in the response. You can map all descendants, map immediate children, unmap all descendants, or unmap immediate children.

Transaction commit control

The transaction commit control lets you control commit and roll back transactions based on a set of rows that pass through the transformation.
Enter an IIF function to specify the conditions to determine whether the mapping task commits, rolls back, or makes no transaction changes to the row. When the mapping task issues a commit or roll back based on the return value of the expression, it begins a new transaction.
Note: You cannot configure a transaction commit control if you are connecting to multiple source objects.
Use the following syntax for the expression:
IIF (condition, value1, value2)
Use the following built-in variables when you create a transaction control expression:
If the transaction control expression evaluates to a value other than commit, roll back, or continue, the mapping is invalid.

Example

You want to use transaction commit control to write order information based on the order entry date. You want all orders entered on a given date to be committed to the target in the same transaction.
You create a field named New_Date and populate it by comparing the order date of the current row to the order date of the previous row. If the orders have different dates, then New_Date evaluates to 1.
You then use the following expression to commit data when the mapping task encounters a new order date:
IIF(New_Date = 1, TC_COMMIT_BEFORE, TC_CONTINUE_TRANSACTION)

Viewing incoming and request fields

When you review incoming fields and request fields, you might want to reduce the number of fields that appear on the page.
You can view and locate fields using the following methods:
Expanding and collapsing nodes
To display the parent and child nodes in a tree, you can expand all nodes. To display only the parent nodes, collapse the nodes. Use the Expand All Nodes and Collapse Nodes icons on the Request Mapping or Response Mapping tabs.
Searching for fields
To search for a particular field, type the field name in the Search text box.
Filtering the fields
You can filter the incoming fields view to show all fields, keys, mapped fields, or unmapped fields. You have a similar option in other tree views:
View the field and field mapping details
For each node in a hierarchy, you can view the field and field mapping details. Right-click on the node to show the properties:
Clear the field mappings and keys
In the Request Structure tree, you can clear the mapping, clear the keys, or map and unmap selected fields:

Pass-through fields

Pass-through fields are response fields that you do not need for the current transformation but you might want to use later in the mapping.
For example you might only need the primary key from a source object for the Web Service transformation. However, you might want to use the other fields in the source object in a downstream transformation.
Incoming fields and response fields pass through the Web Services transformation to the success groups and fault group. However, when the mapping contains multiple sources, only the fields from the primary source pass through. The source that is connected to the Web Service transformation first is the primary source. For example, in the following image, NewSource is the primary source and NewSource1 is the secondary source:
The Field Mapping tab shows incoming fields from two sources, NewSource and NewSource1. The NewSource1 source includes the DeptFk field which is a foreign key.
Because NewSource1 is a secondary source, fields from this source do not pass through to the success groups and fault group.
To determine the source of a field in the Success or Fault group, choose the Incoming Fields tab. The Origin column shows the source for each field.