• No results found

Web services for JAX-WS runtime considerations and limitations

In document Web Application Programmer's Guide (Page 72-75)

If you install the WebSphere Application Server Version 6.1 Feature Pack for Web Services, you can create HATS Web services for the IBM WebSphere Java API for XML-Based Web Services (JAX-WS) runtime. If you plan to create HATS Web services for the JAX-WS runtime, be aware of the following:

v When you generate a test client, the web_service_nameService.java file is created with a hardcoded, absolute location of the WSDL file. If you deploy the test client to a different machine, update the file to contain the correct WSDL file location.

v The WSDL file that you elect to generate for your Web service contains a URL location of the Web service. This URL points to the local host and port. Update the local host and port in the URL when you deploy the Web Service to another server.

Chapter 7. Creating and using a HATS EJB application

As an alternative to the usual HATS project, which transforms one or more host applications and presents Web pages to an end user, you can build a HATS Enterprise JavaBeans(EJB) project. A HATS EJB project provides access to the host interactions, which are encapsulated in Integration Objects. The Integration Objects are needed to provide host data to an EJB client, which can be another HATS application, a user-written Java program, a Web application, or even another EJB. A HATS EJB project enables you to separate the collection of the host data from its presentation. If you have one or more Integration Objects that you want to be able to invoke from several HATS projects, you can include them in a HATS EJB project and call them from several other HATS projects. When you have finished configuring your HATS EJB project, you can assemble it as a HATS EJB

application.

Notes:

1. HATS EJB application support is deprecated in HATS V7.5.1. While support for HATS EJB applications continues for now, IBM reserves the right to remove this capability in a subsequent release of the product. Alternatives are:

v Use Web services to access your Integration Objects. For more information see Chapter 6, “Developing Web services,” on page 53.

v Create custom EJB beans to access your Integration Objects. For more information see “Using an Integration Object in an EJB container (from your own EJB)” on page 79.

2. This section assumes that you are familiar with basic EJB concepts. If not, refer to the Rational SDP documentation on this subject, or the WebSphere

information center for your version and edition of WebSphere Application Server.

3. You cannot include an Integration Object that is configured to use Web Express Logon in a HATS EJB project.

4. If you have developed EJB projects in Host Publisher, you can import them into HATS projects. Refer to HATS User's and Administrator's Guide for information about importing Host Publisher projects into HATS.

A HATS EJB application does not interact directly with an end user, nor does it transform host screens. It does not contain the resources that are included in a HATS project: screen customizations, templates, or transformations. A HATS EJB application contains one or more Integration Objects, whose services it makes available to calling programs.

When you create HATS EJB projects, a new view is opened in HATS Toolkit. This view is called the HATS EJB Project view. It is analogous to the HATS Projects view, but it contains only HATS EJB projects. It shows the EJB resources that are described in this section. To work with your HATS EJB project, you can use the HATS EJB Project view in the same ways that you use the HATS Projects view for other HATS projects. For example, you can click the project name in the HATS EJB Project view and then click the host terminal icon to open the host terminal for the project's main connection, in order to record macros.

A HATS EJB application is an enterprise archive (EAR file) made up of one or more Integration Objects, whose services it makes available to an EJB client and typically consists of these parts:

v A HATS project (Web module), which includes:

– One or more EJB Access Beans. The EJB Access Bean locates the HATS EJB, creates an instance of the EJB, and invokes the main business method of the EJB, passing as input an Integration Object properties object, which contains the Integration Object properties that are set by the JSP.

– One or more JSPs that interface with an EJB Access Bean as if driving an Integration Object locally.

These resources appear in the HATS Projects view.

v A HATS EJB Project (EJB Module) that consists of:

– The HATS EJB. The HATS EJB is implemented as a stateful session EJB.

– One or more Helper objects. The Helper object is invoked with the input parameters, and causes the actual Integration Object function to be driven.

When the Integration Object completes, the new instance of an Integration Object properties object is returned to the EJB Access Bean.

– One or more Integration Objects (.java files) – One or more connection definitions (.hco files)

– Optionally, one or more connect and disconnect macros (.hma files) – One or more macros from which Integration Objects can be created (.hma

files)

– An application file (application.hap) – EJB support files (*.java files)

These resources appear in the HATS EJB Project View.

In addition to providing the HATS EJB, HATS EJB support generates an EJB Access Bean for each Integration Object. This EJB Access Bean has the same signature as the Integration Object, allowing applications and JSPs to be developed to drive an Integration Object using the EJB Access Bean. Because the EJB Access Bean has the same signature as the Integration Object, the EJB Access Bean can be used in client-side code exactly as the original Integration Object would be used. Therefore, the client can be:

v A JSP or a servlet that uses one or more EJB Access Beans in a Web application where the Integration Objects execute in an EJB container

v A custom EJB that uses one or more EJB Access Beans to execute the Integration Objects in an EJB container

v A Java application running in the WebSphere Application Client execution environment

Figure 2 shows the links between a HATS EJB application and other applications that use its services.

In document Web Application Programmer's Guide (Page 72-75)