Create and publish the Web services operation
Provide your Web service and its operation to users who can access it on the net.
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.
The following abbreviated example is from the Web
Services Server tutorial:
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 Writing a Web server application and Choosing a web services style for complete examples and explanations.