While accessing WMS Layer, you get error Message: Error when requesting capabilities from "WMS Layer URL".

While accessing WMS Layer, you get error Message: Error when requesting capabilities from "WMS Layer URL".

book

Article ID: KB0080014

calendar_today

Updated On:

Products Versions
Spotfire Analyst 7.5 and above

Description

While accessing the WMS layer, if you are getting an error message like "Error when requesting capabilities from WMS Layer URL" then it means that entered Web Map Service server URL is not correct or supported.

Below is an error message captured in the Spotfire Analyst debug log file:

---------------------------
2018-10-09T15:03:45,650+05:30 2018-10-09 09:33:45,650 1 [Web Server Worker Thread #5] DEBUG Spotfire.Dxp.Application.Visuals.Maps.WmsLayer [(null)] - Error when reading exceptions from http://server.arcgisonline.com/arcgis/rest/services/World_Physical_Map/MapServer/layers?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetCapabilities
System.InvalidOperationException: There is an error in XML document (1, 2). ---> System.InvalidOperationException: <html xmlns=''> was not expected.
   at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderWebMapServiceExceptionReport.Read4_ServiceExceptionReport()
   --- End of inner exception stack trace ---
   at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events)
   at Spotfire.Dxp.Internal.Utilities.XmlHelper.DeserializeWithoutValidation[T](TextReader textReader, XmlReaderSettings settings)
   at Spotfire.Dxp.Application.Visuals.Maps.WmsLayer.LogExternalException(Uri url)
-------------------------------
I have attached few reference images i.e. Map_chart_Error.png and Map_chart_issue.png

Issue/Introduction

While accessing WMS Layer, you get error Message: Error when requesting capabilities from "WMS Layer URL".

Environment

All Supported OS

Resolution

As of now, Spotfire supports XML format which is the general standard for WMS. So, if you use any other format like JSON, you get this error in Spotfire because it doesn't know how to interpret the JSON/other format capabilities.

Attachments

While accessing WMS Layer, you get error Message: Error when requesting capabilities from "WMS Layer URL". get_app
While accessing WMS Layer, you get error Message: Error when requesting capabilities from "WMS Layer URL". get_app