Upgrade Guides for Genero BDL / 3.00 upgrade guide |
There are changes in support of web services in Genero 3.00.
If migrating from a version 2.xx of a GWS client application to version 3.00, you need to regenerate all client stubs in your application using the fglwsdl tool.
See also Change client behavior at runtime.
The default for the FGLPROFILE entry security.global.protocol is now SSLv23, enabling all supported SSL/TLS protocols, including TLSv1.2 as required by the Federal Law of USA. In prior versions, the default was TLSv1 (v1.0). It is up to the web server administrator to restrict the SSL/TLS protocol to TLSv1.2.
Starting with FGLGWS version 3.00.24 GWS secured communication is based on the OpenSSL 1.1 engine. This version of OpenSSL always selects the security protocol. It no longer allows you to specify a specific Transport Layer Security (TLS) or Secure Sockets Layer (SSL).
The security.global.protocol entry in the fglprofile file is therefore not supported.
OpenSSL 1.1 doesn't support specific protocol anymoreIt is therefore recommended to remove the security.global.protocol entry from your fglprofile file.
For more details, see HTTPS and password encryption
Before version 3.00, when a WS client did not send all the HTTP body (for instance, after connection has been accepted), by default the WS server would wait indefinitely, and this could end up in a denial of service.
The com.WebServiceEngine class supports now a new option called server_readwritetimeout, to define the server socket read/write timeout: If a timeout occurs, the WS server program will raise the BDL exception -15553. By default this timeout is defined as 5 seconds.
For more details, see WebServiceEngine options.
The com.HTTPPart.CreateAttachment() method now by default creates header fields based on the file name and file extension.
For more details, see com.HTTPPart.CreateAttachment.
Before version 3.00, the com.HTTPPart.getAttachment() method returned the path to a temporary file. Starting with Version 3.00, this method will now return the absolute path location of the received part file name, based on the "Content-Disposition" header.
For more details, see com.HTTPPart.getAttachment.
Starting with version 3.00, if the result string of the HTTP request contains & or = XForms special characters, these are escaped by doubling them.
For more details, see com.HTTPServiceRequest.readFormEncodedRequest.
The GWS methods listed below raise an exception with a specific error code -15575, when the GAS disconnects properly from the web service server. Before version 3.00, the generic error -15565 was raised. A specific error code allows you to distinguish fully a normal disconnection from other errors, in a TRY/CATCH block. See code examples in method reference pages:
Web Services client stub generation has been changed to support fault response with HTTP error code of 200.
The generated code supports SOAP fault with HTTP error code of 200 and 500. To enable this new feature in your client stub code, regenerate the stubs with the fglwsdl tool.
For more details, see Client side SOAP fault handling.
In the generated client stub code, all functions handling the SOAP request with multipart get an additional input parameter and/or return parameter as a DYNAMIC ARRAY OF com.HTTPPart, to pass and return optional parts.
When generating client stubs managing multipart, you get an extra input and/or output variable called "AnyInputParts" and "AnyOutputParts" that is a DYNAMIC ARRAY of com.HTTPPart objects. Those variables may contain additional input and/or output HTTP parts not specified in the WSDL. You will have to adapt your client program by handling those dynamic arrays in any Genero functions calling such stubs.
Request example prior to 3.00:
FUNCTION xxx_g(InputHttpPart_1, ..., InputHttpPart_n) DEFINE InputHttpPart_1 com.HTTPPart ... DEFINE InputHttpPart_n com.HTTPPart ... RETURN wsstatus END FUNCTION
FUNCTION xxx_g(InputHttpPart_1, ..., InputHttpPart_n) DEFINE InputHttpPart_1 com.HTTPPart ... DEFINE InputHttpPart_n com.HTTPPart DEFINE AnyInputParts DYNAMIC ARRAY OF com.HTTPPart ... RETURN wsstatus END FUNCTION
For more details, see Multipart in the client stub.
— WS-INFO (Certificate authority) | Loading from Windows keystore —
To avoid this message, it was possible to set the FGLWSNOINFO environment variable to TRUE.
Starting with version 3.00, this message is no longer displayed by the GWS library, and the FGLWSNOINFO is no longer required.
The methods listed in the following table are desupported in Genero 3.00.
Methods desupported as of 3.00 | Alternative method to use |
---|---|
com.Util.CreateDigestString | security.Digest.CreateDigestString |
com.Util.CreateRandomString | security.RandomGenerator.CreateRandomString |
com.Util.CreateUUIDString | security.RandomGenerator.CreateUUIDString |