Java Reference
In-Depth Information
Figure 12-19. JAX-RS 2.0 Interceptor Generated File
Clients
One of the most useful additions to JAX-RS 2.0 is the ability to generate RESTful clients. NetBeans 7.3 accommodates
this new feature by containing wizards for generation of RESTful Java clients and RESTful JavaScript clients.
Let's begin by looking at the procedure to generate a RESTful Java client using the NetBeans wizard.
1.
Right-click on a project directory or select “File” “New File” from the NetBeans File
menu to open the “New File” dialog.
2.
Select “Web Services” from the “Categories” select box, and then select “RESTful
Java Client” from the “File Types” select box (Figure 12-20 ). Add a name for the client,
along with the type of REST resource, whether it belongs to a project within the IDE,
or if it has been registered as a cloud service with the IDE (such as Google or Amazon).
Lastly, provide a type of authentication for the client.
 
Search WWH ::




Custom Search