English

Bug: WMS Connector generates incorrect styles.xml that uses the layer's name and not the ID

Description

The downloadable OGC WMS Connector generates incorrect styles.xml files. The connector uses the ArcIMS layer's name instead of the ArcIMS layer's ID.

Cause

This is a known issue.

Workaround

Typically the the names correspond to ArcIMS layer names and the file appears as follows:

Code:

<?xml version="1.0" encoding="UTF-8"?>
<sld:StyledLayerDescriptor ... version="1.0.0">
<sld:NamedLayer>
     <sld:Name>Ocean</sld:Name>
</sld:NamedLayer>
<sld:NamedLayer>
     <sld:Name>Country</sld:Name>
</sld:NamedLayer>
<sld:NamedLayer>
     <sld:Name>Cities</sld:Name>
</sld:NamedLayer>
</sld:StyledLayerDescriptor>

However, the code needs appear as follows where the layer names are actually ArcIMS layer IDs:

Code:
<?xml version="1.0" encoding="UTF-8"?>
<sld:StyledLayerDescriptor ... version="1.0.0">
<sld:NamedLayer>
     <sld:Name>0</sld:Name>
</sld:NamedLayer>
<sld:NamedLayer>
     <sld:Name>1</sld:Name>
</sld:NamedLayer>
<sld:NamedLayer>
     <sld:Name>2</sld:Name>
</sld:NamedLayer>
</sld:StyledLayerDescriptor>

Edit the file and make the necessary change with a text editor.

Warning:
Each time the capabilities file is updated through the WMS Connector Administrator interface it writes over this file with the incorrect values. Create a backup of this file before updating the capabilities files.