Hi,
First of all I'm not an IT guy and I known my doubts can be annoying for
someone that work in the space.
I'm trying to use the Rest API with cURL to transfer postgis data to
Geoserver.
For that I'm following the REST configuration examples at Geoserver
Documentation
(http://docs.geoserver.org/stable/en/user/rest/examples/curl.html)
The first step of creating a workspace (acme) was succefful with this comand
line
/curl -v -u admin:**** -XPOST -H "Content-type: text/xml" -d
"<workspace><name>acme</name></workspace>"
http://localhost/geoserver/rest/workspaces/
Than I try to Adding a PostGIS database and a I get stucked with something
quiet basic.
In the documentation says I should create a xml file, which I did:
<dataStore>
<name>spo</name>
<connectionParameters>
<host>localhost</host>
<port>5432</port>
<database>spo</database>
<user>postgres</user>
<passwd>****</passwd>
<dbtype>postgis</dbtype>
</connectionParameters>
</dataStore>
The database exists
<http://osgeo-org.1560.x6.nabble.com/file/n5233905/db.png>
I saved the xml at:
/...applications/geoserver-2.8.0/data/workspaces/acme/
Than I run the command:
/curl -v -u admin:geoserver -XPOST -T spo.xml -H "Content-type: text/xml"
http://localhost/geoserver/rest/workspaces/acme/datastores/
And get this error:
/curl: Can't open 'spo.xml'!/
I imagine that I'm saving the xml file in the wrong place...
I appreciate any help.
Thanks,
Pedro
--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Rest-Api-Adding-a-PostGIS-database-tp5233905.html
Sent from the GeoServer - User mailing list archive at Nabble.com.