Migration notes / Migrating GWS server applications |
If you use a variable as the name of the function to publish, you will have an error message at compile time.
com.WebOperation.CreateRPCStyle(test,"Add",add_in,add_out)
Where test is a string variable, add_in and add_out are input and output records.
error:(-9054) Web service function must be a string
The function name in parameter can only be a string literal not a string variable.
Since version 2.21, FGL has introduced the concept of PUBLIC/PRIVATE function, there is a risk for a user to publish private functions. Private functions are not always available at runtime.
CASE function_name WHEN "Operation1" LET op = com.WebOperation.CreateDocStyle( "Operation1","Operation1",op1_in,op1_out) WHEN "Operation2" LET op = com.WebOperation.CreateDocStyle( "Operation2","Operation2",op2_in,op2_out) OTHERWISE DISPLAY "ERROR" END CASE
In Java™ or in .NET you cannot publish different numbers of operations for a same service, everything is done at compile time. For instance, when you publish a web service in Java, only the public methods will be published as operation of the service. There is no way to add or remove some methods at runtime. The only way you have is to create another Java class.
Be aware that if you dynamically change the service operations names you are creating a different service, which might be confusing for the web service client.