Free Sample
+ Collection

Developing RESTful Web Services with Jersey 2.0

Sunil Gulabani

Create RESTful web services smoothly using the robust Jersey 2.0 and JAX-RS APIs
RRP $20.99
RRP $34.99
Print + eBook

Want this title & more?

$12.99 p/month

Subscribe to PacktLib

Enjoy full and instant access to over 2000 books and videos – you’ll find everything you need to stay ahead of the curve and make sure you can always get the job done.

Book Details

ISBN 139781783288298
Paperback98 pages

About This Book

  • Understand and implement the Jersey and JAX-RS APIs with ease
  • Construct top-notch server and client side web services
  • Learn about Server sent events, for showing real-time data

Who This Book Is For

This book is intended for Java EE developers who are building applications on the REST architecture. This is a quick, hands-on guide for learning JAX-RS 2.0. Developers should have some knowledge about RESTful web services but it’s not essential to know JAX-RS 1.0.

Table of Contents

Chapter 1: Getting Started
What is JAX-RS 2.0?
Ease of using and reusing JAX-RS artifacts
Modules and dependencies
Creating a new project
Chapter 2: Server API
Root-resource classes
HTTP methods
Parameter annotations
Scope of the root-resource classes
Rules of injection
Deploying a RESTful web service
Chapter 3: Client API
Consuming web services using a client
Use of Invocation.Builder
Chapter 4: Common Media-Type Representations
Chapter 5: Server-Sent Events (SSE)
Getting started
Implementing Server-Sent Events (SSE)
Chapter 6: WADL
Getting started

What You Will Learn

  • Implement web services using different HTTP methods and *Param Annotations
  • Create resource and sub-resource methods
  • Understand the different rules of injection and the scope of the root resource classes
  • Explore different deployment processes of applications
  • Consume web services along with different HTTP methods and *Param Annotations
  • Get acquainted with different media representations (JSON, XML, and Multipart)
  • Send/push data events from server to client
  • Generate WADL specification

In Detail

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.


Read More