[mapguide-users] Cannot SetSelectionXML using KingOracle as provider
Iulia Tamas
iulia_tamas30 at yahoo.com
Tue Dec 20 11:57:50 EST 2011
Hello,
After passing from charging data from .sdf files to charging data from Oracle Spatial using KingOracle as provider, I have faced some problems when trying to use SetSelectionXML.
The xmlSelection is created but without the <ID> element:
<?xml version="1.0" encoding="UTF-8" ?>
<FeatureSet xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FeatureSet-1.0.0.xsd">
<Layer id="171561a0-2b28-11e1-8000-005056c00001">
<Class id="KingOra:XE~POSTE~DATA">
<ID />
</Class>
</Layer>
</FeatureSet>
I am using the following code to create the $xmlSelection:
$queryOptions = new MgFeatureQueryOptions();
for ($i = 0; $i < $layerCollection->GetCount() && !$foundKey; $i++) {
$layer = $layerCollection->GetItem($i);
if ($layer->GetName() == 'Poste') {
for ($j = 0; $j < sizeof($queryPropertyName); $j++) {
try {
$queryOptions->SetFilter('NAME' . ' ' . $queryOperation . " '" ."A1" . "'");
$featureReader = $layer->SelectFeatures($queryOptions);
if ($featureReader->ReadNext()) {
$featureClass = $layer->GetFeatureClassName();
$properties = new MgPropertyCollection();
$properties->Add(new MgStringProperty('NAME', $featureReader->GetString('NAME')));
$selection = new MgSelection($map);
$selection->AddFeatureIds($layer, $featureClass, $properties);
$xmlSelection = $selection->ToXml();
$featureReader->Close();
$foundKey = true;
break;
}
$featureReader->Close();
} catch (MgException $e) {
}
}
}
I also get the following error:
Error: An exception occurred in FDO component.
c_KgOraSelectCommand.Execute : ERROR: FindClassDefinition() return NULL
StackTrace:
- MgFeatureServiceHandler.ProcessOperation line 83 file c:\builds\mg22x64\mgdev\server\src\services\feature\FeatureServiceHandler.cpp
- MgOpSelectFeatures.Execute line 109 file c:\builds\mg22x64\mgdev\server\src\services\feature\OpSelectFeatures.cpp
- MgServerFeatureService.SelectFeatures line 433 file c:\builds\mg22x64\mgdev\server\src\services\feature\ServerFeatureService.cpp
- MgServerSelectFeatures.SelectFeatures line 266 file c:\builds\mg22x64\mgdev\server\src\services\feature\ServerSelectFeatures.cpp
I'm using Mapguide 2.2, 64 bit
Does anybody know why this happens?
Thank you,
Iulia
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapguide-users/attachments/20111220/d78c124d/attachment.html
More information about the mapguide-users
mailing list