DEALOGIC
asked on
WCF MSMQ unable to serialize interface of DataContract
Hi,
I am trying to send a datacontract object to message queue. one of the property is return a interface type.
I get this errors:
{"Cannot serialize member Dealogic.ClientManager.Dom ain.DataTr ansferObje cts.
ContentTransferObject.Anal yst of type Dealogic.ClientManager.Dom ain.Interf aces.
IAnalyst because it is an interface."}
did I miss any attribute?
One of the solution I found is changing the IAnalyst to an abstract class and use XMLInclude
but that would require a major change. any other work around?
thank you,
DL
I am trying to send a datacontract object to message queue. one of the property is return a interface type.
I get this errors:
{"Cannot serialize member Dealogic.ClientManager.Dom
ContentTransferObject.Anal
IAnalyst because it is an interface."}
did I miss any attribute?
One of the solution I found is changing the IAnalyst to an abstract class and use XMLInclude
but that would require a major change. any other work around?
thank you,
DL
[DataContract]
[KnownType( typeof( AnalystTransferObject ) )]
public class ContentTransferObject : BaseTransferObject, IContent {
[DataMember]
public ContentType ContentType { get; set; }
[DataMember]
public int ContentNo { get; set; }
[DataMember]
public string Headline { get; set; }
[DataMember]
public IAnalyst Analyst { get; set; }
}
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.