170 Building SOA-based Solutions for IBM System i Platform
2. The MakeReservation macro starts with exactly the same sequence of steps as the
FlightSearchData macro (see “Recording a data macro” on page 140). However, you
continue with the Flight Reservation System application further (as described in 7.1.1,
“Analyzing an existing application” on page 116) but adding prompts for other input fields,
Flight number (select from the list)
Customer name
Class of service
Number of tickets
Your final step would be to submit a reservation and return a confirmation number.
3. Next, you create an IntegrationObject and Web service from your new macro,
Now you have two Web services that you can combine in the client application:
1. Your client application displays a Web page with the same input fields that are required for
FlightSearchData macro: date of the flight (day, month, and year), to and from cities.
When a user submit this page, your client application invokes the
Web service.
2. The client application returns the list of available flights and let a user to select one.
3. After that your client application show a page with additional input field: customer name,
class of service, and number of tickets.
4. When a user enters all data, you client application invokes the second Web service,
MakeReservationWS, and pass input data for all fields:
–To city
–From city
Flight number
Customer name
Class of service
Number of tickets
5. After executing the
MakeReservationWS Web service, your client application returns a
confirmation number.
By applying this technique, you can enable many host applications through HATS Web
7.10 Summary
In this Web service example, a 5250 application has been externalized as a Web service. As
we saw in most of the cases, there will not be any modifications required to the 5250
applications. However, in some cases you might have to modify certain application flow so
that it can be driven by a macro. This Web service is accessible by any application that has
access to your System i server and can communicate with SOAP/HTTP adhering to the WS-I
basic profile, including applications such as Java, J2EE Web Clients, JSF, JSP, .NET, PHP,
and others.

Get Building SOA-based Solutions for IBM System i Platform now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.