Midterm test
Objective
Create a virtual library which has basic functions:
Search books: students can search a book by title.
Check reserved books: A student can check the list of books that he reserved.
Reserve a book: A student can reserve a book by providing his student ID and the book ID.
Web service functionality requirements
Client requests a service and gets a response.
Interactions between two services.
Technique requirements
Using Axis2 or Eclipse WTP to create services.
Test the library functions with Web Service Explorer in Eclipse or client Java classes.
Scenario
Suppose: A library web service that manages book reservation is called service A and an authentication web service that checks user identification is called service B. (see the figure below)
When a client searches books, service A checks the existing books' titles and their status to reply the client.
When a client checks reserved books, service A will:
request service B to check the client ID.
then, get the response from B, if success, it returns the client list of reserved book, if not success, returns “failed authentication”.
Input: student ID ; Output: list of books (ID, title, status) reserved by the student or “failed authentication”.
When a client reserve a book, service A will:
request service B to check the client ID.
then, get the response from B, if success, it marks that the requested book is reserved by client, if not success, returns “failed authentication”.
Input: student ID, book ID ; Ouput: the book (ID, title, status) reserved by the student or “failed authentication” or “book not found”.
Evaluation
# | Requierments | Marks (20) |
1 | Successfully create the “search books” function | 2 |
2 | Successfully create the “check reserved books” function | 2 |
3 | Successfully create the “reserve a book” function | 3 |
4 | Successfully create the authentication web service | 3 |
5 | Successfully interact between two web services | 4 |
6 | Work with complex data type (class, array, etc.) | 2 |
7 | Work with database (in xml, in mysql, etc.) | 2 |
8 | Successfully publish and run the created services on Tomcat servers | 2 |
Step-by-step hints
List the required operations, input, output of each web service.
Create service A that provides the required functions.
If you don't want to work with the database, you can create arrays to store the books information and the reservation information. Each element in these arrays is a Class object.
If you intend to use database (MySQL, PostgreSQL, etc) to store the books and reservation information, you have to implement functions to read/write data from the selected database. You can also use these XML files:
books.xml and
students.xml.
Deploy service A and test A by Java client or Eclipse Web service Explorer.
Create and deploy service B that check the student ID.
Test service B by Java client or Eclipse Web service Explorer.
Create interaction: A sends a request to B and receives a response from B.
Test: client → service A → service B → service A → client (using Eclipse Web service Explorer or client Java class).
Deploy service A and B in different Tomcat servers.
Test: client → service A → service B → service A → client.
How to submit
Create a text file, named readme.txt, present: student names; how to install and run your services. The content can be in either English or French.
Compress the readme.txt file and your application in .tar.gz format.
Send the compressed file by email, titled: CSC5522-midterm: [name1-name2] (for example: CSC5522-midterm: Peter-Tom), to ngoc-chan.nguyen@it-sudparis.eu and cc to walid.gaaloul@it-sudparis.eu.
Back to top