[Geoserver-devel] RE STconfig test and feedback

Good to see that RESTconfig is officially released with GS 1.7.3.
It's been quite a wait for me since I last touched it in early January.

I am going to post some test results, and hope to get some further
clarifications.

Test 1. Adding a PostGIS table as a new layer

I have a postGIS database, and some tables are already loaded.

When issuing the following command

curl -u admin:geoserver -v -XPOST -H 'Content-type: text/xml' -d
'<featureType><name>boundary</name></featureType>'
http://localhost:8080/geoserver/rest/workspaces/dugway/datastores/dugway/featuretypes

I got this response

* About to connect() to localhost port 8080
* Trying 127.0.0.1... connected
* Connected to localhost (127.0.0.1) port 8080
* Server auth using Basic with user 'admin'

POST /geoserver/rest/workspaces/dugway/datastores/dugway/featuretypes
HTTP/1.1
Authorization: Basic YWRtaxxW46emdlbxxxxxx=
User-Agent: curl/7.15.5 (i686-redhat-linux-gnu) libcurl/7.15.5
OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.5
Host: localhost:8080
Accept: */*
Content-type: text/xml
Content-Length: 48

<featureType><name>boundary</name></featureType>HTTP/1.1 500 Internal
Server Error

< Server: Apache-Coyote/1.1
< Transfer-Encoding: chunked
< Date: Tue, 17 Mar 2009 16:16:46 GMT
< Connection: close
* Closing connection #0
:SQL Error building FeatureType for null ERROR: relation "public.null" does
not exist

It seems to me the the FeatureType name "boundary" is not properly parsed.
becauset the table should be "public.boundary"

Something I did wrong ?

Dukie

Raleigh, NC

--
View this message in context: http://www.nabble.com/RESTconfig-test-and-feedback-tp22565209p22565209.html
Sent from the GeoServer - Dev mailing list archive at Nabble.com.

Hi Dukie,

I verified the problem. The fix for this was actually supposed to get into the 1.7.3 but got left out. Apologies. I will commit the change shortly. If you try tomorrow nightly build you should have better luck.

-Justin

dukie wrote:

Good to see that RESTconfig is officially released with GS 1.7.3. It's been quite a wait for me since I last touched it in early January.

I am going to post some test results, and hope to get some further
clarifications.

Test 1. Adding a PostGIS table as a new layer

I have a postGIS database, and some tables are already loaded.

When issuing the following command

curl -u admin:geoserver -v -XPOST -H 'Content-type: text/xml' -d
'<featureType><name>boundary</name></featureType>'
http://localhost:8080/geoserver/rest/workspaces/dugway/datastores/dugway/featuretypes

I got this response

* About to connect() to localhost port 8080
* Trying 127.0.0.1... connected
* Connected to localhost (127.0.0.1) port 8080
* Server auth using Basic with user 'admin'

POST /geoserver/rest/workspaces/dugway/datastores/dugway/featuretypes
HTTP/1.1
Authorization: Basic YWRtaxxW46emdlbxxxxxx=
User-Agent: curl/7.15.5 (i686-redhat-linux-gnu) libcurl/7.15.5
OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.5
Host: localhost:8080
Accept: */*
Content-type: text/xml
Content-Length: 48

<featureType><name>boundary</name></featureType>HTTP/1.1 500 Internal
Server Error

< Server: Apache-Coyote/1.1
< Transfer-Encoding: chunked
< Date: Tue, 17 Mar 2009 16:16:46 GMT
< Connection: close
* Closing connection #0
:SQL Error building FeatureType for null ERROR: relation "public.null" does
not exist

It seems to me the the FeatureType name "boundary" is not properly parsed.
becauset the table should be "public.boundary"

Something I did wrong ?

Dukie

Raleigh, NC

--
Justin Deoliveira
OpenGeo - http://opengeo.org
Enterprise support for open source geospatial.

Hi Dukie,

I should also mention that it still can work without the fixes, you just need to be a bit more verbose about what you send to the server:

Rather then just:

<featureType>
   <name>boundary</name>
</featureType>

If you include more info:

<featureType>
   <name>boundary</name>
   <nativeName>boundary</nativeName>
   <enabled>true</enabled>
   <srs>EPSG:XXXX</srs>
   <latLonBoundingBox> <!-- replace with whatever you want lat lon bounds to be -->
     <minx>-180</minx>
     <miny>-90</miny>
     <maxx>180</maxx>
     <maxy>90</maxy>
   </latLonBoundingBox>
   <metadataLinks/>
