Steps to run jMaki REST Components

  1. Install jMaki Ajax plugin (in IDE follow Tools->Plugins->Available Plugins, then select 'jMaki Ajax support' and click 'Install' button). or Download and install jMaki 1.0 NetBeans plugin from jMaki website (https://ajax.dev.java.net/jmaki-plugin.html)
  2. Open NetBeans IDE, then install the plugin by selecting "Downloaded" tab after invoking Tools->Plugins.
  3. Create a web project, add "jMaki Ajax Framework" to this project on the wizard.
  4. Right click on the web project, then select "New->RESTful Web Service Client Stubs". In the wizard, select the web project that contains the RESTful web services for which you want to generate the client stubs. Click "Finish".
  5. Run "/Web Pages/resources/dojo/rest/TestResourcesTable.jsp" to test a jMaki REST component. This displays a table of resources.

Note: - If you see any error on the jsp page, enable debugging by changing line that looks like 'jmaki.debug = false' to 'jmaki.debug = true' in file Web Pages glue.js, then redeploy the application and test the jsp page. - After successful execution of Step 4 above, a .zip is created in the project root directory (Select "Files" tab to see this file in the IDE). This file is a zipped (jMaki component(s)) version of the files generated during creation of the client stubs. You can this file to other developers who want to invoke your RESTful Web Services. You can also register the RESTful Web Service jMaki components in the jMaki palette by invoking "Tools->Palette->Add jMaki Library" action in the NetBeans IDE. After successful registration of these components, users can see them on the palette for jsp, php, rhtml, ejs files. Drag-n-drop them onto jsp, php, rhtml, ejs files to invoke the RESTful web services from these pages.- Please note that .zip also contains dojo 0.4.3 libraries copied from your IDE's jMaki library location. There is a /resources/dojo/resources/libs/dojo/LICENSE file inside this zip file. Please read this file before you redistribute this zip file. - If you do not wish to include dojo libraries, then re-package the zip file by removing all the zip entries that start with /resources/dojo/resources, then include a Readme. This Readme should notify end users to copy the dojo library /resources/dojo/resources into thier web project "Web Pages" directory after they drag-n-drop the web service component from jMaki Component Palette in the IDE. This dojo library is found in their /jmakicomplib/jmaki-dojo/resources/dojo/resources directory.


Steps to run Dojo REST Components

  1. After running Step I, you could also test dojo REST component directly by invoking "/Web Pages/resources/dojo/rest/rdj/TestResourcesTable.html"

Steps to run REST Javascripts stubs

  1. After running Step I, you could also test REST Javascripts directly by invoking "/Web Pages/resources/dojo/rest/rjs/TestStubs.html".

Note: - If you have unchecked jMaki during stub generation, you could see only /web/rest directory. Test file is in /Web Pages/rest/TestStubs.html. - When using proxy for javascript cross-domain, create a java package under org.netbeans.rest.proxy, then copy RestProxyServlet.txt to new package ,then rename RestProxyServlet.txt to RestProxyServlet.java. Add servlet mapping info into /WEB-INF/web.xml as specified in the class documentation for RestProxyServlet.java.