"null" as the result of a RESTConfig request is usually indicative of an (improperly handled) error in GeoServer. Usually there will be more information about what went wrong in the server log. You can also add the "-v" flag (verbose) to your curl command line to get more info that way, but usually the log is more informative.
One trick I use sometimes when working with RESTConfig is to manually configure a layer and then use an HTTP GET request to have GeoServer generate a valid XML document for me. Then I can replace some details with markup for some templating language (I use python's string.format a lot) and make a number of other requests using the same XML structure. -- David Winslow OpenGeo - http://opengeo.org/ On Wed, Aug 10, 2011 at 4:59 PM, Garey Mills <[email protected]>wrote: > David - > > I did finally see the examples. Thanks, and sorry for taking up > bandwith with uninformed questions. That said, I have a number of curl > command lines to put layers into stores. But they don't work. Here's one of > them: > > curl -u admin:geoserver -XPOST -H 'Content-type: text/xml' -d > '<featureType><name>parcels</name></featureType>' > http://localhost:8080/geoserver/rest/workspaces/UCB/datastores/alamedacounty/featuretypes > > the table parcel exists in the postgis-enabled postgresql database > alamedacounty. The store alamedacounty exists in the workspace UCB. When I > run it, it returns the word 'null'. If I run a batch I get back > 'null:null:null:...' > > What am I doing wrong? > > Garey Mills > > > On 8/10/2011 9:58 AM, David Winslow wrote: > > Actually, there are examples for both configuring Postgres datastores and > layers in the manual: > > http://docs.geoserver.org/stable/en/user/restconfig/rest-config-examples/rest-config-examples-curl.html#adding-a-postgis-database > > -- > David Winslow > OpenGeo - http://opengeo.org/ > > On Wed, Aug 10, 2011 at 12:28 PM, Garey Mills <[email protected] > > wrote: > >> Hi - >> >> I have about 15 datastores to create, and about 300 layers under >> them. All the datastores are Postgresql databases. Has someone got an >> example of the REST I would use to create the datastores and configure >> the layers? >> >> >> Thanks; >> >> Garey Mills >> >> >> ------------------------------------------------------------------------------ >> uberSVN's rich system and user administration capabilities and model >> configuration take the hassle out of deploying and managing Subversion and >> the tools developers use with it. Learn more about uberSVN and get a free >> download at: http://p.sf.net/sfu/wandisco-dev2dev >> _______________________________________________ >> Geoserver-users mailing list >> [email protected] >> https://lists.sourceforge.net/lists/listinfo/geoserver-users >> > >
------------------------------------------------------------------------------ uberSVN's rich system and user administration capabilities and model configuration take the hassle out of deploying and managing Subversion and the tools developers use with it. Learn more about uberSVN and get a free download at: http://p.sf.net/sfu/wandisco-dev2dev
_______________________________________________ Geoserver-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geoserver-users
