Using 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:

To use external capabilities files with WFS services, you'll need to create the files and then configure the files for use with your WFS services. The sections below describe this process.

NoteNote:

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, you must prepare two WFS capabilities files: one for version 1.0.0 and one for 1.1.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, you need to manually send the GetCapabilities requests and save the responses as XML.

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

Steps:
  1. If you haven't done so already, publish a map or geodata service 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:

    http://gisserver.domain.com:6080/arcgis/services/folder/service/service type(can be MapServer or GeoDataServer)/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 file for WFS version 1.1.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, you'll need to update the WFS service to reference the URL of your capabilities files. You can do this in ArcGIS Server Manager or ArcGIS for Desktop.

In ArcGIS Server Manager:

Steps:
  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 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 http://webserver.domain.com/arcgis/WFS/services and the common prefix you used is Roads, then the URL you specify in the Specify the location and prefix box is http://webserver.domain.com/arcgis/WFS/services/Roads.
  8. Click Save and Restart.

In ArcGIS for Desktop:

Steps:
  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 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 http://webserver.domain.com/arcgis/WFS/services and the common prefix you used is Roads, then the URL you specify in the Specify the location and prefix box is http://webserver.domain.com/arcgis/WFS/services/Roads.
  6. Click OK.

Controlling the number of features returned by the service

Optionally, you can set the DefaultMaxFeatures property, which allows you to control the maximum number of features returned by the service. 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>

9/1/2015