[mapserver-users] msWFSGetStoredQuery(): WFS server error. Cannot open file

Passmore, James H. jpass at bgs.ac.uk
Fri Aug 30 02:13:48 PDT 2019


I'm configuring a WFS to provide some stored queries, and following https://mapserver.org/ogc/wfs_server.html?highlight=wfs_storedqueries

In my WEB > METADATA  section, if I use:

"wfs_storedqueries" "CommodityByYearStoredQuery"

and an inlinedef either directly like:

"wfs_CommodityByYearStoredQuery_inlinedef" '<?xml version="1.0" encoding="UTF-8"?><StoredQueryDescription xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:gml="http://www.opengis.net/gml/3.2" id="CommodityByYearStoredQuery"><Title>Commodity by year</Title><Abstract>Query by commodity and year, for example Bauxite in 2013</Abstract><Parameter name="commodity" type="xs:string"/><Parameter name="year" type="xs:string"/><QueryExpressionText isPrivate="false" language="urn:ogc:def:queryLanguage:OGC-WFS::WFS_QueryExpression" xmlns:ms="http://mapserver.gis.umn.edu/mapserver" returnFeatureTypes="ms:mintell_centroids"><Query xmlns:fes="http://www.opengis.net/fes/2.0" typeNames="ms:mintell_centroids"><fes:Filter><fes:And><fes:PropertyIsEqualTo><fes:PropertyName>commodity</fes:PropertyName><fes:Literal>${commodity}</fes:Literal></fes:PropertyIsEqualTo><fes:PropertyIsEqualTo><fes:PropertyName>year</fes:PropertyName><fes:Literal>${year}</fes:Literal></fes:PropertyIsEqualTo></fes:And></fes:Filter></Query></QueryExpressionText></StoredQueryDescription>'

or as an INCLUDE like:

INCLUDE "storedQry/wfs_CommodityByYearStoredQuery_inlinedef.map"

My stored query works

If I use "wfs_CommodityByYearStoredQuery_filedef" "storedQry/comm-by-year.map"  with the same content as used in the inlinedef I get an error, either

DescribeStoredQueries / ListStoredQueries

<!--
WARNING: Definition for stored query CommodityByYearStoredQuery missing
-->

or GetFeature

msWFSGetResolvedStoredQuery20(): WFS server error. Unknown stored query id: CommodityByYearStoredQuery msWFSGetStoredQuery(): WFS server error. Cannot open storedQry/comm-by-year.map


Is this a bug or have I got something wrong with the filedef option?

It doesn't seem to be a permissions issue, because the INCLUDE for the inlinedef is in the same folder and works


I'm running MapServer version 7.4.0 on Windows.



James Passmore
-------------------------------
British Geological Survey,
Environmental Science Centre,
KEYWORTH,
United Kingdom,
NG12 5GG

orcid: https://orcid.org/0000-0002-9891-6265
-------------------------------
Phone: +44 (0)115 936 3125
-------------------------------
Skype: BGSjames




This email and any attachments are intended solely for the use of the named recipients. If you are not the intended recipient you must not use, disclose, copy or distribute this email or any of its attachments and should notify the sender immediately and delete this email from your system.
UK Research and Innovation has taken every reasonable precaution to minimise risk of this email or any attachments containing viruses or malware but the recipient should carry out its own virus and malware checks before opening the attachments. UK Research and Innovation does not accept any liability for any losses or damages which the recipient may sustain due to presence of any viruses.
Opinions, conclusions or other information in this message and attachments that are not related directly to UK Research and Innovation business are solely those of the author and do not represent the views of UK Research and Innovation.




More information about the MapServer-users mailing list