Hi Ben, you have to supply style workspace tag, as described in:
http://docs.geoserver.org/stable/en/user/rest/examples/curl.html#changing-a-layer-style <layer><defaultStyle><name>roads_style</name><workspace>acme</workspace></defaultStyle></layer> Hope it helps, Ivan On Fri, Jan 9, 2015 at 11:25 AM, Ben Crane <[email protected]> wrote: > Hey all, > > I've been investigating the REST API as I have to load hundreds of SHP files > into GeoServer and so far I can upload the data and publish it no problems. > > I am having problems assigning a workspace specific style to it. > > Here is my command: > > curl -v -u a:p -XPUT -H "Content-type: text/xml" -d > "<layer><defaultStyle><name>myStyle</name></defaultStyle></layer>" > https:...../rest/layers/RDS:MyLayer > > Now, when I specify any styles not associated with a workspace (such as the > default polygon style) this command works but my styles are stored in > /workspaces/RDS/styles > > So how do I assign a style not in the default location to my layer? I'm > really stuck on this > > Cheers, > Ben > > ------------------------------------------------------------------------------ > Dive into the World of Parallel Programming! The Go Parallel Website, > sponsored by Intel and developed in partnership with Slashdot Media, is your > hub for all things parallel software development, from weekly thought > leadership blogs to news, videos, case studies, tutorials and more. Take a > look and join the conversation now. http://goparallel.sourceforge.net > _______________________________________________ > Geoserver-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/geoserver-users > ------------------------------------------------------------------------------ New Year. New Location. New Benefits. New Data Center in Ashburn, VA. GigeNET is offering a free month of service with a new server in Ashburn. Choose from 2 high performing configs, both with 100TB of bandwidth. Higher redundancy.Lower latency.Increased capacity.Completely compliant. http://p.sf.net/sfu/gigenet _______________________________________________ Geoserver-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geoserver-users
