-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Am 26.08.2010 17:26, schrieb Stefan A. Tzeggai: > Hi > > I found the "expose primary key" flag in the webgui :-) and it works in > 2.0.x > > If the "expose primary key" flag is activated for a datastore, the REST > XML API exposes this information as an connectionParamter of the datastore. > > <connectionParameters> > .... > <entry key="port">5432</entry> > <entry key="Expose primary keys">true</entry> > .... > </connectionParameters> > > But i see no way to set this parameter via rest. Usually the connection > paramters are passed as XML tags, but <Expose primary keys> is not a > valid tag, but rather a tag with two attributes: > >> com.thoughtworks.xstream.converters.ConversionException: : expected = after >> attribute name (position: END_TAG seen ...</namespace><Expose primary k... >> @1:267) : : expected = after attribute name (position: END_TAG seen >> ...</namespace><Expose primary k... @1:267) >> ---- Debugging information ---- >> message : : expected = after attribute name (position: END_TAG >> seen ...</namespace><Expose primary k... @1:267) >> cause-exception : com.thoughtworks.xstream.io.StreamException >> cause-message : : expected = after attribute name (position: END_TAG >> seen ...</namespace><Expose primary k... @1:267) >> class : org.geoserver.catalog.impl.DataStoreInfoImpl >> required-type : java.util.HashMap >> line number : 1 > > Is a patch needed? Or is there a trick? > > Thanks, > Steve >
There was a trick, and Justin Deoliveira was so nice to tell it to me. If anybody has the same problem, here is the solution: > Hi Stefan, > > There are a couple of ways to encode a map with the restconfig api. One of > them (the same one that maps are encoded as ) is friendly to spaces. So just > change your content to: > > <connectionParameters> > .... > <entry key="port">5432</entry> > <entry key="Expose primary keys">true</entry> > .... > </connectionParameters> And it works! http://jira.codehaus.org/browse/GEOS-4121?focusedCommentId=234051#action_234051 Steve - ------------------------------------------------------------------------------ Sell apps to millions through the Intel(R) Atom(Tm) Developer Program Be part of this innovative community and reach millions of netbook users worldwide. Take advantage of special opportunities to increase revenue and speed time-to-market. Join now, and jumpstart your future. http://p.sf.net/sfu/intel-atom-d2d _______________________________________________ Geoserver-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geoserver-users - -- wiki² - Softwareentwicklung Stefan A. Tzeggai, geb. Krüger Straßburger Weg 26 53113 Bonn email [email protected] phone 0228 24 000 528 mobile 0176 40 38 9559 webpage wikisquare.de twitter http://twitter.com/geopublishing skype alfonx reclaim your net - http://tor.eff.org enforce privacy - http://www.pgpi.org pgp key id: 51B576FD - http://pgp.mit.edu Please note that according to the German law on data retention, information on every electronic information exchange with me is retained for a period of six months. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkx/z8MACgkQdFDQR1G1dv1z/gCfUNxujMGsjpSVeA33zgGKX9FX Nv8An2KH3G/CDC/LwaOtjS2dDQ6AlwQK =qpBY -----END PGP SIGNATURE----- ------------------------------------------------------------------------------ This SF.net Dev2Dev email is sponsored by: Show off your parallel programming skills. Enter the Intel(R) Threading Challenge 2010. http://p.sf.net/sfu/intel-thread-sfd _______________________________________________ Geoserver-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geoserver-users
