Complete Java RESTful Services


Duration Two Days


Duration: 2 Days


In Complete Java RESTful Services, students not only learn the concepts and design principles associated with Representational State Transfer (REST), they also take a deep dive into JAX-RS – Java’s standard API for REST development.  This is an intense hands-on course for Java programmers intent on learning how to design and build RESTful services and clients that exchange information in plain text, XML, JSON and other formats.  Students spend almost 50% of their time in labs building JAX-RS services and REST clients. 

Learning Objectives

  •  Understand the concepts of REST.
  •  Explore the conventions and design principals associated with REST services.
  •  Learn the JAX-RS API for building services from annotated plain old Java objects (POJOs).
  •  See how to produce and consume multiple data formats to include XML and JSON.
  •  Examine how to secure Java REST services.
  •  See how to build Java REST client applications.


This course is designed for Java programmers who have interest in learning how to build or maintain Java RESTful Web services using JAX-RS. 


A solid understanding of Java is required.  An understanding of HTTP is also expected.  An understanding of XML is helpful.

Course Outline

Introducing REST

  •  Representational State Transfer (REST)
  •  Resource Identifiers 1-5
  •  REST Operations 1-7
  •  Representational State Formats 1-9
  •  Status Codes and Error Handling
  •  REST versus SOAP
  •  REST in the Real World
  •  RESTful Services and Java

JAX-RS Introduction

  •  JAX-RS
  •  Jersey Setup
  •  JAX-RS Services
  •  @Produces
  •  @Consumes

 Advanced JAX-RS Features

  •  Path Parameters
  •  Query Parameters
  •  Cookie and Header Parameters
  •  Form and Matrix Parameters
  •  JAX-RS @Context
  •  Exception Handling
  •  Resource Lifecycle
  •  JAX-RS Resource Deployment Options


  •  JAXB
  •  Producing XML with JAXB Annotations
  •  Consuming XML with JAXB Annotations
  •  JAXB Alternatives


  •  What is JSON?
  •  JSON Syntax
  •  Producing and Consuming JSON with JAX-RS

Securing Services

  •  Securing RESTful Services
  •  SSL/TLS
  •  SSL/TLS Benefits and Issues
  •  Java EE Security
  •  Security Constraints
  •  Defining Security Roles
  •  Realms and Identity Storage
  •  Authentication Types
  •  Programmatic Security

Java REST Clients

  •  REST Client Options
  • Clients
  •  Apache HttpComponents
  •  Jersey REST Clients

Appendix A – XML Syntax

  •  An XML History
  •  HTML
  •  XML vs. HTML
  •  XML Syntax
  •  Elements
  •  Attributes
  •  Attribute vs. Element
  •  XML Miscellaneous
  •  Well-Formed

Appendix B – XML Namespaces

  •  XML Name Conflicts
  •  Namespaces
  •  The Namespace Identifier
  •  Qualified and Unqualified Names
  •  Global and Local Scope

Appendix C – XML Schema

  •  XML Schema
  • XML Schema Specifications