5.2.2 Edit the GetCapabilities documents
ArcGIS server doesn’t create any static GetCapabilities xml documents, but does allow you to use external files. You will need to use such external files if you want to add any additional spatial reference systems, correct the keywords listing, change the LegendURL images, add better abstracts and layer titles, or add an INSPIRE extended capabilities section. We think to provide a fully compliant WMS it is highly likely that you will need to use a set of static files.
The first step to editing your files is to create them!
The quickest way to do this is to use the response documents from your initial service. You will need to have a file for all the WMS versions that you want your service to support. We would recommend that you have at least a version 1.3.0 document and a version 1.1.1 document; for completeness you could also have a 1.1.0 and 1.0.0 response.
Your WMS version 1.1.1 GetCapabilities document is generated using a request like:
http://[hostname]/ArcGIS/services/[map service title]/MapServer/WMSServer?service=WMS&request=GetCapabilities&version=1.1.1&
Save this as [short service name]111.xml
Your WMS version 1.3.0 GetCapabilities document is generated using a request like:
http://[hostname]/ArcGIS/services/[map service title]/MapServer/WMSServer?service=WMS&request=GetCapabilities&version=1.3.0&
Save this as [short service name]130.xml
It doesn’t really matter what name you give these files, as long as you use the same name prefix for all files that belong to the same service.
You need to put these files on the server (or at a location available to your server), and make them browseable. These files only need to be browseable internally by the ArcGIS server.
Now go back to the ArcGIS Server Manager and edit your service. Select "WMS", then select the "Use External capabilities files" option and in the ‘Specify the location and prefix’ dialog add the web address to the folder containing the capabilities response documents plus your [short service name] prefix.
For example:
For a service called BGS_EN_MARS_GEOLOGY, we may save our initial GetCapabilities response documents using a prefix "MARS-", giving us a file called MARS-130.xml for our version 1.3.0 GetCapabilities response document, MARS-111.xml for our version 1.1.1 GetCapabilities response document, MARS-110.xml for our version 1.1.0 GetCapabilities response document, and MARS-100.XML for our version 1.0.0 GetCapabilities response document. We might then save these to a location on our web server such as C:\Inetpub\wwwroot\ONEGEOLOGY_WMS\BGS_EN_MARS_GEOLOGY\ which would be browseable locally as http://localhost/ONEGEOLOGY_WMS/BGS_EN_MARS_GEOLOGY/. When we select the "Use External capabilities files" option, we then provide the web address and prefix as http://localhost/ONEGEOLOGY_WMS/BGS_EN_MARS_GEOLOGY/MARS-
Having created your files, you may then edit them as required. We would recommend you make a second copy of the files in case you make an error whilst editing.
INSPIRE extended capabilities
The extended capabilites section is inserted into your external GetCapabilities section, between the Exception element block and the first Layer element.
For example to add a scenario 1 INSPIRE extended capabilities section (where you have an external XML document or service that provides such an XML document containing metadata for your WMS service) you would insert a section like below:
</Exception> <inspire_vs:ExtendedCapabilities xmlns:inspire_vs="http://inspire.ec.europa.eu/schemas/inspire_vs/1.0"> <inspire_common:MetadataUrl xsi:type="inspire_common:resourceLocatorType"> <inspire_common:URL>http://metadata.bgs.ac.uk/geonetwork/srv/en/csw?SERVICE=CSW &REQUEST=GetRecordById&ID=7822e848-822d-45a5-8584-56d352fd2170&elementSetName=full&OutputSchema=csw:IsoRecord& </inspire_common:URL> <inspire_common:MediaType>application/xml</inspire_common:MediaType> </inspire_common:MetadataUrl> <inspire_common:SupportedLanguages> <inspire_common:DefaultLanguage> <inspire_common:Language>eng</inspire_common:Language> </inspire_common:DefaultLanguage> </inspire_common:SupportedLanguages> <inspire_common:ResponseLanguage> <inspire_common:Language>eng</inspire_common:Language> </inspire_common:ResponseLanguage> </inspire_vs:ExtendedCapabilities> <Layer>
Alternatively to add a scenario 2 INSPIRE extended capabilities section (where you have no external metadata document for your WMS service) you would insert a section like below:
</Exception> <inspire_vs:ExtendedCapabilities xmlns:inspire_vs="http://inspire.ec.europa.eu/schemas/inspire_vs/1.0"> <inspire_common:ResourceLocator> <inspire_common:URL>http://ogc2.bgs.ac.uk/cgi-bin/BGS_OGE_Bedrock_and_Surface_Geology_in3/ows?</inspire_common:URL> </inspire_common:ResourceLocator> <inspire_common:ResourceType>service</inspire_common:ResourceType> <inspire_common:TemporalReference> <inspire_common:DateOfLastRevision>2015-10-23</inspire_common:DateOfLastRevision> </inspire_common:TemporalReference> <inspire_common:Conformity> <inspire_common:Specification> <inspire_common:Title>-</inspire_common:Title> <inspire_common:DateOfLastRevision>2015-10-23</inspire_common:DateOfLastRevision> </inspire_common:Specification> <inspire_common:Degree>notEvaluated</inspire_common:Degree> </inspire_common:Conformity> <inspire_common:MetadataPointOfContact> <inspire_common:OrganisationName>Mr Matthew Harrison</inspire_common:OrganisationName> <inspire_common:EmailAddress>enqiries@bgs.ac.uk</inspire_common:EmailAddress> </inspire_common:MetadataPointOfContact> <inspire_common:MetadataDate>2015-10-23</inspire_common:MetadataDate> <inspire_common:SpatialDataServiceType>view</inspire_common:SpatialDataServiceType> <inspire_common:MandatoryKeyword xsi:type='inspire_common:classificationOfSpatialDataService'> <inspire_common:KeywordValue>infoMapAccessService</inspire_common:KeywordValue> </inspire_common:MandatoryKeyword> <inspire_common:SupportedLanguages> <inspire_common:DefaultLanguage> <inspire_common:Language>eng</inspire_common:Language> </inspire_common:DefaultLanguage> </inspire_common:SupportedLanguages> <inspire_common:ResponseLanguage> <inspire_common:Language>eng</inspire_common:Language> </inspire_common:ResponseLanguage> </inspire_vs:ExtendedCapabilities> <Layer>
In addition (for both scenarios) you will need to reference the inspire_common schema and namespace in your root element, so it will become something like:
<WMS_Capabilities xmlns:inspire_common="http://inspire.ec.europa.eu/schemas/common/1.0" xmlns="http://www.opengis.net/wms" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:esri_wms="http://www.esri.com/wms" version="1.3.0" xsi:schemaLocation="http://www.opengis.net/wms http://schemas.opengis.net/wms/1.3.0/capabilities_1_3_0.xsd http://inspire.ec.europa.eu/schemas/inspire_vs/1.0 http://inspire.ec.europa.eu/schemas/inspire_vs/1.0/inspire_vs.xsd http://www.esri.com/wms http://../arcgis/services/.../MapServer/WmsServer?version=1.3.0%26service=WMS%26request=GetSchemaExtension">
Section last modified: 23 March 2016