RESTful Webservices

REST stands for Representational State Transfer. In simple terms, REST systems do basic CRUD (Create, Read, Update and Delete) operations based on http protocol methods and communications between client and server happen over http protocol. More information can be found here.

JAX-RS specification was introduced under JSR 311 to enable J2EE applications implement REST services with ease and portability.

Few popular implementations of this specification are CXF (by Apache), RESTEasy (by JBoss) and Jersey (by Oracle).

Introduction

  • Create a working example of REST with GET,POST,PUT,DELETE Http methods

A Quick Overview on REST

JAX-RS request data extraction annotations:

  • Capture information in Path URI

Working with JAX-RS @Path and @PathParam

  • Capture values of Query String and handle optional queries.

Using JAX-RS @QueryParam,@DefaultValue,UriInfo

  • Capture submitted form values

Using JAX-RS @FormParam and MultivaluedMap

  • Capture http request header fields.

Using JAX-RS @HeaderParam and HttpHeaders

  • Capture Matrix parameters in URI using different techniques.

Working with Matrix URIs (@MatrixParam,PathSegment)

XML Binding in JAX-RS

  • JAX-RS with JAXB and CXF (without Spring)

XML Binding with Springless CXF and JAXB

 

 

 

Back to Top
%d bloggers like this: