Skip To Content

Use external capabilities files with WFS services

Each WFS service exposes service-level metadata through its capabilities file. The capabilities file is the XML response that clients receive when they make a GetCapabilities request on the service. Configuring external capabilities files gives you the flexibility to do the following:

  • Add service-level metadata information to WFS capabilities files.
  • Add feature-level metadata information to WFS capabilities files.
  • Add additional predefined spatial reference systems from the ArcGIS Server predefined projection list.
  • Improve performance when connecting to your WFS service, especially when there are many type names in your service.

To use external capabilities files with WFS services, create the files and configure the files for use with your WFS services. The sections below describe this process.

Note:

By using external capabilities files for your WFS service, you are responsible for validating your capabilities files against the DTD or XML schema from OGC. You also assume responsibility for all the synchronization between your capabilities files and the source map document or geodatabase from which your WFS service is published.

Creating external capabilities files

To configure a WFS service to use external capabilities files, prepare three WFS capabilities files: one for version 1.0.0, one for 1.1.0, and one for 2.0. You can create the files from scratch, but it's often easier to use the system-generated capabilities files as templates.

By default, system-generated capabilities files are created automatically every time you send a WFS GetCapabilities request to the service. To use the system-generated capabilities files as templates, manually send the GetCapabilities requests and save the responses as XML.

Follow the steps below to create external capabilities files for your WFS service.

  1. If you haven't done so already, publish a map and enable the WFS capability. For more information, see WFS services.
  2. In a web browser, enter the URL of your WFS service. The URL is formatted as follows:

    https://gisserver.domain.com:6443/arcgis/services/folder/service/MapServer/WFSServer

  3. Append ?request=GetCapabilities&version=1.0.0 to the end of the service URL and press Enter. The XML displayed in the browser is the WFS version 1.0.0 capabilities for your service.
  4. Save the results as an XML file. The file name must follow the format <prefix><WFS version>.xml. For example, when you save the result XML from a WFS version 1.0.0 GetCapabilities request, the file must use a common prefix (such as Roads) followed by the three-digit WFS version number (100). The resulting file is Roads100.xml.
  5. Repeat steps 3 and 4 to create the capabilities files for WFS version 1.1.0 and 2.0.
  6. Configure and customize metadata information for the WFS layers in each capabilities file.
  7. Move all the capabilities files into a common folder accessible through HTTP. Typically, this will be a virtual directory on your organization's web server.

Configuring a WFS service to use external capabilities files

To configure your WFS service to use external capabilities files, update the WFS service to reference the URL of your capabilities files. You can do this in ArcGIS Server Manager or ArcMap.

Configure in ArcGIS Server Manager

  1. Open ArcGIS Server Manager and log in.
  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 in a subfolder under the Site (root) folder.
  4. In the Edit module, click Capabilities.
  5. In the capabilities list, click WFS.
  6. In the WFS Configuration list, choose Use external capabilities files.
  7. In the Specify the location and prefix box, specify the URL of the folder where you placed your capabilities files plus the common prefix you used for the files. For example, if the URL to the folder that contains your files is https://webserver.domain.com/arcgis/WFS/services and the common prefix you used is Roads, the URL you specify in the Specify the location and prefix box is https://webserver.domain.com/arcgis/WFS/services/Roads.
  8. 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 your ArcGIS Server site.

    If you already have an Administer GIS server connection set up, you can skip this step. For instructions on how to connect, see Connect to ArcGIS Server from ArcGIS Desktop.

  2. Within your connection to ArcGIS Server, right-click your service and choose Service Properties.
  3. In the Service Editor, click the Capabilities tab.
  4. Click the WFS tab and select Use external capabilities files.
  5. In the Specify the location and prefix box, specify the URL of the folder where you placed your capabilities files plus the common prefix you used for the files. For example, if the URL to the folder that contains your files is https://webserver.domain.com/arcgis/WFS/services and the common prefix you used is Roads, the URL you specify in the Specify the location and prefix box is https://webserver.domain.com/arcgis/WFS/services/Roads.
  6. Click OK.

Control the number of features returned by the service

To control the maximum number of features returned by the service, set the DefaultMaxFeatures property. The DefaultMaxFeatures property is only supported with WFS 1.1.0, so if you are using external capabilities files, you only need to set this property in the file referencing the 1.1.0 properties.

In an external capabilities file, the DefaultMaxFeatures property is defined in the metadata section of WFSServer 1.1.0 file as follows:

<ows:Constraint name="DefaultMaxFeatures">
 <ows:Value>200</ows:Value>
</ows:Constraint>