XML Plugin (Deprecated)
The XML plugin is deprecated.
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.
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
|
| UserFile | Name of the file containing the usernames and passwords | None. |
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 or dictionaries 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 or the dictionary. 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.