2nd Problem:
 
Can't send an array of plain old objects!:
 
In this case, data appears to go across alright, but ColdFusion returns the following error:
   > SimpleDeserializer encountered a child element, which is NOT expected, in something it was trying to deserialize.
 
Can someone please describe how they are sending sets of objects to a WS from flex? (Coldfusion webservice, in this case).

<mx:Script>
 <![CDATA[
  import mx.rpc.events.FaultEvent;
  import mx.controls.Alert;
  import com.churchwerks.attendance.vo.StudentVO;
  function init() {
   var students:Array = new Array();
   
   var s:Object = new Object(); // s:StudentVO = new StudentVO();
   s.firstName = "Aaron";
   s.lastName = "Johnson";
   students.push( s );
   
   s = new Object();
   s.firstName = "Scott";
   s.lastName = "Langeberg";
   students.push( s );
   
   attendanceDelegate.saveAttendance( students );
  }
  
  public function resultHandler( event : * = null ) : void
  { 
   trace( "\n *** Test.onResult()" );     
   
   if ( String( event.result.SUCCESS ).toLowerCase() != "true" ) {        
    Alert.show( event.result.MSG, "Attendance Save Failed" );
   }
  }
  
 //----------------------------------------------------------------------------
 
  public function faultHandler( event : * = null ) : void
  {
   var fe:FaultEvent = event as FaultEvent;
   Alert.show( ( fe ? fe.fault.faultString : "Unable to save attendance" ),
    "Test - WebService Fault" );  
  }
 ]]>
</mx:Script> 
 
 <mx:WebService
  wsdl=" http://granite/churchwerks/sis/sis_ent/ws/AttendanceService.cfc?wsdl"
     id="attendanceDelegate"      
     fault="faultHandler(event)"
     result="resultHandler(event)"
     useProxy="false">
      
       <mx:operation name="saveAttendance" />
    
 </mx:WebService>   
 
On 7/5/06, Jeremy Rottman <[EMAIL PROTECTED]> wrote:

Can you post some code?



--- In [email protected], slangeberg <[EMAIL PROTECTED]> wrote:
>
> I'm having trouble sending ValueObjects through WebServices (to
ColdFusion).
>
> When I try to send the ValueObject itself, flex only sends 'null'
for the
> value. Same if I try to send them in an array.
>
> Is there some method to serialize these objects so that the WSDL
knows what
> I'm supposed to be sending?
>
> Thanks,
>
>
> : : ) Scott
>




--

: : ) Scott __._,_.___

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com





SPONSORED LINKS
Web site design development Computer software development Software design and development
Macromedia flex Software development best practice


YAHOO! GROUPS LINKS




__,_._,___

Reply via email to