|
Home > Training >
Web Services
>
|
WA2018 Implementing RESTful Web Services with JAX-RS 1.1 Training and Courseware
|
Although many of the services in active use are SOAP or at least XML-based, an increasing number of services take a RESTful approach to data transmission. Representational state transfer (REST) is a style of software architecture that differs from the more traditional Remote Procedure Call (RPC) style of data transmission, instead emphasizing the importance of defining and retrieving representations of resources.
The Java JAX-RS specification covers how to implement RESTful services with Java. This specification is driven by annotations and can be leveraged from many different environments, including a Java EE 'Application Server'. With the recent inclusion of the JAX-RS specification in the Java EE 6 umbrella of technologies implementing RESTful services with JAX-RS will become even easier.
This course covers the design principles of REST architecture along with the details of how to implement these services with JAX-RS. This will allow students who take the course to implement RESTful services using Java standards that will be portable to many different Java environments. |
|
Topics
|
| |
- Primer on REST
- Working with REST Resources
- JAX-RS
- Content Types in JAX-RS
- REST vs SOAP
- Building JAX-RS Responses
- Clients of JAX-RS Services
- JAX-RS Security
|
|
What you will learn
|
| |
After completing this course, the student should be able to:
- Understand the REST style of software architecture
- Describe the advantages and disadvantages of applying RESTful design strategies to various scenarios
- Implement RESTful services using the JAX-RS Java specification
- Create JAX-RS services that use various types of request/response content
- Compare and contrast REST with RPC, SOAP, and other similar communication strategies
- Apply fine-grained control of the responses returned from JAX-RS services
- Use various techniques to implement clients of RESTful services
- Apply Java EE security to JAX-RS services
|
|
Audience
|
| |
This course is applicable for Architects and Developersthat need to design and develop RESTful web services using JAX-RS.
|
|
Prerequisites
|
| |
Experience with Java programming is required. Experience with Eclipse is useful but not required. For those that might need this Java or Eclipse 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. |
|
|
Course Outline
Chapter 1. Overview of REST Services
- Many Flavors of Services
- Understanding REST
- Principles of RESTful Architecture
- RESTful Services
- Sample REST Service Requests
- Sample REST Service Responses
- Advantages
- Disadvantages
- Summary
Chapter 2. Defining REST Resources
- What Constitutes a Resource?
- Resource Examples
- Resource Identifiers
- REST and MIME Types
- REST and HTTP Methods
- Constrained Service Interface
- Resource Management Best Practices
- Summary
Chapter 3. Introduction to JAX-RS
- The JAX-RS Specification
- Resource Classes
- The @Path Annotation
- @Path Expressions
- Using @PathParam
- Binding to HTTP Methods with @GET, @POST, etc
- Using web.xml to Define a Base URI
- Summary
Chapter 4. Extracting Information from JAX-RS Requests
- Path Parameters with @PathParam
- Query Parameters with @QueryParam
- Form Parameters with @FormParam
- Cookies with @CookieParam
- Request Headers with @HeaderParam
- Setting Defaults with @DefaultValue
- JAX-RS Parameter Conversion
- Using Custom Types for Parameters
- Summary
Chapter 5. JAX-RS Content Types
- JAX-RS @Consumes for Request Content
- JAX-RS @Produces for Response Content
- JAX-RS MediaType Class
- XML
- JAXB
- JSON
- Content Negotiation
- Client Accept Headers
- Other Negotiation Tactics
- Summary
Chapter 6. REST vs SOAP
- Defining REST
- Defining SOAP
- RPC SOAP vs REST
- Document SOAP vs REST
- Where SOAP Shines
- Where REST Shines
- Selecting an Appropriate Solution
- Summary
Chapter 7. Building Complex JAX-RS Responses
- Default Response Codes
- The JAX-RS Response Class
- Using a ResponseBuilder
- Setting the Status of a Response
- Returning Cookies
- Returning a WebApplicationException
- Implementing a Custom ExceptionMapper
- Summary
Chapter 8. Clients of JAX-RS Services
- Java Clients
- Apache HttpClient
- JAX-RS Implementation Client Libraries
- WADL
- HATEOAS
- Using Atom Links for State Transitions
- Building Links with UriBuilder and UriInfo
- Summary
Chapter 9. Securing JAX-RS Services
- Integration with Web Container Security
- Java EE Security Roles
- Java EE Security Annotations
- Restrictions Based on Content Type
- Summary
|
|
|
We regularly offer classes in these and other cities. Atlanta, Austin, Baltimore, Calgary, Chicago, Cleveland, Dallas, Denver, Detroit, Houston,
Jacksonville, Miami, Montreal, New York City, Orlando, Ottawa, Philadelphia, Phoenix, Pittsburgh, Seattle, Toronto, Vancouver, Washington DC.
|
|
|