Ultrashock Forums > Flash > Flash Professional
AS3 - Error getting xml from web service

You are currently viewing our website as a guest which gives you limited access to forums, files and other resources.

Click here to join now for free, and start interacting with our members, download files and much more!

Click here if you are looking for our Flash files and other professional assets.
 
Post Reply | View first unread | Rate Thread Search this Thread | Thread Tools | Display Modes

#1
Bookmark and Share!
AS3 - Error getting xml from web service
Old 2009-03-25

Hello all. Thanks for reading.

I'm getting the following error from my swf.

IOErrorEvent type="ioError" bubbles=false cancelable=false eventPhase=2 text="Error #2032"
I'm calling an static web service url that returns xml. Calling this same url from my local machine returns successfully. Calling a flat xml file on the server from the server returns successfully. Calling the web service, however, returns the above error code.

My flash resides on a test html page in the same domain (different folder but same domain) as the web service url. It is NOT under https.

Here is the code I am using to load the xml
Code:
var loader:URLLoader = new URLLoader();
loader.addEventListener(Event.COMPLETE, OnXmlLoaded);
loader.addEventListener(IOErrorEvent.IO_ERROR, errorIOHandler);
			
try
{
	loader.load(new URLRequest(serviceUrl));
}
I have spent considerable time trying to figure this out. Looking for help!

Thanks!
postbit arrow 2 comments | 541 views postbit arrow Reply: with Quote   
Registered User
aljavar is offline
seperator
Posts: 184
2005-08-02
Age: 29
seperator

Ultrashock Member Comments:
aljavar aljavar is offline 2009-03-25 #2 Old  
I just noticed (using HttpWatch) that the flash is getting a "500" back from the server when making the call. Any idea why calling the web service from the application directory would return a 500 when calling it from my local doesn't?
Reply With Quote  
aljavar aljavar is offline 2009-03-25 #3 Old  
I just want you to know that I was stuck on this for 5+ hours and within 20 minutes of posting this I figured it out. I think asking questions is some sort of zen cleansing for the mind... Sorry for the question and retraction, but I figured it out.

For those who may find this helpful in the future, the 2032 Error was indeed occurring because of a 500 response from the server. The flash was being sent a web service url as a flashvar param and the ampersand wasn't url encoded. Since flashvars are ampersand delimited name value pairs, the ampersand in the query string of the service url parameter was treated as the beginning of a new flashvar param and therefore the last (second) web service parameter was being truncated. Encoding the ampersand to %26 was all I needed.

HttpWatch was the key in catching the 500 coming back to flash.
Reply With Quote  
Thread Tools
Display Modes Rate This Thread
Rate This Thread: