473,466 Members | 1,436 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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

AA
I want to Deserialize this simple xml...

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

================================================== =============

into this object
================================================== =============

<System.Xml.Serialization.XmlTypeAttribute(Namespa ce:="http://www.3gpp.org/ftp/Specs/archive/23_series/23.140/schema/REL-5-MM7-1-0"), _
System.Xml.Serialization.XmlRootAttribute("SubmitR eq", [Namespace]:="http://www.3gpp.org/ftp/Specs/archive/23_series/23.140/schema/REL-5-MM7-1-0", IsNullable:=False)> _

Public Class submitReqType
Inherits genericVASPRequestType

Public Recipients As recipientsType
Public ServiceCode As serviceCodeType

<System.Xml.Serialization.XmlElementAttribute(Data Type:="NMTOKEN")> _
Public LinkedID As String

<System.ComponentModel.DefaultValueAttribute(messa geClassType.Informational)> _
Public MessageClass As messageClassType = 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

<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

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

Do you know why?

Thanks a lot

AA

Nov 12 '05 #1
1 39722
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
Nov 12 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Shone | last post by:
I would like to perform a 2-pass XML reading from a stream. Once using the Validating reader, just to confirm the validity against the schema, and next time to do a reading to extract the data....
2
by: Snowman | last post by:
Suppose I have a RootObject which holds a collection of other objects. The other objects have a property (Parent) which refers back to the "parent" collection (b.t.w. my collection is based on...
3
by: parrot toes | last post by:
Summary: I have been trying to make requests of a web service provided by Axis using a dotnet client with code generated by wsdl.exe and have been getting exceptions when trying to process the...
1
by: parrot toes | last post by:
I tried to post this question before, but there was an error when posting. I case it did get posted and in order to avoid duplication, I'll just repost a summary. I have written a dotnet client...
5
by: frustratedWithDotNet | last post by:
Why does .NET not issue messages or throw exceptions if it doesn't like something in the response from a web service?? I am getting a response object, but an array of custom objects within the...
0
by: Jay Sauls | last post by:
I've got a simple XML document (from an external source that I can't change) that I'm having trouble deserializing correctly. The document looks like: <?xml version='1.0'?> <quotes...
5
by: Greg Allen | last post by:
I am consuming a web service and using the generated Reference.cs to access the service and the objects associated with it. I have run into a problem where some inherited classes are not being...
0
by: =?Utf-8?B?UGllcmNlQnJvc25hbg==?= | last post by:
I am using C#(Vs.Net 2003) The error I am getting is... System.Xml.XmlException: This is an unexpected token. The expected token is 'EndElement' I have come to understand that this error is...
1
by: depalau | last post by:
I'm experiencing issues where XmlSerialier.Deserialize throws an exception when attempting to use a MemoryStream built with an XmlWriter vs. a standalone StringReader. It is attempting to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.