The following request should return a legend graphic for a particular layer:
However instead I get the following error:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE ServiceExceptionReport SYSTEM "http://schemas.opengis.net/wms/1.1.1/exception_1_1_1.dtd">
<ServiceExceptionReport version="1.1.1">
<ServiceException code="InvalidFormat">
Can't parse XML request.
</ServiceException>
</ServiceExceptionReport>
The GetCapabilities request for the service for the layer contains the following:
<Style>
<Name>default</Name>
<Title>Layer Name</Title>
<LegendURL width="100" height="62">
<Format>image/png</Format>
<OnlineResource xlink:href="http://server/arcgisoutput/wms/default1.png" xlink:type="simple"/>
</LegendURL>
</Style>
The OnlineResource href is a valid PNG file that is accessible externally.
It seems others have had issues, and recommend using external capabilities files, but when the legend already has a valid image file is this necessary? Has anyone successfully configured a WMS to support the GetLegendGraphic request?
Best Answer
It appears for ArcGIS Server 9.x the GetLegendGraphic operation was never implemented. Apparently this operation is an optional implementation and is not a part of the "basic WMS" standard.
From the ESRI docs:
The good news however is that in ArcGIS Server 10 this functionality has now been added.