Receive Xml File Is Corrupted (on Sprint Network)?
I am having a very strange issue in my android app. I receive xml file from server and perform operation based on xml content. It is working on almost every network for eg. AT&
Solution 1:
Thanks everybody for responding my queries i have resolved it few days back.
Actually sprint compress any xml file using gzip encoding. I tried to unzip the Http response using following it worked like charm. Most of the network provide compress audio/video data but sprint is doing for all data sent across the network.
I use following code which resolved my issue.
HttpEntityhttpEntity= reponseData.getEntity();
InputStreamres= AndroidHttpClient.getUngzippedContent(httpEntity);
linputSourceFromServerResponse = newInputSource(res);
Documentdoc= builder.parse(linputSourceFromServerResponse);
Solution 2:
Check if the ouput is just a gzipped xml.
Use GZIPInputStream
to read the plain xml.
Solution 3:
With a first sight, looks like an encoding issue.. If it is possible, you could send an email to sprint network and explain your problem, maybe they ll give you an answer or a logical explanation.
Post a Comment for "Receive Xml File Is Corrupted (on Sprint Network)?"