I’m trying to upload the attached SLD file using Rest (as I have many more like it)
curl -u admin:geoserver -XPUT -H ‘Content-type: application/vnd.ogc.sld+xml’ -d @Woodland.sld http://localhost:8080/geoserver/rest/styles/Woodland
- but GeoServer keeps complaining that:
java.lang.RuntimeException: org.xml.sax.SAXParseException: Element type “StyledLayerDescriptor” must be followed by either attribute specifications, “>” or “/>”.
at org.geotools.styling.SLDParser.readXML(SLDParser.java:319)
at org.geoserver.catalog.rest.SLDFormat.read(SLDFormat.java:66)
at org.geoserver.rest.format.StreamDataFormat.toObject(StreamDataFormat.java:33)
at org.geoserver.rest.ReflectiveResource.handlePut(ReflectiveResource.java:191)
at org.restlet.Finder.handle(Finder.java:298)
at org.geoserver.rest.BeanDelegatingRestlet.handle(BeanDelegatingRestlet.java:37)
at org.restlet.Filter.doHandle(Filter.java:105)
at org.restlet.Filter.handle(Filter.java:134)
at org.restlet.Router.handle(Router.java:444)
even though that is clearly the case. If I just open the file with the web interface all is fine. I’m guessing it’s a quoting issue but I can’t work out where to look, can anyone help?
cheers
Ian
–
Ian Turton
Woodland.sld (1.04 KB)