Opened 8 weeks ago

Last modified 4 weeks ago

#998 assigned defect

WFS DescribeSchema fails on landvic service

Reported by: jng Owned by: jng
Priority: major Milestone: 4.1.0
Component: WFS Provider Version: 4.1.0
Severity: 3 Keywords:
Cc: External ID:


When a WFS feature source is set up in MapGuide to this service:

Attempting to describe a schema fails. In the MG error log, it shows this error reported by the provider:

The requested URL returned error: '414 Request-URI Too Long'

Attachments (1)

test.xml (4.1 KB ) - added by jng 4 weeks ago.
Minimal failing DescribeFeatureType response

Download all attachments as: .zip

Change History (7)

comment:2 by jng, 4 weeks ago

Found the problem.

The cause is that the initial DescribeFeatureType response on the WFS service is *huge*.

There are 652 (!!!) WFS layers and the provider is doing a subsequent request stitching together all 652 layer names to a GET request, clearly exceeding whatever natural limits for a URL.

In such a case, the FdoWfsDescribeFeatureType http handler should be smarter and pivot to using a POST request if it is clear that stitching the GET request would produce a URL that exceeds 2000 characters.

Similar logic should apply for the WMS equivalent operation as well.

comment:3 by jng, 4 weeks ago

Or an architectural-level fix is for these providers to implement the FDO RFC23 interfaces (GetSchemaNames, GetClassNames, DescribeSchema with hints)

comment:4 by jng, 4 weeks ago

Further testing reveals the actual cause. It is not the 414 error from constructing a giant URL. Because when this happens, it does a fallback attempt where it doesn't try to append this giant list of layer names.

The actual problem is that the DescribeFeatureType response contains 2 layer names that are being treated as the same feature class name:


Digging further shows that Xerces is reading these attributes wrong. The one with the trailing underscore is being read with the trailing underscore stripped out, resulting in an erroneous class name collison by the FDO XML SAX handler.

Attached is a minimal XML document that cannot be read into a FdoFeatureSchemaCollection

by jng, 4 weeks ago

Attachment: test.xml added

Minimal failing DescribeFeatureType response

comment:5 by jng, 4 weeks ago

One final note: The http 414 error is thrown because the fallback method of reading the XML failed due to to erroneous FDO class name collision. When the fallback method also fails, the original error (the http 414 error) is thrown back.

comment:6 by jng, 4 weeks ago

The test case for the attached XML is:

  1. Make a FdoFeatureSchemaCollection
  2. Call ReadXml passing in a stream to the example file

Expect: A schema collection with 1 schema that has 2 classes. Get: An empty schema collection

Note: See TracTickets for help on using tickets.