If I want to list stored queries I get this error:
org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 735; The element type "null:ValueReference" must be terminated by the matching end-tag "</null:ValueReference>"
I found out, why this error occurs.
I created the Stored Query
with this XML
<wfs:CreateStoredQuery service="WFS" version="2.0.0" xmlns="http://www.opengis.net/wfs/2.0" xmlns:wfs="http://www.opengis.net/wfs/2.0" xmlns:fes="http://www.opengis.org/fes/2.0" xmlns:ows="http://www.opengis.net/ows/1.1" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<wfs:StoredQueryDefinition id="test">
<wfs:Parameter name="gemarkungsname" type="xsd:string"/>
<wfs:QueryExpressionText returnFeatureTypes="KRE_ALKIS:sg_flurstueck_f" language="urn:ogc:def:queryLanguage:OGC-WFS::WFS_QueryExpression" isPrivate="false">
<wfs:Query typeNames="KRE_ALKIS:sg_flurstueck_f">
<fes:Filter>
<fes:PropertyIsEqualTo>
<fes:ValueReference>gemarkungsname</fes:ValueReference>${gemarkungsname}</fes:PropertyIsEqualTo>
</fes:Filter>
</wfs:Query>
</wfs:QueryExpressionText>
</wfs:StoredQueryDefinition>
</wfs:CreateStoredQuery>
But on the server in the data directory was this XLS stored. Here you can see <null:Filter
instead of <fes:Filter
.
<?xml version="1.0" encoding="UTF-8"?><wfs:StoredQueryDescription xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:fes="http://www.opengis.net/fes/2.0" xmlns:wfs="http://www.opengis.net/wfs/2.0" xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:ows="http://www.opengis.net/ows/1.1" xmlns:xlink="http://www.w3.org/1999/xlink" id="test">
<wfs:Parameter name="gemarkungsname" type="xs:string"/>
<wfs:QueryExpressionText isPrivate="false" language="urn:ogc:def:queryLanguage:OGC-WFS::WFS_QueryExpression" returnFeatureTypes="KRE_ALKIS:sg_flurstueck_f">
<wfs:Query wfs:typeNames="KRE_ALKIS:sg_flurstueck_f">
<null:Filter xmlns:null="http://www.opengis.org/fes/2.0">
<null:PropertyIsEqualTo>${gemarkungsname}<null:ValueReference>gemarkungsname</fes:ValueReference>
</fes:PropertyIsEqualTo>
</fes:Filter>
</wfs:Query>
</wfs:QueryExpressionText>
</wfs:StoredQueryDescription>
I wonder, why the null
is saved instead of fes
in my Stored Query
in the data directory? I can edit the XML file. I can change here null
to fes
and everything works fine.
Then I had a look into the capabilites with geoserver/wfs?service=wfs&version=2.0.0&request=GetCapabilities
. I guess I'm making a mistake in the syntax. Here the relevant part:
<fes:Filter_Capabilities>
<fes:Conformance>
<fes:Constraint name="ImplementsQuery">
<ows:NoValues/>
<ows:DefaultValue>TRUE</ows:DefaultValue>
</fes:Constraint>
<fes:Constraint name="ImplementsAdHocQuery">
<ows:NoValues/>
<ows:DefaultValue>TRUE</ows:DefaultValue>
</fes:Constraint>
<fes:Constraint name="ImplementsFunctions">
<ows:NoValues/>
<ows:DefaultValue>TRUE</ows:DefaultValue>
</fes:Constraint>
<fes:Constraint name="ImplementsResourceId">
<ows:NoValues/>
<ows:DefaultValue>TRUE</ows:DefaultValue>
</fes:Constraint>
<fes:Constraint name="ImplementsMinStandardFilter">
<ows:NoValues/>
<ows:DefaultValue>TRUE</ows:DefaultValue>
</fes:Constraint>
<fes:Constraint name="ImplementsStandardFilter">
<ows:NoValues/>
<ows:DefaultValue>TRUE</ows:DefaultValue>
</fes:Constraint>
<fes:Constraint name="ImplementsMinSpatialFilter">
<ows:NoValues/>
<ows:DefaultValue>TRUE</ows:DefaultValue>
</fes:Constraint>
<fes:Constraint name="ImplementsSpatialFilter">
<ows:NoValues/>
<ows:DefaultValue>TRUE</ows:DefaultValue>
</fes:Constraint>
<fes:Constraint name="ImplementsMinTemporalFilter">
<ows:NoValues/>
<ows:DefaultValue>TRUE</ows:DefaultValue>
</fes:Constraint>
<fes:Constraint name="ImplementsTemporalFilter">
<ows:NoValues/>
<ows:DefaultValue>TRUE</ows:DefaultValue>
</fes:Constraint>
<fes:Constraint name="ImplementsVersionNav">
<ows:NoValues/>
<ows:DefaultValue>FALSE</ows:DefaultValue>
</fes:Constraint>
<fes:Constraint name="ImplementsSorting">
<ows:NoValues/>
<ows:DefaultValue>TRUE</ows:DefaultValue>
</fes:Constraint>
<fes:Constraint name="ImplementsExtendedOperators">
<ows:NoValues/>
<ows:DefaultValue>FALSE</ows:DefaultValue>
</fes:Constraint>
<fes:Constraint name="ImplementsMinimumXPath">
<ows:NoValues/>
<ows:DefaultValue>TRUE</ows:DefaultValue>
</fes:Constraint>
</fes:Conformance>
<fes:Id_Capabilities>
<fes:ResourceIdentifier name="fes:ResourceId"/>
</fes:Id_Capabilities>
<fes:Scalar_Capabilities>
<fes:LogicalOperators/>
<fes:ComparisonOperators>
<fes:ComparisonOperator name="PropertyIsLessThan"/>
<fes:ComparisonOperator name="PropertyIsGreaterThan"/>
<fes:ComparisonOperator name="PropertyIsLessThanOrEqualTo"/>
<fes:ComparisonOperator name="PropertyIsGreaterThanOrEqualTo"/>
<fes:ComparisonOperator name="PropertyIsEqualTo"/>
<fes:ComparisonOperator name="PropertyIsNotEqualTo"/>
<fes:ComparisonOperator name="PropertyIsLike"/>
<fes:ComparisonOperator name="PropertyIsBetween"/>
<fes:ComparisonOperator name="PropertyIsNull"/>
<fes:ComparisonOperator name="PropertyIsNil"/>
</fes:ComparisonOperators>
</fes:Scalar_Capabilities>
WFS and Geoserver - what exactly is FES and what is the correct syntax?
geoserver/wfs?service=wfs&version=2.0.0&request=GetCapabilities
strictly the request should begeoserver/wfs?service=WFS&acceptversions=2.0.0&request=GetCapabilities