Define functions in a module
A GWS REST service is defined in a single module.
You write a BDL function for each service function you wish to make public. BDL functions support
attributes (in ATTRIBUTE()
or ATTRIBUTES()
clauses) that can have
input and output function parameters. For more information see Function attributes.
In terms of HTTP, these attributes are designed to allow you to specify the communication between
the server and the client:
- Path, query, header, cookie
- Request body
- Response body
- Multipart request and response
Function REST parameters
Through function parameters and their attributes, you define how the resources of your Web
service are to be accessed and used:
- REST operation attributes define the REST behavior (such as the HTTP GET, or POST operation).
- Path (templating) parameters define the location of a resource and the path parameter value is directly related to a resource and is part of the resource path.
- REST attributes on the input parameters and output return values define how parameters are serialized. For example, in the body or header, as multipart, or as the query.
For details of all available attributes and descriptions of their usage, see the High-level RESTful Web service attributes section.
See the examples provided for the different ways to use attributes to define your REST Web service functions.