Using Web services in EGL
This tutorial provides basic procedures for creating and consuming Web services in EGL.
The finished applications will contain the following Web pages and capabilities
In the first section of this tutorial, you will create an EGL Web service, and then test the service using the Web Services Explorer. The service will check for valid California ZIP codes.
Using the Web Services Explorer, you will generate a very simple UI for testing the service. It contains one input field to enter the ZIP code and will show a return code of 0 or -1 determined by your EGL service depending whether the ZIP code is a valid California code.
Figure 1 shows the UI that gets generated by the Web Services Explorer to test the EGL Web service.
Figure 1. Invoke a WSDL Operation
In the second section of this tutorial, you will access an existing Web service. The service returns a list of movies playing in a certain area of the U.S. You input a postal code and a radius (in miles), and get a list of movie theaters in the area.
Figure 2 shows the UI that you will create with EGL.
Figure 2. Movies showing within 10 miles of ZIP code 27518
Now you know what you have to build in this tutorial.
To get started, just follow the detailed instructions in this tutorial and you will learn how easy it is to write an EGL data access application.
Creating and consuming Web services with EGL EGL implements two categories of services:
-
EGL service: For applications written entirely in EGL.
-
EGL Web service: Created using EGL, but can be accessed from both EGL and non-EGL clients.
This tutorial will show you how to create and consume Web services with EGL. Services differ from traditional monolithic programs in that they are modular, and conform to a formal specification for their data input and output (calling) mechanism. In so doing, they become more useful building blocks for applications, with artifacts that you can easily deploy to different runtimes, and that are far easier to maintain and reuse.
You can develop these services with many different technologies and languages. This tutorial explores what EGL and the IBM® Rational® tools contribute as far as building, testing, and deploying services. There are two broad categories of services that this tutorial covers:
-
EGL Web service: this service is created using EGL, but can be accessed from both EGL and non-EGL clients
-
A non-EGL Web service: this service can be called by an EGL client using an interface part created from the non-EGL service’s WSDL (Web Service Definition Language) specification.
Overview of development tasks
-
In the Creating EGL Web services section, you will build an EGL Web service. At the end of this section, you should be able to test the Web services that you have created and deployed to IBM® WebSphere® Application Server V6.1 (or later).
-
In the Consuming a 3rd party Web service section, you will consume a 3rd party Web service (not written in EGL). You will create an EGL client that will execute this Web service, which exists on the Web.
|