[Geoserver-users] Geoserver-2.1.0 Rest problem

Hi,

   I want to use rest api for geoserver , so I downloaded geoserver-2.1.0,
since the rest is inbuilt in it. I am able to see the content at
http://localhost:8080/geoserver/rest like such links. This makes me think
that rest is installed. But when I use the curl commands for creating a
workspace/store/layer I am getting the error as "system cannot find the file
specified".

curl -u admin:geoserver -v -XPOST -H 'Content-type: text/xml' \

   -d '<workspace><name>acme</name></workspace>' \
   http://localhost:8080/geoserver/rest/workspaces

System cannot find the file specified.

I heard that the rest jar files which come inbuilt in geoserver are not
complete and so replacing them by downloading from online would suffice my
problem. Is that true?? if so, where can I find the rest jar files(plugin
extension) for downloading???

I dont find any rest plugin at
http://sourceforge.net/projects/geoserver/files/GeoServer%20Extensions/2.1.0/

--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/Geoserver-2-1-0-Rest-problem-tp6478979p6478979.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

On 15 June 2011 10:05, Vikash Talanki <vikashtalanki@anonymised.com> wrote:

Hi,

I want to use rest api for geoserver , so I downloaded geoserver-2.1.0,
since the rest is inbuilt in it. I am able to see the content at
http://localhost:8080/geoserver/rest like such links. This makes me think
that rest is installed. But when I use the curl commands for creating a
workspace/store/layer I am getting the error as "system cannot find the file
specified".

curl -u admin:geoserver -v -XPOST -H 'Content-type: text/xml' \

-d '<workspace><name>acme</name></workspace>' \
http://localhost:8080/geoserver/rest/workspaces

System cannot find the file specified.

Looks like curl is not on your path or not installed - I've just
pasted that in to a terminal window here and it works fine,

Ian
--
Ian Turton

Hello Ian,

        Can you please tell me how to set the curl path..... I have just
downloaded curl ,unzipped and put it in C:/Windows/System32/Curl. My
geoserver is in C:/Program Files/Geoserver-2.1.0

--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/Geoserver-2-1-0-Rest-problem-tp6478979p6479777.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

On 15 June 2011 13:17, Vikash Talanki <vikashtalanki@anonymised.com> wrote:

Hello Ian,

   Can you please tell me how to set the curl path\.\.\.\.\. I have just

downloaded curl ,unzipped and put it in C:/Windows/System32/Curl. My
geoserver is in C:/Program Files/Geoserver-2.1.0

I'm on a linux box so my curl is in /usr/bin which won't help you
much. If you are in the windows command window then the problem may be
with the \ used to continue the lines. Try it with out them (i.e.
paste all of this as one line)

curl -u admin:geoserver -v -XPOST -H 'Content-type: text/xml' -d
'<workspace><name>acme</name></workspace>'
http://localhost:8080/geoserver/rest/workspaces

Failing that install cygwin (cygwin.org) and use that instead

Ian

Iant,

   Still no success from command tool but I am able to run rest from
php-curl. I have tried to run the example given in php section for creating
a workspace and it worked fine. I request you to just give me the php script
for publishing a layer in geoserver. As soon as we create a postgis table
the corresponding layer is shown in geoserver but for publishing it we have
to manually do that. Can you please give me the php-script for publishing
it.... does
http://docs.geoserver.org/2.0.x/en/user/extensions/rest/rest-config-examples-curl.html#adding-a-postgis-database
also publishes the layer???

--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/Geoserver-2-1-0-Rest-problem-tp6478979p6479938.html
Sent from the GeoServer - User mailing list archive at Nabble.com.