R
rseroter
Hello,
I'm working with a scenario where I have a base abstract data entity
(ContactDTO) and a number of inherited concrete classes (ex,
StandardContactDTO). My web service method returns the base entity
type, which means that in theory, I could return any of the concrete
instance types.
My WSDL shows all the appropriate complex types defined. However, when
I call my service, the message I get back is:
The specified type was not recognized: name='StandardContactDTO',
namespace='http://tempuri.org/', at <GetContactsResult
xmlns='http://tempuri.org/'>
Now, I've tried appending XmlInclude attributes at both the base class,
and web service method level. I know that in theory, this should force
the compiler to attach the appropriate types to the service assembly.
However, that doesn't appear to be working.
So, is there some sort of tweak in order to get complex inherited types
to be returned from web services? I'd like to avoid the need to have
individual service methods that explicitly return each type of concrete
class, as opposed to a single method that can return each type.
Thanks!
I'm working with a scenario where I have a base abstract data entity
(ContactDTO) and a number of inherited concrete classes (ex,
StandardContactDTO). My web service method returns the base entity
type, which means that in theory, I could return any of the concrete
instance types.
My WSDL shows all the appropriate complex types defined. However, when
I call my service, the message I get back is:
The specified type was not recognized: name='StandardContactDTO',
namespace='http://tempuri.org/', at <GetContactsResult
xmlns='http://tempuri.org/'>
Now, I've tried appending XmlInclude attributes at both the base class,
and web service method level. I know that in theory, this should force
the compiler to attach the appropriate types to the service assembly.
However, that doesn't appear to be working.
So, is there some sort of tweak in order to get complex inherited types
to be returned from web services? I'd like to avoid the need to have
individual service methods that explicitly return each type of concrete
class, as opposed to a single method that can return each type.
Thanks!