Universal Messaging 10.5 | Administration Guide | Universal Messaging Enterprise Manager | Plugins | XML Plugin
 
XML Plugin
You can use the XML plugin to query the realm server, its queues and channels. It returns the data in XML format. This plugin also supports style sheets, so the XML can be transformed into HTML or any format required. For example, a client can publish XML data onto a Universal Messaging realm's channel, then using a standard web browser, get the server to transform the XML into HTML via a stylesheet, thereby enabling the web browser to view events on the realm.
This functionality enables realm data to be viewed from a channel without any requirement for a Java client. All that is required is for the client to have a browser.
Important:
Never include XSL code from untrusted sources into the plugin's XSL code, as this can lead to a security risk for the client browser (or other client application) accessing the plugin. The Universal Messaging realm server itself is not at risk, since it does not execute the plugin's XSL code.
Configuration
Once you have created the XML plugin on the interface you require it on, you can then select it from the Plugins panel for the selected interface and enter values as you wish for the configuration parameters.
The XML plugin requires configuration information relating to its behavior as well as the entry point in the namespace for the channels you wish to make available to serve to the clients. Below is a table that shows each configuration parameter and describes what it is used for.
Parameter Name
Description
Default Value
ChannelRoot
Name of the channel or folder to render.
/
Security Realm
Name of the authentication realm
None.
StyleSheet
Name of the style sheet file to use to process the resulting XML.
None. If you specify a filename without a path, the default path is UniversalMessaging/server/<InstanceName>/bin under the product installation root location.
UserFile
Name of the file containing the usernames and passwords
None.
Note:
As a starting point for creating your own stylesheet, you can use the stylesheet xml2html.xsl that is supplied in the UniversalMessaging/doc/style directory in the file hierarchy for your local product installation.
For example, on the Comms > Interfaces tab, you can have an nhp interface running on port 9005. This interface has an XML plugin configured to use the xml2html.xsl stylesheet and its URL path as /xml. The default ChannelRoot setting is /, which is the root of the namespace, i.e. all channels. Once the plugin is created, you can click the Apply button, which will restart the interface and enable the new XML plugin.
From a browser, you can now enter the URL http://localhost:9005/xml/ which will render the realm information page using the stylesheet.
The XML plugin will determine whether the events on the channel contain byte data, dictionaries or XML documents and return the relevant elements within the XML document. The stylesheet applied to the XML document then examines each element to find out how to render it within the browser. Each event on the channel or queue is shown in the table with event ID, its size in bytes and links to either the byte data, the dictionary or the XML data. These links are generated by the stylesheet. Clicking on the data or dictionary links will again return an XML document from the XML plugin that will be rendered to show either the base64 encoded event data or the event dictionary.
If any events contain XML documents, these will be returned directly from the XML plugin. The stylesheet provided will not render event XML documents, since the structure of these is unknown. You will need to provide your own stylesheet to render your own XML event documents.