Migration notes / Migrating GWS server applications |
If you want to take advantage of the new features and simplify future migrations, you can migrate your Genero Web Services (GWS) Server runner and also use the new GWS 2.x APIs. All the 1.3x publishing functions for all the operations in your application must be replaced with 2.x publishing functions. Since this does not change the interface, all existing Genero 1.3x Client applications, as well as third-party Client applications, will continue to work.
Since 1.3x only supports RPC-Encoded style services, you must use the RPC style functions of the new 2.x APIs as the replacement functions, with setInputEncoded and setOutputEncoded set to true. And, you cannot add XML attributes to the records used as Web Service function parameters.
CALL fgl_ws_server_publishfunction( "EchoInteger", "http://tempuri.org/webservices/types/in", "echoInteger_in", "http://tempuri.org/webservices/types/out", "echoInteger_out", "echoInteger")
import com
DEFINE serv com.WebService DEFINE op com.WebOperation -- Operation of a WebService
LET serv = com.WebService.CreateWebService( "EchoInteger", "http://tempuri.org/webservices")
LET op = com.WebOperation.CreateRPCStyle( "echoInteger", "EchoInteger", echoInteger_in, echoInteger_out) CALL op.setInputEncoded(true) CALL op.setOutputEncoded(true) CALL serv.publishOperation(op,NULL)
Compile and re-link your GWS Server application (.42r)
GWS 2.x also allows your Server application (.42r) to contain multiple services. If you would like 2.x and 1.3x GWS to coexist in the same .42r executable, replace the existing publishing 1.3x functions.