Back in Chapter 9 we talked about building proxy services, which sit between client applications and other services. In that chapter, the back-end service with which the proxies communicated was located at http://mindstrm.com:8004/glue/urn:CorpDataServices. Let's do the same thing again, only this time we'll build our proxy service using the JAX-RPC reference implementation. This example allows us to see how JAX-RPC interoperates with GLUE, and gives us a chance to build both a service and a client using JAX-RPC.
 I'm assuming you've downloaded and installed the Java Web Services Developer Pack already, and verified that it is working properly.
The first step in building the service is to write a Java interface for it, which I'll call javasoap.book.ch11.services.IStockServiceProxy. This interface must implement the java.rmi.Remote interface because JAX-RPC makes use of the Java RMI package. This strategy is fairly common because Java RMI provides a good distributed computing abstraction. The methods in the interface should be defined to throw RemoteException, which also comes from the java.rmi package. We'll define one method, getStockQuote( ), which takes a string parameter for the stock symbol and returns an instance of javasoap.book.ch9.services.ProxyQuote. There's no need to create a new class for returning a quote; we've already done it in Chapter 9. Here's what the code looks like for the IStockServiceProxy interface:
package javasoap.book.ch11.services; ...