XmlInclude does it do anything?

  • Thread starter Thread starter R.A.
  • Start date Start date
R

R.A.

Hi

I have a web service that returns a custom class in one of the service
methods.

public class MyClass
{
public string Name;
public string Street;
}


web method:

[WebMethod (Description = "Get customer info")]
public MtClass [] GetCustomerList (string ZipCode)
{
....
}


As I am testing I didn't use XmlInclude for MyClass or for the
GetCustomerList method but still I am able to get the serialized information
back from the web service. If this is the case then do I need XmlInclude at
all?

Thanks
 
The XmlInclude attribute is currently intended to support polymorphic
return types. In other words, it is intended to permit you to mark a Web
method as returning a base class, but also include the definitions for
the derived classes in the WSDL document so that clients can be prepared
to accept objects of the derived types as return values.

rajagopal
 
Back
Top