Skip To Content

Configure a WFS to use stored queries

Stored queries allow complex filter queries to be stored by Web Feature Service (WFS) 2.0 and executed using a basic request. Configuring stored queries gives you a wide range of benefits that broaden the use of WFS 2.0 in applications:

  • Complex queries can be streamlined so they can be executed as HTTP GET requests.
  • A WFS can be implemented to support only stored queries so the administrator can control how users access the data.
  • Stored queries can reduce costs for development of applications since they can be configured to support specific queries rather than complex ad hoc queries and XPath expressions.
  • RESTful interfaces can be established on top of the WFS alongside HTTP GET/POST and SOAP to enable the WFS to be used within lightweight client applications.

To use stored queries with WFS 2.0, configure the service to reference the URL of your stored queries file. You can do this using ArcGIS Server Manager or ArcMap. To learn how to create stored queries files, see Communicating with a WFS service in a web browser.

Note:

Stored queries are only supported by the WFS 2.0 implementation; they are not supported in WFS 1.0.0 or 1.1.0.

Configure in ArcGIS Server Manager

  1. Open ArcGIS Server Manager and log in. If you need help with this step, see Log in to Manager.
  2. Click Services > Manage Services.
  3. In the Manage Services module, locate your service and click Edit Edit. If you don't see your service in the list, it may be located within a subfolder under the Site (root) folder.
  4. In the Edit module, click Capabilities.
  5. In the capabilities list, click WFS.
  6. In the Path or URL to stored query file (WFS 2.0) input box, enter the file path or URL to your stored queries file. For example:
    • File path: C:\WFS_Testing\WFSStoredQueryFile.xml or \\share\WFS_Testing\WFSStoredQueryFile.xml
    • URL: http://myserver.domain.com/WFSStoredQueryFile.xml
  7. Click Save and Restart.

Configure in ArcMap

  1. In ArcCatalog or the Catalog window in ArcMap, expand the GIS Servers node and establish an Administer GIS server connection type to ArcGIS Server. If you already have an Administer GIS server connection set up, you can skip this step. For instructions on how to connect, see Make an administrative connection to ArcGIS Server in ArcMap.
  2. Within your ArcGIS Server connection, right-click your WFS service and choose Service Properties.
  3. In the Service Editor, click Capabilities > WFS.
  4. In the Path or URL to stored query file (WFS 2.0) input box, enter the file path or URL to your stored queries file. For example:
    • File path: C:\WFS_Testing\WFSStoredQueryFile.xml or \\share\WFS_Testing\WFSStoredQueryFile.xml
    • URL: http://myserver.domain.com/WFSStoredQueryFile.xml
  5. Click OK.