Namespaces with MRM non-XML messages

The use of namespaces by WebSphere® Message Broker is not necessarily limited to XML message models.

There is one scenario where the use of namespaces by non-XML message models can simplify the ESQL or Java code that you write. But before describing this scenario, it is important to understand that the MRM parser, when parsing messages that are defined in a Message Definition File that has a target namespace, produces a logical message tree that contains both name and namespace information. It does this regardless of the physical format of the message. For non-XML (CWF or TDS) messages, the namespace is obtained from the Message Definition file.

Consider a transformation scenario where a message from a COBOL application requires to be transformed into namespace-aware XML; for example, a SOAP XML message. The transform must map the logical message tree that was created for the COBOL message to a logical message tree that matches the XML message. If the COBOL message tree does not contain namespace information, each mapping from a COBOL field to an XML element must set the namespace for the XML element. However, if the COBOL message tree already contains the required namespace information, this mapping is much simpler.

To enable the MRM parser to create namespace information in a message tree that was created from a CWF or TDS message, you need to specify a target namespace for the Message Definition File. This must be done as part of the Message Definition File creation process; you cannot do this after the file has been created. There are two ways to specify a target namespace. For each of these, make the target namespace of the Message Definition File the same as the target namespace of the XML message into which the non-XML message is being transformed.

When dealing with both the message tree for the non-XML message and the message tree for the XML message, the ESQL or Java code that you write to perform the transformation must be namespace aware.

Related concepts
Namespaces in the message model
Namespaces with MRM XML messages
Specifying namespaces in the Message Type property
Reusing message definition files
Related tasks
Creating a message set
Creating a message definition file
Importing from XML DTD
Importing from XML Schema
Importing from C
Importing from COBOL copybooks
Related reference
Import formats
Notices | Trademarks | Downloads | Library | Support | Feedback

Copyright IBM Corporation 1999, 2009Copyright IBM Corporation 1999, 2009.
Last updated : 2009-01-07 15:21:27

ad30770_