If I have a web service method, e.g.
[WebMethod]
[XmlInclude(typeof(SportsCar)), XmlInclude(typeof(FamilyCar))]
public Car[] GetCars()
{
Car[] cars = new Car[2];
cars[0] = new FamilyCar();
cars[1] = new SportsCar();
return cars;
}
If I want to add a new car type to my service, I would have to add a new XmlInclude attribute to the web method. Unfortunately the clients (AFAIK) would now need to update their web service reference, rebuild and re-deploy. Otherwise they would get an XML document generation error.
What strategies exist to deal with this?
Thanks.