Answered step by step
Verified Expert Solution
Link Copied!

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:

  1. 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.
  2. 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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Essentials Of Probability And Statistics For Engineers And Scientists

Authors: Ronald E. Walpole, Raymond Myers, Sharon L. Myers, Keying E. Ye

1st Edition

0321783735, 978-0321783738

More Books

Students also viewed these Programming questions