Ticket #480 (closed defect: fixed)

Opened 4 years ago

Last modified 4 years ago

Fdo WFS doesn't recognize class whose name contains "."

Reported by: CXYS Owned by: gregboone
Priority: major Milestone: 3.5.0
Component: WFS Provider Version: 3.4.0
Severity: 2 Keywords:
Cc: External ID: 1200560.01

Description

Defect:

Connect to the following WFS server. < http://giswebservices.massgis.state.ma.us/geoserver/wfs> List all the feature classes and get only "TOWNS_POLYM"; however the server actually has quite a large number of feature classes.

Cause: The missing feature classes are caused by the "." in the class name. The class names in the wfs server all contain "." except "TOWNS_POLYM". Take one class "GISDATA.BUGS96_POLY" for example, after FdoFeatureSchemaCollection? read the xml requested from wfs server, the class name is transferred to "GISDATA-dot-BUGS96_POLY" -- please note, the "." is renamed as "-dot-" in FdoFeatureSchemaCollection?. However in another aspect FdoWfsFeatureTypeList? also parse the xml and build up a FdoWfsFeatureTypeCollection?. (FdoWfsFeatureTypeList?.cpp line 72:)

FdoPtr?<FdoWfsFeatureType?> featureType = FdoWfsFeatureType::Create();

featureType->InitFromXml?(context, atts); m_featureTypes->Add(featureType);

It doesn't do the translation of ".".

These difference cause the problem during DescribeSchema? command execute, which calls FdoWfsConnection::GetSchemas?() actually. FdoWfsConnection?.cpp line 600:

FdoPtr?<FdoWfsFeatureType?> pFeat = pFeatColl->FindItem?(classDef->GetName?());

As you can see, it tries to search in FdoWfsFeatureTypeCollection? by class name. But the class name is "GISDATA-dot-BUGS96_POLY" and the name recorded in feature type is "GISDATA.BUGS96_POLY", of course nothing can be found. Thus the class is treated as "abstract" by mistake.

Attachments

1200560.01 Download (6.5 KB) - added by CXYS 4 years ago.
This patch fixes the defect.

Change History

Changed 4 years ago by CXYS

This patch fixes the defect.

Changed 4 years ago by CXYS

  • status changed from new to closed
  • resolution set to fixed

This fix has been reviewed by Romica Dascalescu.

Changed 4 years ago by CXYS

  • status changed from closed to reopened
  • resolution fixed deleted

Changed 4 years ago by romicadascalescu

  • status changed from reopened to closed
  • resolution set to fixed

Fixed in FDO 3.5.0

Modified:

trunk/Fdo/Unmanaged/Src/Fdo/Xml/FeaturePropertyReaderImpl.cpp trunk/Providers/WFS/Src/Provider/FdoWfsConnection.cpp trunk/Providers/WFS/Src/Provider/FdoWfsSelectCommand.cpp trunk/Providers/WFS/Src/Provider/FdoWfsServiceMetadata.cpp

Log: #480 Fdo WFS doesn't recognize class whose name contains "." on behalf of Christine Bao

Changed 4 years ago by waltweltonlair

Fix also submitted to 3.4 stream. See  https://trac.osgeo.org/fdo/changeset/4588.

Changed 4 years ago by stevenxu

Ported the fix into FDO 3.4.0

 http://trac.osgeo.org/fdo/changeset/4588

Changed 4 years ago by romicadascalescu

  • status changed from closed to reopened
  • resolution fixed deleted

Additional fix required:

  • We need to replace "." only in class names and avoid other types.

Changed 4 years ago by romicadascalescu

  • status changed from reopened to closed
  • resolution set to fixed

Fixed by:

  • Replacing "." only for class names since properties names can contain special

characters in case are surrounded by double quotes. Changed files: \Fdo\Unmanaged\Src\Fdo\Xml\FeaturePropertyReaderImpl?.cpp \Fdo\Unmanaged\Src\Fdo\Xml\FeaturePropertyReaderImpl?.h

Changed 4 years ago by waltweltonlair

Additional fix also submitted to 3.4 stream. See  https://trac.osgeo.org/fdo/changeset/4598.

Note: See TracTickets for help on using tickets.