java - HttpClient response only one line of XML -
i'm using httpclient fetch xml file , i'm having issues getting entire document returned (it returns 1 line of xml file). so:
defaulthttpclient c = new defaulthttpclient(); basicresponsehandler r = new basicresponsehandler(); string s = null; try { s = c.execute(new httpget("http://localhost/activity.xml"), r); } catch (exception e) { e.printstacktrace(); } log.i(tag, s);
the resulting string <?xml version="1.0" encoding="utf-8"?>
is there need tell httpclient load entire file or process newlines or something? xml super simple:
<?xml version="1.0" encoding="utf-8"?> <project> <group-id type="integer">2187</group-id> <icon type="integer">2</icon> <name>android</name> <overview>android app</overview> <permalink>codebase</permalink> <start-page>tickets</start-page> <status>active</status> </project>
if pass basicresponsehandler
response handler, result of execute
should entire response body.
if getting 1 line, theory that server sending.
take @ server logs see if exception being thrown while generating response body. (if using jsp rendering example, exception thrown cannot reported client via http status code. instead client see 200 response truncated body.)
Comments
Post a Comment