Try OpenEdge Now
skip to main content
Messaging and ESB
Implementing Messaging : Working with messages : Creating, populating, and accessing messages : XMLMessage
 
XMLMessage
An XMLMessage is a message type whose body contains a well-formed XML document (a SAX-WRITER, SAX-READER, or X-DOCUMENT). ABL has built in support to send and receive XML messages. The following table lists the methods for handling XML messages.
Table 25. Methods for handling XML messages
Create method
Populate method
Access method
The XMLMessage is an extension of a JMS TextMessage. XMLMessage supports the same methods as TextMessage.
XML messages can be used in conjunction with the ABL XML parser:
*Incoming messages — Parse the XML text using the getX-Document function or the setSaxReader procedure
*Outgoing messages — Save the XML text using the setX-Document procedure or the getSaxWriter function
It is important to consider the code page of XML messages. (A code page is a table that maps each character on it to a unique numeric value.) Theoretically, any code page can be used to encode XML documents. However, each XML parser supports some or all code pages, and XML parsers differ with respect to the code page conversions that they can do.
With the ABL–JMS API, the conversion rules are straightforward. The text stored in an XML message by the OpenEdge application is expected to be encoded in the internal code page of the OpenEdge client (the –cpinternal startup parameter). For more information on the -cpinternal startup parameter, see OpenEdge Deployment: Startup Command and Parameter Reference.
The ABL–JMS implementation automatically converts the text to Unicode when a SonicMQ XML message is created. Unicode is an encoding format that provides a unique number for every character, regardless of platform, program, or language. The ABL–JMS implementation also converts the Unicode text received in XML messages to the internal code page of the OpenEdge client when the text is extracted.
For more information, see XML code page encoding .