I create the PersonVO with the cfc wizard,the error still same.

PersonVO.cfc

<cfcomponent displayname="PersonVO" hint="Login VO For CairngormTest" 
output="false">

        <cfproperty name="firstname" type="string" default="">
        <cfproperty name="lastname" type="string" default="">
        <cfproperty name="sid" type="string" default="">
        
        <cfscript>
                //Initialize the CFC with the default properties 
values.
                variables.firstname = "";
                variables.lastname = "";
                variables.sid = "";
        </cfscript>

        <cffunction name="init" output="false" returntype="PersonVO">
                <cfreturn this>
        </cffunction>
        <cffunction name="getFirstname" output="false" 
access="public" returntype="any">
                <cfreturn variables.Firstname>
        </cffunction>

        <cffunction name="setFirstname" output="false" 
access="public" returntype="void">
                <cfargument name="val" required="true">
                <cfset variables.Firstname = arguments.val>
        </cffunction>

        <cffunction name="getLastname" output="false" access="public" 
returntype="any">
                <cfreturn variables.Lastname>
        </cffunction>

        <cffunction name="setLastname" output="false" access="public" 
returntype="void">
                <cfargument name="val" required="true">
                <cfset variables.Lastname = arguments.val>
        </cffunction>

        <cffunction name="getSid" output="false" access="public" 
returntype="any">
                <cfreturn variables.Sid>
        </cffunction>

        <cffunction name="setSid" output="false" access="public" 
returntype="void">
                <cfargument name="val" required="true">
                <cfset variables.Sid = arguments.val>
        </cffunction>

        
</cfcomponent>

Thanks.Please give me a hit

Mark



--- In [email protected], "Muzak" <[EMAIL PROTECTED]> wrote:
>
> If you're using FlexBuilder, install the ColdFusion Extensions for 
Flex Builder (they're in the Flex Builder install dir).
> I've mentioned this yesterday.
> 
> With the CF extensions installed, all you have to do is right click 
a cfc or as VO and you're done.
> 
> Your cfc is missing some required stuff by the way..
> 
> Just use the CF wizards.. saves time and hair ;-)
> 
> regards,
> Muzak
> 
> ----- Original Message ----- 
> From: "Mark Shen" <[EMAIL PROTECTED]>
> To: <[email protected]>
> Sent: Wednesday, December 05, 2007 3:08 PM
> Subject: [flexcoders] cfc do not understand cairngorm VO?
> 
> 
> >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
>


Reply via email to