[Geoserver-users] Layer sets not enabled after changing style via REST.

Hi.

I hava a little problem with REST api. I do:

**curl.exe -v -u new_user:123456 -XPUT -H "Content-type: text/xml"** 
**-d "<layer><defaultStyle><name>poi</name></defaultStyle></layer>"** 
<b>
[http://localhost:8080/geoserver/rest/layers/cite:point](http://localhost:8080/geoserver/rest/layers/cite:point)</b>

Style was changed, but layers sets not enabled in Publishing tab.

What can i do to fix it?


On Wed, Oct 23, 2013 at 8:30 AM, Макс Кливер <dh0m0ch@anonymised.com> wrote:

Hi.

I hava a little problem with REST api. I do:

*curl.exe -v -u new_user:123456 -XPUT -H "Content-type: text/xml"
-d "<layer><defaultStyle><name>poi</name></defaultStyle></layer>"
http://localhost:8080/geoserver/rest/layers/cite:point

*

Style was changed, but layers sets not enabled in Publishing tab.

This enabled thing is a known problem that's apparently very hard to fix,
something
about XStream serialization issues.
Anyways, it has a simple workaround, add <enabled>true</enabled> to all
the PUT you make against layers and other resources having a enabled flag

Cheers
Andrea

--

Our support, Your Success! Visit http://opensdi.geo-solutions.it for more
information.

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

-------------------------------------------------------