IBM Integration Bus, Version 10.0.0.1 Operating Systems: AIX, HP-Itanium, Linux, Solaris, Windows, z/OS


Casting a base type to a derived type or extension type

In a message map, you can cast a base type to a derived type or extension type so that you can define transformations between subtypes of a data type.

Before you begin

  • Model the schemas that correspond to the base type and the derive type.
  • Cast an xsd:any element in your message map to a base type.

About this task

A derived type is a data type that is related to another data type known as the base type or super type.

For example, Address is the base type, and USAddress, CanadianAddress, and UKAddress are derived types of Address.

Procedure

To cast a base type to a derived type, complete the following steps:

  1. Select the base type.

    For example, you can cast an xsd:any element to the Address base type.

  2. Right-click the base type (Address), and then select Cast.

    This figure shows graphically how to cast a derived type Address. Right-click Address, and then select Cast.

  3. In the Type Selection window, choose a matching type, and then select OK.

    The options available correspond to specific address types in the schema model that are modeled by using Address as the base type.

    The following figure shows the Type Selection window that you get:

    This figure shows the Type Selection window that opens when you select Cast....

Results

The message map contains two entries, one for the base type and a second one for the derived type.

In the example, one entry corresponds to the base type Address. The other entry corresponds to an Address with the derived type CanadianAddress.

This figure shows the message map with two entries for Address, one with a base type, and one with a CanadianAddress derived type.

What to do next

Define additional transformations between elements in the message map. For more information, see Transform types in the Graphical Data Mapping editor.


br30026_.htm | Last updated 2015-05-28 20:53:06