User-Defined Method Restrictions
This section discusses restrictions related to using user-defined methods when exposing component interfaces as services.
User-Defined Method Actions
User-defined methods which are executed with the Create action should not be exposed as web services.
Specifying Method Parameters and Parameter Names
All user defined methods that will be accessed via the service interface must have a doc string.
The doc string contains:
-
The keyword GET. .
-
An ordered list of parameter names corresponding to the method's parameters.
The following example shows the format of the doc string:
Function simpleFunction(&sParm As string, &dParm As date,
&nParm As number, &bParm As boolean)
Returns string
Doc "GET, StringParm, DateParm, NumParm , BoolParm"
Local string &aString = &sParm;
&aString = &aString | " -- " | &dParm;
&aString = &aString | " -- " | &nParm;
&aString = &aString | " -- " | &bParm;
Return &aString;
End-Function;
The contents of the doc string are used when the function is invoked. For example, if GET is specified, then the GET keys are set, and GET is called on the component interface before the used-defined method is invoked.
The list of parameters are used at runtime to match the data in the input message with the method's parameters. This is an ordered list; if the parameter list in the doc string and the method parameters don't match, then the method may not work correctly. The names in the doc parameter list will be the names visible in any WSDL created for the service.
Method parameters and return values must be of a primitive type, such as a string, date or number. Object parameters or return values are not supported.