title: WCF problem passing complex types
body: <p>I have a service contract that defines a method with a parameter of type System.Object (xs:anyType in the WSDL).  I want to be able to pass simple types as well as complex types in this parameter.  Simple types work fine, but when I try to pass a complex type that is defined in my WSDL, I get this error:</p>
  
  <p>Element '<a href="http://tempuri.org/:value" rel="nofollow noreferrer">http://tempuri.org/:value</a>' contains data of the '<a href="http://schemas.datacontract.org/2004/07/MyNamespace:MyClass" rel="nofollow noreferrer">http://schemas.datacontract.org/2004/07/MyNamespace:MyClass</a>' data contract. The deserializer has no knowledge of any type that maps to this contract. Add the type corresponding to 'MyClass' to the list of known types - for example, by using the KnownTypeAttribute attribute or by adding it to the list of known types passed to DataContractSerializer.</p>
  
  <p>Adding it as a known type doesn't help because it's already in my WSDL.  How can I pass an object of a complex type via an "xs:anyType" parameter?</p>
  
  <p>More info:</p>
  
  <p>I believe this works when using NetDataContract, but I can't use that because my client is Silverlight.</p>
  
  <p>I have seen references to complex types explicitly extending xs:anyType, but I have no idea how to make WCF generate a WSDL that does that, and I have no idea whether or not it would even help.</p>
  
  <p>Thanks</p>