Web Services changes
There are changes in support of web services in Genero 5.01.
The handling of NULL values for primitive types during serialization has changed
Starting from FGLGWS 5.01.00, there are changes to how nulls are handled in primitive types.
Previously, when null
values were passed, the GWS sent null
. Now
error-15807 will be raised if
a null
value is sent. Where previously you did not have an option to allow null
values, you must now review your code to explicitly allow nulls. The following is a summary of the
behavioral changes for handling nulls in primitive types, objects, and arrays:
- Primitive type: If the value is
NULL
:- Before: It was serialized to
NULL
. - Now: If the
json_null="null"
attribute is not set or the serializeNullAsDefault option is not set to 1, a serialization error is generated.
- Before: It was serialized to
- Object: If a primitive type field is
NULL
, it is omitted unless there is aJSONRequired
attribute set:- Before: It was serialized to
NULL
. - Now: If the json_null="null" attribute is not set or the serializeNullAsDefault option is not set to 1, a serialization error is generated.
- Before: It was serialized to
- Array: If an index is
NULL
:- Before: It was serialized to
NULL
. - Now: If the
json_null="null"
attribute is not set or the serializeNullAsDefault option is not set to 1, a serialization error is generated.
- Before: It was serialized to
For more information about serialization, go to Serializer options.
Using the json_null="null"
attribute with
JSONRequired
Starting from FGLGWS 5.01.00, json.Serializer class
introduces changes to how nulls are handled with JSONRequired
.
Previously, when null
values were passed in a record, or on one of its
primitive elements, marked with JSONRequired
, the GWS sent null
.
Now serialization error-15807
will be raised if a null
value is sent. Where previously you did not have an option
to allow null values, you must now review your code to explicitly allow null values.
To explicitly allow a null value, you must set the json_null="null" attribute on the relevant field, or set the serializeNullAsDefault option for the The json.Serializer class to allow nulls.
For more information about JSONRequired
attribute, go to JSONRequired.
New HttpRequest methods dynamically override FGLPROFILE entries
Starting from FGLGWS 5.01.00, new methods in the HttpRequest
class have been
implemented to allow you to override configurations in FGLPROFILE dynamically at runtime.
Calling setCertificateAndKey() overrides configuration for certificates that might be set in FGLPROFILE. Calling the setCipher() and setVerifyServer() override other parameters that may be set in FGLPROFILE.
While clearing a parameter using clearCertificateAndKey(), clearCipher(), and clearVerifyServer() resets values to the ones configured in FGLPROFILE.
For details, go to com.HttpRequest methods: connection options.
New xml.keystore.cadir entry in FGLPROFILE for XML signature verification
Starting from FGLGWS 5.01.00, an xml.keystore.cadir
entry can be used to specify
a directory for all trusted X509 certificates to be used during XML signature verification.
Previously, you could only specify a priority list of certificates with the
xml.keystore.calist
entry.
Now, xml.keystore.cadir
allows you to provide all the CA certificates in a
directory. You can continue to use the xml.keystore.calist
as before; as files in
the "cadir" directory will be appended to those in xml.keystore.calist
.
For more details, go to FGLPROFILE entries for XML configuration.