Actually there should be a direct answer to this question (this applies to the "Object" property below):
Having the following contract:
[KnownType(typeof(bool))]
[KnownType(typeof(int))]
[KnownType(typeof(string))]
[KnownType(typeof(Customer))]
[KnownType(typeof(Client))]
public class Transaction
{
[DataMember(Name = "UID")]
public int UID{}
[DataMember(Name = "Type")]
public Enums.TransactionType Type{}
[DataMember(Name = "Data")]
public Object Data{}
}
and the following service contract:
public interface IService
{
[OperationContract(Name = "GetData")]
List<Transaction> GetTransact();
}
Will it be compatible? Speak with Java, gSoap? If not, how can I make it compatible?
Thank.
EDIT:
I just want to know if WCF knows how to serialize / deserialize an object from / to known types.
source
share