We are going to discuss:
Creating the database tier
Generating DTD from XML Schema
Creating DAD file using RDB to XML mapping
Creating Web service from DADX file
Testing a Web service
Modifying the Passenger List application to use Web service
9.2.1Create the database tier
See database specification in figures below.
| Column name | Data type | Maximum length |
|
|
|
|
| Flight | VarChar | 30 |
|
|
|
|
| Name | VarChar | 20 |
|
|
|
|
| Membership | VarChar | 10 |
|
|
|
|
|
|
|
|
| Column name | Data type | Maximum length |
|
|
|
|
| FlightNo | VarChar | 30 |
|
|
|
|
| AirCraft | VarChar | 10 |
|
|
|
|
| Departure | VarChar | 10 |
|
|
|
|
| Arrival | VarChar | 10 |
|
|
|
|
In order to create the necessary files to access the database, we need to create a database connection. To add a database connection to your project:
1.Open the database perspective.
2.Click Window—>Open Perspective—>Data.
3.Select DBServers tab.
4.Right-click New Connection.
The connection must be configured as shown in Figure
1.Select the connection.
2.Right-click Import to folder.
3.Select your project’s folder and click OK.
4.Click Finish.
Chapter 9. Developing XML Web services 193