Level: Introductory Rick Hardison (hardison@us.ibm.com), IT Specialist, IBM
27 Apr 2005 This article summarizes solutions provided by IBM to enable legacy application transformation, and provides an overview of one particular method of using Web services to access these existing applications.
The legacy "challenge"
The term legacy applications is used in this article to refer to existing host-based applications, including what are known as green-screen applications. These applications continue to be a significant part of the mix of business applications within a company. However, business applications cannot remain static. They have to be changed to meet business needs and to adapt to technology advancements.
Businesses are looking for ways to leverage their IT assets, while looking for alternatives that save money and reduce the strain on already scarce skills. This includes the challenge of searching for ways to transform legacy applications to integrate with new and existing business applications more easily.
One possible solution to this challenge is to use Web services technology as a common denominator over which applications of different technologies can communicate and be integrated together in a Service Oriented Architecture (SOA) environment.
This article will summarize solutions provided by IBM® to enable application transformation, and provide an overview of one particular method of using Web services to access existing green-screen applications.
IBM application transformation capabilities overview
IBM offers complete application transformation solutions that include product offerings and services. From a software portfolio perspective, IBM offers products that enable the following three styles of application transformation.
Transform the user experience
Transforming the user experience requires enhancing existing green-screen applications with easy to use Web and portal-based interfaces. These enhancements are typically done by tapping into the 3270/5250 data streams and don't require source code modifications. By transforming application's user experience, customers can:
- Improve the user interface and workflow of mission-critical applications to reduce training costs, increase end-user productivity, and add new users.
- Integrate multiple applications into a single, streamlined user interface.
- Reduce development costs by avoiding the recoding of existing applications.
Key offerings that enable the transform user experience style of integration are:
- WebSphere® Host Access Transformation Services
- WebFacing in WebSphere Development Studio for iSeries
Transform connectivity
The transform connectivity set of offerings enable applications to participate in a larger application integration or SOA environment. The integration is enabled without modifying the existing application code. The transform connectivity offerings enable customers to:
- Adapt application interfaces to enable participation in e-business workflows with less cost and risk than a replacement approach.
- Develop customer, partner, and supplier relationships by integrating existing and legacy applications into e-business workflows.
- Flexibly connect to existing applications and data using:
- Web services
- Java™ connectors
- Real time data integration tools
- WebSphere Business Integration Mainframe Adapters
Key offerings that enable transform connectivity are:
- CICS Transaction Server
- CICS integration technology
- CICS SOAP support
- Link 3270
- CICS Transaction Gateway
- IMS Connect
- WebSphere Host Access Transformation Services
- WebSphere Studio Enterprise Developer
Transform application architecture
The transform application architecture set of offerings allow customers to analyze the source code of their applications and expose the business logic as a set of Web services -- optimizing their use for SOA. The transform application architecture set of offerings enable customers to:
- Update and extend mission critical applications as services, leveraging their core value in new ways.
- Adapt business processes to new marketplace imperatives faster and with lower cost.
- Improve development processes and productivity.
- Increase flexibility and efficiency with tools to discover existing business value as well as develop and deploy mixed-workload applications.
In addition, offerings in this style enable customers to migrate code to another platform.
Key offerings supporting this style are:
- Asset Transformation Workbench
- WebSphere Studio Asset Analyzer
- WebSphere Studio Enterprise Developer
- WebSphere Development Studio for iSeries
HATS overview
WebSphere Host Access Transformation Services (HATS) is one of the several application transformation offerings listed above. As Figure 1 below shows, HATS includes a development and a runtime environment.
A developer creates and tests a HATS application using the HATS Toolkit. Then they deploy the HATS application (including the HATS runtime) to a WebSphere Application Server for access by the user community or the consuming application.
Figure 1. WebSphere HATS overview
The HATS Toolkit plugs into the Eclipse-based IBM Rational® Software Development Platform, (including existing WebSphere Studio products). These products will be referred to hereafter as the "SDP." The HATS Toolkit provides a development environment for creating HATS applications. HATS applications provide Web browser presentation and programmatic interfaces to host green-screen applications non-invasively (no required changes to the application). HATS supports 5250 (iSeries) and 3270 (zSeries) green-screen applications for both Web browser presentation and programmatic interfaces. VT protocols are also supported for programmatic interfaces.
Presentation transformation for the Web browser includes the ability to recognize legacy host green-screens and transform them in real time to HTML Web pages according to a set of predefined rules. The rules can easily be modified to match the requirements of the host application. Screen components can be transformed to elements such as drop down lists, hot links, tables, buttons, valid value lists, tabbed folders, and graphs -- giving users plenty of tools for navigating the host application.
Programmatic function for HATS includes macro support that allows for programmed navigation through multiple host screens. HATS support for global variables allows the use of powerful programming techniques. Switches can be set, or data collected, while traversing one area of the host application and tested, or used, in another. Programmatic support can be combined with presentation transformation to further improve the end user’s experience with the host application. Programmatic support is also the basis of HATS ability to collect data from multiple back end systems and to provide Web services interfaces for host applications.
The remainder of this article describes how HATS can easily and non-invasively be used to develop a Web service interface to a host green-screen application.
HATS Web service implementation overview
The following is an overview of how to use the HATS Toolkit to create a Web service that will access data from a host green-screen application. Detailed instructions for both 5250 (iSeries) and 3270 (zSeries) examples along with recorded and live demos can be found at http://websphere.dfw.ibm.com/atdemo/atdemo_hats.html. Click on the Web Services link in the left nav.
Figure 2 summarizes the steps needed to create a HATS Web service. First a HATS project is created. While creating a HATS project, the connection to the backend host site is defined. Then HATS macros are created that will be used to connect to and navigate through the host application. Parameters such as host session connection pooling are set up for the connection to the host application. HATS Integration Objects (IOs) are created from one or more of the macros. The IOs provide a programming interface to execute the macros. From the IO, or IOs, a Web service is created and tested using the Web Services Explorer that is built into the SDP. Finally, a sample client that invokes the Web service is created and tested.
Figure 2. HATS Web services implementation overview
Create a HATS project
Within the SDP, HATS development efforts are organized by project. From a project, a HATS application is generated that can be deployed to run on WebSphere Application Server.
When creating a HATS project, a key component in the project’s settings is the definition of the connection to the backend host system. HATS applications can communicate with one or more backend host systems. Required settings include the TCP/IP host name and port of the telnet server running on the target backend host and the protocol to be used (for example 5250 or 3270).
Figure 3. HATS project connection settings
Create macros
As mentioned earlier, HATS applications provide non-invasive Web presentation and programmatic interfaces to green-screen applications. When creating a HATS application that provides a Web services interface for a green-screen application, HATS programmatic functions are used. A key element of HATS programmatic function is macro support. Macros provide programmed navigation through multiple host screens.
It's easy to create macros using the HATS Toolkit. As the developer navigates through host screens using a live host connection, the actions are recorded. So the HATS wizard creates the macro automatically.
To create a Web service interface for a green-screen application, at least one macro is required. We will call this the Data macro. If you want to improve performance, you can use connection pooling (discussed below). Two macros, Connect and Disconnect, are recommended for this.
Connect macro
Green-screen 5250 and 3270 applications are session oriented. To communicate, the HATS application must create a session connection with the host application. The Connect macro primes the connection by navigating to the point where the Data macro can begin.
Figure 4. Connect macro
Data macro
The purpose of the Data macro is to prompt for input, navigate through the application to extract data based on the requested input, and then navigate back to where it can prompt for the next input. If a Connect macro is used in conjunction with connection pooling, a connection will be reused over and over again by multiple executions of the Data macro. The Web service will be derived from the Data macro.
Figure 5. Data macro
Disconnect macro
In conjunction with connection pooling, use the Disconnect macro to sign off the host system and end the connection between the HATS and host applications.
Set connection parameters
A HATS application uses a connection (a 5250 or 3270 session) to communicate with the host application. Basic configuration parameters for the connection, for example the TCP/IP host name of the telnet server for the host application, are set when the project is first built. More connection parameters can also be defined including, connection pooling and which Connect and Disconnect macros to use for the connection.
Connection pooling
HATS uses a function called connection pooling to improve response time for the Web services client and performance for both the HATS application providing the Web service and the host application. Connection pooling allows a number of connections (5250 or 3270 sessions) to be specified that HATS will maintain in a pool already connected and ready to be used by the HATS application.
In other words, HATS maintains a number of primed connections in the pool by running the Connect macro. Each of the connections will be connected and ready to run the Data macro on request. This avoids constant connecting and disconnecting from the host application when multiple Web service requests are being serviced.
Figure 6. Connection pool
Create Integration Object
A HATS Integration Object is a JavaBean that encapsulates a programmed interaction with a host application. In other words, an Integration Object encapsulates and provides a programming interface to execute a macro.
The Data macro created above is set up to prompt for input, navigate through the application to extract data based on the requested input, and then navigate back to where it can prompt for the next input.
Creating an Integration Object for the Data macro creates a Java programming interface to execute the macro that will accept the input expected by the macro, drive the macro, and supply as output the output supplied by the macro.
Figure 7. Integration Object
There are many ways Integration Objects can be used to integrate a host green-screen application with a new Java or Web-based program. One way is to provide the interaction with a host green-screen application for a Web service.
Create Web service
Once an Integration Object has been created, HATS can be instructed to create Web service support files for it. These are Java class files that describe the methods contained in the Integration Object and its inputs and outputs. The inputs and outputs correspond to the inputs and outputs of the Data macro. From the Web service support files, the SDP can create a Web Services Description Language (WSDL) file that describes the interface to the HATS Web service.
Figure 8. Web service
The WSDL file describes how to use the Web service for any client that wishes to do so. Built into the SDP is a Web Services Explorer. Using the WSDL file, the Web Service Explorer can be used to test the HATS Web service.
Create and test Web service client
The SDP can also be used to create a sample client application that can call the HATS Web service. The client is built based on the information in the WSDL file that represents the HATS Web service.
After being generated, the sample client application and the HATS Web service application can be tested using the WebSphere Test Environment built into the SDP.
When the WebSphere Test Environment starts, the HATS application providing the Web service is started. At this point the initial set of connections to the host application for the connection pool is started. The Connect macro is run for each connection leaving each at the point where the Data macro can begin.
The client application is started and using information from the WSDL file allows entry of an input that corresponds to the input expected by the HATS Web service. This is the same input expected by the HATS Integration Object and the Data macro.
The proxy code in the client application uses a SOAP request to call the HATS Web service with the supplied input. At this point the HATS Web service application instantiates the Integration Object. A free connection from the connection pool is allocated, and the Data macro is driven to navigate through the host application using the input supplied by the client.
As the Integration Object runs, the Data macro collects its output data. This data is then returned in a SOAP response from the HATS Web service to the requesting client.
Figure 9. Web service client
The sample client application can now be used as a base for integrating the host green-screen application with new Java and Web-based applications being developed in the company.
Conclusion
Legacy applications continue to be a significant part of the mix of applications within an Enterprise application suite. Now Web services technology can serve as a common denominator over which applications of different technologies can communicate and be integrated together. WebSphere HATS can be used non-invasively to provide Web services interfaces for integrating 5250 iSeries and 3270 zSeries applications with other applications in the enterprise.
Resources
About the author  | 
|  | Rick Hardison joined IBM in Raleigh, North Carolina in 1970 as a junior programmer, working on the design and
development of TCAM, a predecessor to VTAM. In 1977, he joined the TCAM/NCP installation support department
and provided customer education and installation support for the first releases of ACF networking. In 1981, he
became a VTAM product planner, and was involved with the announcement of VTAM support for APPN. Since 1992, Rick
has been in Technical Marketing providing support for IBM's Communications Clients and Servers. Most recently,
he has been involved with supporting IBM's WebSphere Host Integration products, Host On-Demand and Host Access
Transformation Services. |
Rate this page
|