Write XML File from a flex application back to a rails Server

Posted by Markus on Stack Overflow See other posts from Stack Overflow or by Markus
Published on 2010-02-02T20:00:32Z Indexed on 2010/12/25 19:54 UTC
Read the original article Hit count: 199

Filed under:
|
|

Hi everybody,

I have a XML-file, which I want to send to a rails server. To do so I use the following code:

 <mx:HTTPService id="dataService"
 result="resultHandler(event)"
 resultFormat="e4x"/>

In a Function triggered by a save button, I do the following:

 var params:Object = {};
 params["xml_file"] = xmlDoc;
 dataService.method = "POST";
 dataService.url = "http://localhost:3000/containers";
 dataService.send(params);

Unfortunately there is always the Problem (see below) appearing. If I remove the params var, it runs a GET Request...

[RPC Fault faultString="HTTP request error" faultCode="Server.Error.Request" faultDetail="Error: [IOErrorEvent type="ioError" bubbles=false cancelable=false eventPhase=2 text="Error #2032: Stream-Fehler. URL: http://localhost:3000/containers"]. URL: http://localhost:3000/containers"]

what could be the problem?

Thanks for any hints! Markus

© Stack Overflow or respective owner

Related posts about ruby-on-rails

Related posts about flex