I have added the following WFS source to the Stores in GeoServer. http://geoservices.rijkswaterstaat.nl/verkeersscheidingsstelsel_noordzee?service=wfs&version=1.1.0&request=GetCapabilities

This went well, and I can now see the list of supported feature types in the web interface, when trying to add a new layer. However, when selecting one of these feature types, I get an error. The feature type I have tried to add in this case is named nzvss_ank (named wfs_nzvss_ank in GeoServer). The relevant part of the stack trace is:

Caused by: java.lang.RuntimeException: org.geotools.data.DataSourceException: No XSDElementDeclaration found for {http://www.opengis.net/wfs}nzvss_ank
    at org.geotools.data.store.ContentFeatureSource.getAbsoluteSchema(ContentFeatureSource.java:342)
    at org.geotools.data.store.ContentFeatureSource.getSchema(ContentFeatureSource.java:309)
    at org.geotools.data.store.ContentFeatureSource.getSchema(ContentFeatureSource.java:109)
    at org.geoserver.catalog.CatalogBuilder.buildFeatureType(CatalogBuilder.java:348)
    at org.geoserver.catalog.CatalogBuilder.buildFeatureType(CatalogBuilder.java:330)
    at org.geoserver.web.data.layer.NewLayerPage.buildLayerInfo(NewLayerPage.java:323)
    ... 97 more

The full stack trace can be found in this Gist.

The same exception occurs when trying to add other feature types, and when using other WFS links from the same provider.

Other information: GeoServer version is 2.6.0, charset set for the XML documents is UTF-8, feature buffer size is set to 10.

What can I do to fix this issue?

  • Try taking out the _ as I think it is illegal in a featute name. – Ian Turton Nov 20 '14 at 14:22
  • I was thinking about that too but it is valid in WFS 1.0.0. However, by giving the remote WFS url as &version=1.0.0 does not remove this error. And if it is a remote WFS @jowido can't change the name. Here I would say GeoServer is too strict. Validation happens only with POST, not GET requests but user can not always select that. – user30184 Nov 20 '14 at 15:03
  • The WFS source is a remote source, so I am unable to change the feature type names. And I have not enabled the option to prefer POST to GET in the store in GeoServer, so it would seem to make sense that it is using GET requests to obtain the information, however, it still gives me the error. – jowido Nov 20 '14 at 17:18

Old MapServer versions were not very good in making fully standard compliant WFS services. I am not sure if this case is an example of such or not but you could anyways to contact rijkswaterstaat and tell them that they run MapServer 5.7-dev which is rather old and that current versions (6.4, soon 7.0) are much better than their version from year 2011.

GeoServer has a nasty habit to validate XML schemas always when it is possible. With this service it seems to have some trouble with parsing or validating the feature type schema that is queried with DescribeFeatureType request. A GeoServer developer or someone who has tools for validating XML would be needed to tell what is wrong. The whole response from the service is here:

HTTP/1.1 200 OK
Date: Thu, 20 Nov 2014 13:42:35 GMT
Server: Apache
X-Mapserver: Mapserver 5.7
Content-Type: text/xml; subtype=gml/3.1.1
Proxy-Connection: Keep-Alive
Connection: Keep-Alive
Age: 0
Content-Length: 1120

<?xml version='1.0' encoding="ISO-8859-1" ?>
   elementFormDefault="qualified" version="0.1" >

  <import namespace="http://www.opengis.net/gml"
          schemaLocation="http://schemas.opengis.net/gml/3.1.1/base/gml.xsd" />

  <element name="nzvss_ank" 
           substitutionGroup="gml:_Feature" />

  <complexType name="nzvss_ankType">
      <extension base="gml:AbstractFeatureType">
          <element name="GEOMETRY" type="gml:SurfacePropertyType" minOccurs="0" maxOccurs="1"/>
          <element name="NAAM_ANKERGEBIED" type="string"/>
          <element name="ENTITEIT_VAARGEUL" type="string"/>
          <element name="SYSTEEM" type="string"/>

  • Thanks, I have contacted Rijkswaterstaat, hopefully they will be able to help me further. Marked as answer. – jowido Nov 20 '14 at 15:04
  • I get exactly same error from demo.mapserver.org/cgi-bin/…. BTW, the version there is even a bit older v.5.6.5. This may be a proof of general issue with cascading 5.6.x MapServers with GeoServer. – user30184 Nov 20 '14 at 15:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.