Ver código fonte

Api Geoserver

Maximiliano Schvindt 7 anos atrás
pai
commit
d0e5ae5191
1 arquivos alterados com 4 adições e 3 exclusões
  1. 4 3
      Services/GeoserverService.php

+ 4 - 3
Services/GeoserverService.php

@@ -59,12 +59,13 @@ class GeoserverService
         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();
         $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_RETURNTRANSFER, 1);