Sending byte array with ksoap2 on android

view story

http://stackoverflow.com – I'm trying to upload images from an android device to a WCF service. If I send a small image (about 20kb) then it works fine. If I send a slightly larger image (about 95kb) I get an error: org.xmlpull.v1.XmlPullParserException: unexpected type (position:END_DOCUMENT null@1:1 in java.io.InputStreamReader@41636470) Android code is: byte[] fileContents = IOUtil.readFile(image.getFileName()); request = new SoapObject(CommonFunctions.NAMESPACE, "SaveAttachment"); envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11); envelope.dotNet = true; envelope.setOutputSoapObje (HowTos)