【发布时间】:2015-02-25 04:09:40
【问题描述】:
我跟随this basic NetBeans tutorial 开发了一个 RESTful Web 服务。 我能够成功地为客户数据库创建和测试 Restful Web 服务。
但是,在为这个 RESTful Web 服务创建 Restful JavaScript 客户端时,我得到一个空表输出。似乎 TestStubs.html JavaScript 代码部分中的 app.getResources() 调用通过 app.getResources() 调用返回了一个空数组,因此资源数组上的循环永远不会运行。
这是 TestStubs.html 的 JavaScript 部分,其中资源为空:
var app = new CustomerDBRest('http://localhost:8080/CustomerDBRest/webresources');
var resources = app.getResources(); //returns an empty array
for (i = 0; i < resources.length; i++)
{
...
}
这里是 localhost:8080/CustomerDBrestJS/customerDBrest.client/TestStubs.html 的截图
【问题讨论】:
-
我正面临着确切的问题。你找到解决办法了吗?
标签: javascript rest netbeans open-esb