WSName
Specify names for parameters in a REST function.
Syntax
WSName
Usage
You use this attribute to specify names for parameters in a REST function. You set the
WSName
attribute in the ATTRIBUTE()
clause of the parameter.
WSName
can be set with the following attributes:WSQuery
WSHeader
( input, output )WSCookie
WSName
is an optional attribute.
PUBLIC FUNCTION add(a INTEGER ATTRIBUTE(WSQuery,WSName="BigA"),
b INTEGER ATTRIBUTE(WSHeader,WSName="BigB"),
coef FLOAT ATTRIBUTE(WSCookie,WSOptional) )
ATTRIBUTES (WSGet,
WSPath='/add')
RETURNS (FLOAT)
# ... function code ...
RETURN (a + b)
END FUNCTION
The
URL to call the REST function must use the values specified by WSName
for the
query:http://host:port/gas/ws/r/MyService/add?BigA=5. In the request, there must be a header named "BigB".