|
Looks like a pretty test case for the new functionality. Thanks stas! I'll put it in after work and merge it into the next mini release. wade The fix provided is partial and works only if the function in php is not strongly typed like: and we pass a class A say : } now since the class mapping is not done on the server, the php function receives a stdClass and works. PHP starts complaining the passed argument is of type stdClass instead of A. The fix for this can be achieved if the Deserializer figures out the type (specified by the remote class alias on the Actionscript class) and then instantiates the correct type on the server side. The mapping works if the class in question (ARemote) exists or can be loaded. If it can not, then the mapping of course can not work. I tried your example and it worked for me just fine as soon as class ARemote is defined when server request is parsed. If you code does not work, please provide the full code. Find the files in the attached zip file. <br /> In your example, ARemoteClass is loaded too late - since requests are parsed before they are executed, when parsing the incoming packet the definition of ARemote class is not available. >>In your example, ARemoteClass is loaded too late If this is not supported can you provide a workaround for this scenario. Seems to be still questions about it, so reopening it to keep on my radar screen. It looks like it is the transfer object that you are having issues with and not the service. ZF-9809 should make this a lot easier. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||
I've changed the serializer methods so that they will return class name and not empty for unknown classes, unless the class is stdClass (which will be just Object).
Wade, if you could add test for that (I'm not sure how it's best to do it) that'd be great.