Duration: 3 days
This course shows experienced Java programmers how to build RESTful web services using the Java API for RESTful Web Services, or JAX-RS. We first overview the key concepts of REST -- ultimately the thorough and thoughtful use of URLs, HTTP methods, and media types to design and implement scalable and maintainable enterprise services. Then we dive into the elegant JAX-RS standard for building RESTful services, learning how to manage URLs and URL patterns and methods, how to bind input and control response production, and how to manage HTTP entities in popular content types such as XML and JSON.
• Understand the advantages of the REST architecture for web services.
• Use JAX-RS to develop simple RESTful services.
• Control dispatching to service methods based on URL patterns and HTTP methods.
• Bind request values to method parameters when expressed as HTTP query parameters, form values, headers, cookies, and more.
• Manage XML and JSON content using XML Schema and JAXB -- or without JAXB using leading JAX-RS providers and Reflection-driven entity providers such as MOXy and Jackson.
• Handle error conditions by producing appropriate HTTP responses.
• Use JSR-303 validation for request parameters, headers, and entities.
• Use Java generics to implement REST API patterns for various domain classes.
• Take advantage of lifecycle and context services available to JAX-RS services.
• Organize request-handling methods into sub-resource classes to make REST APIs extensible and maintainable.
• Build filters and interceptors to adapt service endpoint behavior.
• Develop unit tests for JAX-RS services that cover both method code and JAX-RS annotations, using the Jersey test framework.
• Be aware of security concerns for RESTful services and secure services appropriately.
Method of Delivery
• Onsite/Live class instructions or Online web conference
• Open discussion
• Case studies