Web Service Consumer Transformation Input Mapping
When you view the transformation ports, show the input mapping to view the operation input hierarchy. When you show the input mapping, you can define input groups, define input ports, and map input ports to operation input nodes.
The input mapping includes the following areas:
- Ports
- Create the transformation input groups and input ports in the Ports area.
- Operation Input
- The Operation Input area shows the nodes in the SOAP request message that the Web Service Consumer transformation sends to the web service. The WSDL data object that you use to create the transformation defines the operation input hierarchy.
The following figure shows the input mapping for a non-reusable Web Service Consumer transformation:
After you create input ports, map the input ports from the Ports area to the nodes in the Operation Input area. When you map an input port to a node in the operation input, the location of the port appears in the Location column in the Operation Input area.
The Developer tool maps nodes in the first level of the operation input to input ports when you choose to map the first level of the input hierarchy. The Developer tool also creates the ports to perform the mapping. If the first level of the hierarchy contains a multi-occurring parent node with one or more multi-occurring child nodes, the Developer tool does not map the first level of the hierarchy.
You can map XML data from one string or text input port to the entire SOAP request message. When you map XML data to the entire SOAP request, you cannot map ports to nodes in the operation input.
You can choose to view the lines that connect the input ports to the nodes in the operation input.
Rules and Guidelines to Map Input Ports to Nodes
Review the following rules when you map input ports to nodes in the operation input hierarchy:
- •You can map an input port to one node in the hierarchy. You can map the same port to any number of keys in the hierarchy.
- •The input port and the node must have compatible data types.
- •You can map ports from one input group to multiple hierarchy levels in the operation input.
- •You must map input ports to the keys in the operation input. Any port that you map to a key must be a string, integer, or bigint datatype. Map data to the keys in all levels in the operation input above the hierarchy level that you are including in the SOAP message. Include the foreign keys for all levels above and including the level you are mapping.
Note: You do not have to map input ports to keys if you are mapping only the lowest level of the operation input hierarchy.
- •You can map multiple string, bigint, or integer input ports to a key in the Operation Input area to create a composite key. When you click the Location field for a composite key, you can reorder the input ports or remove one of the ports.
Customize View Options
You can change the operation input hierarchy to show keys in the Operation Input area. You can also show grouping constructs that define how to order nodes.
Click the
Customize View button
(
) in the
Operation Input area. Enable any of the following options:
- Sequence, Choice, and All
- Show a line that indicates whether an element definition is sequence, choice, or all.
- Nodes in an all group must all be included in the SOAP message.
- Nodes in a sequence group must be in the order specified in the WSDL.
- At least one node in a choice group must appear in the SOAP message.
- Keys
- View the keys in the Operation Input area. The Operation Input area includes keys for each group. You can add a key to an input port in the Ports area.
Mapping Input Ports to the Operation Input
When you show the transformation input mapping, you can define input groups, define input ports, and map input ports to operation input nodes.
1. Open a Web Service Consumer transformation.
2. To show the transformation input mapping, use one of the following methods:
- - For a reusable transformation, click the Overview view. Choose to show the input mapping.
- - For a non-reusable transformation, click the Ports tab in the Properties view. Choose to show the input mapping.
3. Define a primary key for the root input group.
4. To add an input group or port to the Ports area, use one of the following methods:
Option | Description |
---|
Drag a node | Drag a group node or a child node in the Operation Input area to an empty column in the Ports area. If the node is a group node, the Developer tool adds a group without ports. |
Manually add a group or port | To add a group, click the arrow next to the New button and then click Group. To add a port, click the arrow next to the New button and then click Field. |
Drag a port from another transformation | In the editor, drag a port from another transformation to the Web Service Consumer transformation. |
Copy a port | Select ports from another transformation and copy them to the Ports area. To copy ports, you can use keyboard shortcuts or you can use the copy and paste buttons in the Developer tool. |
Select Map first level of hierarchy | Select Map first level of hierarchy. The Developer tool maps nodes in the first level of the operation input to input ports and groups. The Developer tool also creates the input ports and groups to perform the mapping. |
5. If you manually create a port or you copy a port from another transformation, click the Location column in the Operation Input area and choose a port from the list.
6. To map input ports as a composite key, use one of the following methods:
Option | Description |
---|
Drag input ports | Select two or more input ports and drag them to a key in the operation input hierarchy. |
Select input ports from the Select Location dialog box | Click the Location column of a key in the operation input hierarchy and then select the input ports. |
7. To clear the locations of nodes, use one of the following methods:
Option | Description |
---|
Click Clear | Select one or more nodes in the Operation Input area and click Clear. |
Delete the lines that connect ports to nodes | Select one or more lines that connect the input ports to the nodes in the operation input and press Delete. |
8. If the associated WSDL data object includes anyType elements, any elements, anyAttribute attributes, derived type elements, or substitution groups, choose objects in the Operation Input area. In the Type column for a node, click Choose and then choose one or more types, elements, or attributes from the list.
9. To map XML data from a string or text input port to the complete SOAP request, right-click the port and select Map as XML.