Input and output messages to a message map

In a message map, you must define a model for the input message and an output message. You can choose from a predefined message format, or you can use an XML, DFDL, or JSON schema message model, to define the structure of the data and provide information about the data type. Alternatively, you can define it dynamically in the map by using the Add User-Defined function.

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, a JSON schema, or an XML schema. You can also define the input message body by using the Add User Defined function, for example, to define the structure of a JSON message.
  • The output message body is defined by associating an output message model such as a DFDL schema, a JSON schema, or an XML schema. You can also define the output message body by using the Add User Defined function, for example, to define the message body structure of a JSON message.

The Output domain property target message assembly is set to define the message domain in which an output message is to be built, based on the message type that you selected for the map output. You can change it if necessary.

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
  • XML schema-based message model
  • DFDL schema-based message model for text and binary formats
  • JSON schema-based model, from a REST API swagger document, or a JSON schema in a shared library
  • 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 output message format:
  • SOAP_Domain_Msg {}: Use this message model to handle messages in the SOAP domain; it allows you to add mapping casts to define the content of the SOAP body and header by using a schema model.
  • JSON Object Message: Use this message model for JSON object data in the JSON domain, by using the Add User Defined function.
  • JSON Array Message: Use this message model for JSON array data in the JSON domain, by using the Add User Defined function.
  • BLOB {}: Use this message model to handle messages in the BLOB domain, or when you do not need to process any message body data.