Re: Serialization.

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



The abstract class is not decorated at all. The overridden property is
decorated as below. How should this change to avoid the exception?

Kevin

"erymuzuan" wrote:

> Xml Serialization never take attribute with it in inheritance chains ,
> so you have to copy and paste the attribute if any exists between your
> base class and derive class
>
> regards
> erymuzuan mustapa
>
> Kevin Burton wrote:
> > 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
>
.



Relevant Pages

  • Re: Service Problem - service on local computer started and then s
    ... This behaviour is typical for when an exception is thrown on startup. ... Like Kevin said, Try/Catch is a good idea. ... None of the logging happens. ...
    (microsoft.public.dotnet.framework)
  • Re: Urgent User Control
    ... function in the chain that you want to handle the exception. ... low-level classes generally throw exceptions rather than ... Kevin Spencer ... >>> catch an exception thrown from the User Control. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Exception in thread "main" java.lang.NoClassDefFoundError:
    ... $ ./runScript.sh -master kevin ... Exception in thread "main" java.lang.NoClassDefFoundError: ... ClientPackage/ChatClient ... This is part of the Chord implementation. ...
    (comp.lang.java.programmer)
  • RE: Race condition in SQLDriverConnect on Windows2003 Server SP1.
    ... Are you getting an AV exception? ... Kevin Yu ... Microsoft Online Community Support ...
    (microsoft.public.data.odbc)
  • Re: Create a email addres question!
    ... Kevin has provided you two ways for your goal. ... Add a Distribution Groups, then you can follow the instruction to configure ... you can create a public folder ... delivered to each member of the group. ...
    (microsoft.public.windows.server.sbs)