Hi guys,
A while ago I was using REST to allow a layer to use any style. To do this I was retrieving the XML for all styles from:
http://localhost:8080/geoserver/rest/styles.xml
I was then wrapping this XML like:
and PUTting it to:
http://localhost:8080/geoserver/rest/layers/mylayer.xml
However this no longer works. Instead of setting the layers styles to the given styles, it get’s given a single null style. For example, if I navigate to:
http://localhost:8080/geoserver/rest/layers/mylayer.html
It displays the styles as:
Available styles: [null]
Is this a bug or am I doing something wrong?
Thanks,
Jon
Does GeoServer output any diagnostic information? It might be in the body of the REST response, but I’d expect more info in the server logs.
Off-hand, the only potential problem that I can think of is that you reference styles that do not exist. I’m not sure what GeoServer does in this case, but it’s conceivable that it would blank out the style list.
···
On Sun, Jan 27, 2013 at 5:40 AM, Jon Britton <jonbritton3@anonymised.com> wrote:
Hi guys,
A while ago I was using REST to allow a layer to use any style. To do this I was retrieving the XML for all styles from:
http://localhost:8080/geoserver/rest/styles.xml
I was then wrapping this XML like:
and PUTting it to:
http://localhost:8080/geoserver/rest/layers/mylayer.xml
However this no longer works. Instead of setting the layers styles to the given styles, it get’s given a single null style. For example, if I navigate to:
http://localhost:8080/geoserver/rest/layers/mylayer.html
It displays the styles as:
Available styles: [null]
Is this a bug or am I doing something wrong?
Thanks,
Jon
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only – learn more at:
http://p.sf.net/sfu/learnnow-d2d
Geoserver-users mailing list
Geoserver-users@anonymised.comsts.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users
Hi David, thanks for the response.
I’ll see if I can find some more details when I get a chance. As for trying to access styles that don’t exist - I don’t see how that can be possible if I’m getting the list of styles from GeoServer itself.
Cheers,
Jon
···
On 28 January 2013 14:44, David Winslow <dwinslow@anonymised.com> wrote:
Does GeoServer output any diagnostic information? It might be in the body of the REST response, but I’d expect more info in the server logs.
Off-hand, the only potential problem that I can think of is that you reference styles that do not exist. I’m not sure what GeoServer does in this case, but it’s conceivable that it would blank out the style list.
–
David Winslow
OpenGeo - http://opengeo.org/
On Sun, Jan 27, 2013 at 5:40 AM, Jon Britton <jonbritton3@anonymised.com> wrote:
Hi guys,
A while ago I was using REST to allow a layer to use any style. To do this I was retrieving the XML for all styles from:
http://localhost:8080/geoserver/rest/styles.xml
I was then wrapping this XML like:
and PUTting it to:
http://localhost:8080/geoserver/rest/layers/mylayer.xml
However this no longer works. Instead of setting the layers styles to the given styles, it get’s given a single null style. For example, if I navigate to:
http://localhost:8080/geoserver/rest/layers/mylayer.html
It displays the styles as:
Available styles: [null]
Is this a bug or am I doing something wrong?
Thanks,
Jon
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only – learn more at:
http://p.sf.net/sfu/learnnow-d2d
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users