This solution often reports errors when uploading large images to the server using KSOAP2 in Android development,
In the original article, I started my main blog
Http://anforen.com/wp/2017/04/android_ksoap2_unexpected_type_position_end_document_null_java_io_inputstreamreader/
Jpg image files are relatively small, such as about KB. Generally, no error is reported and can be uploaded successfully. When the Photo size is large, org. xmlpull. v1.XmlPullParserException unexpected type is often reported.
KSoap2 unexpected type (position: END_DOCUMENT null @ 1:1 in java. io InputStreamReader @ 414fae00.
After a lot of attempts, we finally found that we only need to update the ksoap2 version.
Originally
Ksoap2-android-assembly-2.5.2-jar-with-dependencies.jar
Update
Ksoap2-android-assembly-3.1.1-jar-with-dependencies.jar
After, everything is normal.