Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Screenshot

like image 443
stevetronix Avatar asked Feb 25 '15 04:02

stevetronix


1 Answers

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

like image 82
Awad Maharoof Avatar answered Oct 21 '22 06:10

Awad Maharoof