JAX-WS RPC (Remote Procedure Call)
Remote procedure call (RPC) is a protocol that helps one program to request service from another program located in another computer in a network. In this method, processes that are communicating does not need to understand network details because RPC takes care of that. RPC is similar to the IPC (Inter Process Communication).
Java RPC is referred under the JAX-WS. It is for SOAP web services. JAX-WS (SOAP) is one of the main API’s defined by Java for developing web service applications since JavaEE 6.
Java RPC is not a one-way flow and it uses a request-response style of interaction for communication (client-server style). RPC is best suited for Local area networks.
In RPC, simply what happens is, there is a client and server — so the client machine contains some methods and the server has the implementation of those methods. So when the client needs to get something done, it makes a request to the server. Then the server is executing those methods and returns the result to the client machine. Then the client machine will display the result.
This is an example of java code to explain the RPC concept.
Characteristics of RPC
- Parameters are passed only by values.
- Synchronous
Examples for RPC
- Java RMI (Remote Method Invocation)
- CORBA (Common Object Request Broker)