Topics |
|
|
|
What you will learn |
|
After completing this course, the student should be able to:
|
|
Audience |
|
This course is applicable for Architects and Developers that need to design and develop RESTful web services using JAX-RS. |
|
Prerequisites |
|
Experience with Java programming is required. Experience with Eclipse/RAD is useful but not required. For those that might need this Java or Eclipse/RAD experience the following course is suggested:
An understanding of basic web architecture and the HTTP protocol. Prior experience with RPC-style services such as Web services, Java RMI, COM objects, etc. is helpful, but not required. |
|
Duration |
|
2 days. |
Outline for Programming REST Web Services with JAX-RS 1.1 - WebSphere 8.0 / RAD 8.0 Training
Chapter 1. REST Services
- Many Flavors of Services
- Understanding REST
- Principles of RESTful Services
- REST Resource Examples
- SOAP Equivalent Examples
- REST vs SOAP Communication
- More REST vs SOAP
- REST vs SOAP Summary
- Famous RESTful Services
- Additional Resources
- Summary
Chapter 2. Introduction to JAX-RS
- The JAX-RS Specification
- The Resource Class
- A Bunch of Annotations
- @Path
- Using Path Parameters
- HTTP Method Binding
- More Complex Paths
- Configuring JAX-RS for Deployment
- Summary
Chapter 3. JAX-RS Data Injection
- Sources for Injected Data
- Path Parameters
- Query Parameters
- HTML Form Input
- Cookies
- Matrix Parameters
- HTTP Headers
- Default Values
- Parameter Conversion
- Custom Types
- Summary
Chapter 4. Designing a RESTful Service
- Introduction
- The Design Methodology
- Ingredients of a Service Operation Interface
- What Constitutes a REST Resource
- Resource Identifiers
- MIME Types
- HTTP Methods
- Example Operation Interface Document
- Summary
Chapter 5. JAX-RS Content Types
- Internet Media Types
- Use of Media Type in REST
- The @Consumes Annotation
- Content Negotiation
- The @Produces Annotation
- The MediaType Class
- JAXB
- Dynamic Content Negotiation
- Summary
Chapter 6. Building Complex JAX-RS Responses
- HTTP Response Status Codes
- Introduction to the JAX-RS Response Class
- Using the Response and Response.ResponseBuilder Classes
- Example: Conditional HTTP GET
- Returning Cookies
- Cookies in Response Headers
- Reading Cookies
- Returning an Exception
- ExceptionMappers
- Summary
Chapter 7. REST vs. SOAP
- Defining REST
- The Six REST Architectural Style Constraints
- The Four REST Interface Constraints
- Hypermedia Examples
- Defining SOAP
- RPC SOAP vs. REST
- Document SOAP vs. REST
- Where SOAP Shines
- Where REST Shines
- Selecting an Appropriate Solution
- Summary
Chapter 8. Clients of JAX-RS Services
- Java Web Service Clients
- Apache HttpClient
- More Apache HttpClient Code
- JAX-RS Implementation Client Libraries
- RESTEasy Example
- HATEOAS
- Building Links with UriBuilder and UriInfo
- Using Atom Links for State Transitions
- WADL
- WADL Example
- Summary
Chapter 9. Securing JAX-RS Services
- HTTP Basic Authentication
- Example Client
- The WWW-Authenticate and Authorization Headers
- Java EE Security Roles
- Integration with Web Container Security
- Java EE Security Annotations
- SecurityContext
- Restrictions Based on Content Type
- Summary