Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

The following request should return a legend graphic for a particular layer:

http://myserver/arcgis/services/default/MapServer/WMSServer?Service=WMS&Request=GetLegendGraphic&Version=1.1.1&Layer=3&FORMAT=image/png

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?

share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

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:

"it is not necessary for a WMS service to support all the operations. But one must support at least GetCapabilities and GetMap operations to be a "Basic WMS"

The good news however is that in ArcGIS Server 10 this functionality has now been added.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.