WMS services

An OGC Web Map Service (WMS) produces maps of spatially referenced data dynamically from geographic information. This international standard defines a "map" to be a portrayal of geographic information as a digital image file suitable for display on a computer screen.

WMS service interfaces define three operations:

Preparing the map document

Publishing any GIS service requires you to first create the GIS resource, such as a map, then publish the resource as a service. A successfully published service can be consumed by client applications that support the service type. To follow this pattern for a WMS service, you need to first create the map document that you want to serve, then publish the map document as a map service with the WMS capability enabled, using either ArcCatalog or ArcGIS Server Manager. The service can then be consumed by any client that supports the OGC WMS specification.

Use ArcGIS Desktop's ArcMap application to create the map document that you want to serve. The map document and all of the data it references must be accessible to each server object container machine in your ArcGIS Server configuration. Additionally, the ArcGIS Server Object Container account must have the appropriate permissions to the data folder.

When preparing a map document for publication as a WMS service, keep in mind that people who view the service will not be able to change the layer order, symbology, scale-dependency, or transparency levels that you set. You should author your map in a way that all users can interpret without having to adjust these properties.

WMS services created with ArcGIS Server only support their native spatial reference system and WGS84. Given that ArcGIS Server supports thousands of predefined spatial reference systems, these spatial reference systems can be added into a WMS service and advertised to WMS clients by using external WMS capabilities files (see the subsection "Publishing a WMS service with external capabilities files" below for information on using additional spatial reference systems).

Publishing the map document as a WMS service

To publish the map document as a WMS service, you will need to create an ArcGIS Server map service that has the WMS capability enabled. For help with creating a map service, see Map services. You can either enable the WMS capability at the time you create the service, or you can enable it on an existing service by using the "Capabilities" tab of the map service's properties through ArcCatalog or Manager.

There are two ways to publish a WMS service in the perspective of how WMS capabilities files are generated. These are WMS services with system generated capabilities files, and WMS service with external capabilities files.

Publishing a WMS service with system generated capabilities files

  1. Start ArcCatalog or Manager.
  2. Open the map service's properties dialog. To do this in ArcCatalog, right-click an existing map service and select "Service Properties". In ArcGIS Server Manager, click the Edit link of an existing map service in the Services tab.
  3. Click the Capabilities tab.
  4. In the list of capabilities, check WMS if it is not checked already.
  5. In the Properties section of Capabilities tab, select "Enter service properties below" and you will see a table where you can input WMS service level metadata.
  6. You must at least provide a Name and a Title for your WMS service, and you must fill in the OnlineResource with the URL of this WMS service which is: http://<server name>/<instance name>/services/<folder name (if applicable)>/<map name>/mapserver/wmsserver?
  7. Populate other service-level metadata as needed.
  8. Save the change you made.

Publishing a WMS service with external capabilities files

Publishing using external capabilities aims at users who are familiar with OGC WMS specification and WMS capabilities files syntax. This option gives you maximum flexibility to customize your WMS services. With external capabilities files you can:

Publishing a WMS service using an external capabilities file saves the time it takes to create the capabilities file from scratch every time the service is accessed. This significantly improves the speed of connecting to your WMS service, especially when there are many layers in your service or the symbology of certain layers is complicated. However, if you make changes to the service's underlying map document, you must also update the capabilities file accordingly in order for the service to continue working.

To publish a WMS service with external capabilities files:

  1. Start ArcCatalog or Manager
  2. Open the map service's properties dialog. To do this in ArcCatalog, right-click an existing map service and select "Service Properties". In ArcGIS Server Manager, click the Edit link of an existing map service in the Services tab.
  3. Click the Capabilities tab.
  4. In the list of capabilities, check WMS if it is not checked already. 
  5. In the Properties section, select "Use external capabilities files" and you will see a input text where you can specify the URL location and prefix of capabilities files of your WMS service.
  6. To use external capabilities files for your WMS services, you must have at least one WMS capabilities file ready. If you want your WMS service to support different versions of WMS protocol—for example, 1.0.0, 1.1.0, or 1.1.1—you must have one capabilities file for each version of WMS you want to support.

    Note: External capabilities files are just XML files. You can find their definition in the WMS DTD/schema at http://schemas.opengis.net/wms/. You could create external capabilities files from scratch by following the OGC WMS specification and the WMS DTD/schema, but the best and most common workflow is to use system generated capabilities files as templates and modify them accordingly. To get system generated capabilities files, you need to publish a WMS service with system generated capabilities files first and save the XML responses of a WMS GetCapabilities request as XML files.

  7. Once you created all necessary capabilities file, name them with a common prefix (for example, "capabilities") plus a unique version number (for example, "capabilities100", "capabilities110", "capabilities111")
  8. Place all your capabilities files under a folder which is accessible from a URL, or you can place them under C:\Inetpub\wwwroot\<instance name>\wms if you are using IIS with ArcGIS Server for the Microsoft® .NET Framework.
  9. Input the URL of the folder where you place all your capabilities files plus the common prefix you use for them in "Specify the location prefix" input text box (For example, if you place capabilities files under C:\Inetpub\wwwroot\<instance name>\wms and you are using IIS with ArcGIS Server for .NET, you can just input "http://<server name>/<instance name>/wms/capabilities", in which "http://<server name>/<instance name>/wms/" is the location URL and "capabilities" is the common prefix)
  10. Save the change you made.

Note: By using external capabilities files for your WMS service, you must be responsible for validating your capabilities files against DTD or XML schema from OGC and all the synchronization between your capabilities files and the map document based-on which WMS service is published.

After creating the service, you can view and configure its advanced properties at any time in ArcCatalog or Manager. When configuring advanced properties, remember that WMS Services should always be pooled.

Using the WMS service

To connect to a WMS service, you need to know the URL. When you use ArcGIS Server to publish a WMS service, its URL takes this format:

http://<server name>/<instance name>/services/<folder name (if applicable)>/<map name>/mapserver/wmsserver?

For example, if you had a folder Japan which contained the service Tokyo, running on a machine named myServer with the default instance name of "arcgis", the URL of your WMS service would look like this:

http://myServer/arcgis/services/Japan/Tokyo/mapserver/wmsserver?

You can see a list of all of the WMS services running on your server and their URLs in ArcGIS Server Manager. See Viewing WMS services for more information.

Types of clients for WMS services

A Web browser is the simplest client of a WMS service. WMS requests can be issued through HTTP, and the responses or exceptions are returned through the browser. WMS services support three operations: GetCapabilities, GetMap, and GetFeatureInfo. Through URL parameters, a client can use these operations to obtain metadata, maps, and feature information from the WMS service. These operations and parameters are detailed in the OGC WMS specifications.

ArcCatalog and ArcMap can also act as clients for WMS services. For help on using WMS services in ArcMap, see Adding a WMS service layer to ArcMap in the ArcGIS Desktop Help.

If you're developing applications with the Web ADF, you can connect to WMS services using the OGC WMS Data Source Library (its fully qualified name is ESRI.ArcGIS.ADF.Web.DataSources.OGCWMSService). For information on how to use this library, see the Developer Help.

Other ESRI clients for WMS services include ArcGIS Explorer and ESRI GIS Portal Toolkit Mapviewer.