There are various ways to implement communication between heterogeneous applications. There are standards focusing on web services based on SOAP, WSDL, and WS* specifications; alongside these standards there is an emerging lightweight solution based on plain HTTP referred to as Representational State Transfer (REST).
REST is identified by the principles of addressable resources, constrained interfaces using HTTP verbs, representation, and statelessness.
The key principles of REST are:
Associating IDs to resources
Using standard HTTP methods
Multiple formats of data sent by a resource
Statelessness
This chapter starts with the basic concept of building RESTful Web Services using the JAX-RS 2.0 API and covers the following sections:
Getting started with JAX-RS 2.0
Converting POJOs to RESTful endpoints using JAX-RS 2.0 annotations
@Produces
,@Consumes
annotationsClient API for JAX-RS 2.0
Sample showing all verbs
Custom entity providers for serializing and deserializing user defined classes using JAX-RS
Utilizing the Bean Validation API for validation with JAX-RS 2.0