Hi all, For 2.0-alpha2 I have been running cite tests like for normal releases, however I used this as an opportunity to resurrect some stuff I was working on a while back.
To step back a moment, my motivation was to be able to run cite tests against multiple backends easily, targeting mainly db back ends, postgis, h2, mysql, etc... So the first thing I did was come up with a small utility program to load an arbitrary datastore with the various configurations of cite data. Currently I have only implemented wfs 1.0 and wfs 1.1. The loader can be found underneath the rest of the cite utilities i have worked on in the past: http://svn.codehaus.org/geoserver/trunk/src/community/cite/loader/ The nice thing about this is that it exercises really what goes *into the datastore* strictly through the geotools api, rather than hacking the backend with sql scripts and making this appear ok coming *out of the datastore*. So with the loader script I loaded up an H2 database for cite wfs 1.0 cite tests and did a run. And... it uncovered quite a few of the hacks that the current postgis setup uses to be "cite compliant". To name the major ones: 1) the boundedBy attribute only gets encoded because it is an attribute in the underlying tables. Which obviously would never get updated if the actual geometry changed. 2) The reference to "built-in" gml geometry property types in GML2 is toggled via a flag to the gml2 encoder, rather than mapping feature attributes to the actual application schema and gml schemas like we do for GML3. And there are other issues. I finally figured out why wfs 1.0 describe feature types never pass with the new engine. It is because the schema generated by wfs 1.0 does not match the schemas built into the cite tests. I am not sure how this ever passed on the old engine but I had to dig into into the XSLT pit of the new engine and indeed found the schemas that it uses to validate. Here is a summary of what I did codewise: 1) Added a new GML2 output format (GML2OutputFormat2) which uses the gtxml encoder like the GML3 one does. (I can see Andreas eyes rolling from here). I did try to make it work with the existing encoder but could not since it does not at all respect the application schema being encoded against. 2) Added proper schema.xsd files for each feature type so that geoserver actually creates the feature types properly for the cite wfs 1.0 cite data 3) Refactored a bit the wfs 1.1 schema encoder to work with both 1.1 and 1.0. 4) Some other random changes here and there... mostly bug fixes to work against the new configuration. And it works!! I was able to run wfs 1.0 cite tests on both H2 and MySQL (NG). It should work for pretty much all NG datastores but I have not gotten around to trying them all. Although I know there is something special with Oracle (go figure) that prevent us to pass cite. Same goes for DB2 I believe. Similar situation for wfs 1.1 tests. I have committed all my changes that are "non-disruptive" and wanted to bounce my ideas off for the important changes. 1) GML2OutputFormat2: I realize that there are performance issues with the the gtxml encoder (which btw i am working on, but that is a discussion for another thread). So I am not proposing a replacement. What I am proposing is that the GML2OutputFormat be engaged when strict cite compliance is set. 2) XmlSchemaEncoder: I am proposing replacing the old 1.0 schema encoder with the new one. The old one has no notion of schema overrides, and quite brutishly builds up a big string buffer and then spits out the XML. And that is it. Thansk for reading :). -Justin -- Justin Deoliveira OpenGeo - http://opengeo.org Enterprise support for open source geospatial. ------------------------------------------------------------------------------ This SF.net email is sponsored by: High Quality Requirements in a Collaborative Environment. Download a free trial of Rational Requirements Composer Now! http://p.sf.net/sfu/www-ibm-com _______________________________________________ Geoserver-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geoserver-devel
