Hi, I've first sent that to the Udig ML, but then... it looks more like a geotools problem. Can you guy help me on that? The geotools version in use by my Udig version is 11.2.
By the way, why the XSD validation done in geotools code and not in standard java code? Thanks. ---------- Forwarded message ---------- From: Patrick Valsecchi <[email protected]> Date: Thu, Oct 1, 2015 at 5:01 PM Subject: WFS validation errors To: [email protected] Hi, I'm trying to access a WFS layer served by geoserver. Nothing fancy or special. I get this error most of the time (only if I have features where POPULATION is not null): SEVERE: Too many elements for http://sbb.ch/sbb:orte (type = orteType) : 2 children, 1 maxOccurs org.geotools.xml.handlers.ComplexElementHandler.validateElementOrder(ComplexElementHandler.java:251) Looks like the validation is not happy about the response from the server. I've used wireshark to see what's happening. Basically, udig gets three pages from geoserver: The content: <wfs:FeatureCollection xsi:schemaLocation="http://sbb.ch/sbb http://XXX/geoserver/wfs?service=WFS&version=1.0.0&request=DescribeFeatureType&typeName=sbb%3Aorte http://www.opengis.net/wfs http://XXX/geoserver/schemas/wfs/1.0.0/WFS-basic.xsd"> <gml:boundedBy> <gml:Box srsName="http://www.opengis.net/gml/srs/epsg.xml#21781"> <gml:coordinates decimal="." cs="," ts=" ">612179.4351,118802.2868 612179.4351,118802.2868</gml:coordinates> </gml:Box> </gml:boundedBy> <gml:featureMember> <sbb:orte fid="orte.240043267"> <gml:boundedBy> <gml:Box srsName="http://www.opengis.net/gml/srs/epsg.xml#21781"> <gml:coordinates decimal="." cs="," ts=" ">612179.4351,118802.2868 612179.4351,118802.2868</gml:coordinates> </gml:Box> </gml:boundedBy> <sbb:NAME>Saint-Luc</sbb:NAME> <sbb:TYPE>village</sbb:TYPE> <sbb:POPULATION>319</sbb:POPULATION> <sbb:GEOM> <gml:Point srsName="http://www.opengis.net/gml/srs/epsg.xml#21781"> <gml:coordinates decimal="." cs="," ts=" ">612179.4351,118802.2868</gml:coordinates> </gml:Point> </sbb:GEOM> </sbb:orte> </gml:featureMember> </wfs:FeatureCollection> Then it gets the schema for the sbb namespace: <xsd:schema elementFormDefault="qualified" targetNamespace=" http://sbb.ch/sbb"> <xsd:import namespace="http://www.opengis.net/gml" schemaLocation=" http://XXX/geoserver/schemas/gml/2.1.2/feature.xsd"/> <xsd:complexType name="orteType"> <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="TYPE" nillable="true" type="xsd:string"/> <xsd:element maxOccurs="1" minOccurs="0" name="POPULATION" nillable="true" type="xsd:decimal"/> <xsd:element maxOccurs="1" minOccurs="0" name="GEOM" nillable="true" type="gml:GeometryPropertyType"/> </xsd:sequence> </xsd:extension> </xsd:complexContent> </xsd:complexType> <xsd:element name="orte" substitutionGroup="gml:_Feature" type="sbb:orteType"/> </xsd:schema> The third one is the standard gml v2.1.2 schema. Checking manually my WFS response with the schema, I don't see any problem. Did I miss something? What can I do from there? Thanks.
------------------------------------------------------------------------------
_______________________________________________ GeoTools-GT2-Users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
