I'm having a problem with some flex code I'm hoping I can get
some help with. It's related to batching of requests and responses.
mdickson:
I set up the connection programmatically
(channels, channelsets, etc) like so:
// Create the AMF Channel and ChannelSet and add our
channel to it.
var channel:AMFChannel = new AMFChannel( "pyamf-channel",
"http://"+hostname+":"+port);
var channels:ChannelSet = new ChannelSet();
channels.addChannel( channel );
// Create a new remote object and add listener(s)
remoteObj = new RemoteObject("server");
remoteObj.channelSet = channels;
remoteObj.addEventListener("fault", onFault);
remoteObj.get_all.addEventListener("result", getAllResult);
remoteObj.get_power_state.addEventListener("result",
getPowerStateResult);
remoteObj.get_server_name.addEventListener("result",
getServerNameResult);
remoteObj.get_health.addEventListener("result",
getHealthResult);
remoteObj.get_all();
If I then call 3 remote methods in succession the result handlers in my
flash code never get called. But if I purposefully sequence them by calling the new method
in the previous result handler they work. That is:
private function getAllResult(re:ResultEvent) : void
{
var ids:Array = re.result as Array;
if(ids.length > 0)
{
uuid = ids[0];
remoteObj.get_server_name(uuid);
remoteObj.get_power_state(uuid);
remoteObj.get_health(uuid);
}
}
Doesn't fly. But calling just get_server_name() and then in the
getServerNameResult method calling get_power_state() and so on works...
Is there some option or issue with request batching I need to
address? I can see the stuff come and go on the python side. I'm using
the 3.3 Flex sdk fwiw with FlexBuilder. The python code is just using
the WSGI gateway. Honestly I don't think the issue is in the server.
More likely its sending something back the client doesn't like... Any
help or pointers are greatly appreciated.
BTW, thanks for all the great work that's gone into PyAMF. It's way
cool!
Mike
_______________________________________________
PyAMF users mailing list -
users@...
http://lists.pyamf.org/mailman/listinfo/users