i got next problem have xml webservice contain string example: enter invalis data wanna read string app. code working perfect suddnly start return html code not string whic want :( here code:
try { string xx; defaulthttpclient httpclient = new defaulthttpclient(); ; httpget httppost = new httpget(urlstring); httpresponse httpresponse = httpclient.execute(httppost); httpentity httpentity = httpresponse.getentity(); inputstream = httpentity.getcontent(); bufferedreader reader = new bufferedreader(new inputstreamreader(inputstream, "utf-8"), 8); stringbuilder stringbuilder = new stringbuilder(); string line = null; if ((line = reader.readline()) != null) { stringbuilder.append(line + "\n"); xx = stringbuilder.tostring(); } inputstream.close(); } catch (unsupportedencodingexception e) { system.err.print("unsupportedencodingexception: " + e); } catch (clientprotocolexception e) { system.err.print("clientprotocolexception: " + e); } catch (ioexception e) { system.err.print("ioexception: " + e); }
so pleas if 1 can !!!
Comments
Post a Comment