# Not receiving COMPLETE event in URLLoader

**URL:** <https://forum.kirupa.com/t/not-receiving-complete-event-in-urlloader/294717>\
**Category:** flash\
**Created:** [August 18, 2009, 9:59pm UTC](https://forum.kirupa.com/t/not-receiving-complete-event-in-urlloader/294717 "2009-08-18T21:59:56Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jdoe](https://avatars.discourse-cdn.com/v4/letter/j/eb8c5e/32.png) [@jdoe](https://forum.kirupa.com/u/jdoe)\
**Post date:** [August 18, 2009, 9:59pm UTC](https://forum.kirupa.com/t/not-receiving-complete-event-in-urlloader/294717/1 "2009-08-18T21:59:56Z")

</div>

Hi:

I’m querying a web application in a remote server through XML files and receiving answers in the same file format. Until now, sometimes I received a connection error:

Error #2044: Unhandled ioError:. text=Error #2032: Stream Error. URL: [http://server/Services/startSesion.com](http://server/Services/startSesion.com)  
at reg\_jugadores\_fla::MainTimeline/queryGQ()  
at reg\_jugadores\_fla::MainTimeline/reg\_jugadores\_fla::frame1()

When this occurs, trying to access the services through a web browser, there’s a test page where you can try queries, returns a “500 Internal server error”. I managed that problem adding a listener to catch the error:

xmlSendLoad.addEventListener(IOErrorEvent.IO\_ERROR, catchIOError);

But since yesterday I can’t connect anymore using Flash while it’s possible to access the test page. I’m not able to talk to any support guy as the company is closed for vacations! I added listeners to try to know what’s happening and this is the result in the output window:

openHandler: [Event type=“open” bubbles=false cancelable=false eventPhase=2]  
progressHandler loaded:154 total: 154  
httpStatusHandler: [HTTPStatusEvent type=“httpStatus” bubbles=false cancelable=false eventPhase=2 status=200]

AFAIK, status=200 means OK but why the COMPLETE event isn’t dispatched?. So, is there anything I can do or just wait until the tech guys return from the beach?

Thanks in advance

/**/  
queryGQ(sessionURL,sessionQS); // Start session  
stop();  
/**/

function queryGQ(url:String,qs:String):void {  
var serviceURL:URLRequest = new URLRequest(“[http://server/Services/](http://server/Services/)”+url);  
serviceURL.data = qs;  
serviceURL.contentType = “text/xml”;  
serviceURL.method = URLRequestMethod.POST;

var xmlSendLoad:URLLoader = new URLLoader();  
configureListeners(xmlSendLoad);  
xmlSendLoad.load(serviceURL);  
}

function configureListeners(dispatcher:IEventDispatcher):void {  
dispatcher.addEventListener(Event.COMPLETE, loadXML);  
dispatcher.addEventListener(Event.OPEN, openHandler);  
dispatcher.addEventListener(ProgressEvent.PROGRESS, progressHandler);  
dispatcher.addEventListener(SecurityErrorEvent.SECURITY\_ERROR, securityErrorHandler);  
dispatcher.addEventListener(HTTPStatusEvent.HTTP\_STATUS, httpStatusHandler);  
dispatcher.addEventListener(IOErrorEvent.IO\_ERROR, catchIOError);  
}

function openHandler(event:Event):void {  
trace("openHandler: " + event);  
}

function progressHandler(event:ProgressEvent):void {  
trace(“progressHandler loaded:” + event.bytesLoaded + " total: " + event.bytesTotal);  
}

function securityErrorHandler(event:SecurityErrorEvent):void {  
trace("securityErrorHandler: " + event);  
}

function httpStatusHandler(event:HTTPStatusEvent):void {  
trace("httpStatusHandler: " + event);  
}

function ioErrorHandler(event:IOErrorEvent):void {  
trace("ioErrorHandler: " + event);  
}
