Select to view content in your preferred language

XML parse error when adding Geoserver WMS layer

04-04-2022 02:46 AM
New Contributor


I am adding a GeoServer WMS layer into ARCGIS. After making HTTP request to the GeoServer, I get the required image/jpeg in the response but when I try to add this layer into map, it throws below errors :-

  • [esri.layers.WMSLayer] #load() Failed to load layer (title: 'IMAGE', id: '17ff30d84b3-layer-20') 
    • message: "XML Parse Error"
  • [esri.views.LayerViewManager] Failed to create layerview for layer title: 'IMAGE', id: '17ff30d84b3-layer-20' of type 'wms'

Following code I am using to make the request :

var layer = new WMSLayer({ url: "geoserver/test/wms", title: "IMAGE", customParameters: { 'SERVICE': 'WMS', 'REQUEST': 'GetMap', 'BBOX': '109.37,18.03,111.03,19.64', 'WIDTH': '768', 'HEIGHT': '651', 'SRS': 'EPSG:4326', 'FORMAT': 'image/jpeg', 'VERSION': '1.1.1', 'STYLES': '', 'LAYERS': 'cite:test' } });


Any help would be highly appreciated!



0 Kudos
1 Reply
MVP Regular Contributor

Hello Mridul,

Are you the owner/admin of the GeoServer WMS layer?  If so, have you tried locating this image ID: 17ff30d84b3-layer-20 and deleting it?  Seems there is an error with that record.

Amanda Bishop, GISP
0 Kudos