如何使用 HttpClient 发送 GWT-RPC 请求?

发布于 2024-12-05 03:24:06 字数 661 浏览 0 评论 0原文

我正在使用 Apache HTTPClient API 发送 HTTPRequest,到目前为止它可以处理标准请求。现在我想发送 GWT-RPC 请求并显示响应,但我总是从 GWT-RPC 服务器收到以下错误:

 //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]

实际上,我必须随请求发送以下数据:

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|

但我不知道如何。

当我从 FireBug 检索请求代码时,我在帖子区域中找到了上述数据作为来源。

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

弥枳 2024-12-12 03:24:07

查看 gwt-syncproxy 项目。它完全符合您的要求,从 Java 代码中伪造 RCP 调用。如果您不想让您的项目依赖于 gwt-syncproxy,您可以查看了解它的实现并了解如何创建有效的请求。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文