Programming RESTful Services with REST/JAX-RS

See Course Outline

Training for your Team

2
Days
  • Private Class for your Team
  • Online or On-location
  • Customizable
  • Expert Instructors

Training for Yourself

$850.00
or 2 vouchers
  • Live Online Training
  • For Individuals
  • Expert Instructors
  • Guaranteed to Run
  • 100% Free Re-take Option
  • 1-minute Video

Upcoming Classes

  • See More Classes

Please select a class.
Overview

This Programming Programming RESTful Services with REST/JAX-RS training class provides in-depth coverage of REST principles and building RESTful services using the JAX-RS 2.0 API. It includes a brief overview of SOAP-based services and WSDL, to provide a contrast to RESTful services.

To really understand REST, we need to remind (teach) students about the full capabilities of HTTP, since RESTful service design is centered on the innate principles and capabilities of the HTTP protocol. Stated differently, RESTful services should use HTTP the way it was originally intended, not just as GET/POST plumbing for request/response data. You will emerge from the course with a full understanding of the HTTP protocol and its vision of the "original web," and how these ideas are implemented in RESTful applications.

We'll show you how to handle the most common types of request input, culminating in the transmission of HTTP entities in both XML and JSON format, in line with the original intention of HTTP. You'll also learn how to create appropriate responses given a variety of inputs and conditions, according to the guidelines and principles in the HTTP standard.

On the client side, we look at Ajax-JavaScript clients, as well as standalone Java clients using the JAX-RS 2.0 Client API.

Your daily personal use of the web is increasingly RESTful, and this course will show you how to expose your backend business systems using REST and the innate API and capabilities of HTTP. We also take cues from the masters such as Google, examining some of their public services and using them as a backdrop in building our own.

The course is very hands-on with frequent labs, in which the student can see these ideas implemented in software.

Attendees must be experienced in Java and preferably familiar with XML, Java web applications, and other Java EE standards. Familiarity with Ajax, JavaScript, and JSON is also beneficial, but not required.

All labs are done with the Eclipse IDE Java EE version and the WildFly Application Server, and the lab instructions include detailed directions for using them. Other IDEs and servers available on request.

Goals
  1. Learn to understand the purpose and role of web services in general, and how they are architected to expose business systems and processes over the web.
  2. Learn to understand the concepts and principles of REST and HTTP applications.
  3. Learn to expanded knowledge of HTTP, including its full set of methods and their intended uses, important headers, response codes, and content types.
  4. Learn to understand REST APIs, including resource identifiers and the URI namespace, resources and subresources, and WADL.
  5. Learn to understand configuration, deployment, and the runtime environment, including per-request and singleton objects, options for dependency injection, etc.
  6. Learn to understand how HTTP requests get dispatched to service methods.
  7. Learn to understand content negotiation and the importance of Accept and Content-Type headers, and how they impact method dispatching.
  8. Learn to bind request inputs to method parameters, including path parameters, query parameters, and headers.
  9. Learn to exchange business data by communicating in HTTP entities in both XML and JSON format.
  10. Learn to handle errors using Java exceptions and appropriate HTTP response codes.
  11. Learn to learn how to integrate JAX-RS services with other Java EE technologies like servlets, EJB, and CDI, and how JAX-RS fits into the larger Java EE landscape.
  12. Learn to write browser clients using Ajax-JavaScript.
  13. Learn to write Java clients using the JAX-RS 2.0 Client API, including standalone clients and server-side components invoking remote services.
  14. Learn to learn how to secure RESTful resources.
