Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Annotate the following resource class, using JAX-RS annotations, to reflect that: The URI for a student resource has the form /rest/student/ cwid and the resource
Annotate the following resource class, using JAX-RS annotations, to reflect that:
- The URI for a student resource has the form /rest/student/cwid and the resource is represented as an XML document. A representation for this resource can be obtained using the GET verb.
- The URI for the resource of all students has the form /rest/student. A list of all student records can be obtained by performing GET on this resource. A new student record is added by performing the POST operation on this resource. The representation for the new student should be represented in XML. A student record is updated by performing a PUT operation on the student resource.
public class StudentResource { public void add(Student s) { ... }; public Student retrieve(long cwid) { ... }; public void update(String cwid, Student s) { ... }; public Student[] retrieveAll() { ... }; }
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started