PROBLEM

Adding a WMS service as a layer in an ArcGIS Server Web application returns an error

Last Published: April 25, 2020

Description

When adding a WMS (OGC) service as a layer to an ArcGIS Server Web application in ArcGIS Server Manager, an "Error Connecting to Host" message displays.

Cause

The Web ADF has two basic requirements for adding a WMS (OGC) service as a layer in an ArcGIS Server Web application.

First, ADF requires that a version 1.1.1 capabilities file be present for the service.

Second, the ADF expects the connection URL to be in a specific format to parse it correctly. If the ArcIMS WMS connector is aliased or deployed as something other than the standard form, it can still connect if the alias can be correctly mapped to the standard URL format.

Note:
Connecting to WMS services that depend on CGI script connections does not work. The ADF cannot parse the URL correctly.

Solution or Workaround

To successfully add a WMS (OGC) service to an ArcGIS Server Web application, the WMS (OGC) service must meet the following requirements:

  1. The WMS service must have a version 1.1.1 capabilities file. The ADF does not connect otherwise.
  2. Aliased servlets should be avoided, though they will work if the URL format can be correctly mapped. The reason for this is that the Web ADF expects the connection URL to be in a specific format to parse it correctly. If the WMS connector is aliased or deployed as something other than the standard form, it can still connect if the alias can be correctly mapped to the standard URL format.

    For example, the ADF expects the WMS service URL to be in the following format:
    http://<fullyQualifiedDomainName>/<deployName>/<servletName>/<WMSmapServiceName>

    If the servlet has been aliased, the URL may appear as follows:
    http://<serverName>/ArcIMS (deploy name)/WMS (servlet name)/<serviceName>

    The aliased servlet URL should work in the Web application since the functional mapping in the URL has not changed.

    However, if the alias is more complex and changes the functional mapping of the components of the URL, it does not connect. For example, the following URL does not successfully create a connection:
    http://<serverName>/servlet/<deployName>/connectors/<servletName>/<serviceName>

    The reason it fails is because the functional mapping of the URL components has been changed to a non-standard form that cannot be parsed correctly.

    Note:
    Any WMS connection URL should first be tested in ArcCatalog. If the WMS connection URL fails to connect when adding it as a WMS server in ArcCatalog, it is very likely to fail in an ADF Web application as well.

    In addition, while connecting in ArcCatalog is no guarantee that a successful connection can be created in the Web application, it allows the user to confirm if a version 1.1.1 capabilities file is available for the service. It also provides useful information about the WMS service, such as the bounding box (BBOX) or extent.

Article ID:000009588

Software:
  • ArcGIS Server

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options

Discover more on this topic