Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Base class members are not exposed in Excel using Web Service
Hi,
I am trying to reference a web service from Excel using Office 2003 Web Service Toolkit and I have the following objects defined: [Serializable()] public class BaseClass { private int id; public int ID { get { return id; } set { id = value; } } } [Serializable()] public class InheritedClass : BaseClass { private int attribute; public int Attribute { get { return attribute; } set { attribute = value; } } } and I have the following method defined in the web service: [WebMethod( Description = "description", MessageName = "GetAttribute" )] [XmlInclude( typeof( BaseClass ) )] public string GetAttribute( InheritedClass test ) { return test.Attribute; } When my web service is referenced in the Excel, it generates a structure called "struct_InheritedClass" with "Attribute" property but it does not contain base class property "ID". How can I expose members of base class in the structure of inherited class? Shouldn't the Web Service Toolkit also generate a structure for base class as well? Any help would be appreciated. Thanks. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
excel is connected to sharepoint server and says too many members | Excel Discussion (Misc queries) | |||
Painting my kitchen exposed parts (including ceiling) | Excel Discussion (Misc queries) | |||
A thank-you note to Excel and PPT group members | Charts and Charting in Excel | |||
Difference between a Service Release and a Service Pack? | Excel Programming | |||
How I can determine a base class of a procedure's incoming parameter? | Excel Programming |