Hi,
GeoServer 2.1.x changed behavior compared to 2.0.2 when it comes to handling the
GML built in attributes for simple features: 2.0.2 used to report “name” in the feature
type own namespace, but 2.1.x is instead assuming “name” is in the gml namespace
instead. Compare the 2.1.x result:
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="[http://www.w3.org/2001/XMLSchema](http://www.w3.org/2001/XMLSchema)" xmlns:cite="[http://www.opengeospatial.net/cite](http://www.opengeospatial.net/cite)" xmlns:gml="[http://www.opengis.net/gml](http://www.opengis.net/gml)" xmlns:it.geosolutions="[http://www.geo-solutions.it](http://www.geo-solutions.it)" xmlns:nurc="[http://www.nurc.nato.int](http://www.nurc.nato.int)" xmlns:sde="[http://geoserver.sf.net](http://geoserver.sf.net)" xmlns:sf="[http://www.openplans.org/spearfish](http://www.openplans.org/spearfish)" xmlns:tiger="[http://www.census.gov](http://www.census.gov)" xmlns:topp="[http://www.openplans.org/topp](http://www.openplans.org/topp)" elementFormDefault="qualified" targetNamespace="[http://www.openplans.org/topp](http://www.openplans.org/topp)">
<xsd:import namespace="[http://www.opengis.net/gml](http://www.opengis.net/gml)" schemaLocation="[http://localhost:8080/geoserver/schemas/gml/3.1.1/base/gml.xsd](http://localhost:8080/geoserver/schemas/gml/3.1.1/base/gml.xsd)"/>
<xsd:complexType name="polygons_5Type">
<xsd:complexContent>
<xsd:extension base="gml:AbstractFeatureType">
<xsd:sequence>
<xsd:element maxOccurs="1" minOccurs="0" name="wkb_geometry" nillable="true" type="gml:GeometryPropertyType"/>
<xsd:element maxOccurs="1" minOccurs="0" name="date" nillable="true" type="xsd:date"/>
<xsd:element maxOccurs="1" minOccurs="0" name="test" nillable="true" type="xsd:string"/>
<xsd:element maxOccurs="1" minOccurs="0" name="test2" nillable="true" type="xsd:string"/>
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
<xsd:element name="polygons_5" substitutionGroup="gml:_Feature" type="topp:polygons_5Type"/>
</xsd:schema>
with the 2.0.2 result:
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="[http://www.w3.org/2001/XMLSchema](http://www.w3.org/2001/XMLSchema)" xmlns:cite="[http://www.opengeospatial.net/cite](http://www.opengeospatial.net/cite)" xmlns:gml="[http://www.opengis.net/gml](http://www.opengis.net/gml)" xmlns:it.geosolutions="[http://www.geo-solutions.it](http://www.geo-solutions.it)" xmlns:nurc="[http://www.nurc.nato.int](http://www.nurc.nato.int)" xmlns:sde="[http://geoserver.sf.net](http://geoserver.sf.net)" xmlns:sf="[http://www.openplans.org/spearfish](http://www.openplans.org/spearfish)" xmlns:tiger="[http://www.census.gov](http://www.census.gov)" xmlns:topp="[http://www.openplans.org/topp](http://www.openplans.org/topp)" elementFormDefault="qualified" targetNamespace="[http://www.opengeospatial.net/cite](http://www.opengeospatial.net/cite)">
<xsd:import namespace="[http://www.opengis.net/gml](http://www.opengis.net/gml)" schemaLocation="[http://localhost:8080/geoserver_202/schemas/gml/3.1.1/base/gml.xsd](http://localhost:8080/geoserver_202/schemas/gml/3.1.1/base/gml.xsd)"/>
<xsd:complexType name="polygons_5Type">
<xsd:complexContent>
<xsd:extension base="gml:AbstractFeatureType">
<xsd:sequence>
<xsd:element maxOccurs="1" minOccurs="0" name="name" nillable="true" type="xsd:string"/>
<xsd:element maxOccurs="1" minOccurs="0" name="wkb_geometry" nillable="true" type="gml:GeometryPropertyType"/>
<xsd:element maxOccurs="1" minOccurs="0" name="date" nillable="true" type="xsd:date"/>
<xsd:element maxOccurs="1" minOccurs="0" name="test" nillable="true" type="xsd:string"/>
<xsd:element maxOccurs="1" minOccurs="0" name="test2" nillable="true" type="xsd:string"/>
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
<xsd:element name="polygons_5" substitutionGroup="gml:_Feature" type="cite:polygons_5Type"/>
</xsd:schema>
This is breaking applications relying on DescribeFeatureType to discover the
available attributes that were working with 2.0.x.
As far as I can see there is no flag that can be set, we just switched hard to the
new behavior.
I already had one company I’m following switch back to 2.0.x because of this…
not nice. At the very least this behavior should be admin configurable imho.
Opinions?
Cheers
Andrea
–
Ing. Andrea Aime
GeoSolutions S.A.S.
Tech lead
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 962313
mob: +39 333 8128928
http://www.geo-solutions.it
http://geo-solutions.blogspot.com/
http://www.youtube.com/user/GeoSolutionsIT
http://www.linkedin.com/in/andreaaime
http://twitter.com/geowolf