all groups > dotnet xml > april 2004 >
You're in the

dotnet xml

group:

Problems with Deserialization.. There is an error in XML document (1, 2).


Problems with Deserialization.. There is an error in XML document (1, 2). AA
4/19/2004 2:14:20 PM
dotnet xml: I want to Deserialize this simple xml...

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
<SubmitReq =
xmlns=3D"http://www.3gpp.org/ftp/Specs/archive/23_series/23.140/schema/RE=
L-5-MM7-1 -3">
<MM7Version>5.6.0</MM7Version>=20
<SenderIdentification>=20
<VASPID>TNN</VASPID>=20
<VASID>News</VASID>=20
</SenderIdentification>=20
<Recipients>=20
<To>=20
<Number>7255441234</Number>=20
</To>=20
<Cc>=20
<Number>7255443333</Number>=20
</Cc>=20
<Bcc>=20
<RFC2822Address>7255444444@OMMS.com</RFC2822Address>=20
</Bcc>=20
</Recipients>=20
<ServiceCode>gold-sp33-im42</ServiceCode>=20
<LinkedID>mms00016666</LinkedID>=20
<MessageClass>Informational</MessageClass>=20
<ExpiryDate>P90D</ExpiryDate>=20
<DeliveryReport>true</DeliveryReport>=20
<Priority>Normal</Priority>=20
<Subject>News for today</Subject>=20
<ChargedParty>Sender</ChargedParty>=20
<DistributionIndicator>true</DistributionIndicator>=20
<Content href=3D"cid:SaturnPics-01020930@news.tnn.com" =
allowAdaptations=3D"true"/>=20
</SubmitReq>=20

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D

into this object
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D

<System.Xml.Serialization.XmlTypeAttribute(Namespace:=3D"http://www.3gpp.=
org/ftp/Specs/archive/23_series/23.140/schema/REL-5-MM7-1-0"), _
System.Xml.Serialization.XmlRootAttribute("SubmitReq", =
[Namespace]:=3D"http://www.3gpp.org/ftp/Specs/archive/23_series/23.140/sc=
hema/REL-5-MM7-1-0", IsNullable:=3DFalse)> _

Public Class submitReqType
Inherits genericVASPRequestType

Public Recipients As recipientsType
Public ServiceCode As serviceCodeType

=
<System.Xml.Serialization.XmlElementAttribute(DataType:=3D"NMTOKEN")> _
Public LinkedID As String

=
<System.ComponentModel.DefaultValueAttribute(messageClassType.Information=
al)> _
Public MessageClass As messageClassType =3D =
messageClassType.Informational

Public TimeStamp As Date

<System.Xml.Serialization.XmlIgnoreAttribute()> _
Public TimeStampSpecified As Boolean

Public ReplyCharging As submitReqTypeReplyCharging
Public EarliestDeliveryTime As String
Public ExpiryDate As String
Public DeliveryReport As Boolean

<System.Xml.Serialization.XmlIgnoreAttribute()> _
Public DeliveryReportSpecified As Boolean

Public ReadReply As Boolean

<System.Xml.Serialization.XmlIgnoreAttribute()> _
Public ReadReplySpecified As Boolean

Public Priority As priorityType

<System.Xml.Serialization.XmlIgnoreAttribute()> _
Public PrioritySpecified As Boolean

Public Subject As String
Public ChargedParty As chargedPartyType
=20
<System.Xml.Serialization.XmlIgnoreAttribute()> _
Public ChargedPartySpecified As Boolean

Public DistributionProtection As Boolean

<System.Xml.Serialization.XmlIgnoreAttribute()> _
Public DistributionProtectionSpecified As Boolean

Public Content As contentReferenceType
End Class

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D


But the error ..=20
There is an error in XML document (1, 2).=20

Do you know why?



Thanks a lot



Re: Problems with Deserialization.. There is an error in XML document (1, 2). Mickey Williams
4/20/2004 5:07:04 PM
Somebody moved your cheese: your namespaces don't match, so the serializer
thinks the types are not compatible.
--
Mickey Williams
Author, "Microsoft Visual C# .NET Core Reference", MS Press
www.servergeek.com

AddThis Social Bookmark Button