JAX-RS 2.0 is an enhanced framework based on RESTful architecture. It provides support for both the client and the server. Jersey 2.0 is the reference implementation of JAX-RS 2.0 (JSR 339 specification). This framework has undergone major revisions. The enhanced framework helps developers to use a low-level and simplified API.


This practical, hands-on guide will help you to create RESTful web services easily with individual aspects of the application requests. It will enable you to learn and implement RESTful web services using the new features included in JAX-RS 2.0. It’s a jump start for those who want to try their hand at the new API. It aims to provide practical knowledge of the API along with detailed understanding.

This book covers the new features of JAX-RS 2.0. It covers the complete lifecycle of a web service, that is, from server side to client side. The book focuses on the server API and the client API.

You will learn how to use the server API in order to create web services that will be deployed on the server. This has all different implementations of HTTP methods and media representations. You will also get acquainted with the client API which specifies how to consume the deployed application’s web services. This includes how to handle different HTTP methods and media representations in response to the web services.
You will also get to know Server Sent Events (SSE), which the server uses to push the data event directly to the client. The book will finally take you through the WADL specification. By the end of the book, you will be well equipped to implement Jersey 2.0 and JAX-RS.

Topics that are covered in this book:

Chapter 1: Getting Started
  • What is JAX-RS 2.0?
    • Features of JAX-RS 2.0
  • Ease of using and reusing JAX-RS artifacts
  • Modules and dependencies
  • Creating a new project
  • Summary
Chapter 2: Server API
  • Root-resource classes
    • @Path
    • @Path with a regular expression
  • HTTP methods
    • @GET
    • @PUT
    • @POST
    • @DELETE
    • @Produces
    • @Consumes
  • Parameter annotations
    • @PathParam
    • @QueryParam
    • @DefaultValue
    • @MatrixParam
    • @HeaderParam
    • @CookieParam
    • @FormParam
    • @BeanParam
  • Subresources
  • Scope of the root-resource classes
  • Rules of injection
  • Deploying a RESTful web service
  • Summary
Chapter 3: Client API
  • Consuming web services using a client
    • The get method
    • The post method
    • The put method
    • The delete method
    • The path parameter
    • The query parameter
    • The cookie parameter
    • The matrix parameter
    • The bean parameter
    • The @Produces annotation
    • The @Consumes annotation
  • Use of Invocation.Builder
  • Adding support for new representations
  • Client transport connectors
  • Securing a client
  • Summary
Chapter 4: Common Media-Type Representations
  • JSON
    • MOXy
      • Using the ResourceConfig class
    • Java API for JSON Processing (JSON-P)
    • Jackson
    • Jettison
  • XML
    • Low-level XML support
    • JAXB support
    • POJOs
  • Multipart
  • Summary
Chapter 5: Server-Sent Events (SSE)
  • Getting started
  • Implementing Server-Sent Events (SSE)
    • Consuming the SSE events
    • The pull model (using EventInput)
    • The push model (using EventSource)
  • Summary
Chapter 6: WADL
  • Getting started
  • Configuration
  • Summary
The book in now available online:

1 comment:

  1. Thanks! All examples are simple and very beautifully explained, even someone who does not know much about Web services can get the hang of them.
    web designing company Pakistan

    ReplyDelete

Find me on Facebook! Follow me on Twitter!