Flex 4 前端连接到 Java Jersey Web 服务

发布于 2024-09-03 00:01:37 字数 704 浏览 1 评论 0原文

我使用 Jersey 创建了一个 Java REST 服务。我使用了三个 HTTP“动词”GET、POST 和 DELETE。我想为该服务创建几个原型前端。经过大量研究(从 2008 年到 2009 年),我一直无法找到任何简单的东西。

我的三个选择是:

1)resthttpservice。这个项目已经一年没有更新了。唯一的活动是单个用户实施的一次性建议。

http://code.google.com/p/resthttpservice/

2) 创建 AIR应用。这并非不可行。

3)编写我自己的套接字级代码,但闪存播放器存在安全限制,我需要实现策略服务器。

我已经阅读了有关使用 Flex 进行 REST 服务是否值得的问题。该信息也很旧。我想向我的公司引入 REST 服务,但 Flex 对 HTTP PUT 和 DELETE 的有限支持令人沮丧。我的服务还使用 Accept 标头来确定是将 JSON 还是 XML 返回给客户端。如果不进行套接字编程,我似乎无法更改 HTTP 标头。我对此表示同意,但安全策略的事情很烦人。

有没有一种简单的方法可以将 Flex 4 与使用 PUT/DELETE 和 Accept HTTP 标头的 RESTful 服务结合使用?

请帮忙。我很沮丧。

I created a Java REST service using Jersey. I use three of the HTTP "verbs" GET, POST and DELETE. I want to create several prototype front ends for the service. After much research, a lot dating to 2008 and 2009, I have been unable to find anything remotely simple.

My three options are:

1) resthttpservice. This project hasn't been updated in a year. The only activity are one off suggestions that individual users have implemented.

http://code.google.com/p/resthttpservice/

2) Create an AIR application. This isn't unfeasible.

3) Writing my own socket level code but there is a security restriction with flash players and I need to implement a policy server.

I have already read the question posted about asking whether using Flex for REST services were worth it. That information is old as well. I want to introduce REST services to my company but Flex's limited support for HTTP PUT and DELETE are discouraging. My service also uses the Accept header to determine if JSON or XML will be returned to the client. I can't seem to change HTTP headers without doing socket programming. I'm fine with that but the security policy thing is annoying.

Is there an easy way to use Flex 4 with RESTful services that uses PUT/DELETE and the Accept HTTP header?

Please help. I'm very frustrated.

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

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

发布评论

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

评论(1

浅笑依然 2024-09-10 00:01:37

我建议使用 BlazeDS 作为代理。另请阅读 stackoverflow 中的讨论

I would suggest using BlazeDS as a proxy. Also read this discussion from stackoverflow.

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