Java Web Services Training Duration: 5 days Class Overview A comprehensive look at the state of the art in developing interoperable web services on the Java EE 6 platform. Students learn the key standards -- SOAP, WSDL, and the WS-I Basic Profile -- and the Java architecture that has evolved to build interoperable services and clients. We begin with an introductory module that covers both SOAP-based and RESTful services, and therefore both JAX-WS and JAX-RS. But JAX-WS is central to the course, and we cover both WSDL-driven and Java-driven development paths, as well as message handlers and attachment support. With the new Provider and Dispatch APIs, it's now much easier to integrate SAAJ, JAXB, and JAXP code into services and clients, and we explore these strategies in depth as well. Class Goals Be able to describe the interoperable web services architecture, including the roles of SOAP and WSDL in component-based services and XML and HTTP in the REST architecture. Understand the importance of the WS-I Basic Profile for interoperable web services. Build JAX-WS services and clients that take full advantage of the automated data binding of JAXB. Build WSDL-to-Java and Java-to-WSDL services, with equal facility. Apply advanced techniques and best practices including proper exception handling, care around possibe polymorphism, and use of context and lifecycle services. Use lower-level SOAP and XML APIs for services and/or clients. Customize data binding by specifying specific type mappings or altering method or parameter names. Incorporate binary data, such as images, into service and client code. Class Outline 1. Overview of Web Services A. Why Web Services? B. Service-Oriented Architecture C. HTTP and XML D. SOAP E. WSDL F. The SOAP Vision G. The REST Vision
H. UDDI I. The WS-I Basic Profile J. Security 2. Web Services for Java EE. Hosting Web Services: Scenarios A. Web Services for Java EE B. JAX-WS and JAXB C. Web-Services Metadata D. WSDL-to-Java and Java-to-WSDL Paths E. Provider and Dispatch APIs F. SAAJ and JAXP G. JAX-RS for RESTful Services H. JAXR 3. The Java API for XML Binding. The Need for Data Binding A. XML Schema B. Two Paths C. JAXB Compilation D. Mapping Schema Types to Java E. Java-to-XML Mapping Using Annotations F. Marshaling and Unmarshaling G. Working with JAXB Object Models 4. The Simple Object Access Protocol. Messaging Model A. Namespaces B. SOAP over HTTP C. The SOAP Envelope D. The Message Header E. The Message Body F. SOAP Faults G. Attachments 5. Web Services Description Language. Web Services as Component-Based Software A. The Need for an IDL B. Web Services Description Language C. WSDL Information Model D. The Abstract Model -- Service Semantics E. Message Description
F. Messaging Styles G. The Concrete Model -- Ports, Services, Locations H. Extending WSDL -- Bindings I. Service Description 6. The Java API for XML-Based Web Services. Two Paths A. How It Works: Build Time and Runtime B. The Service Endpoint Interface C. Working from WSDL D. Working from Java E. RPC and Document Styles F. One-Way Messaging G. Binary Protocols 7. WSDL-to-Java Development. The @WebService Annotation A. Generated Code B. Scope of Code Generation C. Parameter Order D. More JAXB: Mapping Collections E. More JAXB: Mapping Enumerations F. Applying JAXB Customizations 8. Client-Side Development. Stubs and Proxies A. Generated Code B. Locating a Service C. Invoking a Service D. The @WebServiceRef Annotation 9. Java-to-WSDL Development. Generating the WSDL and Schema A. The @WebMethod, @XmlParam, and Related Annotations B. More JAXB: Mapping Inheritance C. Controlling the XML Model D. Controlling the WSDL Description E. JAXB Customizations with @XmlJavaTypeAdapter 10. Exception Handling. SOAP Faults vs. Java Exceptions A. Mapping Faults from WSDL
B. Mapping Exceptions from Java C. JAX-WS Exception API and Handling D. Client Exception Handling 11. JAX-WS Best Practices. Which Way to Go? A. Interoperability Impact B. Portability Impact C. Polymorphism in Web Services D. Web Services as Java EE Components E. Lifecycle Annotations F. Context Interfaces 12. Metadata. Abstract and Concrete Model Metadata A. Defaults B. Annotations C. webservices.xml and web.xml D. Best Practices and Pitfalls 13. Provider and Dispatch APIs. Stepping Down A. The @WebServiceProvider Annotation B. The Provider<T> Interface C. Implementing a Provider D. The @ServiceMode Annotation E. JAXB Without WSDL F. Integrating JAXP G. The Dispatch<T> Interface H. Building Clients 14. The SOAP with Attachments API for Java. The SAAJ Object Model A. Parsing a SOAP Message B. Reading Message Content C. Working with Namespaces D. Creating a Message E. Setting Message Content F. Relationship to the DOM 15. Message Handlers. Handling SOAP Headers
A. Handlers and Handler Chains B. Configuration by XML or Annotation C. MessageContext and SOAPMessageContext D. Processing Model and Patterns E. Logical and Protocol Handlers F. Client-Side Handlers 16. Handling Binary Content. The WS-I Attachments Profile A. Using base64binary B. MTOM and XOP C. JAX-WS Support D. Configuration by XML or Annotation E. Client-Side Support F. SAAJ Support Please note that this content is meant to be a guideline. Class material is subject to change and may be presented in a slightly different format than listed.