Server / Writing a Web services function |
Methods are available in the Genero Web Services library (com) to:
Define the Web Service, by creating a WebService object
Define the Web Services operation for your function, by creating a WebOperation object
Publish the operation - associate it with the Web Service object that you defined.
The com library must be imported into each module of a Web Services Server application.
IMPORT com ... FUNCTION createservice() DEFINE serv com.WebService # A WebService DEFINE op com.WebOperation # Operation of a WebService --Create WebService object LET serv = com.WebService.CreateWebService("MyCalculator", "http://tempuri.org/webservices") --Create WebOperation object LET op = com.WebOperation.CreateRPCStyle("add", "Add", add_in, add_out) --Publish the operation, associating it with the WebService object CALL serv.publishOperation(op,NULL) ... END FUNCTION
See the Web Services Server tutorial and Choosing a Web Service Style for complete examples and explanations.