About JAX-RPC Web Services
See Also
Java API for XML-based RPC (JAX-RPC) is the initial version of
Java web service support.
If you are programming according to the Java EE 5 specification, use
JAX-WS instead.
JAX-RPC web services come in two styles, document-style and RPC-style:
- Document-style. The client interacts with the web service using
documents that are meant to be processed as complete entities. These documents
typically take the form of XML, which is defined by a commonly agreed upon schema
between the service provider and its client. It is also possible that the document
exchanged in such an interaction could be in a format other than XML (such as
encrypted files); however, the value of agreeing on a XML schema is to facilitate
interoperability. In other words, the document represents a complete unit of
information and may be completely self-describing.
If the following statements are true for your application, you should
probably create a document-style web service:
- The client interacts asynchronously with the web service, so that immediate responses
are not expected.
- The web service is data-oriented, not process-oriented.
- RPC-style. The client interacts with the web service using
operations exposed by the web service. The web service is viewed by the client as a single logical
application or component with encapsulated data, where the WSDL described
by the publicly-published interface and the XML in the SOAP messages exchanged
is formatted to map to the discrete operations published by that application.
In fact, the messages directly map onto input and output parameters of the
procedure calls or operations. Typically, such invocations occur over a synchronous
transport protocol like HTTP, where the SOAP request and response is piggybacked
on the protocol-level request-and-response, respectively, to form synchronous
request-response interaction patterns.
For example, a RPC-style web service can implement a payment service that accepts
payments and returns a status, or a stock quote service that accepts a ticker
symbol and returns the current quote in the HTTP response.
If the following statements are true for your application, you should
probably create a RPC-style web service:
- The web service client requires an immediate response, in a synchronous fashion.
- The web service is process-oriented, not data-oriented.
- See Also
- About Web Service Clients
- About Web Service Support in the IDE
Legal Notices