Atlaslog
Atlaslog / Field Notes / OpenLayers layers
Field note · OpenLayers layers

WMS layer is blank because the server returns ServiceException XML

Quick answer

Every GetMap request returns HTTP 200 with Content-Type application/vnd.ogc.se_xml, so the tile renders transparent and the console stays silent. The exception text names the bad parameter, usually a missing workspace prefix or a CRS/SRS mismatch.

Last verified 2026-11-03 · Multiple versions · Cite this page
Applies to: OpenLayers + GeoServer
Symptom
Checklist
  1. Copy the failing GetMap URL and open it directly in the browser.
  2. Check the response Content-Type before looking at pixels.
  3. Check LAYERS for the workspace prefix, for example workspace:roads.
  4. Check VERSION against the axis parameter: 1.1.1 uses SRS, 1.3.0 uses CRS with lat-first BBOX.
Fix

Build the source with LAYERS 'workspace:roads', STYLES '', VERSION '1.1.1', SRS 'EPSG:3857', FORMAT 'image/png' and TRANSPARENT true; for 1.3.0 use CRS and let OpenLayers order the BBOX axes.

Code
<?xml version="1.0" encoding="UTF-8"?>
<ServiceExceptionReport version="1.3.0">
  <ServiceException code="LayerNotDefined">
    Layer not defined: roads
  </ServiceException>
</ServiceExceptionReport>
map.getLayers().forEach(function (l) {
  var src = l.getSource();
  if (src instanceof ol.source.TileWMS) {
    console.log(src.getFeatureInfoUrl(
      map.getView().getCenter(),
      map.getView().getResolution(),
      'EPSG:3857',
      { INFO_FORMAT: 'text/html' }
    ));
  }
});
Watch out
All 120 field notesChinese originalRunnable examples
English edition written for Atlaslog from the original Chinese field note. Code is unchanged and runs as-is.
Cite this page

Atlaslog (2026). WMS layer is blank because the server returns ServiceException XML. https://www.jingweizhi.com/en/cookbook/ol-wms-params-wrong.html (accessed 2026-11-03).