Trying to get this to work, with no luck:
[DataMember]
public Type ParameterType { get; set;}
Any field or property that returns System.Type
is not serializable using WCF because, at runtime, the actual type of the object is System.RuntimeType
, which is marked as internal, and thus cannot be automatically serialized by the DataContractSerializer
, which can only serialize publicly accessible types.
However, you could write an IXmlSerializer
wrapper around System.Type
that will pull out the information you intend to transfer.
Web Services, in general, are meant to be cross-platform. What would a Java program do with a System.Type from .NET?
Also, what part of Type would you like to see serialized, and how would you like to see it deserialized?