Developing RESTful Web Services in Java

Public Training Price : $1950 per student
Private Training Price : $7215 for up to 3 students*
*Additional students subject to a nominal fee

 

 

 

Developing RESTful Web Services in Java Training Class Summary

This course shows you how to build RESTful web services using the Java API for RESTful Web Services, or JAX-RS. We begin with an overview of web services development in the Java EE platform, including SOAP, WSDL, REST; JAX-WS, JAXB, and JAX-RS. Then students learn to work with JAXB to bind Java object models to XML Schema. The bulk of the course is devoted to study of JAX-RS: students work with the Jersey implementation of JAX-RS to create RESTful services from simple single-value interactions to more sophisticated services that manage CRUD (create/retrieve/update/delete) operations on more complex data types, using JAXB to marshal and unmarshal data over the wire.

Audience: Experienced Java programmers.

Prerequisites: Java programming experience is required. Knowledge of XML and XML Schema is recommended. Experience with Servlets and JSP is helpful.

Class Length: 3 days

Developing RESTful Web Services in Java Training Class Objectives
  • Describe 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 content using XML Schema and JAXB.
  • Incorporate XML entities into service input and output.
  • Take advantage of lifecycle and context services available to JAX-RS services as Java EE components.
Developing RESTful Web Services in Java Training Class Detailed Outline
  1. Overview of Web Services
    • What is a Web Service?
    • Networking XML Components
    • Sharing Business Information
    • Integrating Business Processes
    • Earlier Approaches
    • What is a Web Service, Again?
    • Service-Oriented Architecture
    • HTTP
    • XML
    • Web Service Architecture
    • Interoperability Stacks
    • Decisions, Decisions …
    • SOAP
    • WSDL
    • WSDL Bindings
    • The SOAP Vision
    • REST
    • The REST Vision
    • SOAP vs. REST
    • Metadata for REST
    • UDDI
    • The Web Services Interoperability Organization
    • The WS-I Basic Profile
    • WS-Security & Co.
  2. Web Services for Java EE
    • Hosting Web Services
    • Scenarios: SOAP Alone
    • Scenarios: SOAP with Metadata
    • Scenarios: Generating the WSDL
    • Scenarios: REST
    • Forms for Services and Clients
    • Decisions, Decisions, Decisions …
    • Web Services for Java EE
    • The Java API for XML-Based Web Services
    • The Java API for XML Binding
    • Annotations and Deployment Descriptors
    • How to Speak to Your Host
    • The Automatic Approach: JAX-WS and JAXB
    • Where’s the SOAP?
    • Manual Options: SAAJ and JAXP
    • Java APIs and Interoperable Targets – Take 1
    • The Java API for RESTful Web Services
    • Applications, Resources, and Sub-Resources
    • The Java API for XML Registries
    • Java APIs and Interoperable Targets – Take 2
    • Next Steps
  3. The Java API for XML Binding
    • The Need for Data Binding
    • Acquiring JAXB
    • W3C XML Schema
    • Two Paths
    • Mapping XML Schema Simple Types to Java
    • Mapping XML Schema Complex Types to Java
    • Mapping Collections
    • The JAXB Context Class
    • Marshalling and Unmarshalling
    • Mapping Java Types to XML Schema
    • JAXB Annotations
    • Which Way to Go?
    • Customization
    • Declaring Custom Bindings
  4. The Java API for RESTful Web Services
    • Connecting HTTP to Java
    • How it Works
    • Acquiring JAX-RS
    • Applications
    • Resources
    • Providers
    • HTTPPad
    • Understanding JAX-RS Request URLs
  5. Dispatching Requests to Methods
    • The @Path Annotation
    • Uniqueness and Precedence
    • The HTTP Method Annotations
    • Annotation Inheritance
  6. Parameter and Return Types
    • Defining Inputs to Service Methods
    • Simple Parameter Types
    • The Parameter Annotations
    • The @DefaultValue Annotation
    • Constructor Initialization
    • Return Types
    • @Consumes and @Produces Annotations
    • The MediaType Class
    • Binary Content
  7. Entities and Complex Content
    • Entity Providers
    • Built-In Entity Providers
    • Working with XML
    • Custom Entity Providers
  8. Context and Lifecycle
    • JAX-RS Lifecycle
    • JAX-RS and Other Java EE Technology
    • Context Injection
    • Injectable Types
    • Finding Java EE Components
    • Finding Databases
    • Security Contexts
    • The Billing Web Service

.