Well, I'll answer my own question here. I think this was a case of 'Keep It Simple Stupid'...
add the parameter to the end of the rest request URL. "rest/workspaces/test_ws/datastores/".$file."/file.shp?configure=all" That seems to make the parameter work. If you set configure=none then no layer is made but the data source is added. I think I was misunderstanding the configuration parameter anyway. It sets whether the first, all, or no Feature Types (points, lines, poly) are created as layers. Shapefiles only contain one feature type, so the default of 'first' works and 'all' won't do anything different than 'first'. I was thinking it would load multiple Data Sources from multiple shapefiles within the ZIP file. I typically have ZIP files with a couple of shapefiles in them. I was hoping to send the ZIP containing several shapefiles to the REST config and have all of the shapefiles inside that ZIP 'published'. it doesn't look like the 'configuration' parameter is the way to do that. Thanks, Ryan On 12/15/2010 9:52 AM, Ryan Williams wrote: > Hello list, > > Can anyone give an example of how to add parameters to a PHPcURL > request like: "/workspaces/<ws>/datastores/<ds>/file[.<extension>]" > > I'm trying to set the 'configure' parameter for a REST shapefile upload. > Do i do that with postfields? httpheader? > I've tried adding 'configure: all' to the httpheader and that doens't > seem to work. > > I've done some searching and saw some examples of setting" > ...CURLOPT_CUSTOMREQUEST, 'PUT'... " and then "...CURLOPT_POSTFIELDS, > $fields.... " > to pass along whatever you put in the postfields $fields variable. Is > this correct? > > Next, what's the syntax for the Geoserver REST 'configure' parameter? > I tried xml of <configure>all</configure> and 'configure: all' but > those doesn't appear to work. > > Thanks, > Ryan > -- Ryan Williams, GISP GIS Analyst / Programmer PAQ Interactive Inc. Monticello, IL www.paqinteractive.com ------------------------------------------------------------------------------ Lotusphere 2011 Register now for Lotusphere 2011 and learn how to connect the dots, take your collaborative environment to the next level, and enter the era of Social Business. http://p.sf.net/sfu/lotusphere-d2d _______________________________________________ Geoserver-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geoserver-users
