[mapguide-internals] FeatureSet xml serialization issues (RE:
SELECTFEATURES via mapagent and null values)
Zac Spitzer
zac.spitzer at gmail.com
Thu Apr 8 21:25:23 EDT 2010
Adopting Oracle's approach of treating empty string as nulls might
be a good approach here? It's a lot simpler, the approach for the
handling of nulls used at the moment seems to cause a lot
of nigglying grief
On 9 April 2010 11:19, Jackie Ng <jumpinjackie at gmail.com> wrote:
>
> Sorry to necro a 1.5 year old post but this issue has stuck for over 1.5
> years without a solution and is severly hampering what I want to do with
> some new Maestro features (see tickets 1238, 1228 and 708)
>
> I've done some digging around attempting to piece the trail of logic from
> the moment a SELECTFEATURES request is made to the point where a
> MgNullPropertyValueException is thrown.
>
> So far, I've pieced the flow of logic as follows:
>
> 1. Send SELECTFEATURES on mapagent
> 2. MgHttpSelectFeatures handles this request and does a call to
> MgProxyFeatureService::SelectFeatures
> 3. MgHttpSelectFeatures calls ToXml() on the MgProxyFeatureReader
> 4. In the process of iterating through the MgProxyFeatureReader, it fetches
> features from the server in batches via MgBatchPropertyCollection, which may
> contain null property values.
> 5. Each iterated feature (a MgPropertyCollection) is individually serialized
> to xml
> 6. Each feature property in the MgPropertyCollection fetches and writes the
> boxed values to xml, which throws a MgNullPropertyValueException if the
> property is actually null property value.
> 7. The XML content is written out to the HTTP response stream.
>
> So from my observation, it seems that in the process of serializing features
> to xml it does not consider the scenario of null feature property values,
> instead just blindly writing each property value.
>
> Does my observation sound about right? If so, how should be properly
> handling this? Do we serialize null values? Or should we omit writing the
> xml if the property value is null?
>
> - Jackie
>
> --
> View this message in context: http://n2.nabble.com/SELECTFEATURES-via-mapagent-and-null-values-tp1822076p4874808.html
> Sent from the MapGuide Internals mailing list archive at Nabble.com.
> _______________________________________________
> mapguide-internals mailing list
> mapguide-internals at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapguide-internals
>
--
Zac Spitzer
Solution Architect / Director
Ennoble Consultancy Australia
http://www.ennoble.com.au
http://zacster.blogspot.com
+61 405 847 168
More information about the mapguide-internals
mailing list