Section 12.1. What s Covered Here?


12.1. What's Covered Here?

There have been a few generations of "web services" over the years. XML-RPC was arguably the first XML-based services scheme that was used widely, and it is still available today in various programming environments. More recently, a standard set of protocols for XML-based services has been defined and adopted by the software community. The primary protocol in this family is the Simple Object Access Protocol (SOAP).

In this chapter, we cover the standard APIs used in Java for implementing and using SOAP-based web services. These include the Java API for XML-based RPC (JAX-RPC) and the SOAP with Attachments API for Java (SAAJ). We will cover the versions included in the J2EE 1.4 specification, and that translates to JAX-RPC Version 1.1 and SAAJ Version 1.2.

We will also be discussing the Web Services for J2EE specification, Version 1.1. This API is also required in J2EE 1.4 servers and defines a standard deployment model for web services within a J2EE environment.

This chapter begins with a general overview of web services and the SOAP and Web Service Descriptor Language (WSDL) protocols that modern-day web services use predominantly. The bulk of the chapter, though, discusses how to build web services and web service clients in the Java/J2EE framework. The examples cover both the standard J2EE approaches to web services (in terms of APIs, tools, and deployment procedures) as well as the somewhat nonstandard but very popular Axis web service engine. We've tested the examples discussed in this chapter using both Axis 1.2, the Apache open source implementation of the JAX-RPC and SAAJ APIs, and the JBossWS engine bundled in the JBoss 4.0 application server. Both of these web service engines support the JAX-RPC and SAAJ APIs, but Axis implements a legacy, nonstandard deployment process for web services while JBossWS implements the newer, standardized deployment process specified in the Web Services for J2EE specification. In addition, the two engines use slightly different tools for managing the web service development process. We demonstrate both here, rather than picking one, because while Axis remains a popular web service engine, the standard web service deployment scheme is the presumed direction forward and makes for more portable Java-based web services. We also discuss both engines because contrasting the two deployment schemes highlights the basic issues with web service deployment in a Java environment and will help you to more easily navigate some other Java web service environments if the need arises.

This chapter focuses primarily on developing, deploying, and using web services in your enterprise applications. For additional relevant details, you may want to refer to Appendix A, where we provide details on the deployment descriptors for JAX-RPC web services, as well as Chapter 21, where we discuss code annotation facilities that can be used to automatically generate these deployment descriptors, as well as actual source code, for web services.



Java Enterprise in a Nutshell
Java Enterprise in a Nutshell (In a Nutshell (OReilly))
ISBN: 0596101422
EAN: 2147483647
Year: 2004
Pages: 269

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net