Introduction to Restful Web Services Using JAX-RS
RESTful web services are built to work best on the Web. Representational State Transfer (REST) is an architectural style that specifies
constraints, such as the uniform interface, that if applied to a web service induce desirable properties, such as performance, scalability, and
modifiability, that enable services to work best on the Web. In the REST architectural style, data and functionality are considered resources and
are accessed using Uniform Resource Identifiers (URIs), typically links on the Web. The resources are acted upon by using a set of simple, well-defined
operations. The REST architectural style constrains an architecture to a client/server architecture and is designed to use a stateless communication
protocol, typically HTTP. In the REST architecture style, clients and servers exchange representations of resources by using a standardized interface
and protocol.
RESTful Web Services utilize the features of the HTTP Protocol to provide the API of the Web Service. It uses the HTTP Request Types
to indicate the type of operation:
GET: Retrieve / Query of existing records.
POST: Creating new records.
DELETE: Removing records.
PUT: Updating existing records.
Using these 4 HTTP Request Types a RESTful API mimics the CRUD operations (Create, Read, Update & Delete). REST is stateless,
each call the to a RESTful Web Service is completely stand-alone, it has no knowledge of previous requests.
We are giving simple examples to create restful web services using JAX-RS standards.
References:
What Are RESTful Web Services?
Java API for RESTful Web Services
Jersey User Guide
Restful Web Services Examples
- Restful web services using RESTEasy hello world example.
- Restful web services using Jersey hello world example.
- JAX-RS @Path annotation example
- JAX-RS @Path annotation with regular expression match example
- JAX-RS @PathParam annotation example
- JAX-RS @QueryParam and @DefaultValue annotations example
- JAX-RS @MatrixParam annotation example
- How to read multiple values of a query paramter in JAX-RS restful web services?
- How to pass header parameters as method inputs in JAX-RS restful web services?
- How to read header parameters in JAX-RS restful web services?
- JAX-RS @FormParam annotation example
- How to upload file using Jersey restful web services?
- How to download file using java restful web services?
- XML based Restful web service with RESTEasy and JAXB.
- XML based Restful web service with Jersey and JAXB.
- Json based Restful web service with RESTEasy, Jettison and JAXB
- Json based Restful web service with RESTEasy and Jackson
- Json based Restful web service with Jersey and Jackson
- How to input json request with Jersey and Jackson?
- Java client for restful web service using java.net package
- Java client for restful web service using Jersey API
- Java restful webservices with HTTP basic authentication.
|