×
☰ See All Chapters

REST Tutorial

In this tutorial you will learn REST Web services development with JAX-RS API.

  • JAX-RS stands for java API for XML RESTful web services. (REST stands for [Representational state transfer]) 

  • REST is an architectural style which is based on web-standards and HTTP protocol. 

  • In REST based architecture everything is Resource. Whatever the data/response we get from the server is known as Resource, Each resource can be accessed by its URI’s.  We can get the resource from RESTful service in different formats like, HTML,XML,JSON,TEXT,PDF and in the Image formats as well, but in real time we mainly we will prefer JSON. 

  • The rest client can ask for specific representation via the HTTP protocol (Content Negotiation). 

  • REST guidelines always talk about stateless communication between client and the Server.  Stateless means, every single request from client to server will be considered as a fresh request. Because of this reason REST always prefers to choose HTTP as it a stateless protocol. 

JAX-RS different implementations

API

Implementation

JAX-RS

  1. Jersey 

  2. RestEasy (from JBOSS) 

  3. Restlet 

  4. Apache CXF 

HTTP methods of REST

RESTful uses below four main HTTP methods:

  1. GET - Retrieve Data 

  2. POST- Create/Insert Data 

  3. PUT- Update Data 

  4. DELETE- Delete Data 

 


All Chapters
Author