WebSphere Message Brokers
File: ad30770_
Writer: Terry Cowling

Concept topic

This build: July 31, 2007 21:26:47

Namespaces with non-XML messages

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.

Related concepts
Namespaces in the message model
Specifying namespaces in a Message Type
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, 2007Copyright IBM Corporation 1999, 2007. All Rights Reserved.
This build: July 31, 2007 21:26:47

ad30770_ This topic's URL is: