Just as a note I got this to work, after much much trial error. I am posting this just for comments/feedback.
Thanks for all of the help.
Cheers.
----------------------------------------------------------------------------
----------------------------------------------------------------------------
Flex side has:
[Bindable]
public var localUser:UserObj=new UserObj();
private var wsUsers:WebService = new mx.rpc.soap.WebService();
and I was trying to call it as:
wsUsers.updateUser(localUser);
This was just throwing Error #2032.
----------------------------------------------------------------------------
-----
Key was this on the CFC:
<CFFUNCTION NAME="updateUser" ACCESS="remote" RETURNTYPE="string"
OUTPUT="false">
<cfargument name="user" required="yes" type="UserObj">
...
<CFRETURN "OK">
</CFFUNCTION>
had to create a CFC "ValueObject" called UserObj:
<cfcomponent output="false">
<cfproperty name="userID" type="numeric" default="0">
<cfproperty name="firstName" type="string" default="">
<cfproperty name="lastName" type="string" default="">
<cfproperty name="login" type="string" default="">
<cfproperty name="email" type="string" default="">
<cfproperty name="enterDate" type="date" default="">
<cfproperty name="loginLastDate" type="date" default="">
<cfproperty name="loginCount" type="numeric" default="0">
<cfproperty name="badgeID" type="string" default="">
<cfproperty name="lastScreenRes" type="string" default="">
<cfproperty name="loggedInDate" type="date" default="">
<cfproperty name="rights" type="struct" default="">
<cfscript>
//Initialize the CFC with the default properties values.
this.userID = 0;
this.firstName = "";
this.lastName = "";
this.login = "";
this.email = "";
this.enterDate = "";
this.loginLastDate = "";
this.loginCount = 0;
this.badgeID = "";
this.lastScreenRes = "";
this.loggedInDate = "";
this.rights = "";
</cfscript>
<cffunction name="init" output="false" returntype="UserObj">
<cfreturn this>
</cffunction>
... getters .... setters
</cfcomponent>
It matches the model on the Flex Side, except that the property values have
to match the "getter" names on the Flex side (ie. userID instead of
_userID).
package _local
{
[Bindable]
public class UserObj
{
private var _userID:Number=0;
private var _firstName:String='';
private var _lastName:String='';
private var _login:String='';
private var _badgeID:String='';
private var _email:String='';
private var _enterDate:Date=null;
private var _loginLastDate:Date=new Date();
private var _loginCount:Number=0;
private var _lastScreenRes:String='';
private var _loggedInDate:Date=new Date();
private var _rights:Array;
private var modelValid:Boolean = false;
public function UserObj() {
}
... getters .... setters
}
I also noticed that I had to run the CFC with the WSDL paramter in the
browser to get it to refresh when I changed the properties of the CFC.
_________________________________________
Galen M. Smallen
Quality Supplier Data Systems
Bell Helicopter/Textron
<<attachment: Glacier_Bkgrd.jpg>>
_______________________________________________ Reply to DFWCFUG: [email protected] Subscribe/Unsubscribe: http://lists1.safesecureweb.com/mailman/listinfo/list List Archives: http://www.mail-archive.com/list%40list.dfwcfug.org/ http://www.mail-archive.com/list%40dfwcfug.org/ DFWCFUG Sponsors: www.instantspot.com/ www.teksystems.com/
