I have updated Geoserver 2.0 to the latest nightly build, so that I have the rest api capability. I am trying the below curl request and getting back an HTTP/1.1 405 Method Not Allowed error.
Any idea how to get this to work? This example is for rest 1.7.x extension, so perhaps the syntax is different? or it’s a bug? or what?
curl -u admin:pwd -v -XPOST -H “Content-type: text/xml” -d “test” http://localhost:8080/geoserver/rest/workspaces
- About to connect() to localhost port 8080 (#0)
- Trying 127.0.0.1… connected
- Connected to localhost (127.0.0.1) port 8080 (#0)
- Server auth using Basic with user ‘admin’
POST /geoserver/rest/workspaces HTTP/1.1
Authorization: Basic
User-Agent: curl/7.16.2 (i686-redhat-linux-gnu) libcurl/7.16.2 OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.8
Host: localhost:8080
Accept: /
Content-type: text/xml
Content-Length: 40
< HTTP/1.1 405 Method Not Allowed
< Server: Apache-Coyote/1.1
< Allow: GET
< Date: Thu, 02 Jul 2009 00:30:27 GMT
< Server: Noelios-Restlet-Engine/1.0…8
< Transfer-Encoding: chunked
<
- Connection #0 to host localhost left intact
- Closing connection #0
Regards,
Katie
Hi Katie,
Actually the restconfig extensions have not been ported to 2.0 as of yet. They will be in for 2.0-RC1 but have not been forward ported yet unfortunately. So you will be stuck using 1.7.x for now. Sorry 
-Justin
Katie Filbert wrote:
I have updated Geoserver 2.0 to the latest nightly build, so that I have the rest api capability. I am trying the below curl request and getting back an HTTP/1.1 405 Method Not Allowed error.
Any idea how to get this to work? This example is for rest 1.7.x extension, so perhaps the syntax is different? or it's a bug? or what?
curl -u admin:pwd -v -XPOST -H "Content-type: text/xml" -d "<workspace><name>test</name></workspace>" http://localhost:8080/geoserver/rest/workspaces
* About to connect() to localhost port 8080 (#0)
* Trying 127.0.0.1... connected
* Connected to localhost (127.0.0.1) port 8080 (#0)
* Server auth using Basic with user 'admin'
POST /geoserver/rest/workspaces HTTP/1.1
Authorization: Basic
User-Agent: curl/7.16.2 (i686-redhat-linux-gnu) libcurl/7.16.2
OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.8
Host: localhost:8080
Accept: */*
Content-type: text/xml
Content-Length: 40
< HTTP/1.1 405 Method Not Allowed
< Server: Apache-Coyote/1.1
< Allow: GET
< Date: Thu, 02 Jul 2009 00:30:27 GMT
< Server: Noelios-Restlet-Engine/1.0..8
< Transfer-Encoding: chunked
<
* Connection #0 to host localhost left intact
* Closing connection #0
Regards,
Katie
------------------------------------------------------------------------
------------------------------------------------------------------------------
------------------------------------------------------------------------
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users
--
Justin Deoliveira
OpenGeo - http://opengeo.org
Enterprise support for open source geospatial.