I'm having trouble getting a WMS layer from my Geoserver to display in my ArcGIS test application. I'm just learning the ArcGIS Javascript API. For my test application, I started with the "WMS- resource info" sample https://developers.arcgis.com/javascript/jssamples/layers_wmsresourceinfo.html
I basically replaced the WMS layer from the sample with my own:
var layer1 = new WMSLayerInfo({
name: 'testSave.0',
title: 'testSave.0'
});
var resourceInfo = {
extent: new Extent(-120.77027961360123, 35.79776317148635, -120.74876891832204, 35.812242893139256, {
wkid: 3857
}),
layerInfos: [layer1]
};
var wmsLayer = new WMSLayer('http://localhost:8040/geoserver/reproj/wms', {
resourceInfo: resourceInfo,
visibleLayers: ['testSave.0']
});
map.addLayers([wmsLayer]);
When I run my application, I get the following error message when the WMS layer tries to load:
<SPAN><ServiceExceptionReport xmlns="</SPAN><A class="jive-link-external-small" href="http://www.opengis.net/ogc" rel="nofollow noopener noreferrer" target="_blank">http://www.opengis.net/ogc</A><SPAN>" xmlns:xsi="</SPAN><A class="jive-link-external-small" href="http://www.w3.org/2001/XMLSchema-instance" rel="nofollow noopener noreferrer" target="_blank">http://www.w3.org/2001/XMLSchema-instance</A><SPAN>" version="1.3.0" xsi:schemaLocation="</SPAN><A class="jive-link-external-small" href="http://www.opengis.net/ogc" rel="nofollow noopener noreferrer" target="_blank">http://www.opengis.net/ogc</A><SPAN> </SPAN><A class="jive-link-external-small" href="http://localhost:8040/geoserver/schemas/wms/1.3.0/exceptions_1_3_0.xsd" rel="nofollow noopener noreferrer" target="_blank">http://localhost:8040/geoserver/schemas/wms/1.3.0/exceptions_1_3_0.xsd</A><SPAN>"></SPAN><BR /><ServiceException code="InvalidCRS"><BR />Error occurred decoding the espg code urn:x-ogc:def:crs:EPSG:102100 No code "EPSG:102100" from authority "European Petroleum Survey Group" found for object of type "IdentifiedObject".<BR /></ServiceException><BR /></ServiceExceptionReport>
The problem seems to be related to the spatial reference of the ESRI basemap (ESRI:102100) and my Geoserver's inability to process that spatial reference. I've tried changing the spatial reference of my layer (to EPSG:3857, which I believe is the EPSG equivalent to ESRI:102100). I've also tried adding ESRI:102100 as a custom CRS to my Geoserver, but it added it as EPSG:102100 which is not valid. And both attempts resulted in the same error message.
Does anybody know how I could get this layer to display in my application?