HighTechTalks DotNet Forums  

Serialization of an inherited property.

ASP.net Web Services microsoft.public.dotnet.framework.aspnet.webservices


Discuss Serialization of an inherited property. in the ASP.net Web Services forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Kevin Burton
 
Posts: n/a

Default Serialization of an inherited property. - 05-04-2005 , 03:36 PM






Hopefully this is the right group.

I am getting the following exeption:

Member 'PPRP602AType.RPLY_HEADER' hides inherited member
'REPLYType.RPLY_HEADER', but has different custom attributes.
at
System.Xml.Serialization.StructMapping.FindDeclari ngMapping(MemberMapping
member, StructMapping& declaringMapping, String parent)
at System.Xml.Serialization.StructMapping.Declares(Me mberMapping member,
Stri
ng parent)
at
System.Xml.Serialization.XmlReflectionImporter.Imp ortStructLikeMapping(Str
uctModel model, String ns)

The 'REPLYType.RPLY_HEADER' is abstract and specified as:

public abstract class REPLYType
{
#region Accessor Functions
public abstract RPLY_HEADERType RPLY_HEADER
{
get;
set;
}
#endregion
}

Then I derive from there

public sealed class PPRP602AType : REPLYType

and implement the abstract property:

#region Private Members
private RPLY_HEADERType _RPLY_HEADER;
#endregion
#region Accessor Functions
[XmlElement(ElementName="RPLY_HEADER_PPRP602A")]
public override RPLY_HEADERType RPLY_HEADER
{
get
{
return _RPLY_HEADER;
}
set
{
_RPLY_HEADER = value;
}
}
#endregion

What am I doing wrong? Why the serialization exception?

Thank you.

Kevin




Reply With Quote
  #2  
Old   
gpartin33324
 
Posts: n/a

Default Re: Serialization of an inherited property. - 04-27-2007 , 10:33 AM







Any chance that you have solved this problem? I'm getting the exact
same error with the exact same class architecture that you have.
Basically, an abstract class and a class that inherits from the abstract
class.

Kevin Burton wrote:
Quote:
*Hopefully this is the right group.

I am getting the following exeption:

Member 'PPRP602AType.RPLY_HEADER' hides inherited member
'REPLYType.RPLY_HEADER', but has different custom attributes.
at
System.Xml.Serialization.StructMapping.FindDeclari ngMapping(MemberMapping
member, StructMapping& declaringMapping, String parent)
at System.Xml.Serialization.StructMapping.Declares(Me mberMapping
member,
Stri
ng parent)
at
System.Xml.Serialization.XmlReflectionImporter.Imp ortStructLikeMapping(Str
uctModel model, String ns)

The 'REPLYType.RPLY_HEADER' is abstract and specified as:

public abstract class REPLYType
{
#region Accessor Functions
public abstract RPLY_HEADERType RPLY_HEADER
{
get;
set;
}
#endregion
}

Then I derive from there

public sealed class PPRP602AType : REPLYType

and implement the abstract property:

#region Private Members
private RPLY_HEADERType _RPLY_HEADER;
#endregion
#region Accessor Functions
[XmlElement(ElementName="RPLY_HEADER_PPRP602A")]
public override RPLY_HEADERType RPLY_HEADER
{
get
{
return _RPLY_HEADER;
}
set
{
_RPLY_HEADER = value;
}
}
#endregion

What am I doing wrong? Why the serialization exception?

Thank you.

Kevin *


--
gpartin33324
------------------------------------------------------------------------
Posted via http://www.codecomments.com
------------------------------------------------------------------------



Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.