| 
 
|  |  | 
	
		|  |  
		| 
            | Java Training   Overview 
 
 
				
This course shows experienced Java programmers how to build RESTful web services using the Java API for RESTful Web Services, or JAX-RS. We develop a clear sense of 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.
 From here students investigate intermediate features including dependency injection, error handling, and JSR-303 validation, and use Java generics to implement patterns for common operations over an application's domain classes. We explore the JAX-RS client API, and filters and interceptors, before closing with a summary chapter on REST security that includes implementations of HTTP BASIC security and HMAC signatures.
 
 Java Training   Learning Objectives
 
				Java Training   PrerequisitesUnderstand 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.Implement REST clients using the JAX-RS standard API.Build filters and interceptors to adapt service endpoint behavior.Be aware of security concerns for RESTful services and secure services appropriately. 
Server Support: Tomcat
				
This version of the course works with the Tomcat server. Our Java EE courses are available in variants that support various server products, including Tomcat, GlassFish, JBoss, and WebLogic. For more details, and to find a desired server-specific version of a course, see our server-support matrix.
	Java Training   Course duration
				
				5 days
		
		Java Training   Course outlineStrong Java programming skills are essentialExperience with other Java EE standards, especially servlets and JSP, will be very helpful in class, but is not strictly required. 
 Chapter 1. Overview of REST and JAX-RS
 
Chapter 2. Configuration and LifecycleThe REST VisionUse of HTTPUse of URIsUse of Content TypesCRUD Operations and Business OperationsHATEOAS and the Richardson Maturity ModelJAX-RSApplications, Resources, and Providers 
Chapter 3. Dispatching RequestsThe JAX-RS ApplicationXML ConfigurationAnnotation-Driven ConfigurationApplicationsRoot Resource ClassesPer-Request vs. Singleton LifecycleProviders 
Chapter 4. Handling RequestsThe Application PathThe @Path AnnotationThe HTTP Method AnnotationsSub-Resource LocatorsAnnotation Inheritance and overriding@XXXParam AnnotationsThe @DefaultValue AnnotationParameter TypesParameter Converters 
Chapter 5. Producing ResponsesThe Application PathThe @Path AnnotationThe HTTP Method AnnotationsSub-Resource LocatorsAnnotation Inheritance and overriding@XXXParam AnnotationsThe @DefaultValue AnnotationParameter TypesParameter Converters 
Chapter 6. Entity TranslationSupported Return TypesThe Response ClassResponse EntitiesBinary ContentDelivering a File 
Chapter 7. Working with XML and JSONEntity Parameter and Return TypeEntity Providers@Consumes and @Produces AnnotationsBuilt-In Entity ProvidersCustom Entity Providers 
Chapter 8. Dependency InjectionThe JAXB Entity ProviderDriving XML Representations from SchemaDriving JSON Representations with JAXBJSON Without JAXB: Jackson, MOXy, etc.CRUD PatternsError HandlingSub-Resources 
Chapter 9. Validation and Error HandlingThe @Context AnnotationInjectable TypesThe Application SubclassServlet Configuration and ContextImpact of Lifecycle PoliciesContext ProvidersUsing CDI 
Chapter 10. Generic ServicesUsing ResponseThrowing WebApplicationExceptionException Mapping ProvidersSelection of Exception MappersSupport for JSR-303Annotating Method ParametersAnnotating Entity ClassesError Reporting 
Chapter 11. Working with DatabasesGeneric EntitiesGeneric Entity ProvidersParameterizedTypeReflection-Driven Entity ProvidersAnnotation InheritanceCRUD Patterns, IISerialization, Recursion, and ScopeDynamic Sub-Resources 
Chapter 12. The Client APIPersistence ServicesThe Java Persistence APIJPA Support for JSR-303Handling IDs and KeysCascadingCachingError HandlingHypermedia Challenges 
Chapter 13. Filters and InterceptorsThe Builder PatternClientWebTargetInvocationBasic UsageManaging Content Types and EntitiesError HandlingRegistering ProvidersThe Service Locator PatternGeneric Clients 
Chapter 14. SecurityThe Filter InterfacesProcessing PatternThe Request and Response Context InterfacesAborting a RequestThe Interceptor InterfacesAdaptive StreamsFilters on the Client SideInterceptor Strategy for Hypermedia 
Chapter 15. The Java API for XML BindingConcerns for RESTful ServicesAuthentication and AuthorizationHTTP BASIC and DIGESTHTTPSProgrammatic SecuritySQL InjectionCross-Site Request ForgeryMessage-Level SecurityHMACs 
System RequirementsThe Need for Data BindingXML SchemaTwo PathsJAXB CompilationMapping Schema Types to JavaJava-to-XML Mapping Using AnnotationsMarshalling and UnmarshallingWorking with JAXB Object Models 
						
Hardware – minimal:                    i5 1.8 GHz, 4 gig RAM, 1 gig disk space.
 Hardware – recommended:            i5 2.8 GHz, 8 gig RAM, 1 gig disk space.
 
 Operating system:  Tested on Windows 7/8 and Mac OS 10.8.5. Course software should be viable on all systems which support a Java SE 7 Developer's Kit.
 
 Network and Security: Limited privileges required
 
 Software:                                        All free downloadable tools.
 
 
 
 |  |  |  |