I4GL migration guide / Migrate an I4GL web service provider to Genero |
Use the COM APIs to publish the I4GL function as a web service based on I4GL .4cf configuration file to get a compatible Genero Web service.
To create a new 4GL function in charge of the service publication, you will need the following elements of the I4GL .4cf configuration file:
FUNCTION create_zipcode_details_web_service() DEFINE serv com.WebService DEFINE op com.WebOperation # # Create the web service based on the entries of the .4cf file # SERVICENAME: The name of service is 'ws_zipcode' # FUNCTION NAME: The namespace of the service is built from # the base url 'http://www.ibm.com/' concatenated to # the NAME of the I4GL function 'zipcode_details' # LET serv = com.WebService.CreateWebService("ws_zipcode", "http://www.ibm.com/zipcode_details") # # Create and publish the Doc/Literal web function based on # step 2, step 3 and step 4 # and from the FUNCTION NAME defined in the .4cf file # LET op = com.WebOperation.CreateDOCStyle("zipcode_details_g", "zipcode_details", zipcode_details_in, zipcode_details_out) CALL serv.publishOperation(op,NULL) # # Register the service into the SOAP engine # CALL com.WebServiceEngine.RegisterService(serv) END FUNCTION