Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I send a GWT-RPC request with HttpClient?

I am using the Apache HTTPClient API to send HTTPRequests, and so far it's worked with standard requests. Now I want to send a GWT-RPC request and show the response, but I always receive the following error from the GWT-RPC server:

 //EX[2,1,"com.google.gwt.user.client.rpc.IncompatibleRemoteServiceException/3936916533","This application is out of date, please click the refresh button on your browser. ( Malformed or old RPC message received - expecting version 5 )"],0,5]

Actually, I have to send the following data with the request:

5|0|5|http://172.16.103.244:38081/kunagi/scrum.ScrumGwtApplication/|6E611C647A0C98D5A31A2506E16D81D6|scrum.client.ScrumService|startConversation|I|1|2|3|4|1|5|-1|

but I don't know how.

When I retrieve the request code from FireBug, I find the above data as a source in the post area.

like image 963
AYADI Akrem Avatar asked Nov 04 '22 14:11

AYADI Akrem


1 Answers

Take a look at the gwt-syncproxy project. It does exactly what you are looking for, faking RCP calls from Java code. If you don't want to rely your project on gwt-syncproxy, you could look at it's implementation and find out how the create valid requests.

like image 180
Adrian B. Avatar answered Nov 15 '22 06:11

Adrian B.