Welcome to ONLC Training Centers


Developing RESTful Services with REST/JAX-RS Course Outline

 (3 days)

Overview
This course 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.

Audience
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.

Labs
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.

Skills Gained
◾Understand the purpose and role of web services in general, and how they are architected to expose business systems and processes over the web
◾Understand the concepts and principles of REST and HTTP applications
◾Expanded knowledge of HTTP, including its full set of methods and their intended uses, important headers, response codes, and content types
◾Understand REST APIs, including resource identifiers and the URI namespace, resources and subresources, and WADL
◾Understand configuration, deployment, and the runtime environment, including per-request and singleton objects, options for dependency injection, etc.
◾Understand how HTTP requests get dispatched to service methods
◾Understand content negotiation and the importance of Accept and Content-Type headers, and how they impact method dispatching
◾Bind request inputs to method parameters, including path parameters, query parameters, and headers
◾Exchange business data by communicating in HTTP entities in both XML and JSON format
◾Handle errors using Java exceptions and appropriate HTTP response codes
◾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
◾Write browser clients using Ajax-JavaScript
◾Write Java clients using the JAX-RS 2.0 Client API, including standalone clients and server-side components invoking remote services
◾Learn how to secure RESTful resources

Course Outline

Session 1: Web Services Overview ◾Definition
Legacy Systems
Benefits of Web Services
Architecture
◾Standards and Portability
XML and Related Standards
JSON
HTTP
◾SOAP-Based Services
Overview
SOAP Messages, Requests, and Responses
WSDL
Java APIs and Programming Models

Session 2: Introduction to REST ◾Overview and Principles
REST Characteristics
Resources and Operations
REST Principles
◾Requests and Responses
REST APIs
URI Templates
GET, POST, PUT, DELETE
Safe and Idempotent Methods
◾Comparison of REST and SOAP

Session 3: Introduction to JAX-RS ◾APIs and Implementations
JAX-RS Overview, Annotations
JAX-RS Implementations
◾Runtime Environment
Application Server, Servlet-Only Container
Architectural and Implementation Perspectives
Configuring the Application
◾Applications, Resources, and Providers
JAX-RS Applications
Resource Classes and @Path
Provider Classes and @Provider
Default Lifecycles
The Application Class and rest-path
◾Ajax-JavaScript Clients
Overview
Classic vs. Ajax Interactions
Working with Ajax-JavaScript

Session 4: Resources and Requests ◾Resources and Subresources
Root Resource Classes, Resource Methods, Subresource Methods
@GET, @POST, @PUT, @DELETE
Subresource Locators
Naming Conventions and Rules
Dispatching Requests to Methods
◾Binding Request Data
Request Data Injection and Conversion
Default Values
Fields vs. Method Parameters
◾Context-Based Injection
Injection via @Context
Context-Injectable Types
Context Injection from the Web Container
Fields vs. Method Parameters

Session 5: HTTP Entities ◾Complex Content and Entities
Working with Complex Content
@Consumes and @Produces
Content Negotiation
Standard Entity Providers
◾Working with JSON
Returning Data as JSON
Working with JSON in JavaScript
Processing JSON Responses
◾Working with XML
JAXB and Mapping to XML
Returning Data as XML
Working with XML on the Client
Customizing Content, Custom Media Types
Working with Collections
◾XML vs. JSON

Session 6: Responses ◾Response Class
Return Types and HTTP Response Codes
Appropriate Responses for HTTP Methods
Choosing the Right Response
◾Error Handling
Exception Mappers
WebApplicationException
Response vs. Thrown Exception
Error Responses
◾Subresource Locators
Motivation and Uses
Locating the Locator
Initializing the Subresource
◾Binary Content
File, InputStream, StreamingOutput
Using StreamingOutput

Session 7: Java Client API ◾Java Client - Options and Ingredients
◾Building and Sending the Request
◾Consuming the Response
◾Options for the Response Data
◾Asynchronous Requests

Session 8: Integration with Java EE ◾Integration with EJB
◾CDI - Contexts and Dependency Injection
Activation, Scopes, and JAX-RS Lifecycles
Injection in CDI-Enabled JAX-RS Applications
Enhanced Java EE Lifecycle

Session 9: Security ◾Java EE Security Overview
Security Requirements in JAX-RS
Declarative, Role-Based Security
Security Constraints
Annotation-Based Security
◾Authentication
Configuration
Authentication Models: Basic, Digest, Client-Cert
◾Programmatic Security
SecurityContext
Client Security
◾HTTPS
View outline in Word

XRESTJ

Attend hands-on, instructor-led Developing RESTful Services with REST/JAX-RS training classes at ONLC's more than 300 locations. Not near one of our locations? Attend these same live classes from your home/office PC via our Remote Classroom Instruction (RCI) technology.

For additional training options, check out our list of Courses and select the one that's right for you.

Microsoft Gold Partner
Class Dates
(click date for class times)
(click Enroll for locations)

Fee:  $1195

Savings options:

 CEA Apps Saver
Need a price quote?

Follow the link to our self-service price quote form to generate an email with a price quote.

Email Alert

Receive an email when this class is available as "Ready to Run" or "Early Notice" status.

Attend from your office or home

If you have high-speed internet and two computers you can likely take this class from your office or home.

Need a class for a group?

We can deliver this class for a private group at your location. Follow the link to request more information.

Attend computer classes from ONLC Training Centers Request a copy via mail

GENERAL INFO

Class Format
Class Policies
Student Reviews

Bookmark and Share


HAVE QUESTIONS?
First Name

Last Name

Company

Phone

Email

Location

Question/Comment



ONLC TRAINING CENTERS
800-288-8221
www.onlc.com