我的顶点团队决定使用 Qooxdoo 作为我们项目的前端。我们正在使用 NOX 为 OpenFlow 控制器开发应用程序,因此我们使用的是 NOX webservices 框架。我无法从服务中获取数据;我知道该服务正在运行,因为如果我使用 Firefox 访问 URL,则会显示正确的数据。这是我的代码的相关部分:
var req = new qx.io.remote.Request("http://localhost/ws.v1/hello/world",
"GET", "text/plain");
req.addListener("complete", function(e) {
this.debug(e.getContent());
});
var get = new qx.ui.form.Button("get");
get.addListener("execute", function() {
alert("The button has been pressed");
req.send();
}, this);
form.addButton(get);
在萤火虫控制台中,我在单击警报后收到此消息:
008402 qx.io.remote.Exchange: Unknown status code: 0 (4)
如果我再次按下 Get 按钮,我会收到此错误:
027033 qx.io.remote.transport.XmlHttp[56]: Failed with exception: [Exception... "Component returned failure code: 0x80070057 (NS_ERROR_ILLEGAL_VALUE) [nsIXMLHttpRequest.open]" nsresult: "0x80070057 (NS_ERROR_ILLEGAL_VALUE)" location: "JS frame :: file:///home/user/qooxdoo-1.0-sdk/framework/source/class/qx/io/remote/transport/XmlHttp.js :: anonymous :: line 279" data: no]
我还查看了 Twitter 客户端教程,但是我设置的“dataChange”事件代替“tweetsChanged”事件从未触发。任何帮助表示赞赏,谢谢。