Skip To Content

Tutorial: Publishing a WMS service

Complexity: BeginnerData Requirement: Use your own dataGoal: Publish a WMS service to ArcGIS Server and consume it in ArcMap.

This tutorial walks you through the process of publishing an ArcMap map document as a WMS service. WMS is a specification published by the Open Geospatial Consortium, Inc. (OGC), for serving map images on the Internet. If you're new to WMS and want to learn more about it before attempting this tutorial, see WMS services.

Before beginning this tutorial

If you've just installed ArcGIS Server, you need to complete some preparatory steps before you can connect to the server in ArcMap and publish services:

Publishing the WMS service

Follow these steps to configure and publish your WMS service in ArcMap:

  1. Open your map document in ArcMap and choose File > Share As > Service from the main menu.
  2. In the Share as Service window, choose Publish a service. Click Next.
  3. In the Publish a Service dialog box, click Connect to ArcGIS Server Add ArcGIS Server to create a new connection to the server.
  4. In the Add ArcGIS Server window, choose Publish GIS Services. Click Next.
  5. For the Server URL, type the URL of the ArcGIS Server site you want to connect to. For example,
  6. From the Server Type drop-down list, choose ArcGIS Server.
  7. During the publishing process, a service definition file is created and temporarily stored locally on disk. When the publishing process completes, the service definition is uploaded to the server and the local file is deleted. For the purposes of this tutorial, accept the default staging folder and continue.
  8. If your server administrator has enabled security for your site, enter your User Name and Password. Click Finish.
  9. Optionally, in the Publish a Service window, enter a new name for the service. The name cannot be more than 120 characters long and may contain only alphanumeric characters and underscores. Click Next.
  10. By default, services are published to the root folder (root) of ArcGIS Server. Services can be organized into subfolders under the root folder. Choose the folder where you want to publish the service, or create a new folder to contain the service. Click Continue.
  11. The Service Editor displays. You'll use the Service Editor to choose what users can do with your WMS service and take fine-grained control of how the server will expose your service. Click the Capabilities tab.
  12. By default, mapping and KML are enabled. Select WMS.
  13. In the left pane of the Service Editor, click WMS. Use this panel to choose how to configure the properties of your WMS service. By providing WMS service properties, clients can gain a better understanding of the service publisher.
    • The URL field displays the URL clients use to access the WMS service. The URL will be formatted as follows:

      Copy and save the WMS service URL. You will need it to perform additional steps in this tutorial.

    • If you want to publish a WMS service with system-generated capabilities files, use the default Enter service properties below option. The Name, Title, and OnlineResource fields are automatically populated and should not be modified. Optionally, you can populate additional properties using the fields in the list. For more information, see Available WMS service properties.
    • If you want to configure a WMS service to use external capabilities files, select Use external capabilities files. To use this option, you must have already created a WMS capabilities file. For more information, see Using external capabilities files with WMS services.
    • If you are binding an SLD file to your WMS service, you need to browse to its location on disk or type its URL in the SLD Path or URL field. For more information, see Using Styled Layer Descriptors with WMS services.
    • To reflect the layer names from your map document in your WMS service, select Use layer names from the map document. All of the layer names in the map must be unique and cannot use any of the following characters: &, <, >, ", '.

    For details on how to set WMS service properties using the Service Editor, see WMS services. For information on how to best configure your services for deployment, see Tuning and configuring services.

  14. Click Analyze Analyze. This examines your map document to see if it can be published as a WMS service to the server.

    To give yourself more viewing area when configuring your WMS service, click the Collapse Collapse button at the top of the Service Editor.

  15. Fix any Errors Error in the Prepare window; this must be done before you can publish your map as a WMS service. Optionally, you can fix the warnings and informational messages to further improve the performance and appearance of your service. For more information about resolving these issues, see Analyzing your GIS resource.

    You can register folders and geodatabases with your ArcGIS Server site, thus ensuring that the server can recognize and use your data. If you proceed with the following steps, any data referenced by your map document originating from an unregistered folder or geodatabase will be copied to the server at the time that you publish. This is a precautionary measure to ensure that the server can access all the data used by the service. For full instructions on registering a folder or geodatabase with your ArcGIS Server site, see Registering your data with ArcGIS Server using ArcGIS Desktop.

  16. Optionally, in the Service Editor, click Preview Preview. This can give you an idea of how your map will look when viewed on the web. See Previewing your map for more information.
  17. Once you've fixed the errors in your map document, click Publish Publish.

Consuming the WMS service

To verify that you successfully published your ArcMap document as a WMS service, you can consume the service in ArcMap right away. To do so, follow these steps:

  1. Remaining in ArcMap, open the Catalog window and expand the GIS Servers node.
  2. Double-click Add WMS Server.
  3. In the Add WMS Server window, paste the URL of your WMS service in the URL text box.
  4. Click Get Layers and wait for the WMS service to be connected. When successfully connected, you can see a layer tree accompanied by metadata of the WMS service.
  5. Click OK.
  6. A node for your WMS service connection appears under the GIS Servers node in the Catalog window. Expand the node representing your WMS service, choose any one of the subnodes, then drag the service into the ArcMap Table of Contents to see the service.
  7. Optionally, try to identify some features from your WMS service by selecting the Identify tool in the toolbar and clicking anywhere on the map.

Although this tutorial connects to your WMS service using the Catalog window in ArcMap, you'll find that the process for adding a WMS service in ArcCatalog is very similar. Expanding the GIS Servers node in ArcCatalog should expose your WMS server connection since you've already connected to it in the Catalog window in ArcMap. You can preview your WMS service by selecting the service in the Catalog tree and clicking the Preview tab. If you don't see your connection, add a new connection the same way you did in this tutorial by double-clicking Add WMS Server.