Skip To Content

Configuring a WFS service to use stored queries

In this topic

Stored queries allow complex filter queries to be stored by 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 ArcGIS for Desktop. 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.

ArcGIS Server Manager

  1. Open ArcGIS Server Manager and log in. If you need help with this step, see Logging 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.

ArcGIS for Desktop

  1. In ArcCatalog or the Catalog window in ArcGIS for Desktop, 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 Making an administrative connection to ArcGIS Server in ArcGIS for Desktop.
  2. Within your connection to ArcGIS Server, right-click your 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.