Results 1 to 1 of 1

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

  1. #1
    Join Date
    Nov 2011
    Posts
    1

    Default REST:httpMessageConverterExtractorObject.extractDa ta(response) calling twice

    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 at 07:12 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •