[Geoserver-users] Problem specifying SLD in WMS request [Sec=Unclassified]

Hey folks,

I'm having some trouble getting Geoserver (1.4 RC5) to
accept SLD urls in a WMS GetMap request
and all I get is a WMS Exception: "SLD document contains no layers"

You need a <UserLayer> with a <Name> in your SLD:

http://indus.msi.ucsb.edu:8180/knb/wms?VERSION=1.1.1&REQUEST=GetMap&SERV
ICE=WMS&LAYERS=metacat:data_points&SRS=EPSG:4326&BBOX=-180,-90,180,90&WI
DTH=720&HEIGHT=360&FORMAT=image/gif&STYLES=&TRANSPARENT=TRUE&SLD=http://
ids.org.au/~milesj/data_points_style.sld&UNIQUEID=

<?xml version="1.0" encoding="UTF-8"?>
<StyledLayerDescriptor version="1.0.0"
  xsi:schemaLocation="http://www.opengis.net/sld
StyledLayerDescriptor.xsd"
  xmlns="http://www.opengis.net/sld&quot;
  xmlns:ogc="http://www.opengis.net/ogc&quot;
  xmlns:xlink="http://www.w3.org/1999/xlink&quot;
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot;&gt;
  <UserLayer>
    <Name>metacat:data_points</Name>
    <UserStyle>
      ...
    </UserStyle>
  </UserLayer>
</StyledLayerDescriptor>

Regards,

Miles
___________________________________________________________________________

    Australian Government Antarctic Division - Commonwealth of Australia
IMPORTANT: This transmission is intended for the addressee only. If you are not the
intended recipient, you are notified that use or dissemination of this communication is
strictly prohibited by Commonwealth law. If you have received this transmission in error,
please notify the sender immediately by e-mail or by telephoning +61 3 6232 3209 and
DELETE the message.
        Visit our web site at http://www.aad.gov.au/
___________________________________________________________________________

Miles,

Thanks for the tip .. that solved the problem.

- matt

On 12/11/06, Miles Jordan <Miles.Jordan@anonymised.com> wrote:

> I'm having some trouble getting Geoserver (1.4 RC5) to
> accept SLD urls in a WMS GetMap request
> and all I get is a WMS Exception: "SLD document contains no layers"

You need a <UserLayer> with a <Name> in your SLD:

http://indus.msi.ucsb.edu:8180/knb/wms?VERSION=1.1.1&REQUEST=GetMap&SERV
ICE=WMS&LAYERS=metacat:data_points&SRS=EPSG:4326&BBOX=-180,-90,180,90&WI
DTH=720&HEIGHT=360&FORMAT=image/gif&STYLES=&TRANSPARENT=TRUE&SLD=http://
ids.org.au/~milesj/data_points_style.sld&UNIQUEID=

<?xml version="1.0" encoding="UTF-8"?>
<StyledLayerDescriptor version="1.0.0"
        xsi:schemaLocation="http://www.opengis.net/sld
StyledLayerDescriptor.xsd"
        xmlns="http://www.opengis.net/sld&quot;
        xmlns:ogc="http://www.opengis.net/ogc&quot;
        xmlns:xlink="http://www.w3.org/1999/xlink&quot;
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot;&gt;
        <UserLayer>
                <Name>metacat:data_points</Name>
                <UserStyle>
                        ...
                </UserStyle>
        </UserLayer>
</StyledLayerDescriptor>

--
Matthew T. Perry
GIS Analyst / Software Engineer
National Center for Ecological Analysis and Synthesis (NCEAS)
work: perry@anonymised.com
web: http://www.perrygeo.net