Please make sure that you are not consuming your inputstream
anywhere before parsing. Sample code is following:
the respose below is httpresponse
(i.e. response) and main content is contain inside StringEntity (i.e. getEntity())in form of inputStream(i.e. getContent())
.
InputStream rescontent = response.getEntity().getContent();
tsResponse=(TsResponse) transformer.convertFromXMLToObject(rescontent );