RESTful web services are very flexible. They can consume several types of different MIME types, although they are typically written to consume and/or produce XML or JSON (JavaScript Object Notation).
Web services must support one or more of the following four HTTP methods:
- GET - By convention, a
GET
request is used to retrieve an existing resource - POST - By convention, a
POST
request is used to update an existing resource - PUT - By convention, a
PUT
request is used to create a new resource - DELETE - By convention, a
DELETE
request is used to delete an existing resource
We develop a RESTful web service with JAX-RS by creating a class with annotated methods that are invoked when our web service receives one of the above HTTP requests. Once we have developed and deployed our RESTful web service, we need to develop a client that will send requests to our service. JAX-RS includes a standard client-side API that we can use to develop RESTful web service...