Home

This Chapter
-Chapter 12: Web Services
-Web Service Annotations
-A Web Service Example
-Summary

Table of Contents
-Introduction
-Chapter 1: Core Libraries
-Chapter 2: Dynamic Compilation
-Chapter 3: Scripting
-Chapter 4: Networking
-Chapter 5: Swing Updates
-Chapter 6: Abstract Window Toolkit
-Chapter 7: Internationalization
-Chapter 8: Java Database Connectivity 4.0
-Chapter 9: XML Digital Signature API
-Chapter 10: Streaming API for XML
-Chapter 11: Java Architecture for XML Binding
-Chapter 12: Web Services
-Chapter 13: JavaBeans Activation Framework
-Chapter 14: User-Defined MXBeans
-Chapter 15: Concurrency Updates
-Appendix A: Enums
-Appendix B: Generics
-Appendix C: Annotations

Previous
Next

 

Chapter 12

Web Services

Mustang includes the reference implementations for web services-related APIs, particularly Java API for XML-based Web Services (JAX-WS) 2.0, which is specified in JSR 224 (http://jcp.org/en/jsr/detail?id-224), and Web Services Metadata for the Java Platform (JSR 181, http://jcp.org/en/jsr/detail?id-181). Together the two APIs define the web services stack that makes developing Java Web Services easier than ever.

JAX-WS 2.0 is the next version of JAX-RPC 1.0 (JAX-RPC 2.0 was renamed JAX-WS 2.0) with the former a conspicuously much better technology than the latter. JAX-RPC 1.0 was overly complex a technology to build Java web services, If you’ve done web service programming using this API, you must still remember how painful the process was, like riding bareback. It’s not surprising that JAX-RPC 1.0 was less appealing than competing alternatives such as Apache Axis. Meanwhile JAX-WS 2.0 easily wins approval among Java programmers and is a welcome upgrade to JAX-RPC 1.0.

While JAX-WS 2.0 defines the Java to XML/WSDL mapping (it employs JAXB 2.0 for its data binding operations), ease of development comes from the annotations defined in JSR 181. In truth, these annotations are what make JAX-WS 2.0 much simpler and more powerful than its predecessor. In addition, JAX-WS 2.0 supports both SOAP 1.1 and SOAP 1.2, as opposed to JAX-RPC 1.0’s support for SOAP 1.1 alone. Publishing, too, can never be easier with JAX-WS 2.0, thanks to a light-weight HTTP server to which you can publish your web services and make them available in less than a minute.

This chapter shows you how to build a web service with these web services technologies included in Mustang.

Previous
Next