Mapping a SOAP message by using a conditional transform
You define SOAP message parts in a message map by using the Cast function and then you define transforms between its elements. To map between elements that are defined as specific or derived types, you might want to define some conditional transforms. You can configure the If, Else if, and Else transform to control the flow of the mapping between elements.
About this task
Complete the following steps to configure the SOAP_Domain_Msg when the Mapping node is wired directly from a SOAPInput node with no SOAPExtract node:
- Define the transformation for the Context object.
Copy the Context object by using the Move transform. For more information, see Specifying a transform (mapping operation).
- Define the transformation for the Header object.
You can define a Move transform between the input Header object and the output Header object to copy the structure and all its elements.
Copy the Header object by using the Move transform.
Define the transformation for the Body object. Define SOAP Body
parts by using the Cast function. You can cast attributes and other body
parts. Then, define transforms between the input elements and the output elements in each body
part. For more information, see Casting elements in a message map.
- Cast attributes that are defined as xsd:any into a specific type. Then, define a transform between the input attribute and the output attribute.
- Cast wildcard elements that are defined as xsd:any into a specific type.
Cast a base type element to a derive type element. A derive type element is also known as
an extension type element.
In a message map, you cast a base type to a derive type or extension type so that you can define transformations between subtypes of a data type.For example, addresses are represented differently for different countries. You might want to map addresses from different countries into a common complex structure for addresses.
- Create and configure the If, Else if, and Else transform to control the flow of the mapping between elements that are defined as a specific or a derive type in the input and output message assembly by setting conditions.
- Optional: Define the transformation for the Attachment object.
Copy the Attachment object by using the Move transform.
You define SOAP attachment parts by using the Cast function.
You have a message map that transforms a SOAP message. The message map contains a nested map that uses the If, Else if, and Else transform.
The following figure shows a message map after you complete the previous steps to transform a SOAP message:
What to do next
Define more transforms between the input SOAP_Domain_Msg and the output SOAP_Domain_Msg. For more information, see Specifying a transform (mapping operation).