Midterm test

Objective

Create a train journeys and booking service which has basic functions:

  1. Train Searching: customers can search available trains based on departure and arrival stations, the outbound and return dates and time, number of tickets and travel class (First, Business or Standard).
  2. Train booking: customers can reserve a seat by providing the trains IDs, the travel class (First, Business or Standard)and ticket type (flexible, not flexible).

Web service functionality requirements

  1. Client requests a service and gets a response.
  2. Interactions between two services.

Technique requirements

  1. Using (Eclipse WTP or Terminal mode) AND (Restlet or Jersey) framework to create services.
  2. Test the functions with client Java classes.

Scenario

  1. Let:
    • A: Train Booking SOAP WS a Web Service that handles : the user authentification, the train searching and reservation requests.
    • B: Train Filtering REST WS : one or Many Rest services that finds and updates available trains based on departure and arrival stations, outbound and return dates and time, number of tickets and the travel class (First, Business or Standard) (see the figure below).
    • Each train has information about: departure and arrival stations, date and time, number of available seats and classes (First, Business or Standard).
  2. A customer (client) sends a request to the SOAP service A to check available trains.
  3. Based on the Client request (input information), service A calls one or many REST service(s) B to filter trains:
    • client Input: departure and arrival stations, outbound and return dates and time, number of tickets and the travel class (First, Premium or Standard);
    • client Output: list of available trains (with train IDs) that match the user's request, as well as corresponding fares w.r.t ticket type (flexible, not flexible); or the exception: “No available trains.”.
  4. Based on the obtained list of trains, the client chooses the outbound and the return trains (for a round trip) to make the reservation by providing their IDs. The client may also choose a one-way trip by providing one train ID.
  5. Having the trains IDs, the service A calls service(s) B to update the reservation information. If the reservation is successful, service B will return a value “true”. Otherwise (e.g. the ID is not corresponding to an available train) it returns a value “false”.
    • client Input: trains' IDs, travel class (First, Business or Standard) and ticket type (flexible, not flexible);;
    • client Output: a message: “Successful reservation” (if If service A receives a “true”) or a message: “Reservation error or the train”+ID+“ is not available” (otherwise).
  6. Finally, if the client makes another search, the service B should return the result with the updated information about the previous reservation.
  7. Optionnaly, you should have many similar services of type B
  8. Test at least one API with Postman
  9. Document you API with OpenAPI (formerly Swagger)
  10. OPTIONAL : implement the application using a BPMS
  11. Recommendation: for the REST service B, add the jar files “org.restlet.jar” and “org.restlet.ext.servlet-2.1.1.jar” to the project webContent > WEB-INF > lib

Evaluation

# Requierments Marks (30)
1 Create REST Train Filtering service B 6
2 Create SOAP Train Booking service A 4
3 Interaction between two services 4
4 Test with Web service Client (instead of using Eclipse's Web service Explorer) 2
5 Work with complex data type (class, table, etc.) 2
6 Work with database (in text file, xml, in mysql, etc.) 2
7 Postman 2
8 OpenAPI 3
9 BPMS 5

How to submit

  1. Prepare a presentation to explain your project
  2. Create a text file, named readme.txt, present: student names; how to install and run your services. This text file should also outline a self-evaluation structure, including the marks of each requirement mentionned above. The content can be either in English or in French.
  3. Go to your Workspace, select and compress your projects into only 1 file.
  4. Compress the readme.txt file and your project file in .zip format.
  5. Submit the compressed file via the Moodle platform
teaching_assistant/web_services/midterm2021_88.txt · Last modified: 2023/09/07 16:57 by IT Courses (NNC)
Back to top
CC Attribution-Share Alike 4.0 International
chimeric.de = chi`s home Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0