Webservices Training

Why Web Services?

  • Service-Oriented Architecture
  • HTTP and XML
  • SOAP
  • WSDL
  • The SOAP Vision
  • The REST Vision
  • UDDI
  • The WS-I Basic Profile
  • Security

Web Services for Java EE

  • Hosting Web Services: Scenarios
  • Web Services for Java EE
  • JAX-WS and JAXB
  • Web-Services Metadata
  • WSDL-to-Java and Java-to-WSDL Paths
  • Provider and Dispatch APIs
  • SAAJ and JAXP
  • JAX-RS for RESTful Services
  • JAXR

The Java API for XML Binding

  • The Need for Data Binding
  • XML Schema
  • Two Paths
  • JAXB Compilation
  • Mapping Schema Types to Java
  • Java-to-XML Mapping Using Annotations
  • Marshaling and Unmarshaling

Working with JAXB Object Models

The Simple Object Access Protocol

  • Messaging Model
  • Namespaces
  • SOAP over HTTP
  • The SOAP Envelope
  • The Message Header
  • The Message Body
  • SOAP Faults
  • Attachments

Web Services Description Language

  • Web Services as Component-Based Software
  • The Need for an IDL
  • Web Services Description Language
  • WSDL Information Model
  • The Abstract Model — Service Semantics
  • Message Description
  • Messaging Styles
  • The Concrete Model — Ports, Services, Locations
  • Extending WSDL — Bindings
  • Service Description

The Java API for XML-Based Web Services

  • Two Paths
  • How It Works: Build Time and Runtime
  • The Service Endpoint Interface
  • Working from WSDL
  • Working from Java
  • RPC and Document Styles
  • One-Way Messaging
  • Binary Protocols

WSDL-to-Java Development

  • The @WebService Annotation
  • Generated Code
  • Scope of Code Generation
  • Parameter Order
  • More JAXB: Mapping Collections
  • More JAXB: Mapping Enumerations
  • Applying JAXB Customizations

Client-Side Development

  • Stubs and Proxies
  • Generated Code
  • Locating a Service
  • Invoking a Service
  • The @WebServiceRef Annotation

Java-to-WSDL Development

  • Generating the WSDL and Schema
  • The @WebMethod, @XmlParam, and Related Annotations
  • More JAXB: Mapping Inheritance
  • Controlling the XML Model
  • Controlling the WSDL Description
  • JAXB Customizations with @XmlJavaTypeAdapter

Exception Handling

  • SOAP Faults vs. Java Exceptions
  • Mapping Faults from WSDL
  • Mapping Exceptions from Java
  • JAX-WS Exception API and Handling
  • Client Exception Handling

JAX-WS Best Practices

  • Which Way to Go?
  • Interoperability Impact
  • Portability Impact
  • Polymorphism in Web Services
  • Web Services as Java EE Components
  • Lifecycle Annotations
  • Context Interfaces

Metadata

  • Abstract and Concrete Model Metadata
  • Defaults
  • Annotations
  • xml and web.xml
  • Best Practices and Pitfalls

Provider and Dispatch APIs

  • Stepping Down
  • The @WebServiceProvider Annotation
  • The ProviderInterface
  • Implementing a Provider
  • The @ServiceMode Annotation
  • JAXB Without WSDL
  • Integrating JAXP
  • The DispatchInterface
  • Building Clients

The SOAP with Attachments API for Java

  • The SAAJ Object Model
  • Parsing a SOAP Message
  • Reading Message Content
  • Working with Namespaces
  • Creating a Message
  • Setting Message Content
  • Relationship to the DOM

Message Handlers

  • Handling SOAP Headers
  • Handlers and Handler Chains
  • Configuration by XML or Annotation
  • MessageContext and SOAPMessageContext
  • Processing Model and Patterns
  • Logical and Protocol Handlers
  • Client-Side Handlers

Handling Binary Content

  • The WS-I Attachments Profile
  • Using base64Binary
  • MTOM and XOP
  • JAX-WS Support
  • Configuration by XML or Annotation
  • Client-Side Support
  • SAAJ Support