views:

251

answers:

1

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

A: 

you flex code is calling index action of your containers controller(/containers) but, when you don't send any parameters Rails will treat it as a get action, Please check your development.log file for more description on the error.

Vamsi