SOAP, the underlying protocol used in Web Services, is complex to use in applications. Hence, as a part of the Web Services support, Java introduced the Java API for XML-based RPC (JAX-RPC). JAX-RPC provides a simple, easy to use remote procedure calling API for accessing and defining Web Services. WebLogic Server 7.0 uses JAX-RPC API for its remote procedural communication. The Java API for XML-based Remote Procedural Calls (JAX-RPC) is similar in concept to RMI. It is basically used to communicate over the Web using SOAP messages over the HTTP protocol. JAX-RPC enables writing applications in the Java programming language and uses XML to make remote procedural calls. JAX-RPC differs from Java IDL and RMI (which have similar methods for marshalling and unmarshalling arguments to transmit and receive messages) in its XML-based nature. However, the client does not need to work with XML or do any direct mapping. This is internally taken care of by JAX-RPC. WSDL forms the endpoints of the communication channel between a client and the Web Services. JAX-RPC does the job of making a Java interface from the WSDL, and a WSDL from a Java interface, thus helping in communication. Figure 22.3 shows the basic architecture of a JAX-RPC environment. Figure 22.3. RPC calls in a JAX-RPC architecture.JAX-RPC supports both Java and non-Java services. It also provides the client-side method invocation and dynamic-method invocation when considered from a client perspective. JAX-RPC is built on top of SOAP. Hence, for example, a Web Service based on JAX-RPC consumes SOAP requests and produces SOAP responses. Similarly, a Java application that needs to access or invoke Web Services can use the JAX-RPC API. Limitations of JAX-RPCTake a look at some of the limitations of the JAX-RPC API:
|