</featureType>

It should work.

-Justin

dukie wrote:

Good to see that RESTconfig is officially released with GS 1.7.3. It's been quite a wait for me since I last touched it in early January.

I am going to post some test results, and hope to get some further
clarifications.

Test 1. Adding a PostGIS table as a new layer

I have a postGIS database, and some tables are already loaded.

When issuing the following command

curl -u admin:geoserver -v -XPOST -H 'Content-type: text/xml' -d
'<featureType><name>boundary</name></featureType>'
http://localhost:8080/geoserver/rest/workspaces/dugway/datastores/dugway/featuretypes

I got this response

* About to connect() to localhost port 8080
* Trying 127.0.0.1... connected
* Connected to localhost (127.0.0.1) port 8080
* Server auth using Basic with user 'admin'

POST /geoserver/rest/workspaces/dugway/datastores/dugway/featuretypes
HTTP/1.1
Authorization: Basic YWRtaxxW46emdlbxxxxxx=
User-Agent: curl/7.15.5 (i686-redhat-linux-gnu) libcurl/7.15.5
OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.5
Host: localhost:8080
Accept: */*
Content-type: text/xml
Content-Length: 48

<featureType><name>boundary</name></featureType>HTTP/1.1 500 Internal
Server Error

< Server: Apache-Coyote/1.1
< Transfer-Encoding: chunked
< Date: Tue, 17 Mar 2009 16:16:46 GMT
< Connection: close
* Closing connection #0
:SQL Error building FeatureType for null ERROR: relation "public.null" does
not exist

It seems to me the the FeatureType name "boundary" is not properly parsed.
becauset the table should be "public.boundary"

Something I did wrong ?

Dukie

Raleigh, NC

--
Justin Deoliveira
OpenGeo - http://opengeo.org
Enterprise support for open source geospatial.

Justin, finally got 1.7.4 downloaded, and re-tested the same.

Yes, this part is working in 1.7.4.

With the new changes, it seems I can only see the configured layers within a postgis datastore.

How do I get a list of all the unconfigured layers (postgis tables) ?

This was listed as unconfigured in a previous version of restconfig.

One more question, is there a plan to add the capability to create a postgis table using restconfig ?

Thanks!

Dukie


From: Justin Deoliveira jdeolive@anonymised.com
To: dukie myjiang@anonymised.com
Cc: geoserver-devel@lists.sourceforge.net
Sent: Friday, March 20, 2009 12:58:35 PM
Subject: Re: [Geoserver-devel] RE STconfig test and feedback

Hi Dukie,

I should also mention that it still can work without the fixes, you just need to be a bit more verbose about what you send to the server:

Rather then just:

boundary

If you include more info:

boundary boundary true EPSG:XXXX -180 -90 180 90

It should work.

-Justin

dukie wrote:

Good to see that RESTconfig is officially released with GS 1.7.3. It’s been quite a wait for me since I last touched it in early January.

I am going to post some test results, and hope to get some further
clarifications.

Test 1. Adding a PostGIS table as a new layer

I have a postGIS database, and some tables are already loaded.
When issuing the following command

curl -u admin:geoserver -v -XPOST -H ‘Content-type: text/xml’ -d
‘boundary’
http://localhost:8080/geoserver/rest/workspaces/dugway/datastores/dugway/featuretypes

I got this response

  • About to connect() to localhost port 8080
  • Trying 127.0.0.1… connected
  • Connected to localhost (127.0.0.1) port 8080
  • Server auth using Basic with user ‘admin’

POST /geoserver/rest/workspaces/dugway/datastores/dugway/featuretypes
HTTP/1.1
Authorization: Basic YWRtaxxW46emdlbxxxxxx=
User-Agent: curl/7.15.5 (i686-redhat-linux-gnu) libcurl/7.15.5
OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.5
Host: localhost:8080
Accept: /
Content-type: text/xml
Content-Length: 48

boundaryHTTP/1.1 500 Internal
Server Error
< Server: Apache-Coyote/1.1
< Transfer-Encoding: chunked
< Date: Tue, 17 Mar 2009 16:16:46 GMT
< Connection: close

  • Closing connection #0
    :SQL Error building FeatureType for null ERROR: relation “public.null” does
    not exist

It seems to me the the FeatureType name “boundary” is not properly parsed.
becauset the table should be “public.boundary”

Something I did wrong ?

Dukie

Raleigh, NC

– Justin Deoliveira
OpenGeo - http://opengeo.org
Enterprise support for open source geospatial.

Ming Ya Jiang wrote:

Justin, finally got 1.7.4 downloaded, and re-tested the same.

Yes, this part is working in 1.7.4.

With the new changes, it seems I can only see the configured layers within a postgis datastore.

How do I get a list of all the unconfigured layers (postgis tables) ?

If you do a GET request using the parameter &list=available you will get all the tables which have not been configured. See:

http://gridlock.openplans.org/geoserver/1.7.x/doc/user/extensions/rest/rest-config-api.html#list-parameter

This was listed as unconfigured in a previous version of restconfig.

One more question, is there a plan to add the capability to create a postgis table using restconfig ?

Do you mean creating the actual underlying table in the database? and not just the feature type. Not in the immediate short term unless some funding shows up for it. But this is something we would like to be able to do at some point.

Thanks!

Dukie

------------------------------------------------------------------------
*From:* Justin Deoliveira <jdeolive@anonymised.com>
*To:* dukie <myjiang@anonymised.com>
*Cc:* geoserver-devel@lists.sourceforge.net
*Sent:* Friday, March 20, 2009 12:58:35 PM
*Subject:* Re: [Geoserver-devel] RE STconfig test and feedback

Hi Dukie,

I should also mention that it still can work without the fixes, you just need to be a bit more verbose about what you send to the server:

Rather then just:

<featureType>
  <name>boundary</name>
</featureType>

If you include more info:

<featureType>
  <name>boundary</name>
  <nativeName>boundary</nativeName>
  <enabled>true</enabled>
  <srs>EPSG:XXXX</srs>
  <latLonBoundingBox> <!-- replace with whatever you want lat lon bounds to be -->
    <minx>-180</minx>
    <miny>-90</miny>
    <maxx>180</maxx>
    <maxy>90</maxy>
  </latLonBoundingBox>
  <metadataLinks/>
</featureType>

It should work.

-Justin

dukie wrote:
> Good to see that RESTconfig is officially released with GS 1.7.3. It's been quite a wait for me since I last touched it in early January.
>
> I am going to post some test results, and hope to get some further
> clarifications.
>
> Test 1. Adding a PostGIS table as a new layer
>
> I have a postGIS database, and some tables are already loaded.
> When issuing the following command
>
> curl -u admin:geoserver -v -XPOST -H 'Content-type: text/xml' -d
> '<featureType><name>boundary</name></featureType>'
> http://localhost:8080/geoserver/rest/workspaces/dugway/datastores/dugway/featuretypes
>
> I got this response
>
> * About to connect() to localhost port 8080
> * Trying 127.0.0.1... connected
> * Connected to localhost (127.0.0.1) port 8080
> * Server auth using Basic with user 'admin'
>> POST /geoserver/rest/workspaces/dugway/datastores/dugway/featuretypes
>> HTTP/1.1
>> Authorization: Basic YWRtaxxW46emdlbxxxxxx=
>> User-Agent: curl/7.15.5 (i686-redhat-linux-gnu) libcurl/7.15.5
>> OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.5
>> Host: localhost:8080
>> Accept: */*
>> Content-type: text/xml
>> Content-Length: 48
>>
>> <featureType><name>boundary</name></featureType>HTTP/1.1 500 Internal
>> Server Error
> < Server: Apache-Coyote/1.1
> < Transfer-Encoding: chunked
> < Date: Tue, 17 Mar 2009 16:16:46 GMT
> < Connection: close
> * Closing connection #0
> :SQL Error building FeatureType for null ERROR: relation "public.null" does
> not exist
>
> It seems to me the the FeatureType name "boundary" is not properly parsed.
> becauset the table should be "public.boundary"
>
> Something I did wrong ?
>
> Dukie
>
> Raleigh, NC
>

-- Justin Deoliveira
OpenGeo - http://opengeo.org
Enterprise support for open source geospatial.

--
Justin Deoliveira
OpenGeo - http://opengeo.org
Enterprise support for open source geospatial.