Entity classes and errors

Posts   
 
    
dan
User
Posts: 17
Joined: 23-Feb-2006
# Posted on: 12-Jun-2006 13:29:31   

Hello,

I'm using adapter scenario, solution contains web service and web service client I place business logic into entity classes, i've added 2 arraylists for each entity class Errors and Warnings, business logic adds errors into them and sends back to client

the problem i'm having is that inside WebServiceHelper.cs i keep getting serialization exception:



System.ArgumentException was unhandled by user code
  Message="Object of type 'System.String' cannot be converted to type 'System.Collections.ArrayList'."
  Source="System"
  StackTrace:
       at System.ComponentModel.ReflectPropertyDescriptor.SetValue(Object component, Object value)
       at SD.LLBLGen.Pro.ORMSupportClasses.EntityBase2.Xml2Entity(XmlNode node, Hashtable processedObjectIDs, ArrayList nodeEntityReferences)
       at SD.LLBLGen.Pro.ORMSupportClasses.EntityBase2.Xml2Entity(XmlNode node, Hashtable processedObjectIDs, ArrayList nodeEntityReferences)
       at SD.LLBLGen.Pro.ORMSupportClasses.EntityCollectionBase2.Xml2EntityCollection(XmlNode node, Hashtable processedObjectIDs, ArrayList nodeEntityReferences)
       at SD.LLBLGen.Pro.ORMSupportClasses.EntityCollectionBase2.ReadXml(XmlNode node)
       at SD.LLBLGen.Pro.ORMSupportClasses.EntityCollectionBase2.ReadXml(XmlReader reader)
       at ErpNet.Business.HelperClasses.EntityCollection.System.Xml.Serialization.IXmlSerializable.ReadXml(XmlReader reader) in C:\Erp\prev\Server\ErpNet.Business\DatabaseGeneric\HelperClasses\WebServiceHelper.cs:line 915
       at System.Xml.Serialization.XmlSerializationReader.ReadSerializable(IXmlSerializable serializable)
       at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderFinderWebService.Read4_TransportObject(Boolean isNullable, Boolean checkType)
       at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderFinderWebService.Read5_FindAllResponse()
       at Microsoft.Xml.Serialization.GeneratedAssembly.ArrayOfObjectSerializer1.Deserialize(XmlSerializationReader reader)
       at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events)

Is there any way to solve this problem, or is it there any better way to send errors and warnings back to client inside of entity

Walaa avatar
Walaa
Support Team
Posts: 14983
Joined: 21-Aug-2005
# Posted on: 12-Jun-2006 16:21:04   

please check the following link: http://www.ftponline.com/vsm/2004_02/online/wahlin/