Universal Messaging 10.1 | Administration Guide | Universal Messaging Enterprise Manager | Administration Using Enterprise Manager | Plugins | XML Plugin
 
XML Plugin
The XML Plugin can be used 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/<RealmName>/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.
The image below shows the Enterprise Manager Interface panel with 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 image below demonstrates the browser view from a realm that has an XML plugin on an nhp interface on port 9005.
If you use the stylesheet xml2html.xsl delivered with the product, the result will be similar to the display below. The realm information is displayed at the top of the page, and the information on resources is shown beneath.
As you can see above, each resource is shown as a link within a table showing the information obtainable from the XML plugin. Clicking on a channel link will then take you to another page that has been rendered by the XML plugin which will show you the list of events on a channel. The image below shows the event list for the JNDI naming channel.
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.

Copyright © 2013-2017 | Software AG, Darmstadt, Germany and/or Software AG USA, Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.
Innovation Release