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. In your functions
input and output parameters you can set attributes. These attributes allow you to specify the communication between the server and
the client in terms of HTTP:
- 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 (with
WSParam
,WSPath
attributes) define the location of a resource. The path parameter value is directly related to a resource and is part of the resources URL path. - REST attributes on the input parameters and output return values that define how parameters are serialized. For example, parameter attributes specify if data is carried in the body or header, as a cookie, as a query, or as multipart.
For details of all available attributes and descriptions of their usage, see the High-level RESTful Web service attributes section.
See the examples for defining your REST Web service functions.