Expand my Community achievements bar.

Webservice: Flex to CFC

Avatar

Level 2
Hi



I'm triing to send a complex Object (AS) from Flex to a
simple test Webservice CFC.

If I create an Object in ActionScript an send this to my
Webservice, the Object will not be received from the CFC ( return
String is "NO").



How can I send a complex Object to my CFC and read the
variables ?



Thx for any help.

Sonix



Code:



CFC:

<cffunction name="writeTimerChange" output="false"
access="remote" returntype="String">

<cfargument required="no" name="Gewinnzeit"
type="any">

<cfset ret = #isdefined("Gewinnzeit")#>

<cfreturn ret>

</cffunction>



AS:

public class Gewinnzeit {

public var ID:int;

public var timestamp:Date;

public var gewinnzahl:int;

public var count:int;

public var gewinner:String;

public var gewinnerID:int;

...

}





1 Reply

Avatar

Level 1
Can you post the mxml/as you are using to invoke the
webservice too. From what I can see here, what you are doing should
work. The AS Class should come into CF as a struct and back out as
a struct or generic AS Object() (if you returned it).



---nimer