| Sign In/My Account | View Cart |
In my prior articles, I've introduced and discussed various aspects of the JAX Pack, a set of APIs for working with Web services and the underlying supporting protocols. In this article, we'll look at JAX-RPC, a specification for making remote procedure calls via XML and SOAP over HTTP. Specifically we'll look at the client side of JAX-RPC, as it shows the most promise.
Everyone has heard the old adage "the more things change, the more they stay the same." Well, with JAX-RPC (the Java API for XML-based RPC), the adage comes true once more. JAX-RPC, while a cool way to expose Web services' functionality to Java as if they were local calls, is really just another instance of Remote Method Invocation (RMI).
For those unfamilar with RMI, a quick review is in order. Figure 1 shows a traditional development model, where client applications access an API to perform some function. Nothing unusual happens; the application is compiled against the API and at runtme, the OS directs the client call to the appropriate library and it's handled normally.
|
|
Figure 2 shows the RMI model, where the client still makes what appears to be a local call. Actually, the call is handled by a stub that looks like the API call, but in fact the stub redirects the call to a remote server that provides the service. The call is then made to a remote skeleton that makes the call on the remote object. The result of the call is then returned in a similar fashion.
Specifically, an RMI call works as follows:
|
|
JAX-RPC, for all practical purposes, extends this model to Web services and, as we will see shortly, allows Java applications to call Web services as if they were local calls. In fact, JAX-RPC calls look very much like their RMI cousins. As shown in Figure 3, the JAX-RPC model is identical to the RPC model shown in Figure 2, except for the introduction of Web services. Of course, there is a single, incredibly important difference between JAX-RPC and historic RMI -- JAX-RPC can be used to access non-Java Web services!
|
|
JAX-RPC provides support for three different services:
From a client perspective, JAX-RPC provides two specific mechanisms for invoking Web services:
From a building blocks perspective, JAX-RPC provides two specific mechanisms for binding functionality to Web services:
In a nutshell, JAX-RPC provides the ability to generate WSDL from a Java interface and a Java interface from WSDL -- and, of course, the ability to generate the client-side stubs!
|
JSR-101 |
The spring release of the Java XML Pack contains Early Access Release 2 of JAX-RPC. While the JAX-RPC specification has not completed its review, you can download an early access edition. Additionally, BEA's WebLogic Server 7.0 beta includes support for JAX-RPC.
Pages: 1, 2 |