OpenESB/NetBeans RESTful Web Services with JavaScript client
Asked Answered
U

1

8

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

Unalloyed answered 25/2, 2015 at 4:9 Comment(1)
I'm facing the exact issue. Were you able to find a solution?Walkyrie
W
1

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

Walkyrie answered 17/5, 2015 at 9:6 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.