views:

599

answers:

1

Can I get the response headers from a RemoteObject request? If so, how?

I am in the process of writing an application in Flex 3.3, using the Cairngorm framework, for deployment as an AIR application. The application heavily utilizes RemoteObject services to get data from a web server.

Each of my service delegates extends a common class which provides a method for calling service methods on the RemoteObject.

So, where I previously used

ServiceLocator.getInstance().getRemoteObject('myService').myOperation.send();

I instead use

this.send('myOperation', 'myService');

I use this method instead of calling the RemoteObject operations directly because this method adds another, global, responder to the operation call. This extra responder analyses data in the headers of reponse from the server.

Or at least it should -- this is where the problem is. In the result data (event as mx.rpc.events.ResultEvent) the headers property is always null despite the headers definitely being sent from the server.

Thanks

A: 

Unfortunately response headers are available only for URLLoader and only when using it in an AIR application:

http://stackoverflow.com/questions/185761/access-http-response-headers-in-for-flash-net-urlloader-object

radekg