In the end I found my solution.
It just so happens that my value objects were incorrectly formed on the server
side. Hence, some properties were as arrays where the flex was expecting value
objects.
It took me a while to find out since the incorrect objects where deeply buried
in the object hierarchy but thanks to charles and the magic instruction return
(print_r($someObject, true)); I got everything working again.
--- In flexcoders@yahoogroups.com, valdhor valdhorli...@... wrote:
I return arrays of objects (Or just single objects) all the time although I
use WebORB instead of PHP.
What does Charles (http://www.charlesproxy.com) say? What does the PHP error
log show?
--- In flexcoders@yahoogroups.com, ouaqa abenefice@ wrote:
Hello all,
I've been stuck for a couple of days with a very weird error provoked by
AMFPhp.
My Flex client sends to the server a fairly complex value object.
This object is composed of basic attributes (string , int , ...) , value
object attributes and an array of value objects (also complex objects
).
I can perform any treatment on this object on the php side.
However, when I want to send the value object back, I get an
Unsupported Datatype: array error.
In order to simplify my explanations, let's say that this variable is
called $array.
I tested the following :
- gettype($array) returns array.
- I can return any properties of my array, either by $array[someIndex]
(returning the value object held at someIndex) or by
$array[someIndex][someValueObjectAttribute]
- I can use print_r and see the content of $array.
- I can create an array on the server side and return it (even if it
contains value objects).
I just tested to copy each value of $array in a temporary variable and
return it to the server but nothing different happened.
Any help would be appreciated, this is getting very very frustrating.