Steps to run Rest Javascripts stubs

  1. Open Netbeans IDE.
  2. Create a web project.
  3. Right click on the web project, then select "New->Restful Web Service Client Stubs". In the wizard select a web project that contain the RESTful Web Services. Click "Finish".
  4. Run "/Web Pages/rest/TestStubs.html" to test generated Javascripts for the RESTful Web Service project. This displays a table of available resources.
Note: When using proxy for javascript cross-domain,
  1. Create a java package under <Source Packages>org.netbeans.rest.proxy.
  2. Copy RestProxyServlet.txt to new package.
  3. Rename RestProxyServlet.txt to RestProxyServlet.java.
  4. Add servlet mapping info into /WEB-INF/web.xml as specified in the class documentation for RestProxyServlet.java.
  5. Uncomment the line that starts with '//app.setProxy(' in TestStubs.html, then set the correct url to the proxy servlet.