Write a BDL function for your service operation (legacy)
Write functions that use the generated legacy code (Genero 3.20 or prior) for the server stub of the WSDL. This allows you to create your own version of the function.
Using the information from the files generated in Get the WSDL description and generate legacy files, the Add operation from Example 1: Writing the entire server application is rewritten to have different functionality but to still be compatible with the WSDL description of the operation.
This step accomplishes the same thing as Step 2: Write a BDL function for each service operation in Example 1. In this version of the add operation, the sum of the two numbers in the input record is increased by 100.
If you have generated stub
files for compatibility with your GWS client app, you have a reference in the
GLOBALS
statement at the
top of the .4gl module that links the stub file.
# my_function.4gl -- file containing the function
-- definition
IMPORT com -- import the Web Services library
GLOBALS "example1Service.inc" -- use the generated globals file
#User Public Functions
FUNCTION add() -- new version of the add function
LET AddResponse.r = (Add.a + Add.b)+ 100 -- the global input and output
-- records are used
END FUNCTION