Converting a legacy message map that
includes transformations of the local environment tree or xsd:any elements
Before you convert a legacy message map that includes transformations
of the local environment tree or xsd:any elements,
you must provide the XML schema of the input and output data structure
in a library. The library with the schemas must be visible by the
project hosting the imported legacy message map.
About this task
In a message map, the
Variables folder in the local environment tree is represented
by xsd:any. In IBM® Integration Bus, you must qualify the Variables
folder to provide the elements for your map. For more information,
see Mapping data in the local environment tree.
When you convert a
legacy message map, you can encounter
any of the following conversion behaviors:
- You have an xsd:any element and the schema
model associated to the message set that you use to qualify
it in your map. The conversion process casts the xsd:any element
to the schema model automatically.
- You have an xsd:any element and no schema model
describing its structure. The conversion process fails the first
time. You must define the model and run again the conversion
process.
- You have a legacy message map where
you edit the path expression in your map to define the element
that must be read to qualify the xsd:any element.
The conversion process fails the first time. You must define
the schema model and run again the conversion process.
If you only need to qualify a small
number of elements, then, you might want to consider using the Add
user-defined function instead of defining a schema
model. For more information, see Defining user-defined elements.
Procedure
In the Application Development view,
complete the following steps to convert a legacy message map that includes transformations
of the local environment tree and of xsd:any elements:
- If you use the local environment tree in your legacy message map transformations,
create an XML schema model in a library project. The model must
define the Variables folder data structure.
- If your input message or your output message include xsd:any elements
that you use as part of your transformations, define the XML schema
model for each one.
- Start the conversion process: Right-click the message map that you want to convert,
and click Convert Message Map from .msgmap to .map.
- Open the converted map in the Graphical
Data Mapping editor: Double-click
your new message map.
- Review the conversion errors and build the list of unresolved
elements. For more information, see Managing conversion errors on converted legacy message maps.
- Create XML schema models for each unresolved data structure
in a library that is referenced by the project hosting your converted
map.
For more information, see Mapping data in the local environment tree.
- Delete the converted legacy message map.
- Rename the converted legacy message map by removing _backup.
- Rerun the conversion process: Right-click the message map that you want to convert,
and click Convert Message Map from .msgmap to .map.
The conversion process casts automatically your xsd:any elements.
Any related errors to unresolved elements disappear.
What to do next
Continue converting your legacy message map. For more information,
see Converting a message map from a .msgmap file to a .map file.