That is interesting, I would assume null values would not be encoded at all?
A fix would be welcomed, the gt-wfs-ng module has received a bit of attention lately as it takes over duty from the outgoing gt-wfs module. -- Jody Garnett On 5 September 2016 at 18:53, Andreas Watermeyer < andreas.waterme...@its-telco.de> wrote: > Hi all, > > I am using GeoTools WFS-Plugin to write an WFS-T client. On the serverside > GeoServer is used. > > I have a problem with the current handling of null values: > > When I create features on the client side, all null attributes are > transmitted as empty elements by GT. > > On the serverside all those empty elements are turned into empty strings. > Next, a feature is created containing all the empty strings in its > attributes, regardless of the attribute type. Even on numeric, boolean, ... > attributes. All contain those empty strings. > > I am using sort of GeoServer transaction plugin to postprocess the > features. Now there is apparently a mismatch between the > AttributeDescriptors type information and the runtime type of those > attributes. > > I would like to have this problem fixed and could provide a pull request. > > Question: > 1) As a fix might break existing applications, currently expecting empty > strings, is the GeoTools team willing to accept such a "dangerous" change? > > 2) What do you think is the best approach to fix this? Suggestions: > > a) Currently the org.geotools.gml2.bindings.GML2ParsingUtils discard null > values returned by converters when creating the feature. A special case for > empty strings will probably have the desired effect in a save way (in terms > of side effects). > > b) org.geotools.xml.impl.ParseExecutor discards null values being the > result of parsing by the bindings. This might be changed, because the > binding might be actually in charge of converting XML to Objects properly. > However, the parsing seems quite complicated, I can not foresee which side > effects might occur. > > I propose option a). Any comments are welcome. > > But most important: Are you willing to accept such a change? > > Best regards, > Andreas > > > -- > Andreas > > ------------------------------------------------------------ > ------------------ > > _______________________________________________ > GeoTools-Devel mailing list > GeoTools-Devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/geotools-devel > >
------------------------------------------------------------------------------
_______________________________________________ GeoTools-Devel mailing list GeoTools-Devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-devel