Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 05-03-2007, 04:16 PM   #1
Join Date: Aug 2005
Location: Bath, UK
Posts: 127
Red face sending xml to asp from flex

I’m trying to send some xml to asp using flex, all the script does is send back the xml that was received/loaded. When I simply load the xml from a text file on the server all is fine, however if I send the same xml from flex it does not work and I get this error in flex>

Error #2044: Unhandled ioError:. text=Error #2032: Stream Error. URL:


Dim mydoc
Set mydoc=Server.CreateObject("Microsoft.XMLDOM")
if mydoc.parseError.errorcode<>0 then
Response.write mydoc.parseError.errorcode
Response.ContentType = "text/xml"
Response.write mydoc.xml
end if


<book category="COOKING"></book>

My Flex function that sends and receives the xml>

loader = new URLLoader();
loader.dataFormat = "text";
loader.addEventListener(Event.COMPLETE, loaded);
request = new URLRequest("");
request.data = XML(<book category="COOKING"></book>);
request.contentType = "text/xml";
request.method = "POST";

private function loaded(ev:Event):void {
try {

} catch (err:TypeError) {


When I change the ASP code above to load the xml from a book.xml file with the same xml like so>


it works fine and asp sends the xml back to the client.

It could be that the response ASP sends back to flex is not xml, this could be because of a xml parse error when ASP tries to parse the request but the xml is no different then the one in the xml file, and on that occasion all is fine.

Last edited by Daedalus; 05-03-2007 at 04:19 PM.
Daedalus is offline   Reply With Quote

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Flex Email a Form: PHP, ASP, ColdFusion videogamer2791 Flex 2, 3 & 4 1 05-31-2007 03:29 PM
xml preloading problems irish10945 ActionScript 2.0 3 04-02-2007 05:00 PM
Sending data to PHP with AS in Flex Builder chuckgrenade Flex 2, 3 & 4 2 03-04-2007 12:16 PM
releasing xml file from XML.onLoad() sophistikat ActionScript 2.0 2 02-21-2007 07:00 PM
Question about Flex 2 vistasoul Flex 2, 3 & 4 1 02-28-2006 04:07 AM

All times are GMT. The time now is 02:27 AM.

Follow actionscriptorg on Twitter


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.