Serialization of an inherited property.

Discussion in 'ASP .Net Web Services' started by Kevin Burton, May 4, 2005.

  1. Kevin Burton

    Kevin Burton Guest

    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.FindDeclaringMapping(MemberMapping
    member, StructMapping& declaringMapping, String parent)
    at System.Xml.Serialization.StructMapping.Declares(MemberMapping member,
    Stri
    ng parent)
    at
    System.Xml.Serialization.XmlReflectionImporter.ImportStructLikeMapping(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
    Kevin Burton, May 4, 2005
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    8
    Views:
    2,229
    deadsea
    Jan 2, 2005
  2. Replies:
    3
    Views:
    1,013
  3. Alexander Higgins
    Replies:
    3
    Views:
    1,067
    Teemu Keiski
    Jul 30, 2007
  4. Alexander Higgins
    Replies:
    0
    Views:
    439
    Alexander Higgins
    Jul 21, 2007
  5. 7stud --
    Replies:
    11
    Views:
    390
    7stud --
    Nov 9, 2007
Loading...

Share This Page