Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
YoJ YoJ is offline
external usenet poster
 
Posts: 1
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
excel is connected to sharepoint server and says too many members puneet kinger Excel Discussion (Misc queries) 0 May 11th 07 12:49 PM
Painting my kitchen exposed parts (including ceiling) David Smithz Excel Discussion (Misc queries) 2 March 4th 06 12:31 AM
A thank-you note to Excel and PPT group members Hari Charts and Charting in Excel 2 October 14th 05 01:32 AM
Difference between a Service Release and a Service Pack? Bill Renaud[_2_] Excel Programming 2 April 16th 04 04:13 AM
How I can determine a base class of a procedure's incoming parameter? Dmitry V. Petkun Excel Programming 1 November 12th 03 01:41 PM


All times are GMT +1. The time now is 10:50 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"