For each RESTful resource class, you can generate a JavaScript
client stub that makes it easy for client applications to access
the RESTful service. Using a wizard, you can select from a list of
projects containing RESTful services. Alternatively, you can enter the
URL of a RESTful service's WADL file (See
for more information about the Java.net WADL project.) When you finish the
wizard, you will have created the client stubs
for the services contained by the selected projects or represented by the
WADL.
For details on RESTful web services client stubs,
see:
In the Projects window or Files window, right-click the web application project node
and choose New. Then choose RESTful Web Service Client Stubs.
Alternatively, you can choose the above templates
by right-clicking the project node, choosing New > Other
and then selecting RESTful Web Service Client Stubs from the Web Services category.
Click Next and complete the wizard.
In the Projects window, expand the Web Pages node. Notice that you have
a 'reststubs' node, which contains the generated JavaScript classes. There is
also a 'reststub.html' file. Right-click it, choose View, and then you can
view the generated test page. The test
page lists URIs to the client stubs, which
you can click to test whether client
stub generation succeeded as expected.