SOA: Refactoring Mainframe Applications into Dynamic Web Applications, Part 2 : Page 4
By refactoring your mainframe applications into Web services, you separate presentation from logic, and gain the ability to reuse mainframe data in Web applications. The second part of this two-part article completes the refactoring by showing you how to build a browser front-end that uses the XMLHttpRequest object to query the mainframe services exposed through the new Web interface described in Part 1.
by Jeff Hanson
Apr 11, 2005
Page 4 of 4
XMLHttpRequest Object Methods and Properties
The XMLHttpRequest has a set of methods and properties common to all supported environments (browsers). Table 1 shows the most frequently used XMLHttpRequest object methods.
Table 1. The table lists frequently used XMLHttpRequest object methods.
Stops the current request
Returns complete set of headers (labels and values) as a string
String version of data returned from server process
DOM-compatible document object of data returned from server process
Numeric code returned by server, such as 404 for "Not Found" or 200 for "OK"
String message accompanying the status code
At this point, you've seen how to refactor a mainframe application into deployable Web services using service-oriented techniques and a standard Java servlet framework. This article discussed how to access that framework using queries from a the now-ubiquitous browser-based XMLHttpRequest object to invoke the Web services and provide data from the mainframe directly to the client application rather than screen-scraping and reformatting to provide data to a desktop application.
Jeff Hanson has more than 18 years of experience in the software industry. He has worked as senior engineer for the Windows OpenDoc port and as lead architect for the Route 66 framework at Novell. He is currently Chief Architect for eReinsure, which specializes in providing frameworks and platforms for J2EE-based reinsurance systems. Jeff has also authored numerous articles and books.