Mapping xsd:any on an input or output message

You can use the Cast function to redefine parts of the input or output model in a message map. You can also use the Add User-Defined function to redefine dynamically parts of the input or output model.

In your integration solution, you can create a generic message model, which you can later redefine to a specific model, by using a wildcard, defined as xsd:any.

You can redefine an xsd:any element in any of the following ways:
  • Using the Cast function. You can redefine an xsd:any element by specifying the specific complex or global type defined in a particular schema file.
  • Using the Add User-Defined function. You can redefine an xsd:any element by specifying the specific complex or global type directly in the message map.
  • Using a transform. You can define a transform, such as the Submap transform, and define the input and output xsd:any elements within the nested map of the transform.
Note: It is recommended to qualify an xsd:any element before you define any transforms in a main map. Alternatively, you can define a Submap between the xsd:any element and the output element, and then define the transforms within the nested map associated to the Submap.

For example, in IBM® Integration Bus, a SOAP message is a common example of a generic model in which you are required to define the business data being exchanged through the SOAP protocol. The predefined SOAP message format defines only the structure of the SOAP envelope and allows you to redefine the Header and Body content.

Note: The xsd:any input element cannot be involved in a transformation when it is contained within a cast item group. You can either create transformations on the cast elements or remove all associated cast elements to directly transform the xsd:any.

Qualify xsd:any parts of a schema-based message model by using the Cast function

You can define a wildcard in a schema-based message model as an xsd:any element to create a flexible message model that can be redefined later.

You use the Cast function to redefine parts of the input or output model in a message map.

For example, you might have a base type of AddressType, and two derived types of USAddressType and CanadianAddressType. Using the Cast function in the Graphical Data Mapping editor, you can cast AddressType to CanadianAddressType.

For more information, see Casting elements in a message map.

Qualify xsd:any parts of a message model that does not have a schema by using the Add User-Defined function

You use the Add User-Defined function to redefine parts of the input or output model directly in a message map.

For more information, see Defining user-defined elements.

Qualify xsd:any parts by using a Submap transform

You can use the Submap transform to qualify an xsd:any element defined on the input message assembly, the output message assembly, or both.

You must specify the input element type and the output element type using a global type in the referenced submap of the Submap transform.

You qualify the xsd:any elements in the nested map by defining the input and output elements.