Use the Cast function to redefine parts of the input or
output model in a graphical data map.
Your message model schemas might contain one or more wildcards,
defined as xsd:any. Wildcards can be used to create
a flexible message model that can be redefined when a more detailed
definition is required. The process of redefining is called a cast.
To
cast a wildcard element by using the Graphical Data Mapping editor, complete the following
steps:
- With a graphical data map (.map)
file open in the Graphical Data Mapping editor, right-click
the base element or wildcard (xsd:any) element that
you want to cast, then select Cast. The Type Selection dialog opens.
- In the Type Selection dialog, select the type that you
want to cast to, and then click OK.
The Type Selection dialog lists only those elements and
types that are appropriate for the element that you want to cast, and that
are contained in a referenced application or library. When casting a base
element, the Type Selection dialog lists only derived
types.
Note: When you cast a wildcard to multiple types in the input side of a map,
the Graphical
Data Mapping editor injects an XPath
expression to detect which type is present in the input data at run
time. Then, invoke the appropriate mapping. However, the Graphical
Data Mapping editor only checks the name of
the type in each cast. The namespace is ignored. If you cast a wildcard
to two types with the same name but in different namespaces and you need
to map both types, you must add your own conditional transform that
checks the namespace and name part of the
xsi:type attribute of the input data.
Your element is cast to the type that you selected, and is
displayed in the Graphical Data Mapping editor.