16.2. Publishing a Web Service with JAX-RPC

As with RMI, JAX-RPC services use a Java interface to describe the interface available to remote callers. The first step in creating our JAX-RPC Web Service is to create this interface. Like RMI interfaces, JAX-RPC interfaces extend java.rmi.Remote, and methods within the interface can each throw java.rmi.RemoteException. Because of these common requirements, and just a general desire for code reuse, we'd like to use the same interface we created for the RMI version of the application (see Chapter 15). As it turns out, there are a few things that prevent us from doing this. Although it would be possible to design an interface that worked equally well with either RMI or JAX-RPC, our current interface ...

Get J2EE™ and JAX™: Developing Web Applications and Web Services now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.