O'Reilly logo

Java Enterprise in a Nutshell, Third Edition by William Crawford, Jim Farley

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Java Web Services

There are several standard APIs for implementing and using web services in Java. The principal ones we’ll discuss here are the Java API for XML Remote Procedure Calls (JAX-RPC), the SOAP with Attachments API for Java (SAAJ), and the Web Services for J2EE specification. JAX-RPC and SAAJ are APIs aimed at helping you develop both web services and web service clients. These web service clients might be standalone Java applications or code running within a J2EE application (e.g., JSP or servlet web components, EJBs, etc). The Web Services for J2EE specification describes a standard approach for the packaging and deployment of web services.

Relative to the standard web service protocols discussed earlier (SOAP, WSDL, etc.), JAX-RPC and SAAJ together provide a standard Java framework for consuming SOAP messages from web services and for generating SOAP messages and delivering them to web services. In a sense, you can think of JAX-RPC and SAAJ as being in the same category as other remote object APIs in Java, such as RMI and the Java bindings of CORBA. The web service APIs in Java use a different set of protocols to accomplish their remote object and messaging services.

Mapping SOAP and WSDL to Java

JAX-RPC provides more than just an API for consuming and producing web services. It also defines standard mappings from SOAP and WSDL entities to Java entities and back again. This is a very important asset, since it makes it clear how various web service data types will be ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required