2

大家好,我正在使用 Android 中的 WebService。我试图将数据发送到 WebService。作为回应,我收到了这个警告。

06-06 18:50:50.830: W/Response String is=(6930): n--uuid:8787683b-c7db-4abc-abbe-2042ff4877be+id=1nContent-ID: <http://tempuri.org/0>nContent-Transfer-Encoding: 8bitnContent-Type: application/xop+xml;charset=utf-8;type="text/xml"nn<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Body><CreateNewCaseResponse xmlns="http://www.ci.tenmind.va.us/CORServices/tenmindAuditorHotlineService/2011/08/AuditorHotlineService"><CreateNewCaseResult xmlns:a="http://www.ci.tenmind.va.us/CORServices/2011/08/AuditorHotlineService" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><a:CaseId>be140e83-bd1a-4134-a5e9-097a1d8dd654</a:CaseId><a:CaseNumber>2012060005</a:CaseNumber><a:ErrorMsg/><a:PassCode>Pw2f3MEg9</a:PassCode></CreateNewCaseResult></CreateNewCaseResponse></s:Body></s:Envelope>n--uuid:8787683b-c7db-4abc-abbe-2042ff4877be+id=1—n

当我尝试解析上面的字符串时,我得到了这个异常:

06-06 15:43:17.441: W/System.err(13064): org.xmlpull.v1.XmlPullParserException: Unexpected token (position:TEXT 
06-06 15:43:17.445: W/System.err(13064): --uuid:ac00e661...@3:13 in java.io.InputStreamReader@4132afb0) 
06-06 15:43:17.465: W/System.err(13064):    at org.xmlpull.v1.sax2.Driver.parse(Driver.java:331)
06-06 15:43:17.476: W/System.err(13064):    at com.vensi.api.parser.XMLParser.fromXML(XMLParser.java:75)
06-06 15:43:17.484: W/System.err(13064):    at com.vensi.api.parser.XMLParser.fromXML(XMLParser.java:54)
06-06 15:43:17.484: W/System.err(13064):    
at org.tenmind.HttpPostConnection$Communicator.run(HttpPostConnection.java:468)

知道如何解决这个问题吗?

4

1 回答 1

-3

Android 的文件格式是“UTF-8 without BOM”

于 2015-09-16T03:35:50.717 回答