Upgrade Guides for Genero BDL / 3.00 upgrade guide |
There are changes in support of web services in Genero 3.00.
The default for the FGLPROFILE entry security.global.protocol is now SSLv23, enabling all supported SSL 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 protocol to TLSv1.2.
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 was waiting indefinitely, and this could end up in a deny 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 headers fields according to the filename 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 filename, according to 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 it.
For more details, see com.HTTPServiceRequest.readFormEncodedRequest.
The GWS methods listed below will raise an exception with a specific error code -15575, when the GAS disconnects properly the web service server. Before version 3.00, the generic error -15565 was raised. A specific error code allows you to distinguish properly 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, re-generate 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 de-supported in Genero 3.00.
Method de-supported 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 |