PDA

View Full Version : webService + remoteObject + complex object


ljonny18
10-31-2006, 12:13 PM
Hi – I don’t know if this is the right forum to post this question – so I apologise in advance if not

Basically I am trying to pass an object to a ColdFusion “.cfc” using a webService.

The object is a “complex” object containing various variables but additionally a few arrays…..
When the object is passed to the CFC is accepts it as a struct (which is what I have done in the past and seems to work fine….) although in this case in kicks off throwing out errors that it does not like the object…

If the object was a “simple” object (ie without the arrays) then there are no errors and the CFC accepts it.

From what I can work out, the CFC webService cannot handle complex objects, only simple ones…
If this is the case (which I am hoping is not) a solution to this would be to “flatten” and loop through the arrays within the object – which would be a long-winded and untidy solution!

Firstly, is this the case… or am I completely wrong and my CFC can support complex objects???

Secondly, is there another option to my solution – i.e. can I use an alternative like a remoteObject – or will this be the same???


And help is much appreciated on this one,
Thanks,
Jon.

NUMB-LOCK
10-31-2006, 11:52 PM
I'm also trying to figure out how to send complex objects to a webservice. Can you post the errors you are getting? As for using a remoteObject, this can make life easier when passing complex objects (what I've read in the dev guide), however, it requires Flex Data Services (FDS).

ljonny18
11-02-2006, 07:48 AM
yes, I will post my errors - but bare with me for the moment, as I am having some over areas that need resolving before I can get back to my webService problem ;)

Jon.