Dear Friends:
What I want to do is publish a shapefile that already exists on the server.
The shapefile on geoserver locates at data/ChinaMap/newLine/newLine.shp. My
request is below:
url =
"http://localhost:8080/geoserver/rest/workspaces/ChinaMap/datastores/newLine/external.shp";
data = "file:///data/ChinaMap/newLine/newLine.shp";
curl_easy_setopt(_curl_handle, CURLOPT_USERPWD, userPassword.c_str());
curl_easy_setopt(_curl_handle, CURLOPT_URL, url.c_str());
curl_easy_setopt(_curl_handle, CURLOP_CUSTOMREQUEST, "PUT");
curl_easy_setopt(_curl_handle, CURLOPT_HEADER, 1);
headers = curl_slist_append(NULL, "Content-Type: text/plain");
curl_easy_setopt(_curl_handle, CURLOPT_POSTFIELDS, data.c_str());
curl_easy_setopt(_curl_handle, CURLOPT_POSTFIELDSIZE, strlen(data.c_str()));
curl_easy_setopt(_curl_handle, CURLOPT_HTTPHEADER, headers);
curl_easy_perform(_curl_handle);
But I get the response is http 400 bad request, failed to locate the input
file file:/data/ChinaMap/newLine/newLine.shp.
Who can help me??? Thank you!!!
------------------------------------------------------------------------------
Slashdot TV.
Video for Nerds. Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users