Java restful web services tutorial

RESTful web services:

REST stands for REpresentational State Transfer. Unlike SOAP it is a web standards based architecture and not protocol. It uses HTTP protocol for data communication. REST provides the facility to represent a resource in various formats like text, JSON and XML.
Note: JSON is the most popular format.
 
Rest-Demo-Diagram
 

Commonly used HTTP methods in REST:

GET :
It provides a read only access to a resource.
 
PUT :
It is used to create a new resource.
 
DELETE :
It is used to remove a resource.
 
POST :
It is used to update an existing resource or create a new resource.
 
OPTIONS :
It is used to get the supported operations on a resource.

Advantages of RESTful web services:

1. RESTful web services are platform independent.
2. RESTful web services are language independent.
3. RESTful web services are fast.
4. RESTful web services can use SOAP web services as the implementation.
5. RESTful web services provides the facility to represent a resource in various formats like text, JSON and XML.