Overview
This REST Training program helps participants build an expertise in Representational State Transfer (REST); the course covers topics like Designing REST services, building JAX-RS services, understanding JAX-RS injection and other important aspects.
What You'll Learn
After completion of RESTful Web Services Training course, participants will be able to:
- Design RESTful services
- Build JAX-RS services
- Understand JAX-RS injection
- Configure HTTP content negotiation
- Scale JAX-RS applications
- Build RESTful clients
- Compare & contrast JAX-RS implementations
Curriculum
Definition
- Legacy Systems
- Benefits of Web Services
- Architecture
- XML and Related Standards
- JSON
- HTTP
- Overview
- SOAP Messages, Requests, and Responses
- WSDL
- Java APIs and Programming Models
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
APIs and Implementations
- JAX-RS Overview, Annotations
- JAX-RS Implementations
- Application Server, Servlet-Only Container
- Architectural and Implementation Perspectives
- Configuring the Application
- JAX-RS Applications
- Resource Classes and @Path
- Provider Classes and @Provider
- Default Lifecycles
- The Application Class and rest-path
- Overview
- Classic vs. Ajax Interactions
- Working with Ajax-JavaScript
Resources and Sub-Resources
Root Resource Classes,
Resource Methods,
Sub Resource Methods
@GET, @POST, @PUT, @DELETE
- Sub Resource Locators
- Naming Conventions and Rules
- Dispatching Requests to Methods
- Default Values
- Fields vs. Method Parameters
- Injection via @Context
- Context-Injectable Types
- Context Injection from the Web Container
- Fields vs. Method Parameters
Complex Content and Entities
Working with Complex Content
- @Consumes and @Produces
- Content Negotiation
- Standard Entity Providers
- Working with JSON in JavaScript
- Processing JSON Responses
- Returning Data as XML
- Working with XML on the Client
- Customizing Content, Custom Media Types
- Working with Collections
Response Class
Return Types and HTTP Response Codes
- Appropriate Responses for HTTP Methods
- Choosing the Right Response
- Web Application Exception
- Response vs. Thrown Exception
- Error Responses
- Locating the Locator
- Initializing the Sub Resource
- File, InputStream, StreamingOutput
- Using StreamingOutput
- Java Client – Options and Ingredients
- Building and Sending the Request
- Consuming the Response
- Options for the Response Data
- Asynchronous Requests
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
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
- Security Context
- Client Security HTTPS
Prerequisites
Participants must have knowledge of Java development. Experience in Java EE development is recommended however not mandatory.