Serialize Person Object

  • Thread starter Thread starter Roberto Carriquiry
  • Start date Start date
R

Roberto Carriquiry

I am writeing a webService that needs to recieve a CDO.Person object as a
parameter. but when I run it I have a runtime error.

Cannot serialize member CDO.PersonClass.DataSource of type CDO.IDataSource
because it is an interface

I assume that something is wrong with the serialization of this object.
Does anyone have experience in this subject?

thanks
Rob.-
 
I am writeing a webService that needs to recieve a CDO.Person object as a
parameter. but when I run it I have a runtime error.

Cannot serialize member CDO.PersonClass.DataSource of type CDO.IDataSource
because it is an interface

I assume that something is wrong with the serialization of this object.
Does anyone have experience in this subject?

The error is caused by the fact that the XmlSerializer can't deal
with Interface typed member variables. A webservice ALWAYS uses
XmlSerializer. You have to build the XML yourself and return that, or, if
CDO.Person is serializable using Soap, serialize it to string via a
MemoryStream and return that string, then on the client, deserialize the
object back from the string received.

Frans.
 
Back
Top