G
Guest
Hi,
i posted this error message a couple of weeks ago:
has anyone come across this error before:
This is an unexpected token. The expected token is 'NAME'
I am getting it when trying to send an xml file across a web service layer.
The xml file is well formed, having been checked with XmlSpy. The size of
the file is roughly 119KB. I think it was written in MS Word and the HTML is
being sent through the web service layer as a property of a serializable
object.
Searching the web has given me lots of results but none have found a
solution. The error suggests to me that it is reading the xml and suddenly
stops, which means it cannot find a closing tag. Is there a size limit to
the amount of data that can be serialized/deserialized in one go?
Any help would be really appreciated.
Since then I have determined that a field in a data table was causing a
problem and once corrected the transaction worked properly. However, it has
happened again when working with different files and I need to get down to
the root cause.
This time, the error message was:
"The opening tag 'ParagraphOrder' did not match the closing tag 'ParagraphOr'.
ParagraphOrder is a field in the serializable object and has a simple
numeric value. What the error suggests is that the serialized XML is being
read, gets to the closing ParagraphOrder tag and stops reading halway through
it. Or, it is halfway through the serialization when it occurs.
The stacktrace is a follows:
System.Xml.XmlTextReader.ParseTag() +2328
System.Xml.XmlTextReader.ParseBeginTagExpandCharEntities() +1478
System.Xml.XmlTextReader.Read() +216
Microsoft.Web.Services2.Xml.XmlSkipDTDReader.Read()
System.Xml.XmlLoader.LoadCurrentNode() +612
System.Xml.XmlLoader.LoadDocSequence(XmlDocument parentDoc) +49
System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean
preserveWhitespace) +102
System.Xml.XmlDocument.Load(XmlReader reader) +72
Microsoft.Web.Services2.SoapEnvelope.Load(Stream stream)
Microsoft.Web.Services2.OutputStream.Close()
System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String
methodName, Object[] parameters) +162
Internal methods to pass the object to the web service layer go here.
Could there be something in the XmlTextReader that sets a maximum buffer
size? If so, why does it normally work with even bigger files?
This one has me well and truly stumped.
i posted this error message a couple of weeks ago:
has anyone come across this error before:
This is an unexpected token. The expected token is 'NAME'
I am getting it when trying to send an xml file across a web service layer.
The xml file is well formed, having been checked with XmlSpy. The size of
the file is roughly 119KB. I think it was written in MS Word and the HTML is
being sent through the web service layer as a property of a serializable
object.
Searching the web has given me lots of results but none have found a
solution. The error suggests to me that it is reading the xml and suddenly
stops, which means it cannot find a closing tag. Is there a size limit to
the amount of data that can be serialized/deserialized in one go?
Any help would be really appreciated.
Since then I have determined that a field in a data table was causing a
problem and once corrected the transaction worked properly. However, it has
happened again when working with different files and I need to get down to
the root cause.
This time, the error message was:
"The opening tag 'ParagraphOrder' did not match the closing tag 'ParagraphOr'.
ParagraphOrder is a field in the serializable object and has a simple
numeric value. What the error suggests is that the serialized XML is being
read, gets to the closing ParagraphOrder tag and stops reading halway through
it. Or, it is halfway through the serialization when it occurs.
The stacktrace is a follows:
System.Xml.XmlTextReader.ParseTag() +2328
System.Xml.XmlTextReader.ParseBeginTagExpandCharEntities() +1478
System.Xml.XmlTextReader.Read() +216
Microsoft.Web.Services2.Xml.XmlSkipDTDReader.Read()
System.Xml.XmlLoader.LoadCurrentNode() +612
System.Xml.XmlLoader.LoadDocSequence(XmlDocument parentDoc) +49
System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean
preserveWhitespace) +102
System.Xml.XmlDocument.Load(XmlReader reader) +72
Microsoft.Web.Services2.SoapEnvelope.Load(Stream stream)
Microsoft.Web.Services2.OutputStream.Close()
System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String
methodName, Object[] parameters) +162
Internal methods to pass the object to the web service layer go here.
Could there be something in the XmlTextReader that sets a maximum buffer
size? If so, why does it normally work with even bigger files?
This one has me well and truly stumped.