简体   繁体   中英

OpenESB/NetBeans RESTful Web Services with JavaScript client

I followed this basic NetBeans tutorial on developing a RESTful web service. I was able to create and test the Restful Web Service for the Customer DB successfully.

However, when creating the Restful JavaScript Client for this RESTful web service, I am getting an empty table output. It seems that the app.getResources() call within the TestStubs.html JavaScript code section is returning an empty array with the app.getResources() call, and so the loop over the resources array never runs.

Here is the JavaScript section of TestStubs.html where resources is empty:

var app = new CustomerDBRest('http://localhost:8080/CustomerDBRest/webresources'); 
var resources = app.getResources(); //returns an empty array
for (i = 0; i < resources.length; i++) 
{
...
}

Here's a screenshot of localhost:8080/CustomerDBRestJS/customerDBRest.client/TestStubs.html

截图

OK figured it out! The problem at least in my case was because the JDBC connection pool had not been configured properly. I was able to solve it with the help of this article by Dani Gisbert

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM