Opened 15 years ago

Closed 15 years ago

Last modified 15 years ago

#480 closed defect (fixed)

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 (1)

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

Download all attachments as: .zip

Change History (9)

by CXYS, 15 years ago

Attachment: 1200560.01 added

This patch fixes the defect.

comment:1 by CXYS, 15 years ago

Resolution: fixed
Status: newclosed

This fix has been reviewed by Romica Dascalescu.

comment:2 by CXYS, 15 years ago

Resolution: fixed
Status: closedreopened

comment:3 by romicadascalescu, 15 years ago

Resolution: fixed
Status: reopenedclosed

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

comment:4 by waltweltonlair, 15 years ago

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

comment:5 by stevenxu, 15 years ago

Ported the fix into FDO 3.4.0

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

comment:6 by romicadascalescu, 15 years ago

Resolution: fixed
Status: closedreopened

Additional fix required:

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

comment:7 by romicadascalescu, 15 years ago

Resolution: fixed
Status: reopenedclosed

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

comment:8 by waltweltonlair, 15 years ago

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

Note: See TracTickets for help on using tickets.