org.xmlpull.v1.XmlPullParserException: expected: START_TAG

今天做Ace Metrix Android 项目,发现了一个以前那个问题又出现了:

06-13 06:27:15.401: WARN/System.err(577): org.xmlpull.v1.XmlPullParserException: expected: START_TAG {http://schemas.xmlsoap.org/soap/envelope/}Envelope (position:START_TAG <html>@1:6 in java.io.InputStreamReader@43ecfbd0)
06-13 06:27:15.401: WARN/System.err(577): at org.kxml2.io.KXmlParser.exception(KXmlParser.java:273)
06-13 06:27:15.410: WARN/System.err(577): at org.kxml2.io.KXmlParser.require(KXmlParser.java:1431)
06-13 06:27:15.410: WARN/System.err(577): at org.ksoap2.SoapEnvelope.parse(SoapEnvelope.java:127)
06-13 06:27:15.421: WARN/System.err(577): at org.ksoap2.transport.Transport.parseResponse(Transport.java:90)
06-13 06:27:15.421: WARN/System.err(577): at org.ksoap2.transport.HttpTransportSE.call(HttpTransportSE.java:179)
06-13 06:27:15.432: WARN/System.err(577): at com.ceosoft.acemetrix.wsdl.WSDLClient.makeCall(WSDLClient.java:195)
06-13 06:27:15.442: WARN/System.err(577): at com.ceosoft.acemetrix.wsdl.WSDLClient.makeCall(WSDLClient.java:213)
06-13 06:27:15.442: WARN/System.err(577): at com.ceosoft.acemetrix.wsdl.WSDLClient.makeCall(WSDLClient.java:213)
06-13 06:27:15.442: WARN/System.err(577): at com.ceosoft.acemetrix.wsdl.WSDLClient.makeCall(WSDLClient.java:213)
06-13 06:27:15.452: WARN/System.err(577): at com.ceosoft.acemetrix.wsdl.WSDLClient.makeCall(WSDLClient.java:213)
06-13 06:27:15.461: WARN/System.err(577): at com.ceosoft.acemetrix.wsdl.WSDLClient.makeCall(WSDLClient.java:213)
06-13 06:27:15.461: WARN/System.err(577): at com.ceosoft.acemetrix.wsdl.WSDLClient.makeCall(WSDLClient.java:213)
06-13 06:27:15.471: WARN/System.err(577): at com.ceosoft.acemetrix.wsdl.WSDLClient.makeCall(WSDLClient.java:176)
06-13 06:27:15.471: WARN/System.err(577): at com.ceosoft.acemetrix.wsdl.WSDLClient.invokeMethod(WSDLClient.java:128)
06-13 06:27:15.491: WARN/System.err(577): at com.ceosoft.acemetrix.wsdl.WSDLClient.getDailyTop5(WSDLClient.java:227)
06-13 06:27:15.491: WARN/System.err(577): at com.ceosoft.acemetrix.data.manager.DataManager$1.launch(DataManager.java:161)
06-13 06:27:15.503: WARN/System.err(577): at com.ceosoft.acemetrix.data.DataTask.doInBackground(DataTask.java:74)
06-13 06:27:15.512: WARN/System.err(577): at com.ceosoft.acemetrix.data.DataTask.doInBackground(DataTask.java:1)
06-13 06:27:15.512: WARN/System.err(577): at android.os.AsyncTask$2.call(AsyncTask.java:185)
06-13 06:27:15.512: WARN/System.err(577): at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305)
06-13 06:27:15.522: WARN/System.err(577): at java.util.concurrent.FutureTask.run(FutureTask.java:137)
06-13 06:27:15.522: WARN/System.err(577): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1068)
06-13 06:27:15.532: WARN/System.err(577): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:561)
06-13 06:27:15.532: WARN/System.err(577): at java.lang.Thread.run(Thread.java:1096)

实在是蛋疼啊,这个问题好久没有出现了,上次出现,解决方法是 捕捉异常,再重发请求。

今天又遇到,又搞了半天,也搞不出来,没有办法,看看iPhone的实在,才发现,也存在同样的问题:“Bad gateway”,

唉,后台在维护所导致的,唉,命真苦,做外包的人,真是伤不起,后台的人维护怎么也不通知一下呢,至少发个Email给我们这些做前端的人啊(后台不在我们公司)


自己的解决方案:

catch一下这个异常,捕捉到后,重新发一次请求,注意返回值的递归(重点注意啊)

你可能感兴趣的:(exception)