I put the webservice so it creates a public instance ready for use. 

    public var webService:WebService = new WebService(); 
    public var trackInfo:Object = new Object();
    public var myTimer:Timer = new Timer(0);

I then change the code to:

    private function wsdlLoaded(event:LoadEvent):void {
        Alert.show("Web Service Loaded and Ready", "Service Status");
        webService.countIt(trackInfo);
        webService.addEventListener(FaultEvent.FAULT, alertFault);

    }

    private function stop_onClick(event:MouseEvent):void {
        myTimer.stop()
        trackInfo.addOne = 1 ;
        trackInfo.duration =  myTimer.currentCount;
        trackInfo.action = "Video Stopped";    
        trackInfo.source = source;
        webService.wsdl = 
"https://ummciisdevweb22.umich.edu/videotracking/trackerDAO.cfc?wsdl";; 
        webService.loadWSDL();
        webService.addEventListener(LoadEvent.LOAD, wsdlLoaded);
        stop();
        playPressed = false;
    }

It loads the WSDL and the Alert pops up, but still cant get it to the database. 
Now I am getting:

faultCode:DecodingError 
faultString:'SOAP Response cannot be decoded. 
Raw response: ' faultDetail:'null'

----------------------------------------
From: "Tracy Spratt" <[EMAIL PROTECTED]>
Sent: Monday, December 08, 2008 10:08 AM
To: [email protected]
Subject: RE: [flexcoders] Does anyone know ANYTHING about AS Webservices? 

First, loadWSDL() is asynchronous.  You
need to wait for the LoadEvent.LOAD event before attempting to call an
operation.   Also, declare and use a result Handler in
addition to the fault handler.   Tracy    
----------------------------------------
 From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of wkolcz
Sent: Monday, December 08, 2008
12:34 PM
To:[email protected]
Subject: [flexcoders] Does anyone
know ANYTHING about AS Webservices?   

I created
a simple web service using ColdFusion CFC. It takes a struct and inserts the
info into the database. Works fine from a direct call using CF's 
createObject("webservice")
so I know it works...

However in AS, I am getting this error:

faultCode:DecodingError faultString:'SOAP Response cannot be decoded.
Raw response: ' faultDetail:'null'

Here is my Web Service Script:

var ws:WebService = new WebService();

ws.wsdl = "https://ummciisdevweb22.umich.edu/videotracking/trackerDAO.cfc?wsdl";;

ws.addEventListener(FaultEvent.FAULT, alertFault);

ws.loadWSDL();

ws.countIt({trackData:trackInfo});

I have looked at 100 different examples and none of them work. Does ANYONE know
how I can get this to work? I have a Wednesday deadline to get this thing to 
work.



Reply via email to