Remote Procedure Call (RPC) with java

Prarthanawickramarathne1
2 min readJul 17, 2020

--

Introduction:

Remote Procedure Call (RPC) is a protocol that one program can use to request a service from a program located in another computer on a network without having to understand the network’s details. RPC is used to call other processes on the remote systems like a local system. A procedure call is also sometimes known as a function call or a subroutine call. This is similar in many respects to Inter process communication and mainly focus on message based communication schema.

Here is an example code:

There are 04 java files in this project and 03 files for server side and 01 file for client side.

Server side:

01. HiJava.java(Interface)

02. ImplementHi.java

03. publisher.java

Client side:

01. Client.java

HiJava.java (Interface)

Figure1:HiJava.java

ImplementHi.java

Figure2:ImplementHi.java

publisher.java

Figure3:publisher.java

After running the publisher code, you can see the generated WSDL file by visiting the URL:

http://localhost:7780/ws/hello?wsdl

Client.java

Figure4:Client.java

Output:

Figure5:output

--

--

Prarthanawickramarathne1
Prarthanawickramarathne1

Written by Prarthanawickramarathne1

Undergratuate Software Engineering Student in university of Kelaniya

No responses yet