Outline
  1. Web Services Overview
    1. Definition
    2. Legacy Systems
    3. Benefits of Web Services
    4. Architecture
    5. Standards and Portability
    6. XML and Related Standards
    7. JSON
    8. HTTP
    9. SOAP-Based Services
    10. Overview
    11. SOAP Messages, Requests, and Responses
    12. WSDL
    13. Java APIs and Programming Models
  2. Introduction to REST
    1. Overview and Principles
    2. REST Characteristics
    3. Resources and Operations
    4. REST Principles
    5. Requests and Responses
    6. REST APIs
    7. URI Templates
    8. GET, POST, PUT, DELETE
    9. Safe and Idempotent Methods
    10. Comparison of REST and SOAP
  3. Introduction to JAX-RS
    1. APIs and Implementations
    2. JAX-RS Overview, Annotations
    3. JAX-RS Implementations
    4. Runtime Environment
    5. Application Server, Servlet-Only Container
    6. Architectural and Implementation Perspectives
    7. Configuring the Application
    8. Applications, Resources, and Providers
    9. JAX-RS Applications
    10. Resource Classes and @Path
    11. Provider Classes and @Provider
    12. Default Lifecycles
    13. The Application Class and rest-path
    14. Ajax-JavaScript Clients
    15. Overview
    16. Classic vs. Ajax Interactions
    17. Working with Ajax-JavaScript
  4. Resources and Requests
    1. Resources and Subresources
    2. Root Resource Classes, Resource Methods, Subresource Methods
    3. @GET, @POST, @PUT, @DELETE
    4. Subresource Locators
    5. Naming Conventions and Rules
    6. Dispatching Requests to Methods
    7. Binding Request Data
    8. Request Data Injection and Conversion
    9. Default Values
    10. Fields vs. Method Parameters
    11. Context-Based Injection
    12. Injection via @Context
    13. Context-Injectable Types
    14. Context Injection from the Web Container
    15. Fields vs. Method Parameters
  5. HTTP Entities
    1. Complex Content and Entities
    2. Working with Complex Content
    3. @Consumes and @Produces
    4. Content Negotiation
    5. Standard Entity Providers
    6. Working with JSON
    7. Returning Data as JSON
    8. Working with JSON in JavaScript
    9. Processing JSON Responses
    10. Working with XML
    11. JAXB and Mapping to XML
    12. Returning Data as XML
    13. Working with XML on the Client
    14. Customizing Content, Custom Media Types
    15. Working with Collections
    16. XML vs. JSON
  6. Responses
    1. Response Class
    2. Return Types and HTTP Response Codes
    3. Appropriate Responses for HTTP Methods
    4. Choosing the Right Response
    5. Error Handling
    6. Exception Mappers
    7. WebApplicationException
    8. Response vs. Thrown Exception
    9. Error Responses
    10. Subresource Locators
    11. Motivation and Uses
    12. Locating the Locator
    13. Initializing the Subresource
    14. Binary Content
    15. File, InputStream, StreamingOutput
    16. Using StreamingOutput
  7. Java Client API
    1. Java Client - Options and Ingredients
    2. Building and Sending the Request
    3. Consuming the Response
    4. Options for the Response Data
    5. Asynchronous Requests
  8. Integration with Java EE
    1. Integration with EJB
    2. CDI - Contexts and Dependency Injection
    3. Activation, Scopes, and JAX-RS Lifecycles
    4. Injection in CDI-Enabled JAX-RS Applications
    5. Enhanced Java EE Lifecycle
  9. Security
    1. Java EE Security Overview
    2. Security Requirements in JAX-RS
    3. Declarative, Role-Based Security
    4. Security Constraints
    5. Annotation-Based Security
    6. Authentication
    7. Configuration
    8. Authentication Models: Basic, Digest, Client-Cert
    9. Programmatic Security
    10. SecurityContext
    11. Client Security
    12. HTTPS
Class Materials

Each student in our Live Online and our Onsite classes receives a comprehensive set of materials, including course notes and all the class examples.

Class Prerequisites

Experience in the following is required for this Java Web Services class:

  • Experience with Java.
  • Familiarity with XML, Java web applications, and other Java EE standards.

Experience in the following would be useful for this Java Web Services class:

  • Familiarity with Ajax, JavaScript, and JSON.
Preparing for Class

No cancelation for low enrollment

Certified Microsoft Partner

Registered Education Provider (R.E.P.)

GSA schedule pricing

91,059

Students who have taken Live Online Training

16,075

Organizations who trust Webucator for their training needs

100%

Satisfaction guarantee and retake option

9.44

Students rated our trainers 9.44 out of 10 based on 5097 reviews

Great introductory course that can be taken anywhere in the world!

Ryan Ziskind, Steward Health Care
Westwood MA

I learned a lot and the instructor was very informative.

Alethea Reny, GenOn Energy, Inc.
Houston TX

Webucator can fulfill your need to sharpen your skills!

Chase Childs, Dental Arts Laboratories

Great training format. Very interactive and lots of hands on exercises. I especially liked the times when we were able to share our desktops for the instructor to give direct feedback on the exercises.

David Schow, tw telecom
Littleton CO

Contact Us or call 1-877-932-8228