This examples describes the procedure of retrieving message from the server via RPC. The steps involved in geting message from the server are described below:-
Step1:-Right-click on the GWT project node which
you have created and choose New > Other. In the New File wizard, click on the Google Web Toolkit category shows a file template named GWT RPC
Service. Click Next.
Step2:- Fill the sub package box, the name of the package where the files that will be generated will be stored.
Step3:-Click Finish. The Projects window will automatically updates to reflect changes
Step4:- Create the following Classes.
GWTService.java:- This is the client-side definition of the service.
|
GWTServiceAsync.java:-This is the client side definition. It provides a callback object that enables the asynchronous communication between server and client.
|
GWTServiceImpl.java:-This is the servlet that implements the interface. it provides the functionality for retrieving a quote via RPC.
|
GWTServiceUsageExample.java:-This is the interface that will instantiates the service.
|
Step4:-Change the entry point of class MainEntryPoint.java.Modify the onModuleLoad() method of the class to the following :-
|
Step6:-In the Projects window, right-click the project node and choose Run.
Output of the program


If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.
Ask Questions? Discuss: Getting message from the server using RPC( Remote Procedure Call ) View All Comments
Post your Comment