Use of namespaces by WebSphere Message Broker is not necessarily limited to XML message models. There is one scenario where use of namespaces by non-XML message models can simplify the ESQL or Java code that you write.
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 containing 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 transforming into namespace-aware XML, for example a SOAP XML message. The transform must map the logical message tree 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 then 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 then this mapping is much simpler.
To enable the MRM parser to create namespace information in a message tree 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 can not do this once 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.