Click to See Complete Forum and Search --> : WebService + Polymorphism


Grofit
January 20th, 2009, 08:02 AM
Hey there,

Ive just been looking over the article on codeguru about webservices and polymorphism which sums up what im after.

I have a web service function that could return 1 of 3 objects, that all inherit from the same base object. Anyway i added the XMLInclude attribute to my class, and it gives the the correct object, its just it doesnt show all the data. It only seems to show the number based properties and not the string or other properties.

An example is the name property:


public String Name { get{ return m_Name; } }


However this doesnt show up, so is there any custom attributes i need to put into my classes to get the data to be sent across in the web service?