| This Chapter | |
| - | Chapter 12: Web Services |
| - | Web Service Annotations |
| - | A Web Service Example |
| - | Summary |
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.