C
cathywigzell
I have a web service which exposes a method...
[WebMethod]
public Object Invoke(Object obj)
{
...
}
both the input param and the return value objects can, in reality, be
anything. Howver, if I call this method from a client and cast my own
custom object as Object, I get this error...
System.InvalidOperationException: The type MyType was not expected. Use
the XmlInclude or SoapInclude attribute to specify types that are not
known statically.
My custom class is defined like this...
[XmlInclude( typeof( MyType ) )]
public class MyType
{
...
}
Obviously I need to do more, but what?
Cathy
[WebMethod]
public Object Invoke(Object obj)
{
...
}
both the input param and the return value objects can, in reality, be
anything. Howver, if I call this method from a client and cast my own
custom object as Object, I get this error...
System.InvalidOperationException: The type MyType was not expected. Use
the XmlInclude or SoapInclude attribute to specify types that are not
known statically.
My custom class is defined like this...
[XmlInclude( typeof( MyType ) )]
public class MyType
{
...
}
Obviously I need to do more, but what?
Cathy