Service Virtualization

 View Only
  • 1.  Response in PDF format for REST GET request

    Posted Jun 16, 2016 08:33 AM

    Hi All,

     

    We have a scenario in which for a GET call, LISA has to send a PDF response as a downloadable file.

     

    Though, we are able to download the file, but the content is blank. Means pdf downloaded with no content inside it.

     

    Approaches Followed:

     

    1st - Copied the base64 format response and copied it in the response section. With this approach, not even able to open the pdf file, when tried hitting from the URL.

     

    2nd - Decoded the base64 response, able to download the file and able to open it, but the file has no content(white space with 4 pages)

     

    Below are the response headers used:

    HTTP/1.1 200 OK

    Server: LISA/Virtual-Environment-Server

    Date: Thu, 16 Jun 2016 14:31:00 CEST

    X-Powered-By: LISA/8.3.0 (8.3.0.241)

    WAS_JSON: true

    Content-disposition: attachment;filename=bill.pdf

    LittleEndian: false

    ByteAlign: true

    Payload.class: String

    Content-Transfer-Encoding: 8BIT

    Content-Type: application/octet-stream

    Content-Length: 91902

     

    Please let us know if there are any other headers or changes we need to make to see the content inside the pdf.

     

    Thanks in advance.

     

    Regards,

    Ankush



  • 2.  Re: Response in PDF format for REST GET request

    Posted Jun 17, 2016 10:37 AM

    Hi Ankush, are you using Test Data Manager? If not, please let me know so that I can move this question to the correct location.



  • 3.  Re: Response in PDF format for REST GET request

    Posted Jun 17, 2016 11:08 AM

    Hi Taylor,

     

    This question is related to service virtualization with DevTest Version 8.3 (LISA)