WCF - Object as a known type & # 8594; compatible?

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
    {    
        // properties
        [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.

+3
source share
1 answer

, WSDL. , , # List<Transaction> Transaction[] - . . basicHttpBinding .

+1

All Articles