昨天我有一个用户给我发电子邮件说他的应用程序有问题,所以我开始和他一起调试,让他给我发了电话日志,XmlPullParserError
当他打电话给服务器时他收到了
E/Message Exchange::CallWebService(6426): Exception: org.xmlpull.v1.XmlPullParserException: unterminated entity ref (position:TEXT �������`I�...@1:18 in java.io.InputStreamReader@406c8808) 05-31 12:33:25.573
W/System.err(6426): org.xmlpull.v1.XmlPullParserException: unterminated entity ref (position:TEXT �������`I�...@1:18 in java.io.InputStreamReader@406c8808) 05-31-12:33:25.573
W/System.err(6426): at org.kxml2.io.KXmlParser.exception(KXmlParser.java:273)05-31 12:33:25.573
W/System.err(6426): at org.kxml2.io.KXmlParser.error(KXmlParser.java:269)05-31-12:33:25.573
W/System.err(6426): at org.kxml2.io.KXmlParser.pushEntity(KXmlParser.java:781)05-31 12:33:25.573
W/System.err(6426): at org.kxml2.io.KXmlParser.pushText(KXmlParser.java:849)05-31 12:33:25.573
W/System.err(6426): at org.kxml2.io.KXmlParser.nextImpl(KXmlParser.java:354)05-31 12:33:25.573
W/System.err(6426): at org.kxml2.io.KXmlParser.next(KXmlParser.java:1378)05-31 12:33:25.573
W/System.err(6426): at org.kxml2.io.KXmlParser.nextTag(KXmlParser.java:1408)05-31 12:33:25.573
W/System.err(6426): at org.ksoap2.SoapEnvelope.parse(SoapEnvelope.java:126)05-31 12:33:25.573
W/System.err(6426): at org.ksoap2.transport.Transport.parseResponse(Transport.java:100)05-31 12:33:25.573
W/System.err(6426): at org.ksoap2.transport.HttpTransportSE.call(HttpTransportSE.java:195)05-31 12:33:25.573
W/System.err(6426): at org.ksoap2.transport.HttpTransportSE.call(HttpTransportSE.java:95)05-31 12:33:25.573
W/System.err(6426): at ecm2.android.MessageExchange$1.run(MessageExchange.java:96)05-31 12:33:25.573
W/System.err(6426): at java.lang.Thread.run(Thread.java:1019)05-31 12:33:27.928
这是它总是失败的线
trans.call(SOAP_ACTION, soapEnvelope);
这使得调用服务器,它只是抛出一个错误。我有same exact phone
这个人,我让他运行exact version I am running
,我调用服务器没有问题,但他仍然有问题。
我让他卸载并重新安装了几次,所以我不知道是什么导致了他的手机而不是我的手机?
这就是我创建 XML 的方式
private static String CreateCallXML(String sDeviceID, String sEMailAddress, String sVersion) {
Logging logger = new Logging();
XmlSerializer serializer = Xml.newSerializer();
StringWriter writer = new StringWriter();
try {
serializer.setOutput(writer);
serializer.startDocument("UTF-8", true);
serializer.startTag("", "PostData");
serializer.startTag("", "RetrieveMsg");
serializer.attribute("", "ver", sVersion);
serializer.attribute("", "DevID", sDeviceID);
serializer.attribute("", "eMailAddress", sEMailAddress);
logger.append("D", className, "CreateCallXML", "LastIncMsgID:" + Settings.LastIncMsgID);
logger.append("D", className, "CreateCallXML", "LastDLMsgID: " + Settings.LastDLMsgID);
serializer.attribute("", "LastIncMsgID", "" + Settings.LastIncMsgID);
serializer.attribute("", "LastDLMsgID", "" + Settings.LastDLMsgID);
serializer.endTag("", "RetrieveMsg");
serializer.endTag("", "PostData");
serializer.endDocument();
return writer.toString();
} catch (Exception e) {
return null;
}
}
更新 2:
在浏览完代码之后,用户的电子邮件地址似乎是问题,用户电子邮件地址的一个例子是,abcd3961@gmail.com
如果我使用它,它会在命中线路以调用服务器时引发异常。如果我更改电子邮件地址中的一个字母,它会正常执行呼叫。
这是一个ksoap问题吗?由于我不能告诉他更改他的电子邮件地址,我该如何解决这个问题?