Create a web service module
Resources are identified as a set of functions within the Web services module that provides the service.
In this task you create a Genero BDL module and code two functions that define access to resources.
In the RESTful high-level framework you must define functions as PUBLIC
in order
to expose the resource.
A RESTful Web service function is a normal BDL function that uses attributes. These attributes
(WS*
) are defined specifically for high-level REST.
In the function attributes clause there is an attribute that determines the HTTP verb (for example,
WSGet
). The WSPath
attribute determines the resource endpoint.
These two attributes must be included in all RESTful Web service functions.
Other attributes are set in the ATTRIBUTES
property of input and output
parameters to define HTTP headers, etc.