Have you ever wanted to include capabilities files with your OGC Service? An OGC 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. Below is my step by step guide on how to complete this process for a WMS Service. To use external capabilities files with OGC services in ArcGIS, you will need to create the files for use with the service. In my situation I want my WMS service to support different versions of WMS protocols – for example 1.0.0, 1.1.0, 1.1.1 and 1.3.0. To do this I must create one capabilities file for each version of WMS.
- Firstly publish a map or geodata service with WMS enabled.
- Navigate to your ArcGIS REST Services Directory, click the service and then click WMS.
- The page should now list the WMS protocol currently with the service. The URL for the service should look similar to:
- The next step is to adjust the URL. Append after the ‘WMSServer?‘ the following:
Where 1.0.0 corresponds to the WMS protocol of the external capabilities file you wish to generate.
My original URL:
- Depending on your internet browser, this will either instantly download the XML or take you to a new page where you will then need to save the XML. When saving the file, ensure the XML is named with the version. For example: 1.0.0 will be named 100, 1.1.0 will be 110 etc.
- Repeat the previous step for each WMS protocol you want to support (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).
- Now you are going to move all the capabilities files into a common file accessible through HTTP. Typically this will be a virtual directory on your organisational web server. Test that you can access each XML, via your web server.
- Now log into your ArcGIS Server Manager. Click to edit the service.
- Now click ‘Capabilities’ and then ‘WMS’. Change the properties to use external capabilities files. In the box, specify the path to your external capabilities files, for example: http://localhost/xml/
Once changed, click save and restart to update the service.
- Finally test your service with ArcMap. Add the WMS Service, you should be able to specify the version you wish, besides the default that the WMS was published with.
So there we have it, your service should now support multiple WMS protocols. Steps are very similar for other OGC Services, I would encourage you to view the relevant help documentation (WCS, WFS, WMS, and WPS). It is also important to note that by using external capabilities files for your OGC service, you are responsible for validating your capabilities files against the Document Type Definition (DTD) or XML schema from OGC. You also assume responsibility for all the synchronisation between your capabilities files and the source map document from which your OGC service is published.