Tutorial: Publishing a WMS service

Complexity: Beginner Data Requirement: Use your own data

This tutorial walks you through the process of publishing an ArcMap map document (.mxd) 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.

There are several other approaches you could use to make a WMS service with ArcGIS Server. For example, you could publish a map service definition (.msd) file as a map service and enable the WMS capability, or you could publish some raster data as an image service and enable the WMS capability. This tutorial focuses on the simplest scenario of publishing an MXD as a map service and enabling the WMS capability.

Before beginning this tutorial, you'll need to have an MXD file ready in a shared location visible to all server object container (SOC) machines in your GIS server. The SOC account you created during postinstallation must also have permissions to read the map document and all the data that the map document references.

Publishing the WMS service

These steps explain how to publish a WMS service in ArcCatalog. You'll later use ArcCatalog to test your new WMS service. You could alternatively publish the WMS service in ArcGIS Server Manager and test it in any WMS client application. For example, Web applications that you build with Manager can display WMS services.

Steps:
  1. Using ArcCatalog, find the map document you want to publish as a WMS service.
  2. Click the Preview tab.
  3. Right-click the map document and choose Publish to ArcGIS Server from the shortcut menu. A brief wizard prompts you for the minimal amount of information needed to create the map service. After you publish the service, you can go back and configure additional properties if you want.
  4. Choose an existing folder (or create a new one) in which your WMS service will be published. Optionally edit the name of the service. Click Next.
  5. In the second panel of the Publish to ArcGIS Server wizard, check WMS as the capability and click Next. Enabling the WMS capability allows clients to request maps from your service through WMS specifications.
  6. Review the summary of what will be created. Notice the various URLs that clients will be able to use to access the service through different protocols. These URLs are the result of the capabilities that you enabled in the previous panel.
  7. Click Publish to create the service.

Your map service has now been published and can be previewed in ArcCatalog by first selecting your service in the Catalog tree, then clicking the Preview tab in the adjacent panel.

Consuming the WMS service

To verify that you successfully published your ArcMap document as a WMS service, you can consume the service in ArcCatalog right away.

Steps:
  1. Before you can consume a WMS service, you need to know its URL. Right-click your map service and choose Service Properties.
  2. On the ArcGIS Server - Map Service Properties dialog box, click the Capabilities tab and click WMS in the capabilities list.
  3. Copy or write down the URL that appears in the Web Access box. This is the URL for your WMS service.
  4. Using ArcCatalog, expand the GIS Servers node and double-click Add WMS Server. A dialog box appears that will help you make a connection to your WMS service.
  5. In the URL box, type or paste in the URL you got in step 3.
  6. 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.
  7. Click OK to add the WMS service connection in ArcCatalog.
  8. A node for your WMS service appears under the GIS Servers node in ArcCatalog. Expand the node representing your WMS service, choose any one of the subnodes, then click the Preview tab to see your service.
  9. Optionally, try to identify some features from your WMS service by clicking the Identify tool in the toolbar and clicking anywhere on the map.

Although this tutorial connects to the WMS service in ArcCatalog, you'll find that the process for adding a WMS service in ArcMap is very similar. Clicking the Add Data button in ArcMap will allow you to browse to your list of GIS server connections. The WMS tutorial you created in this exercise should already be visible because you've connected to it in ArcCatalog. However, you could add new connections the same way you did in this tutorial by clicking Add WMS Server.


3/6/2013