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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top