Make sure you add properties to the CFC VO using the cfproperty tag. 
Properties case and order must match what is in the AS3 VO.

  Additionally, use the full path with dot notation as the argument type.

  Basically, Flex+CF is not smart enough to know that "PersonVO" is 
equal to "Bursary.cfcs.PersonVO".

markflex2007 wrote:
> 
> 
> I have built a cfc vo class and flex vo class
> 
> PersonVO.as
> 
> package com.abc.CESF.Bursary.vo
> {
> import com.adobe.cairngorm.vo.IValueObject;
> 
> [RemoteClass(alias="Bursary.cfcs.PersonVO")]
> 
> public class PersonVO implements IValueObject
> {
> public var firstname:String = "";
> public var lastname:String = "";
> public var sid:String= "";
> 
> public function PersonVO(){
> 
> this.firstname = "";
> this.lastname = "";
> this.sid = "";
> }
> 
> }
> }
> PersonVO.cfc
> 
> <cfcomponent displayname="PersonVO" hint="Login VO For CairngormTest"
> output="false">
> 
> <cfset this.firstname = "" />
> <cfset this.lastname = "" />
> <cfset this.sid = "" />
> 
> </cfcomponent>
> 
> I have a function in cfc.it is here
> 
> <cffunction name="addPerson" displayname="addPerson" access="remote"
> output="false" returntype="boolean">
> <cfargument name="personVO" type="PersonVO" required="true" />
> 
> <cfquery name="insertPerson" datasource="bursary">
> INSERT INTO person_info (fname,
> lname,
> sid)
> VALUES('#personVO.firstname#',
> '#tpersonVO.lastname#',
> '#personVO.sid#')
> </cfquery>
> 
> <cfreturn true />
> 
> </cffunction>
> 
> but I get the error when I pass flex vo to the cfc function.I am not
> sure how to make flex vo and cfc vo match.the error message is here
> 
> RPC Fault faultString="The argument PERSONVO passed to function
> addPerson() is not of type PersonVO." faultCode="Server.Processing"
> faultDetail="If the component name is specified as a type of this
> argument, the reason for this error might be that a definition file
> for such component cannot be found or is not accessible."]
> 
> Please help me.Thanks
> 
> Mark
> 
> 

-- 
Jeffry Houser, Technical Entrepreneur, Software Developer, Author, 
Recording Engineer
AIM: Reboog711  | Phone: 1-203-379-0773
--
My Company: <http://www.dot-com-it.com>
My Podcast: <http://www.theflexshow.com>
My Blog: <http://www.jeffryhouser.com>

Reply via email to