public static ResponseDTO execute(RequestDTO reqObj) throws BookingTicketException {
        log.debug("Start: execute()");

        PassengerDAO passengerDAO = new PassengerDAO(ENTITY_MANAGER_FACTORY);
        StationInRouteDAO sirDAO = new StationInRouteDAO(ENTITY_MANAGER_FACTORY);
        StationDAO stationDAO = new StationDAO(ENTITY_MANAGER_FACTORY);
        TicketDAO ticketDAO = new TicketDAO(ENTITY_MANAGER_FACTORY);
        TrainDAO trainDAO = new TrainDAO(ENTITY_MANAGER_FACTORY);

        //Determines what kind of server was required.
        Constants.ClientService reqService = reqObj.getService();

        if (reqService == Constants.ClientService.getScheduleFromAtoB) {
            log.debug("Start: getScheduleFromAtoB");
            return StationInRouteService.scheduleFromAtoB(reqObj, sirDAO);
        }
        else if (reqService == Constants.ClientService.scheduleForStation) {
            log.debug("Start: scheduleForStation");
            return StationInRouteService.scheduleForStation(reqObj, sirDAO);
        }
        else if (reqService == Constants.ClientService.buyTicket) {
            log.debug("Start: buyTicket");
            return TicketService.bookTicket(reqObj, passengerDAO, ticketDAO, trainDAO, sirDAO);
        }
        else if (reqService == Constants.ClientService.addTrain) {
            log.debug("Start: buyTicket");
            return TrainService.addTrain(reqObj, trainDAO);
        }
        else if (reqService == Constants.ClientService.addStation) {
            log.debug("Start: addStation");
            return StationService.addStation(reqObj, stationDAO);
        }
        else if (reqService == Constants.ClientService.addRoute) {
            log.debug("Start: addRoute");
            return StationInRouteService.addRoute(reqObj, sirDAO);
        }
        else if (reqService == Constants.ClientService.viewPassangers) {
            log.debug("Start: viewPassangers");
            return PassengerService.showPassengers(reqObj, passengerDAO);
        }
        else if (reqService == Constants.ClientService.viewTrains) {
            log.debug("Start: viewTrains");
            return TrainService.viewAllTrains(trainDAO);
        }
        else return null;
    }