Opened 12 years ago

Closed 12 years ago

#846 closed defect (fixed)

WFS: corrupted schema from http://www.mapinfo.com/miwfs

Reported by: brentrobinson Owned by: brentrobinson
Priority: major Milestone:
Component: WFS Provider Version: 3.7.0
Severity: 2 Keywords: WFS DescribeSchema AbstractFeature
Cc: External ID:

Description

steps:

Get the following error message:

Element 'wfs:InsertElement.gml/_Feature' references class (AbstractFeature) which does not belong to a feature schema.

Change History (2)

comment:1 by brentrobinson, 12 years ago

The WFS provider describe schema command gets all the schemas for the connected WFS, plus any it depends on, including the GML schema. However, the GML schema is treated as a system schema and is removed from the schema collection returned to the caller. Any elements in other schemas, that reference gml schema elements, are also removed.

This can be problematic if the gml schema is removed before all other schemas are checked. In the case of the unit test, the gml schema is removed before the referencing elements are removed from the wfs schema. This leads to the following sequence of events:

  • gml schema is destroyed
  • the gml:AbstractFeature loses its parent schema
  • the wfs schema is checked. When the provider looks at the wfs:InsertElement.gml/_Feature object property, it doesn't recognize its

referenced class (AbstractFeature) as being in the gml schema. This object property is not removed.

  • later on, the described schemas are written back to XML. This generates the error since AbstractFeature is not in a feature schema.

comment:2 by brentrobinson, 12 years ago

Resolution: fixed
Status: newclosed

Revision: 6548 Author: brentrobinson Date: 11:11:08 AM, Thursday, August 16, 2012 Message: Ticket#846:

transfer schemas to remove to a temporary schema collection, which is not destroyed until after all other schemas have been processed. This keeps AbstractFeature's parentage around long enough for wfs:InsertElement.gml/_Feature to be successfully removed.


Modified : /trunk/Providers/WFS/Src/Provider/FdoWfsConnection.cpp

Note: See TracTickets for help on using tickets.