Main Page

Previous Section Next Section

Chapter 10: JAX-RPC


Java API for XML-based RPC (JAX-RPC) is intended to be a Java API to expose remote procedure calls that use XML to business applications that occur primarily, though not exclusively, on the periphery of organizations. The need for such synchronous API increases as corporations begin to communicate with other business partners using disparate hardware and software systems.

Remote procedure call (RPC) has been around for a while, with many implementations. It essentially enables clients to work with remote procedures, or routines, that reside on different machines just as if the procedures were executed locally. In its simplest form, a client calls a procedure, with the name of the procedure and the arguments; the server does something useful and sends the results back to the client.

Allowing different machines or processes in different address spaces to communicate with each other isn't really a new concept. The Java RMI and CORBA models are good examples of RPC that allows objects to marshal arguments, invoke a procedure or method on an object residing on a different machine, unmarshal the results, and use them.

An almost infinite number of data formats is possible for the arguments and results. As more and more Java applications expose themselves to interoperate and move toward a Web-service-based paradigm, XML is the new choice for this data format. JAX-RPC facilitates the invocation of remote procedures, using XML as the data format and SOAP as the data protocol.

SOAP defines the XML-based protocol for exchange of information in a distributed environment, specifying the envelope structure, encoding rules, and a convention for representing remote procedure calls and responses. JAX-RPC provides a Java API for developers to invoke remote procedure calls, by abstracting and hiding the low-level SOAP semantics associated with RPC from applications.

Previous Section Next Section

JavaScript Editor Java Tutorials Free JavaScript Editor . Bitcoin Gambling Site