我有一個XML文件,我想將它發送到rails服務器。要做到這一點我使用下面的代碼:將XML文件從flex應用程序寫回到rails服務器
<mx:HTTPService id="dataService"
result="resultHandler(event)"
resultFormat="e4x"/>
在通過保存按鈕觸發的功能,我做了以下內容:
var params:Object = {};
params["xml_file"] = xmlDoc;
dataService.method = "POST";
dataService.url = "http://localhost:3000/containers";
dataService.send(params);
遺憾是永遠存在的問題(見下文)出現。如果我刪除params var,它會運行GET請求...
[RPC Fault faultString =「HTTP請求錯誤」faultCode =「Server.Error.Request」faultDetail =「錯誤:[IOErrorEvent type =」ioError「 bubbles = false cancelable = false eventPhase = 2 text =「錯誤#2032:Stream-Fehler。 URL:http://localhost:3000/containers「]。URL:http://localhost:3000/containers」]
可能是什麼問題?
感謝您的任何提示! Markus