Main Page

Previous Section Next Section


So, why do you need JAX-RPC? And more important, what value do these APIs add to architects? Should developers stop writing RMI, RMI-IIOP, and JavaIDL/CORBA applications and discard code that consumed significant time and money, just because newer technology is available?

The answer is an obvious no. Those APIs are as integral a part of J2EE specifications as JAX-RPC is in J2EE 1.4.

JAX-RPC adds value only if you are sure you want to use SOAP, because it allows developers to write distributed and loosely coupled applications using this technology: distributed because the objects may not be colocated, and loosely coupled because the model inherently enforces a level of independence between the implementation and the calling code. As with all software, architects have to understand the tradeoffs in integration with existing and new applications, performance, bandwidth, and accessibility. However, there are possibly two major use cases where JAX-RPC API can be exploited.

The RMI Analogy

Just as in RMI developers write a remote interface, the implementation, and use the rmic compiler to generate the stubs and ties, you could write a service definition, the service implementation, and use a JAX-RPC tool (e.g., xrpcc) to generate the relevant JAX-RPC stubs, ties, and the WSDL file. The client could then use the WDSL file and stubs to invoke the service. This is something architects can do to expose existing business logic contained in RMI objects or EJBs as Web services.

The CORBA Analogy

J2SE has the idlj compiler that reads an IDL file and generates the Java bindings. Developers can do something similar with the JAX-RPC tools (e.g., xrpcc) and consume a WSDL file to generate the client, server, or both sides of the code, to serve as relevant adaptors for the servant code they write. This is something architects can do to implement a service that conforms to a given interface or consume an existing Web service on the JAX-RPC or on a completely different platform, such as Microsoft.NET.

This chapter was meant to give you an insight into JAX-RPC, an API that provides an invaluable standard for developers and architects who want to build XML-RPC based Web services.

Previous Section Next Section

JavaScript Editor Java Tutorials Free JavaScript Editor