Nov 5th, 2011, 05:24 AM
REST:httpMessageConverterExtractorObject.extractDa ta(response) calling twice
When I call httpMessageConverterExtractorObject<XYZ>.extractDa ta(response) twice, second time I get following error:
StreamSource contains neither InputStream nor Reader
As XML response body could be of type XYZ(Jaxb class) or PQR(XStream class),
I first check extractData(response) with HttpMessageConverterExtractor<XYZ> and then second time with HttpMessageConverterExtractor<PQR>.
But on first extractData, it reads from InputStream and it becomes null.
Sp when I call extractData second time (if XML response body corresponds to XStream class PQR), InputStream is null and hence I can't umarshal response.
How to solve this problem with two possible response types "XYZ" and then with "PQR"
Last edited by sshelar; Nov 5th, 2011 at 07:12 AM.