Each WMS 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 metadata about the service.
- Add metadata about each layer.
- Customize the legend information for each layer.
To use external capabilities files with WMS services, you'll need to create the files and then configure the files for use with your WMS services. The sections below describe this process.
By using external capabilities files for your WMS 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 from which your WMS service is published.
Create external capabilities files
To configure a WMS service to use external capabilities files, you must prepare at least one WMS capabilities file. You can create the file from scratch, but it's often easier to use a system-generated capabilities file as a template.
By default, system-generated capabilities files are created automatically every time you send a WMS GetCapabilities request to the service. To use a system-generated capabilities file as a template, you need to manually send the GetCapabilities request and save the response as XML. If you want your WMS service to support different versions of WMS protocol—for example, 1.0.0, 1.1.0, 1.1.1, and 1.3.0—you must have one capabilities file for each version of WMS you want to support.
Complete the following steps to create external capabilities files for your WMS service:
- If you haven't done so already, publish a map or image service and enable the WMS capability. For more information, see WMS services.
- In a web browser, provide the URL of your WMS service. The URL is formatted as follows:
https://gisserver.domain.com:6443/arcgis/services/folder/service/service type(can be MapServer or ImageServer)/WMSServer
- 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 WMS version 1.0.0 capabilities file for your service.
- Save the results as an XML file. The file name must follow the format <prefix><WMS version>.xml. For example, when you save the result XML from a WMS version 1.0.0 GetCapabilities request, the file must use a common prefix (such as Roads) followed by the three-digit WMS version number (100). The resulting file is Roads100.xml.
- Repeat steps 3 and 4 for each WMS version you want to support, for example, 1.1.0, 1.1.1, and 1.3.0.
- Configure and customize metadata information for the WMS layers in each capabilities file.
- Move all of the capabilities files into a common folder accessible through HTTP. Typically, this will be a virtual directory on your organization's web server.
Configure a WMS service to use external capabilities files
To configure your WMS service to use external capabilities files, you'll need to update the WMS service to reference the URL of your capabilities files. You can do this in ArcGIS Server Manager or ArcMap.
Configure in ArcGIS Server Manager
- Start ArcGIS Server Manager and sign in as an ArcGIS Server administrator. If you need help with this step, see Log in to ArcGIS Server Manager.
- Click Services > Manage Services.
- In the Manage Services module, locate your service and click Edit . If you don't see your service in the list, it may be located in a subfolder under the Site (root) folder.
- In the Edit module, click Capabilities.
- In the capabilities list, click WMS.
- In the WMS Configuration list, choose Use external capabilities files.
- In the Specify the location and prefix text 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/WMS/services and the common prefix you used is Roads, the URL you specify in the Specify the location and prefix text box is https://webserver.domain.com/arcgis/WMS/services/Roads.
- Click Save and Restart.
Configure in ArcMap
- In ArcCatalog or the Catalog window in ArcGIS Server, expand the GIS Servers node and establish an Administer GIS server connection type to your ArcGIS Server site.
If you have set up an Administer GIS server connection, you can skip this step. For instructions, see Connect to ArcGIS Server from ArcGIS Desktop.
- Within your connection to ArcGIS Server, right-click your service and choose Service Properties.
- In the Service Editor, click the Capabilities tab.
- Click the WMS tab and choose Use external capabilities files.
- 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/WMS/services and the common prefix you used is Roads, the URL you specify in the Specify the location and prefix text box is https://webserver.domain.com/arcgis/WMS/services/Roads.
- Click OK.