org.xmlpull.v1.XmlPullParserException:

org.xmlpull.v1.XmlPullParserException: expected: START_TAG {http://www.w3.org/2001/12/soap-envelope}Envelope (position:START_TAG <{http://schemas.xmlsoap.org/soap/envelope/}soapenv:Envelope>@1:114 in java.io.InputStreamReader@1cb37664) 
	at org.kxml2.io.KXmlParser.exception(+47)
	at org.kxml2.io.KXmlParser.require(+83)
	at org.ksoap2.SoapEnvelope.parse(+20)
	at org.ksoap2.transport.Transport.parseResponse(+30)
	at org.ksoap2.transport.HttpTransport.call(+292)
	at com.database.client.Test2$1.run(+85)


出现上面错误的解决方法:
SoapSerializationEnvelope envelope=new SoapSerializationEnvelope(SoapEnvelope.VER12);

修改其中的SoapEnvelope.VER12版本号。查看ksoap2获取的xml的version,选择合适的version(SoapEnvelope.VER10|SoapEnvelope.VER11SoapEnvelope.VER11)



你可能感兴趣的:(java,xml,SOAP)