Implementing the web services
As we have seen under Designing the web services section, we are going to use three different web services to handle the guest, room, and reservation management functions. We have also discussed that three MySQL tables are used to store information in each of these web services. Let's put together all these elements and start to implement our system.
First, we should define the guest, room, and reservation Java beans which are used as data transferring objects in our system.
The complete source of all Java bean classes can be found at src\com\sample\reservation\dto
folder of the code bundle.
Guest.java:
Guest.java
is a Java bean which represents a guest entity in our system. The class consists of the name, address, and age variables as well as their corresponding getter/setter methods.package com.sample.reservation.dto; public class Guest { private String name; private String address; private int age; public Guest(String name, String address...