Hi again , So far we have discussed writing Web Service using SOAP Messages , along with WSDL and Schema's , now we are going to look into the next type of Web Service which gain Popularity these days used by Google,Amazon and others called REST Style Web Services.
What is REST Web Service?
- REST Stand for Representational State Transfer means state is not maintain it is a stateless Service.
- A REST Web Service is very light weight and easy to create Service.
- It is use along with the HTTP Protocol.
- Do not Require XML Messaging or WSDL & XSD Schema's.
REST is Useful in the following Scenarios:
- Web Service is completely Stateless.A good test is interaction is survive a restart of Server.
- Caching Infrastructure can be leveraged for performance.
- Service Provider and Service Consumer have mutually understand the context and content being passed along.
- Bandwidth is particularly important ,need to be limited. REST is particularly useful for limited Profile devices such as PDA & Mobile devices.
- Well Suited for creating API for client spread out across Internet.
- REST Architecture Style is designed to use a Stateless communication protocol ,typically HTTP .In REST Client and Server exchange Representation of Resources by using a Standardized Interface and Protocol.
JAX-RS(REST) VS JAX-WS (SOAP) :
- Addressed advanced Quality of Service (QOS) commonly occuring in the enterprise computing.
- Comparing JAX-RS , JAX-WS easier to support WS-* ,set of protocols, provide standard way of Security and reliability.
JAX - RS:
- Easier to write Web Applications , apply some or all of the constraint of REST Style .
- Loosely coupled, Scalable, Simple to maintain.
As for REST is concern every thing here is access as resource, and resources are identified by URI which comes as part of the URL .Which provide a global addressing space for resources and services discovery using @Path Annotations(we will discuss this annotation in next part).
Ex:
here student and jack is URI part of the URL.
2. Uniform Interface :
GET : Retrieves the current state of resource in some representation (xml/json)
POST : Transfer a new state on to a resource.
PUT : Create a new resource which can be deleted by DELETE.
DELETE : Use to delete a Resource.
All these operations are provided by HTTP protocol .
3. Self Descriptive Messages :
Resources are decoupled from their representation so that their content can be accessed in variety of format such as HTML,XML,JSON,IMAGE etc.
4. Stateful Interaction through links :
Stateful Interaction can be done based upon the concept of explicit State Transfer.
Several techniques are there to exchange state , such as URI - Rewriting, cookies, hidden fields etc.
JERSEY Framework :
- Jersey is the Production ready frame work for REST to create the Services quick and fast.
- Developing REST Webservice using Jersey is inexpensive and thus have very low barrier for adoption.
- Jersey also provide support for JAXB and also provides libraries for creating and manipulating JSON.
- Jersey support Annotations.
In the next part we will see how to create a simple REST Service ...
<< Prev Index Next >>
--------------------------------------------------------------------------------------------------------------
Great Article
ReplyDeleteJava Web Services Online Training | Web Services Course | Web Services Training Courses | Java Web Services Training in Chennai | Online Java Training | Java Training in Chennai
Wow, this article has important programming information that has helped not only to finish my programming assignment but to also to learn new programming skills. Thanks so much for sharing the article with us and I will be visiting this site occasionally to read more articles. Find time and read my article by clicking on Literature Review Writing Help.
ReplyDeletetidak perlu khawatir karena cara mendaftarnya sangat mudah. Di dalam situs permainan umumnya telah tersedia rangkuman cara mendaftar untuk orang yang belum memiliki pengalaman.
ReplyDeleteasikqq
dewaqq
sumoqq
interqq
pionpoker
bandar ceme terbaik
hobiqq
paito warna terlengkap
syair sgp
nice blog
ReplyDeletedata Science training in chennai
best devops training in chennai
devops training in chennai
best hadoop training in chennai
best hadoop training in omr
hadoop training in sholinganallur
best java training in chennai
the article is very nice. and your blog is fantastic. thanks for the sharing.
ReplyDeleteSoftware Development company in chennai
ERP Development Companies in Chennai
Hire Software Developers in chennai
Web Application development company in chennai
Ecommerce development company in chennai
edirne
ReplyDeletetrabzon
adana
yozgat
AN83S3
Wow, this series just keeps getting better! Part 10 on RESTful web services is an excellent overview, especially coming after the deep dive into SOAP. The comparison between the two styles is really clear, and it's fantastic to see how much lighter and easier REST is to work with.
ReplyDeletevisit: Python: The Language of Artificial Intelligence