Error to add store through cURL REST API too geoserver

المشرف العام

Administrator
طاقم الإدارة
Hello dear community (how usually, sorry for bad english)! I have problem with adding raster layer to geoserver automatically. I need, that geoserver add layer without person job, only script action and i saw that it may be done with cURL REST API but, i can't do it.In general, I have some GeoTIFF files and i want to published them at geoserver throught terminal. I do how wrote DaveParillo. I can add workspace,

zsumo@vm-geoportal:/opt/tomcat/webapps/geoserver/data$ curl -u admin:geoserver -v -XPOST -H 'Content-type: text/xml' -d 'ffftrueGeoTIFF/opt/tomcat/webapps/geoserver/data/avhrr_locale1e2.tif' "http://192.168.255.197:8080/geoserver/rest/workspaces/geotiff/coveragestores?configure=all"answer

* Hostname was NOT found in DNS cache* Trying 192.168.255.197...* Connected to 192.168.255.197 (192.168.255.197) port 8080 (#0)* Server auth using Basic with user 'admin'> POST /geoserver/rest/workspaces HTTP/1.1> Authorization: Basic YWRtaW46Z2Vvc2VydmVy> User-Agent: curl/7.35.0> Host: 192.168.255.197:8080> Accept: */*> Content-type: text/xml> Content-Length: 43>* upload completely sent off: 43 out of 43 bytes< HTTP/1.1 201 Created< Date: Thu, 10 Dec 2015 14:15:53 GMT< Location: http://192.168.255.197:8080/geoserver/rest/workspaces/geotiff* Server Noelios-Restlet-Engine/1.0..8 is not blacklisted< Server: Noelios-Restlet-Engine/1.0..8< Transfer-Encoding: chunked<* Connection #0 to host 192.168.255.197 left intactbut when i try add store i touch this error:

zsumo@vm-geoportal:/opt/tomcat/webapps/geoserver/data$ curl -u admin:geoserver -v -XPOST -H 'Content-type: text/xml' -d 'ffftrueGeoTIFF/opt/tomcat/webapps/geoserver/data/avhrr_locale1e2.tif' "http://192.168.255.197:8080/geoserver/rest/workspaces/geotiff/coveragestores?configure=all"answer:

* Hostname was NOT found in DNS cache* Trying 192.168.255.197...* Connected to 192.168.255.197 (192.168.255.197) port 8080 (#0)* Server auth using Basic with user 'admin'> POST /geoserver/rest/workspaces/geotiff/coveragestores?configure=all HTTP/1.1> Authorization: Basic YWRtaW46Z2Vvc2VydmVy> User-Agent: curl/7.35.0> Host: 192.168.255.197:8080> Accept: */*> Content-type: text/xml> Content-Length: 155>* upload completely sent off: 155 out of 155 bytes< HTTP/1.1 500 Internal Server Error* Server Apache-Coyote/1.1 is not blacklisted< Server: Apache-Coyote/1.1< Content-Type: text/plain< Transfer-Encoding: chunked< Date: Thu, 10 Dec 2015 14:16:14 GMT< Connection: close<* Closing connection 0:Store must be part of a workspaceGeoserver log same error:

2015-12-10 17:15:53,801 INFO [catalog.rest] - POST workspace geotiff2015-12-10 17:16:14,687 INFO [org.geoserver] - Loaded store 'fff', enabled2015-12-10 17:16:14,688 ERROR [geoserver.rest] - :Store must be part of a workspace2015-12-10 17:16:14,688 ERROR [geoserver.rest] - org.geoserver.rest.RestletException: java.lang.IllegalArgumentException: Store must be part of a workspaceWhat's wrong? Thanks for your attention!

Geoserver v.2.8.1.



أكثر...
 
أعلى