A product such as WebSphere Message Broker typically
supplies a range of parsers to parse and write message formats. Some message
formats are self-defining and can be parsed without reference to a model.
An example of a self-defining message format is XML. In XML the message itself
contains metadata as well as data values, enabling an XML parser to understand
an XML message even if no model is available. Most message formats, however,
are not self-defining. As examples, a binary message originating from a COBOL
program and a SWIFT formatted text message do not contain sufficient metadata
to enable a parser to understand the message. The parser must have access
to a model that describes the message to parse it correctly.
Even if your messages are self-defining and do not require
modeling, there are still advantages in modeling them:
- Enhanced parsing of XML messages. Although XML is self-defining, without
a model all data values are treated as strings. If a model is used then the
parser knows the data type of data values and can cast the data accordingly.
- Improved productivity when writing ESQL. When you are creating ESQL programs
for WebSphere Message Broker message flows, the ESQL editor
can use message models to provide code completion assistance.
- Drag-and-drop message maps. When you are creating message maps for WebSphere Message Broker message flows, the Mapping editor uses
the message model to populate its source and target views. Without message
models you can not use the Mapping editor.
- Runtime validation of messages. Without a model it is not possible for
a parser to check that input and output messages have the correct structure
and data values.
- Reuse of message models in whole or in part by creating new messages based
on existing messages.
- Automatic generation of documentation.
- Provision of version control and access control for message models by
storing them in a central repository.
To make full use of the facilities offered by WebSphere Message Broker,
you should model your message formats.
To speed up creation of message models, importers are provided
that take metadata such as C header files, COBOL copybooks, XML Schema and
DTDs, and WSDL files, and create message models from that metadata. Alternatively,
IBM has pre-built models for common industry standard message formats such
as SWIFT, EDIFACT, X12, FIX, HL7 and TLOG.