views:

46

answers:

1

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?

A: 

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

Chris R