错误信息:System.Web.Services.Protocols.SoapException:
System.Web.Services.Protocols.SoapException: Server was unable to process
request. ---> System.Xml.XmlException: Name cannot begin with the ‘1‘
character, hexadecimal value 0x31. Line 1, position 918.
at
System.Xml.XmlTextReaderImpl.Throw(Exception e)
at
System.Xml.XmlTextReaderImpl.Throw(String res, String[] args)
at
System.Xml.XmlTextReaderImpl.ParseQName(Boolean isQName, Int32 startOffset,
Int32& colonPos)
at
System.Xml.XmlTextReaderImpl.ParseElement()
at
System.Xml.XmlTextReaderImpl.ParseElementContent()
at
System.Xml.XmlTextReaderImpl.Read()
at
System.Xml.XmlLoader.LoadNode(Boolean skipOverWhitespace)
at
System.Xml.XmlLoader.LoadDocSequence(XmlDocument parentDoc)
at
System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean
preserveWhitespace)
at System.Xml.XmlDocument.Load(XmlReader
reader)
at System.Xml.XmlDocument.LoadXml(String
xml)
at BasInfomation.BasWebService.IsExsist(String xml, Int32
tag)
at BasInfomation.BasWebService.GetBasInfo(Int32 tag, String
basInfo)
--- End of inner exception stack trace
---
在
System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage
message, WebResponse response, Stream responseStream, Boolean
asyncCall)
在
System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName,
Object[] parameters)
在
DataReport.WebInf.BasWebService.GetBasInfo(Int32 tag, String
basInfo)
在 DataReport.frmAutoUpdate.DataToXml(DataTable
dtXml)
发生在:
错误解决:
1、改头文件:sbXML.Append("<?xml version=‘1.0‘ encoding=‘utf-8‘?>");为sbXML.Append("<?xml version=‘1.0‘ encoding=‘UTF-8‘?>");
2、
原文:http://www.cnblogs.com/mengzhixingping/p/3545680.html