2 Problems:
 
- Can't send a custom object via WS (this will work if I create plain old object with same params):
  [Looking at ServiceCapture, Flex tries to send as Map with value of 'null']
- Second problem in email to come...!
 
<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 svo:StudentVO = new StudentVO();
   svo.firstName = "Aaron";
   svo.lastName = "Johnson";
   
   attendanceDelegate.saveAttendance( svo );
  }
  
  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>   
 
package com.churchwerks.attendance.vo
{
 //import org.nevis.cairngorm.vo.ValueObject;
 import com.adobe.cairngorm.vo.ValueObject;
 
    [Bindable]
 public class StudentVO implements ValueObject
 {
  public var id: String = null;
  public var gender:String = "";
  public var firstName: String = "";
  public var lastName: String = "";  
  public var photo: String = "";
  public var AT_ID: String = "0";
  public var ATS_SID: String = "0";
  public var status:String = "";
  public var reason:String = "";
  public var symbol:String = "";
  public var themeColor:String = "";
  public var row:int;
  public var col:int;
 
  public function toString():String {
   return "[StudentVO, "
    + id + ", "
    + gender + ", "
    + firstName + ", "
    + lastName + ", "
    + photo + ", "
    + AT_ID + ", "
    + ATS_SID + ", "
    + status + ", "
    + reason + ", "
    + symbol + ", "
    + themeColor + ", "
    + "("+row+", "+col+")"
    + "]";  
  } 
 }
}
 

 
On 7/5/06, Jeremy Rottman <[EMAIL PROTECTED]> wrote:

Can you post some code?



--- In flexcoders@yahoogroups.com, 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