Making a message flow namespace aware

This topic describes how to make a message flow namespace aware.

If you have migrated from WebSphere MQ Integrator Broker Version 2.1, you might have written message flows that handle XML messages that use XML namespaces. In Version 2.1, such XML messages are parsed in a different way to that used by WebSphere Message Broker. While such message flows will continue to work correctly when hosted by WebSphere Message Broker, it is better to upgrade them to become namespace aware by performing the following steps.

  1. Correct the message model.
    If you are using the MRM domain, you will have modeled the XML message in question. Create a new message set, ensuring that the Use namespaces property is set and that you create an XML physical format with the same name as the original. There are two cases to consider:
    • The XML message is described by an XML Schema. Import the XML Schema into the new message set. This creates a new namespace-aware message definition file automatically.
    • The XML message is modeled by hand. Create a new message definition file in the desired target namespace (this is specified on the last page of the wizard), then re-create your message model using the editor.
      • Do not set the XML Name property of an element, as you did in Version 2.1. It should be left to take the default value.
      • Do not re-create any elements or attributes with names commencing “xsi_” or “xmlns_”; these are all handled automatically by the parser.
      • Re-create XML attributes as attributes in the model (instead of elements with an XML Render property set to XMLAttribute).
  2. Correct the message flow.
    • If you were using the MRM domain, change any references to the message set to input nodes or compute nodes.
    • If you were using the XML domain, change this to either the XMLNS or XMLNSC domain in input nodes and ESQL statements. These domains are namespace aware; the original XML domain is not and is effectively deprecated.
    • Change ESQL paths that refer to elements in the message to use the correct namespace-aware syntax. The ESQL editor content assist feature can help with the automatic creation of namespace constants if a message model exists.
  3. Deploy the corrected message flow and the new message set.

    Add the corrected resources to a new broker archive file and deploy it to the target broker execution group. If the XML messages that are received by the message flow contain an MQRFH2 header that specifies the message set, the sending application must be changed in step.

You have upgraded your message flows to become namespace aware.

Related concepts
Namespaces in the message model
Importing from XML schemas to create message definitions
Importing XML Schema into message sets with namespaces disabled
The MRM domain
The XML domains
Related tasks
Creating a message set project
Creating a message definition file
Deploying a message flow application
Adding files to a broker archive
Related reference
ESQL editor