To reproduce just create the following stored query, namespace _http://www.opengis.org/fes/2.0_ is being used instead of _http://www.opengis.net/fes/2.0_:
<wfs:CreateStoredQuery service='WFS' version='2.0.0'
xmlns:wfs='http://www.opengis.net/wfs/2.0'
xmlns:fes='http://www.opengis.org/fes/2.0'
xmlns:gml='http://www.opengis.net/gml/3.2'
xmlns:topp='http://www.openplans.org/topp'>
<wfs:StoredQueryDefinition id='myStoredQuery3'>
<wfs:Parameter name='AreaOfInterest' type='gml:Polygon'/>
<wfs:QueryExpressionText
returnFeatureTypes='topp:states'
language='urn:ogc:def:queryLanguage:OGC-WFS::WFS_QueryExpression'
isPrivate='false'>
<wfs:Query typeNames='topp:states'>
<fes:Filter>
<fes:Within>
<fes:ValueReference>the_geom</fes:ValueReference>
${AreaOfInterest}
</fes:Within>
</fes:Filter>
</wfs:Query>
</wfs:QueryExpressionText>
</wfs:StoredQueryDefinition>
</wfs:CreateStoredQuery>
GeoServer will internally (inside the data directory) store it like this:
<?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="myStoredQuery3"><wfs:Parameter name="AreaOfInterest" type="gml:Polygon"/><wfs:QueryExpressionText isPrivate="false" language="urn:ogc:def:queryLanguage:OGC-WFS::WFS_QueryExpression" returnFeatureTypes="topp:states"><wfs:Query wfs:typeNames="topp:states">
<null:Filter xmlns:null="http://www.opengis.org/fes/2.0">
<null:Within>
${AreaOfInterest}
<null:ValueReference>the_geom</fes:ValueReference></fes:Within></fes:Filter></wfs:Query></wfs:QueryExpressionText></wfs:StoredQueryDescription>
… and will not be able to read it back, complain with:
<?xml version="1.0" encoding="UTF-8"?>
<ows:ExceptionReport
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:ows="http://www.opengis.net/ows/1.1"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.0.0" xsi:schemaLocation="http://www.opengis.net/ows/1.1 http://localhost:8080/geoserver/schemas/ows/1.1.0/owsAll.xsd">
<ows:Exception exceptionCode="NoApplicableCode">
<ows:ExceptionText>java.lang.RuntimeException: Error accessign stoed query: myStoredQuery3
Error accessign stoed query: myStoredQuery3
The element type &amp;quot;null:ValueReference&amp;quot; must be terminated by the matching end-tag &amp;quot;&amp;lt;/null:ValueReference&amp;gt;&amp;quot;.</ows:ExceptionText>
</ows:Exception>
</ows:ExceptionReport>
Using strict=true will not have an effect on this, since according to XML rules the the XML is valid, it is just GeoServer who expects a certain namespace.
|