Question

I'm implementing AMF service methods for an flash front-end. Normally things work fine, but we've found that if two methods are called one right after the other, the second call returns null to the flash front-end even though the method actually completes successfully on the PHP end (to verify this, I dump the return data to a file right before I return it).

Has anyone had this behavior before? Is it some setting with ZendAMF?

Was it helpful?

Solution 3

It actually turns out the flash side was using the same connection for two function calls. Making separate connections for each call has solved the problem.

OTHER TIPS

Maybe wait a confirmation that the first method was finished before call the second ?

I use ZendAMF too. I have noticed that if one call fails, it will trigger a failure message for any other batched calls (Async tokens can be used to get around this).

I would try sending each call one at a time and finding out which one is failing if there is one. Personally, I use a software called Charles which is and HTTPProxy that allows me to see the contents and error messages of any AMF calls I perform. You could also use wireshark, either way you would be able to see the exact request sent, and any error messages that are being thrown by your backend.

Are you using any transactions in your code (like Doctrine ), sometimes the code will pass test and write out correctly, but choke when the transaction gets closed and end up throwing an error.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top