为什么我的 HTTP 资源没有在 Flex in a Week 教程系列中加载?

发布于 2024-07-26 16:00:49 字数 892 浏览 6 评论 0原文

我正在学习 Adob​​e“一周使用 Flex”视频培训系列,并且已经完成练习 9,该练习涉及创建远程服务呼叫。 到目前为止,数据源和图像都是本地资源(位于我的 Flash Builder 项目中的 src/assets 中)。

我通过以下方式访问房间列表:

<mx:HTTPService id="rooms" url="assets/roomList.xml" 
                fault="httpFaultHandler(event)"
                result="httpResultHandler(event)"/>

这是两个结果处理程序:

private function httpFaultHandler(event:FaultEvent):void{
    Alert.show("There was a problem","Error");
}

private function httpResultHandler(event:ResultEvent):void{
    roomList = event.result.rooms.room;
}

但是,当我在 blazeDS 容器中运行应用程序时,尽管运行应用程序后房间列表明显存在于部署目录中,但我没有得到任何房间:

$ find . -name roomList.xml
./tomcat/webapps/odt/adobeODT-debug/assets/roomList.xml

如何我可以调试此失败的原因吗? Flash Builder 工具使用的部署过程相当不透明,并且 tomcat 实例不会从 Flex 应用程序通告 404。 是否有需要打开某处或某处的日志记录?

I'm working though the Adobe "Flex in a Week" video training series, and I've reached Exercise 9, which deals with creating a remote service call. Up til this point, the data source and images have been local assets (located in src/assets in my Flash Builder project).

I access the room list by this:

<mx:HTTPService id="rooms" url="assets/roomList.xml" 
                fault="httpFaultHandler(event)"
                result="httpResultHandler(event)"/>

Here are the two result handlers:

private function httpFaultHandler(event:FaultEvent):void{
    Alert.show("There was a problem","Error");
}

private function httpResultHandler(event:ResultEvent):void{
    roomList = event.result.rooms.room;
}

However, when I run the application in the blazeDS container, I get no rooms despite the fact that the room list clearly exists in the deployment directory after running the application:

$ find . -name roomList.xml
./tomcat/webapps/odt/adobeODT-debug/assets/roomList.xml

How can I debug the reason for this failure? The deployment process used by the Flash Builder tool is fairly opaque, and the tomcat instance isn't advertising 404s from Flex apps. Is there logging somewhere, or something, that needs to be turned on?

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

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

发布评论

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

评论(1

旧人 2024-08-02 16:00:49

好的,对于以后发现这个问题的人; 这一切都源于缺少套接字策略文件,如果没有该文件,闪存运行时将无法从本地主机加载资源。 我最终安装了一个小型闪存策略守护进程,并设置 launchd 来提供它,以 inetd 风格。 以下是 Adob​​e 网站上的讨论: http://www.adobe.com /devnet/flashplayer/articles/fplayer9_security_07.html

Okay, for anyone who finds this problem in the future; it all stems from the lack of a socket policy file, without which the flash runtime will silently fail to load resources from the local host. I ended up installing a tiny flash policy daemon and setting launchd to provide it, inetd-style. Here's the discussion on the Adobe web site: http://www.adobe.com/devnet/flashplayer/articles/fplayer9_security_07.html

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