Chapter 18. XML Legacy Gateway 583
18.6.2 The xmlAppData JavaBean
This JavaBean communicates with the host application using XML data
formatting. A JavaDoc for this JavaBean is included with the Host Publisher
installation and can be accessed starting with the following file:
install_dir\SDK\XLGW\xmlAppData\AllNames.html
where install_dir is the directory in which Host Publisher is installed.
The following functionality is provided by the xmlAppData JavaBean:
򐂰 It provides Java classes and events for sending and receiving host windows.
򐂰 It provides an XML interface for representing and manipulating these host
windows.
The xmlLegacyGatewayServlet uses XSL processing to convert the XML host
window data to the HTML output, which is then sent to the Web browser.
The HTML output that the Web browser receives contains JavaScript, which
resides in a Host Publisher directory that the WebSphere Application Server is
configured to access.
Refer to Figure 18-2 on page 572 to see how the xmlAppData JavaBean relates
to the other components of the XML Legacy Gateway. The xmlAppData
JavaBean contains properties that describe the Host Publisher, HOD, and
TN3270 or TN5250 parameters used to instantiate a host session.
The xmlAppData JavaBean also contains properties that describe the host data
as XML records. These records contain the text of the fields displayed in the
window and the attributes of the fields. Methods are supplied for reading the
fields so they can be manipulated as an XML document.
The xmlAppData JavaBean contains methods for sending a new window of data
to the host. This new window is described by an XML document, which will often
be the previous host data transformed into an XML document, with the user input
fields updated, or a user action specified, or both.
The xmlAppData JavaBean sends xmlDataEvents to all xmlDataEvent listeners.
The data events are sent when the host window has changed.
The xmlAppData JavaBean interacts with the IBM Host On-Demand (HOD)
session JavaBean using PSEvents. When a PSEvent is received by the
xmlAppData JavaBean, the JavaBean updates its internal objects to reflect the
new status of the host window. The xmlAppData JavaBean sends an
xmlDataEvent to inform its listeners of the change.
584 IBM WebSphere Host Publisher Version 3.5
The xmlAppData JavaBean sends xmlErrorEvents to all xmlErrorEvent listeners
when a processing error has been detected. The xmlAppData JavaBean sends
xmlLegacyTraceEvents to all xmlLegacyTraceEvent listeners for appropriate
tracing of the xmlAppData JavaBean activity. The xmlAppData JavaBean listens
for HODTraceEvents and sends the HODTraceEvents to all xmlHODTraceEvent
listeners.
Interfaces
The xmlAppData JavaBean provides for the following interfaces that you can use
when writing a servlet that invokes this API.
1. xmlDataListener
This interface is used for receiving notification of host window changes. It
requires you to include the following method:
xmlDataEvent(xmlDataEvent)
This is an abstract method to receive notification of host window changes.
2. xmlErrorListener
This interface is used for receiving notification of xmlAppData errors. It
requires you to include the following method:
xmlErrorEvent(xmlErrorEvent)
This is an abstract method to receive error notifications.
3. xmlTraceListener
This interface is used for receiving notification of xmlAppData trace events. It
uses the following methods:
xmlHodTraceEvent(TraceEvent)
This is an abstract method of the xmlTraceListener event handler.
xmlLegacyTraceEvent(String)
This is an abstract method of the xmlTraceListener event handler.
Classes
The following classes are available with this API:
1. xmlAction
This class extends the Hashtable class and contains the host window action
information for XML host data parsing and generation.

Get A Comprehensive Guide to IBM WebSphere Host Publisher Version 3.5 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.