>From MSDN:
-----Original Message----- From: Unmoderated discussion of advanced .NET topics. [mailto:[EMAIL PROTECTED] On Behalf Of Martijn de Haas Sent: Monday, January 03, 2005 12:23 AM To: [email protected] Subject: Re: Using WSE to pass message objects derived from a common base Hi, You are using the XmlInclude attribute incorrectly. You have to use it on WebMethod level. Not on class level. See example below (source: MSDN library) Regards, Martijn de Haas http://www.artifactory.nl [C#] public class Vehicle{} public class Car:Vehicle{} public class Truck:Vehicle{} public class Sample { [WebMethodAttribute] [XmlInclude(typeof(Car))] [XmlInclude(typeof(Truck))] public Vehicle ReturnVehicle(int i){ if(i == 0) return new Car(); else return new Truck(); } } =================================== This list is hosted by DevelopMentor(r) http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com =================================== This list is hosted by DevelopMentor� http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com
