Implementing a lightweight REST service architecture with Jax-RS
Programme
Introduction
- REST services
- Overview of REST
- An architectural style
- Constraints of a RESTful system
- Richardson’s maturity model
- SOAP/REST comparison
HTTP reminders
- URIs
- Structure of a request
- HTTP method
- HTTP header
- Structure of a response
- HTTP response status
- Safe request
- Idempotent request
- Stateless vs. Stateful
- HTTP security
JAX-RS
- Implementations
- Basic concepts: resource
- Setting up a service
- Deploying a service
Jersey
- Deployment in different environments
- Creating a project
JAX-RS annotations
- Usual annotations
- Annotations to extract data
- Injection model
- Type conversion
- Validation
Content management
- Conneg
- @Produces and @Consumes
- Quality factor q
- Input parameter
- Return type
- Entity provider
- ResponseBuilder
- Uri and UriBuilder
- Link and Link headers
- Exception handling
Resource representation
XML support
JavaScript Object Notation
Advanced use of JAX-RS
- Filters
- Interceptors
- Dynamic binding
- Name Binding
- Order of filters and interceptors
- Asynchronous API
Integration with EJBs
RESTful Java client
- Consuming REST services
- Jersey Client
- Client API of JAX-RS
- Advanced Client Features
Security with JAX-RS
- Service Security with Java EE
- Service Security with JWT
- CORS
Documentation of an API
- WADL, RAML, Blue Print
- Swagger
Testing REST services
- With cURL
- With PostMan
- With RestAssured
- With SOAP-UI
Conclusion