7.4.6. ListStoredQueries

Since version 2.0 of the WFS standard, a WFS server is supposed to manage predefined and parameterized feature query expressions (so called stored queries) that are stored by the server and that can be repeatedly invoked by the client using different parameter values. Stored queries hide the complexity of the underlying query expression from the client since all the client needs to know is the unique identifier of the stored query as well as the names and types of the parameters in order to invoke the operation. For example, the stored query is referenced by its identifier in a GetFeature operation (see Section 7.4.4)

The ListStoredQuery operation is meant to provide the list of stored queries that is offered by the WFS server. The response document contains the unique identifier for each stored query which can then be used in a subsequent DescribeStoredQuery operation to receive the details of a specific stored query form the WFS server. The following listing presents an example ListStoredQuery operation.

<?xml version="1.0" encoding="UTF-8"?>
<wfs:ListStoredQueries service="WFS" version="2.0.0"
 xmlns:wfs="http://www.opengis.net/wfs/2.0"/>

The ListStoredQuery operation may take the following XML attributes as parameters.

Table 7.22 Supported XML attributes of a ListStoredQuery operation. (O = optional, M = mandatory)
XML attribute
O / M
Default value
Description
service
M
WFS (fixed)
The service attribute indicates the
service type. The value “WFS” is fixed.
version
M
2.0.x
The service attribute indicates the
The version of the WFS Interface
Standard to be used in the
communication.
handle
O

The handle parameter allows a client to
associate a mnemonic name with the
request that will be used in exception
reports.

The corresponding KVP-encoded request is shown below.

http[s]://[host][:port]/[context_path]/wfs?
SERVICE=WFS&
VERSION=2.0.0&
REQUEST=ListStoredQueries

The following KVP parameters can be used when invoking the ListStoredQueries operation.

Table 7.23 Supported KVP parameters of a ListStoredQuery operation. (O = optional, M = mandatory)
KVP parameter
O / M
Default value
Description
SERVICE
M
WFS (fixed)
see above
VERSION
M
2.0.x
see above