473,585 Members | 2,512 Online
Bytes | Software Development & Data Engineering Community
+ 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>
<SenderIdentifi cation>
<VASPID>TNN</VASPID>
<VASID>News</VASID>
</SenderIdentific ation>
<Recipients>
<To>
<Number>7255441 234</Number>
</To>
<Cc>
<Number>7255443 333</Number>
</Cc>
<Bcc>
<RFC2822Address >72********@OMM S.com</RFC2822Address>
</Bcc>
</Recipients>
<ServiceCode>go ld-sp33-im42</ServiceCode>
<LinkedID>mms00 016666</LinkedID>
<MessageClass>I nformational</MessageClass>
<ExpiryDate>P90 D</ExpiryDate>
<DeliveryReport >true</DeliveryReport>
<Priority>Norma l</Priority>
<Subject>News for today</Subject>
<ChargedParty>S ender</ChargedParty>
<DistributionIn dicator>true</DistributionInd icator>
<Content href="cid:Sa*** **************@ news.tnn.com" allowAdaptation s="true"/>
</SubmitReq>

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

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

<System.Xml.Ser ialization.XmlT ypeAttribute(Na mespace:="http://www.3gpp.org/ftp/Specs/archive/23_series/23.140/schema/REL-5-MM7-1-0"), _
System.Xml.Seri alization.XmlRo otAttribute("Su bmitReq", [Namespace]:="http://www.3gpp.org/ftp/Specs/archive/23_series/23.140/schema/REL-5-MM7-1-0", IsNullable:=Fal se)> _

Public Class submitReqType
Inherits genericVASPRequ estType

Public Recipients As recipientsType
Public ServiceCode As serviceCodeType

<System.Xml.Ser ialization.XmlE lementAttribute (DataType:="NMT OKEN")> _
Public LinkedID As String

<System.Compone ntModel.Default ValueAttribute( messageClassTyp e.Informational )> _
Public MessageClass As messageClassTyp e = messageClassTyp e.Informational

Public TimeStamp As Date

<System.Xml.Ser ialization.XmlI gnoreAttribute( )> _
Public TimeStampSpecif ied As Boolean

Public ReplyCharging As submitReqTypeRe plyCharging
Public EarliestDeliver yTime As String
Public ExpiryDate As String
Public DeliveryReport As Boolean

<System.Xml.Ser ialization.XmlI gnoreAttribute( )> _
Public DeliveryReportS pecified As Boolean

Public ReadReply As Boolean

<System.Xml.Ser ialization.XmlI gnoreAttribute( )> _
Public ReadReplySpecif ied As Boolean

Public Priority As priorityType

<System.Xml.Ser ialization.XmlI gnoreAttribute( )> _
Public PrioritySpecifi ed As Boolean

Public Subject As String
Public ChargedParty As chargedPartyTyp e

<System.Xml.Ser ialization.XmlI gnoreAttribute( )> _
Public ChargedPartySpe cified As Boolean

Public DistributionPro tection As Boolean

<System.Xml.Ser ialization.XmlI gnoreAttribute( )> _
Public DistributionPro tectionSpecifie d As Boolean

Public Content As contentReferenc eType
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 39750
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
9446
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. Actually, second time I do a deserialization, the data from XML is fed directly to an object. The problem I am experiencing is the error at the...
2
3821
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 CollectionBase), in similar fashion as the object models of MS Office. I want to serialize this object graph (with RootObject as the xml document...
3
9783
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 response. As a result of seraching news groups I guessed that the SOAP response defines an array element in a way that causes the dotnet...
1
3725
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 that accesses a Axis provided web service. The client uses the code generated, using wsdl.exe, from the wsdl file provided by the web service...
5
5524
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 response is null instead of being populated. The SOAP response from the service looks good and I cannot see anything wrong with the WSDL or XML schema....
0
1533
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 timestamp="17:49:23"> <quote id="0" value="foo"/> <quote id="1" value="bar"/> </quotes>
5
2283
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 deserialized. I have verified that the XML being returned by the service contains the tags I am expecting, but they don't show up in the resulting...
0
1309
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 being caused by a character or set of characters...in the value of an xml element.
1
4943
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 deserialize a complex object. Here is what I have: 0. Environment: Visual Studio 2005, VB.Net. I won't go into the gory details of my complex object,...
0
7908
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
8199
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8336
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
6606
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5710
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5389
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3835
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3863
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2343
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 we have to send another system

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.