Steps to run Rest Javascripts stubs
- Open Netbeans IDE.
- Create a web project.
- 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".
- 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,
- Create a java package under <Source Packages>org.netbeans.rest.proxy.
- Copy RestProxyServlet.txt to new package.
- Rename RestProxyServlet.txt to RestProxyServlet.java.
- Add servlet mapping info into /WEB-INF/web.xml as specified in the class documentation for RestProxyServlet.java.
- Uncomment the line that starts with '//app.setProxy(' in TestStubs.html, then set the
correct url to the proxy servlet.
|