Hi

I am using cairngorm with cfc now.

I make some progress and the error like this:

Services.mxml

<?xml version="1.0" encoding="utf-8"?>
<cairngorm:ServiceLocator
        xmlns:mx="http://www.adobe.com/2006/mxml";
        xmlns:cairngorm="com.adobe.cairngorm.business.*">
        
        <!-- Bursary Service -->
        <mx:RemoteObject
                id="BursaryService"
                destination="ColdFusion"
                source="Bursary.cfcs.BursaryProcess">
                
                <mx:method name="addPerson" result="hresult()"  
fault="hfault(event)"/>
                <mx:method name="showPerson" result="hresult()"  
fault="hfault(event)"/>
                
        </mx:RemoteObject>
        <mx:Script>
                <![CDATA[
                
                    import mx.controls.Alert;
                    import mx.rpc.events.FaultEvent 
                    
                    
                        private function hresult():void{
                           Alert.show("add ok")
                        }
                        
                        private function hfault(event:FaultEvent):void
{
                           Alert.show(event.fault.toString())
                          
                        }
                ]]>
        </mx:Script>
        
</cairngorm:ServiceLocator>

formDelegate.as

package ca.sb.CESF.Bursary.business {
        
        import com.adobe.cairngorm.business.ServiceLocator;     
        import mx.rpc.IResponder;       
        import ca.sb.CESF.Bursary.vo.PersonVO;
        import mx.controls.Alert;
        
        public class Form3Delegate {
            
                private var responder:IResponder;
                private var service:Object;
                
                public function Form3Delegate( responder:IResponder ) 
{
                        
                        Alert.show("login delegate begine"); 
                        this.responder = responder;
                        this.service = ServiceLocator.getInstance
().getRemoteObject("BursaryService");                   
                        Alert.show("login delegate done");  
                }
                
                public function AddPersonData(personVO:PersonVO):void 
{
                        Alert.show("DELEGATE " + personVO.firstname); 
                        var call:Object = this.service.addPerson
(personVO);
                        call.addResponder(responder);
                         
                }
                
                 
        
        }
}


I output data with "Alert.show("DELEGATE " + personVO.firstname)" in 
function AddPersonData.I can get output data.

but I get error when I pass data by "call:Object = 
this.service.addPerson(personVO);"

The Error message like following

[RPC Fault faultString="Element FIRSTNAME is undefined in PERSONVO." 
faultCode="Server.Processing" faultDetail=""]


How ro fix this?How to output with "mx:RemoteObject" to show which 
data is passed to cfc?




Reply via email to