为什么我的 HTTP 资源没有在 Flex in a Week 教程系列中加载?
我正在学习 Adobe“一周使用 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
好的,对于以后发现这个问题的人; 这一切都源于缺少套接字策略文件,如果没有该文件,闪存运行时将无法从本地主机加载资源。 我最终安装了一个小型闪存策略守护进程,并设置 launchd 来提供它,以 inetd 风格。 以下是 Adobe 网站上的讨论: 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