Description
Mobile Application Development
Homework 2
**************************************************************************
Submission Rules;
• Please create one project for JAXRS Web Services and one simple Java Project for the client.
• You should follow the java conventions with class and variable names.
• Your project names should contain your name and last name. E.g.
AhmetDemirelliCS310Homework2WebService
AhmetDemirelliCS310Homework2Client
• You cannot use Turkish characters in your file names or variable names
**************************************************************************
1. REST ( JAXRS) Web Services Project
*** Please watch the video of our last session from the following link; https://drive.google.com/file/d/1nR6pJgVCpXdteS5f_ekVFWj2CB-YfdnD/view
*** Please examine, execute and understand the examples in Week7Day1 before you start. *** All the database operations should be done by using JDBC API
We have a table named “product” in our database with following columns :
productID int ( AA : auto increment )
productName. varchar productPrice double
productStock int
• Create a rest web service for inserting new product into database (25 Points) We should be able to call this service from following URL ;
http://localhost:8080/YouProjectName/rest/ProductWebService/addNewProduct/Apple/5.0/3000 Apple is the product name.
5.0 is the price 3000 is the stock count.
• Create a rest web service for deleting product with given ID (25 Points) We should be able to call this service from following URL ;
http://localhost:8080/YouProjectName/rest/ProductWebService/deleteProduct/10 10 is the ID of the product we want to delete
• Create a rest web service for updating the stock and price of the (25 Points) product with given product ID
We should be able to call this service from following URL ;
http://localhost:8080/YouProjectName/rest/ProductWebService/updateProductStock/11/25.0/554 11 is the ID of the product we want to make a stock and price update
25.0 is the new price
554 is the new stock count
CS310
Mobile Application Development
2. JAXRS Client Project (25 Points)
Write a main class that consumes (calls) all of the REST Web Services you have created.
Reviews
There are no reviews yet.