Executing WFS requests (version 2.0.0), using Filter String Property Literals starting with leading zero results in an empty response even if the searched fetures are in the postgis database.
Sample request:
http://localhost:8080/geoserver/wfs?service=wfs&request=getFeature&srsName=EPSG:3857&typeName=Kataster.Kataster.alk_flur&filter=<ogc:Filter xmlns:ogc="http://www.opengis.net/ogc"><ogc:And><ogc:PropertyIsEqualTo><ogc:PropertyName>gemarkungsschluessel</ogc:PropertyName><ogc:Literal>061051</ogc:Literal></ogc:PropertyIsEqualTo></ogc:And></ogc:Filter>&outputFormat=application/json&version=2.0.0&count=5
Corrsponding Geoserver log:
Request: getFeature
service = wfs
version = 2.0.0
baseUrl = http://localhost:8080/geoserver/
count = 5
outputFormat = application/json
resolve = none
resolveDepth = *
resolveTimeout = 300
resultType = results
abstractQueryExpressionGroup[0] = wfs:abstractQueryExpression=net.opengis.wfs20.impl.QueryTypeImpl@anonymised.com (handle: null) (abstractProjectionClause: null, abstractSelectionClause: [[ gemarkungsschluessel = 61051 ]], abstractSortingClause: null, aliases: null, typeNames: [{http://Kataster}Kataster.Kataster.alk_flur]) (featureVersion: null, srsName: EPSG:3857, filter: null, propertyNames: null, sortBy: null)
abstractQueryExpression[0]:
abstractSelectionClause = [[ gemarkungsschluessel = 61051 ]]
typeNames[0] = {http://Kataster}Kataster.Kataster.alk_flur
srsName = EPSG:3857
filter = [[ gemarkungsschluessel = 61051 ]]
It’s clear that the requested literal string 061051 has been transformed to 61051 in the geotools filter.
|