Announcement Announcement Module
Collapse
No announcement yet.
REST:httpMessageConverterExtractorObject.extractDa ta(response) sets response to NULL Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • REST:httpMessageConverterExtractorObject.extractDa ta(response) sets response to NULL

    Hi,
    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, 07:12 AM.
Working...
X