Serialization error for spatial type
Posted: Mon 04 Apr 2016 11:59
On a system running .NET 4.5.2 we use Devart dotConnect for Oracle V8.5.616 together with the Entity Framework 6.0 and the NetTopologySuite V1.14.0.
After filling a DataSet using a DbDataAdapter with data of a table containing a column with the spatial data type DbGeography, I try to convert the data into XML using the DataSet's method GetXml. This operation fails with an InvalidOperationException indicating the default constructor is not defined for the class Devart.Data.Oracle.OracleObject.
Am I doing something wrong, or is this functionality not supported yet?
Thank you,
Joerg
StackTrace:
bei System.Xml.Serialization.TypeDesc.CheckSupported()
bei System.Xml.Serialization.TypeScope.GetTypeDesc(Type type, MemberInfo source, Boolean directReference, Boolean throwOnError)
bei System.Xml.Serialization.ModelScope.GetTypeModel(Type type, Boolean directReference)
bei System.Xml.Serialization.XmlReflectionImporter.ImportTypeMapping(Type type, XmlRootAttribute root, String defaultNamespace)
bei System.Xml.Serialization.XmlSerializerFactory.CreateSerializer(Type type, XmlAttributeOverrides overrides, Type[] extraTypes, XmlRootAttribute root, String defaultNamespace, String location, Evidence evidence)
bei System.Data.Common.ObjectStorage.GetXmlSerializer(Type type, XmlRootAttribute attribute)
bei System.Data.Common.SqlUdtStorage.ConvertObjectToXml(Object value, XmlWriter xmlWriter, XmlRootAttribute xmlAttrib)
bei System.Data.DataColumn.ConvertObjectToXml(Object value, XmlWriter xmlWriter, XmlRootAttribute xmlAttrib)
bei System.Data.XmlDataTreeWriter.XmlDataRowWriter(DataRow row, String encodedTableName)
bei System.Data.XmlDataTreeWriter.Save(XmlWriter xw, Boolean writeSchema)
bei System.Data.DataSet.GetXml()
After filling a DataSet using a DbDataAdapter with data of a table containing a column with the spatial data type DbGeography, I try to convert the data into XML using the DataSet's method GetXml. This operation fails with an InvalidOperationException indicating the default constructor is not defined for the class Devart.Data.Oracle.OracleObject.
Am I doing something wrong, or is this functionality not supported yet?
Thank you,
Joerg
StackTrace:
bei System.Xml.Serialization.TypeDesc.CheckSupported()
bei System.Xml.Serialization.TypeScope.GetTypeDesc(Type type, MemberInfo source, Boolean directReference, Boolean throwOnError)
bei System.Xml.Serialization.ModelScope.GetTypeModel(Type type, Boolean directReference)
bei System.Xml.Serialization.XmlReflectionImporter.ImportTypeMapping(Type type, XmlRootAttribute root, String defaultNamespace)
bei System.Xml.Serialization.XmlSerializerFactory.CreateSerializer(Type type, XmlAttributeOverrides overrides, Type[] extraTypes, XmlRootAttribute root, String defaultNamespace, String location, Evidence evidence)
bei System.Data.Common.ObjectStorage.GetXmlSerializer(Type type, XmlRootAttribute attribute)
bei System.Data.Common.SqlUdtStorage.ConvertObjectToXml(Object value, XmlWriter xmlWriter, XmlRootAttribute xmlAttrib)
bei System.Data.DataColumn.ConvertObjectToXml(Object value, XmlWriter xmlWriter, XmlRootAttribute xmlAttrib)
bei System.Data.XmlDataTreeWriter.XmlDataRowWriter(DataRow row, String encodedTableName)
bei System.Data.XmlDataTreeWriter.Save(XmlWriter xw, Boolean writeSchema)
bei System.Data.DataSet.GetXml()