0302 Web Service Consumer Transformation
0302 Web Service Consumer Transformation
0302 Web Service Consumer Transformation
Informatica
Abstract
In Informatica Developer, you can create a Web Service Consumer transformation that calls a web service from an
Informatica Data Services mapping or an Informatica Data Quality mapping. This article describes the steps to create a Web
Service Consumer transformation, configure the SOAP messages in the transformation, and connect the transformation to
the web service.
Supported Versions
Informatica Data Services 9.1.0
Informatica Data Quality 9.1.0
Table of Contents
Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
Scenario. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
Configuration Tasks. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Step 1. Import a WSDL File. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Step 2. Create the Web Service Consumer Transformation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
Step 3. Extract Ports to the Operation Input. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Step 4. Extract Ports from the Operation Output. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Step 5. Define a Connection to the Web Service. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Step 6. Configure the Connection in the Transformation Runtime Properties. . . . . . . . . . . . . . . . . . . . . . . . . . 9
Step 7. Create the Physical Data Objects. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Step 8. Create the Mapping. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Step 9. Run the Mapping. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Overview
You can create a Web Service Consumer transformation that provides access to a web service from an Informatica Data
Services mapping or an Informatica Data Quality mapping. The Web Service Consumer transformation can access an
Informatica web service or a web service from an external provider.
Create a Web Service Consumer transformation from a Web Services Description Language (WSDL) data object. A WSDL
data object is an object in the Model repository that defines a WSDL file. A WSDL file describes the web service operations
and the request and the response messages.
The Web Service Consumer transformation can pass hierarchical groups of data to a web service in a request message.
The transformation can receive multiple groups of data from a web service in a response message.
Scenario
Hypostores customer service representatives want to access customer data over a network. The customer service
representatives need to view customer and order information by customer ID.
Use a Web Service Consumer transformation to receive a customer ID and pass the ID in a SOAP request to a web service.
The web service returns the customer information and the customer orders in a SOAP response message. The Web Service
Consumer transformation extracts one row of customer information and multiple rows of orders from the response message
for each customer.
2
In Informatica Developer, create a mapping that includes a flat file source, the Web Service Consumer transformation, and
the target customer and order tables.
Configuration Tasks
To implement this scenario, you must have a WSDL file that describes the web service you are going to connect to. Create
the Web Service Consumer transformation from the WSDL.
The WSDL describes the SOAP request message and the SOAP response message between the Web Service Consumer
transformation and the web service provider. Import a WSDL file to create the data object in the Model repository. You can
import the WSDL from the following location: https://communities.informatica.com/docs/DOC-5416.
1. In the Developer tool, click File > New > Data Object.
3
8. Click the WSDL tab and view the messages in the Navigator panel.
The request message is getCustomerByID. The message contains a customer ID.
4
3. Browse and select a repository location for the transformation.
The default is your current location.
4. Browse and select a WSDL data object to define the web service request and response messages.
5. Browse and select an operation from the WSDL.
For this scenario, select the getCustomerByID operation.
6. Click OK.
The following dialog box appears after you choose the getCustomerByID operation:
5
By default, the wizard creates the RequestInput port group. The wizard creates the customerID port and extracts the port to
the customerID node in the Operation input. The wizard creates the input port when the Extract the first level of the
hierarchy from the operation input is enabled.
Note: You do not need to extract data for the keys in the Operation input hierarchy because the SOAP request contains one
field.
Click Next.
The following dialog box appears after you extract ports to the Operation input:
6
The Operation output area contains the nodes in the SOAP response message. By default, the wizard creates the
CustomerDetails group and the CustomerOrders group of output ports in the Ports area. The wizard extracts the nodes from
the Operation output to the transformation output ports. The wizard creates the output port groups and extracts data from
them when Extract first level of hierarchy from operation output is enabled.
Note: You must create a web service connection to configure WS-Security or to configure trust certificate files.
7
Optionally, you can configure the following properties for a web service connection:
Property Description
End Point URL URL for the web service that you want to access.
Timeout Time in seconds that the Data Integration Service waits for response from the web service
provider.
8
Property Description
HTTP Authentication Type Type of user authentication over HTTP. Select one of the following values:
None. No authentication.
Automatic. The Data Integration Service chooses the authentication type of the web service
provider.
Basic. Requires you to provide a user name and password for the domain of the web service
provider. The Data Integration Service sends the user name and the password to the web
service provider for authentication.
Digest. Requires you to provide a user name and password for the domain of the web service
provider. The Data Integration Service generates an encrypted message digest from the user
name and password and sends it to the web service provider. The provider generates a
temporary value for the user name and password and stores it in the Active Directory on the
Domain Controller. It compares the value with the message digest. If they match, the web
service provider authenticates you.
NTLM. Requires you to provide a domain name, server name, or default user name and
password. The web service provider authenticates you based on the domain you are
connected to. It gets the user name and password from the Windows Domain Controller and
compares it with the user name and password that you provide. If they match, the web service
provider authenticates you. NTLM authentication does not store encrypted passwords in the
Active Directory on the Domain Controller.
WS Security Type The WS-Security type that you want to use. Select PasswordText, PasswordDigest, or no WS-
Security header.
Client Certificate Type The format of the client certificate file. Select one of the following values:
PEM. Files with the .pem extension.
DER. Files with the .cer or .der extension.
Private Key File Name File name for the private key used when the web service provider authenticates the consumer or
when the consumer and provider exchange certificates.
8. Click Test Connection to verify that you entered the connection properties correctly and that you can connect to
the URI.
9. Click Finish to create the connection.
You can choose this connection in the Web Service Consumer transformation.
9
2. In the Runtime properties, browse for the web service connection object you created.
The flat file contains rows of customer numbers. For each input row, the Web Service Consumer transformation calls the
getCustomerID web service. The web service returns customer information and multiple orders for the customer. The Web
Service Consumer transformation passes the customer information and the orders to separate tables that are related by the
customer ID.
10
1. To create a mapping, click File > New > Mapping.
2. Enter a name and location for the mapping.
3. Add the flat file physical data object to the mapping. Add the Web Service Consumer transformation to the
mapping. Add the Customer and Order relational tables to the mapping.
4. Connect the input CustomerID to the customerID in the Web Service Consumer transformation.
5. Connect the output ports to the target tables. Connect the customerID and customerName ports from the
getCustomerByIDResponse group to the Customer_Table. Connect the customerID, the orderID, and
orderContact ports from the customerOrders group to the Customer_Orders table.
6. Click Edit > Validate to validate the mapping.
1. Click the Customer or Orders relational table in the mapping before you run the Data Viewer.
2. Click Run > Data Viewer to view the results.
When you click the Customer table, the Data Viewer shows the following rows:
CustomerID Name
10110085 JOSEPHTHAL LYON & ROSS
10110086 NRCA
10110087 POND EQUITIES
10110088 SCHRODER & COMPANY
10110089 YUASA TRADING COMPANY (AMERICA)
When you click the Orders table, the Data Viewer shows the following rows:
11
Customer Order Contact
10110088 O-9130 GIORGIA TWITCHELL
10110089 O-9352 STEFFI MCGLOWN
Author
Ellen Chandler
Principal Technical Writer
12