Hi, I would like to create a new style into my Geoserver from a SLD file.I used, among other things, these links : http://docs.geoserver.org/latest/en/user/rest/examples/curl.html and http://sourceforge.net/p/geoserver/mailman/message/25127542/ and tried these two commands :
curl -v -u admin:geoserver -XPOST -H "Content-type: text/xml" -d "<style><name>style_name</name><filename>file.sld</filename></style>" http://localhost:8080/geoserver/rest/styles
curl -v -u admin:geoserver -XPUT -H "Content-type: application/vnd.ogc.sld+xml" -d @file.sld http://localhost:8080/geoserver/rest/styles/style_name
If the file.sld is locally stored in Geoserver styles directory, I don't have any problem. But is it possible to use this issue to upload a file.sld to a remote Geoserver ? Indeed, if I write the path of file.sld in -d argument of the first command, it works fine but the second command failed :
curl -v -u admin:geoserver -XPOST -H "Content-type: text/xml" -d "<style><name>style_name</name><filename>/home/sophie/ownCloud/file.sld </filename></style>" http://georchestra-mshe.univ-fcomte.fr/geoserver/rest/styles
curl -v -u admin:geoserver -XPUT -H "Content-type: application/vnd.ogc.sld+xml" -d @/home/sophie/ownCloud/file.sld http://georchestra-mshe.univ-fcomte.fr/geoserver/rest/styles/style_name
It returns this error : Warning: Couldn't read data from file "/home/sophie/ownCloud/file.sld", this makes an empty. Does anybody know the answer ? Thank you in advance, -- /Sophie MOLLARD/ /Pôle Géomatique/ /MSHE C. N. Ledoux (USR 3124)/ /Université de Franche-Comté/ /Tél : 03.81.66.53.04/
------------------------------------------------------------------------------ Site24x7 APM Insight: Get Deep Visibility into Application Performance APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month Monitor end-to-end web transactions and take corrective actions now Troubleshoot faster and improve end-user experience. Signup Now! http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
_______________________________________________ Geoserver-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geoserver-users
