Step 4: Register the service
Once the Service and operations are defined and the operations are published, the
WebService
and WebOperation
objects have completed their work.
Registering a service puts the Genero DVM in charge of the execution of all the operations of that
service - dispatching the incoming message to the right service, returning the correct output, and
so on. The same service may be registered at different locations on the Web.
The WebServiceEngine is a global built-in
object that manages the Server part of the Genero DVM. Use the RegisterService
class method of the WebServiceEngine
class. The parameter is:
- The name of the WebService object
To register the "Calculator" service, for example, created in Step 3: Create the service and operations:
CALL com.WebServiceEngine.RegisterService(serv)
END FUNCTION
Note: If you want to create a single GWS Server DVM containing multiple Web Services,
define additional input and output records and repeat steps 2 through 6 for
each Web Service. In Step 5: Start the GWS server and process requests, a GWS
Server DVM is started, containing as many Web Services as you have defined. See Web services server program deployment for additional discussion of GWS Services
and GWS Servers.