RESTful Web Services from Patterns Wizard: Specify Resource Classes (Simple Root)

In this panel of the RESTful Web Services from Patterns Wizard, you specify the resource classes.

This panel contains the following fields, which specify the class name, URI, and representation type of the resource.

Element Description

Project

The NetBeans IDE project containing this RESTful service. The value is generated by the IDE.
Location The parent directory inside the NetBeans IDE project that contains the RESTful service. By default this is the Source Packages directory.
Resource Package The package containing the RESTful service classes. Select from a drop-down list of packages or type the name of a new package. These packages are in the directory specified in the Location field.
Path The path, passed as an argument of the @Path annotation. By default the Path is "generic." The default Path annotation is therefore @Path("generic").

Class Name

Name of the resource class. Default name is GenericResource.

MIME Type

MIME type of RESTful service requests and responses, passed as arguments of the @Produces and @Consumes annotations. The default MIME type is application/xml. Therefore the default @Produces and @Consumes annotations are @Produces("application/xml") and @Consumes("application/xml").

Representation Class

Class of the representation of the service class instance returned by a get method. Default class is java.lang.String.


Related Topics

Developing Applications with NetBeans IDE,

Copyright © 2016, Oracle and/or its affiliates. All rights reserved.