Input and output messages to a message map
In a message map, you must define
an input message and an output message. You can choose from a predefined message format, or a
custom message format. You can cast xsd:any elements, or you
can add user-defined elements for which you do not have an xsd file
definition.
When a message arrives to IBM® Integration Bus,
a parser is called. Each parser is suited for a particular type of
message, and is known as a message domain. A parser converts the bit
stream of an input message to an internal format. A parser is also
called when a logical tree that represents an output message is converted
into a bit stream.
Note: The data structure that you define in a message map for an input or an output
message is the IBM Integration Bus internal
representation of the message.
Message domains
The following message domains
are supported in a
message map:
- DFDL
- XMLNSC
- SOAP
- DataObject
- BLOB
- JSON
- MRM
Note: The MRM domain is supported for compatibility with legacy message maps.
Message assembly
In a message map, the source message
assembly describes the input message and the target message
assembly describes the output message.
A message assembly includes the properties tree, any relevant headers, the local environment
tree,
the Environment tree, and the message body.
- When you create a top-level message map, only the Properties
folder is initially included. A Move transformation from the input
Properties folder to the output Properties folder is created by default where all input values
are copied to the corresponding output values unchanged.
- The structure of the Properties folder, the transport headers, and the local environment
tree are predefined in IBM Integration Bus.
- You can define the local environment tree Variables folder structure
by using the Cast function. You can also define
elements of the Variables folder by using the Add User-Defined function.
- You can define one or more elements under the
Variables folder of the Environment tree. You can use the function to
model Environment elements. Elements that are not defined in the map are maintained unchanged.
- The input message body is defined by associating an input message model such as a DFDL
schema, or an XML schema. You can also define the input message body by
using the function, for example, to define the message body structure of a JSON
message.
- The output message body is defined by associating an output message model such as a DFDL
schema, or an XML schema. You can also define the output message body by
using the function, for example, to define the message body structure of a JSON
message.
You must set the Output domain property
of the target message assembly to define the message domain in which
an output message is to be built.
The message map uses the schema types of the output elements to
create and set the elements of the output message tree.
Message models
The following message models
are supported in a
message map:
- Predefined message model
- Schema-based message model
- Schemaless message model, that is, a message model of a message that has a
well-defined format but no schema definition available as an xsd
file.
You can select any of the following supplied message models
as your input or your output message format:
- SOAP_Domain_Msg {}: You use this message
model to handle messages in the SOAP domain.
- JSON {}: You use this
message model to handle messages in the JSON domain.
- BLOB {}: You use this message model to
handle messages in the BLOB domain.
For other supported message domains, you can select a schema-based message model
or define a schemaless message model.
- You use a schema-based message model when you have the message model in an XSD file. For
more information on how to create a schema-based message model, see Modeling different data formats.
- You use a schemaless message model when you do not have a formal
definition of the message, that is, you do not have an XSD file describing the message
model.