|
@@ -59,12 +59,13 @@ class GeoserverService
|
|
curl_close($ch);
|
|
curl_close($ch);
|
|
}
|
|
}
|
|
|
|
|
|
- // curl -v -u admin:geoserver -XPUT -H "Content-type: text/plain" -d "file:/home/maxi/Escritorio/aux/" "http://localhost:8080/geoserver/rest/workspaces/workspaceName/datastores/shapefiles/external.shp?configure=all"
|
|
|
|
- public function updateShape($workspace, $shapeName = null)
|
|
|
|
|
|
+ // curl -v -u admin:geoserver -XPUT -H "Content-type: text/plain" -d "file:/dir_con_shapes/" "http://localhost:8080/geoserver/rest/workspaces/workspaceName/datastores/shapefiles/external.shp?configure=all"
|
|
|
|
+ public function updateShape($workspace)
|
|
{
|
|
{
|
|
$ch = curl_init();
|
|
$ch = curl_init();
|
|
$path = $this->pathShapes.DIRECTORY_SEPARATOR.$workspace.DIRECTORY_SEPARATOR;
|
|
$path = $this->pathShapes.DIRECTORY_SEPARATOR.$workspace.DIRECTORY_SEPARATOR;
|
|
- $url = "{$this->getUrlRest()}/workspace/{$workspace}/datastores/shapefiles/external.shp?configure=all";
|
|
|
|
|
|
+ $url = "{$this->getUrlRest()}/workspaces/{$workspace}/datastores/shapefiles/external.shp?configure=all";
|
|
|
|
+ // http://200.50.168.118:8081/geoserver/rest/workspaces/deviceServer_1/datastores/shapefiles/external.shp?configure=all
|
|
|
|
|
|
curl_setopt($ch, CURLOPT_URL, $url);
|
|
curl_setopt($ch, CURLOPT_URL, $url);
|
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|