Homework for Web Data
There are two major parts to this assignment. For the server code (service and java business logic) you will need to create a utility object that maps to the JSON you will be ingesting. This includes number in party, hike, start date and hike duration in days. It is probably easiest to map the fields as Strings and primitives and then use them to build your components (BookingDay, Rates) in your Java logic. You will also need
another utility object to package the result and or error message that gets passed back to the client. Once you have your utility objects you will need to incorporate them in your service method from last assignment as either an input parameter or return object. Don’t forget to update the annotations for your modifications.
forget to make sure you have an appropriately configured service using either the ApplicationConfig.xml, web.xml in your war file so that it is recognized on the class server. You should be able to use most of the logic from your last assignment, but you will need to add the new utility objects along with logic to get the information from the objects to your existing code and from your code back to the utility object for return to client. You will also need to update the service signature and annotations to make sure it ingests and returns JSON formatted data.
Your final project source should include all your back end code, service, utility objects and any other business logic, client side page that will be used to call into the service and any configuration files (e.g., web.xml) that are used in your implementation.
A zip file of the following should be posted to the Blackboard assignment:
1. Screen shots of your client working with your server (show one bad data and one good data result).
2. All of the source code for the project (client, service and configuration).
Also upload your war file to the class server and provide the URL of your form page that accesses your web service in your blackboard submission.
Leave a reply