DescribeStoredQueries

La operación DescribeStoredQueries arroja metadatos detallados sobre cada consulta almacenada mantenida por el servidor WMS. Se puede solicitar la descripción de una consulta individual si se proporciona el ID de una consulta específica. Si no se proporciona un ID, se obtiene la descripción de todas las consultas. Un ID no válido de una consulta almacenada arrojará un informe de excepción. DescribeStoredQueries es compatible solo con las versiones 2.0.0 y 2.0.2 de WFS únicamente mediante consultas GET (KVP) y POST (XML). Actualmente solo se admiten elementos GetFeatureById, lo cual arroja una descripción de una consulta almacenada denominada GetFeatureById para KVP y XML.

Solicitud GET

La solicitud GET contiene:

Input Requerido Descripción
SERVICE=WFS Fijo en WFS.
REQUEST=DescribeStoredQueries Definido en DescribeStoredQueries para un tipo de característica descriptiva de operación.
VERSION La versión compatible del estándar Web Feature Service (para esta operación, ya sea 2.0.0 o 2.0.2).
STOREDQUERY_ID=<stored query ID or IDs separated by comma> No ID de consulta almacenada específico o identificadores (ID) que se describirán.

Solicitud GET de muestra con KVP:

http://<server>:<port>/rest/Spatial/WFS?SERVICE=WFS&REQUEST=DescribeStoredQueries&VERSION=2.0.0

Solicitud POST

Solicitud POST de muestra con XML (solo versión 2.0.0; el elemento StoredQueryID usa un formato URN):

<wfs:DescribeStoredQueries
version="2.0.0"
service="WFS"
xmlns:wfs="http://www.opengis.net/wfs/2.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.opengis.net/wfs/2.0 http://schemas.opengis.net/wfs/2.0/wfs.xsd">
               <wfs:StoredQueryId>urn:ogc:def:query:OGC-WFS::GetFeatureById</wfs:StoredQueryId>
</wfs:DescribeStoredQueries>

Solicitud POST de muestra con XML (solo versión 2.0.2; el elemento StoredQueryID usa un formato URL [http]):

<wfs:DescribeStoredQueries
version="2.0.2"
service="WFS"
xmlns:wfs="http://www.opengis.net/wfs/2.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.opengis.net/wfs/2.0 http://schemas.opengis.net/wfs/2.0/wfs.xsd">
               <wfs:StoredQueryId>http://www.opengis.net/def/query/OGC-WFS/0/GetFeatureById</wfs:StoredQueryId>
</wfs:DescribeStoredQueries>

Respuesta de muestra (v2.0.0)

<wfs:DescribeStoredQueriesResponse xmlns:wfs="http://www.opengis.net/wfs/2.0" xmlns:ows="http://www.opengis.net/ows/1.1" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:fes="http://www.opengis.net/fes/2.0" xmlns:gml="http://www.opengis.net/gml" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/wfs/2.0/wfs.xsd">
		<wfs:StoredQueryDescription id="urn:ogc:def:query:OGC-WFS::GetFeatureById">
			<wfs:Title xml:lang="en">Get Feature By Identifier</wfs:Title>
			<wfs:Abstract>
				This stored query accepts a single argument, named "id" and of type xsd:string, and shall return a single feature with the identifier specified as its argument.
			</wfs:Abstract>
			<wfs:Parameter name="ID" type="xs:string">
				<wfs:Title>The Feature Id</wfs:Title>
				<wfs:Abstract>The id of the feature to be returned</wfs:Abstract>
			</wfs:Parameter>
			<wfs:QueryExpressionText xmlns:miwfs="http://www.mapinfo.com/wfs" xmlns:miwfs2="http://www.mapinfo.com/wfs2" returnFeatureTypes="miwfs:World miwfs:WorldCap miwfs:USA miwfs:USACap miwfs2:World miwfs:UK_REGNS miwfs:UKCTY215 miwfs:txairportswithtimefields" language="urn:ogc:def:queryLanguage:OGC-WFS::WFS_QueryExpression" isPrivate="true"/>
		</wfs:StoredQueryDescription>
	</wfs:DescribeStoredQueriesResponse>

Respuesta de muestra (v2.0.2)

<wfs:DescribeStoredQueriesResponse xmlns:wfs="http://www.opengis.net/wfs/2.0" xmlns:ows="http://www.opengis.net/ows/1.1" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:fes="http://www.opengis.net/fes/2.0" xmlns:gml="http://www.opengis.net/gml" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/wfs/2.0/wfs.xsd">
	<wfs:StoredQueryDescription id="http://www.opengis.net/def/query/OGC-WFS/0/GetFeatureById">
		<wfs:Title xml:lang="en">Get Feature By Identifier</wfs:Title>
		<wfs:Abstract>
			This stored query accepts a single argument, named "id" and of type xsd:string, and shall return a single feature with the identifier specified as its argument.
		</wfs:Abstract>
		<wfs:Parameter name="ID" type="xs:string">
			<wfs:Title>The Feature Id</wfs:Title>
			<wfs:Abstract>The id of the feature to be returned</wfs:Abstract>
		</wfs:Parameter>
		<wfs:QueryExpressionText xmlns:miwfs="http://www.mapinfo.com/wfs" xmlns:miwfs2="http://www.mapinfo.com/wfs2" returnFeatureTypes="miwfs:World miwfs:WorldCap miwfs:USA miwfs:USACap miwfs2:World miwfs:UK_REGNS miwfs:UKCTY215 miwfs:txairportswithtimefields" language="urn:ogc:def:queryLanguage:OGC-WFS::WFS_QueryExpression" isPrivate="true"/>
	</wfs:StoredQueryDescription>
</wfs:DescribeStoredQueriesResponse>