O'Reilly logo

Java™ Web Services Unleashed by Mark Wutka, Joseph Weber, Arthur Ryman, K. Scott Morrison, Benoît Marchal, Matthias Kloppmann, Steven Haines, Darren Govoni, Francisco Curbera, Frank Cohen, Robert Brunner

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

Service Mapping

The second goal of JAX-RPC is to simplify writing SOAP nodes and SOAP clients. As you saw in Chapter 7, writing nodes may not be difficult with a library such as Apache SOAP. The clients, though, require more work.

Mapping Services to Java

As of version 0.6, JAX-RPC maps WSDL services as Java classes that extend javax.xml.rpc.Service. Service is a new interface that is equivalent to the wsdl:service tag.

Service offers a few generic methods to retrieve a service port and create Call objects (more on call objects in the next section).

The generated service interface takes this form:

 public interface <ServiceName> extends javax.xml.rpc.Service { public <ServiceDefInterface> get<Name of the wsdl:port>() throws JAXRPCException; // ...

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