You can create Web service JADE methods only for Web service classes.
Methods declared on the
For details about defining a JADE method for a non-Web service class, see "
To define a Web services JADE method
In the Class List of the Class Browser, click on the subclass of the
Select the New JADE Method command from the Methods menu. The Jade Method Definition dialog is then displayed.
The Web Services check box is enabled only when a subclass of the
Uncheck the Web Services check box if you do not want the JADE method to be a Web services method. This check box is checked by default for Web services classes.
When you click the OK button on the Jade Method Definition dialog and the Web Services check box is checked, the signature of your method in the editor pane then includes the webService method option. For example, if you defined a getClients method, the method signature that is created initially is as follows.
getClients(): webService;
The following is an example of a getClient method defined in the ErewhonInvestmentsService subclass of the
getClient(clientName: String): Client webService; vars client: Client; begin client := app.myCompany.allClients[clientName]; if client = null then setError(23, clientName, 'Client does not exist'); endif; return client; end;
You can add or remove the webService method option, which toggles the type of method (that is, to change it from a Web services method to a JADE method, or the reverse).
You can specify any type of parameter (that is, constant, input, io, or output) for a Web services method. For details, see "Parameters", in Chapter 1.
The method does not require a return value because the Web service uses the HTTP protocol (which always requires a response) and a reply is always sent to the Web service consumer. Primitive parameters that are io or output are also sent back in the response as are object parameters that are not constant.
JADE timestamp values use the local time zone. External Web service consumers often expect Coordinated Universal Time (UTC) values and external Web service providers often return UTC values. You may need to convert between UTC and local timestamp values using the