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:
- Open your map document in ArcMap and choose File > Share As > Service from the main menu.
- In the Share as Service window, choose Publish a service. Click Next.
- In the Publish a Service dialog box, click Connect to ArcGIS Server to create a new connection to the server.
- In the Add ArcGIS Server window, choose Publish GIS Services. Click Next.
- For the Server URL, type the URL of the ArcGIS Server site you want to connect to. For example, http://gisserver.domain.com:6080/arcgis.
- From the Server Type drop-down list, choose ArcGIS Server.
- 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.
- If your server administrator has enabled security for your site, enter your User Name and Password. Click Finish.
- 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.
- 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.
- 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.
- By default, mapping and KML are enabled. Select WMS.
- 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: http://gisserver.domain.com:6080/arcgis/services/folder/service/MapServer/WMSServer.
- 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: &, <, >, ", '.
- Click Analyze . This examines your map document to see if it can be published as a WMS service to the server.
- Fix any Errors 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.
- Optionally, in the Service Editor, click 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.
- Once you've fixed the errors in your map document, click 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:
- Remaining in ArcMap, open the Catalog window and expand the GIS Servers node.
- Double-click Add WMS Server.
- In the Add WMS Server window, paste the URL of your WMS service in the URL text box.
- 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.
- Click OK.
- 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.
- 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.