Hi,
I'm trying to send a very simple object from flash to coldfusion with remote :
These are my object and my remote-actionscript-lines:
_global.GFSGeneralData_Object.MainTitle = "Title";
_global.GFSGeneralData_Object.SubTitle = "SubTitle";
function HandleIncomGFSData_Result(result) {
trace("in result :"+result);
}
trace("GFSUploadService makes contact with my COLDFUSION-component with the
method: AddGFStoDB");
GFSUploadService.AddGFStoDB(_global.GFSGeneralData_Object);
I left the initilisation of the remote-gateway to the CFComponent. That part
works(see below)
This is the inportant part of my COLDFUSION-component :
<cffunction
name="AddGFStoDB"
access="remote"
returntype="string">
<cfargument name = "TitleObject"
type="struct"
required="yes" >
<cfset myResult = TitleObject>
<cfreturn myResult>
</cffunction>
If I change the type of the incoming argument to "string" and send a string,
instead of my object, from Flash than everyting works properly. This proves I
have contact with the server, the argument is recieved AND send back.
However changing it back to "struct" and sending the object gives an error :
It says that the required argument isn't passed to the server.
What I'm I doing wrong?
fMidget - 05 Aug 2004 20:50 GMT
This is a little silly, but I have never been able tos end ActionScript objects
to ColdFusion via remoting, but I can send arrays...and I can send arrays that
contain ActionScript objects...
var pointlessArray = [ _global.GFSGeneralData_Object ]
GFSUploadService.AddGFStoDB(pointlessArray );
Then of course you have to recieve it as an array in your cold fusion, but you
can target it's first item as an object and it will be intact.
melo-mel - 20 Aug 2004 20:02 GMT
Ditto, and still no response from Macromedia?