Forum Discussion

tech321's avatar
tech321
Contributor
5 years ago

soapui parameter equivalent to curl parameter

Hi, here is my curl command that generates data in excel sheet. 

curl --header "Content-Type: application/octet-stream" http://ipAddress:port/export --output myExcel.xlsx

I am trying to do the same in Soapui, and I do not know what to do with the "--output". Is there any equivalent to it in Soapui? Looking forward to an answer.

  • Hi guys, finally I found it. See the attached screenshot. A 'Save to file' button, then I call the file anyName.xlsx and  I get the expected excel file. Very good and thanks for your help. 

  • richie's avatar
    richie
    Community Hero
    Hey tech321,

    Your response is base64 encoded....is that still correct? Cos that will impact how you handle your responses.

    Forum members are going to struggle to be able to answer your question properly because we arent going to know the info that is required. We would need more info as to the rest requests details.

    Add "--verbose" to your curl request. This will return all the request and reaponse headers/raw data that will then steer the forum members and you in answering your query.

    What happened with thr base64 encode from your previous post on the forum? Without knowing anything i'd suggest that you wouldnt need to do anything cos the output flagmerely indicates your response payload is .xlsx, so you dont need to do anything, however your Content-Type is for a binary file (so not just an .xlsx) and so im leaning towards the output being base64 encoded.

    Rich
    • tech321's avatar
      tech321
      Contributor

      Thank you . please se those attachments. 

      1- the encoded string that I need to decode

      2- the groovy code I use

      3- the generated excel file by the groovy code

      4- the curl command with --verbose

      • richie's avatar
        richie
        Community Hero
        tech321,

        Ok...so what is the logged response for response2 in your groovy?
        I suspect there might be problems because readyapi! isn't recognising your response as .xml.....the screenshot of the response you provided typically is generated when it hasnt been parsed by xml or json cos it isnt recognised as either of those. If the xml parser isnt recognising the response payload then xpath wont work.
        Can you click RAW and XML tabs....can you provide screenshots please?

        Also...im trying to remember...where did you get the requirement for xls?

        Is it just a convenient form of output to your requests?

        Can you do me a favour. Grab the base64 encode from your response and plug it into https://www.base64decode.org and run the decode? We need to know what the encoded data is actually. I assumed from your previous posts that the encode was of xls data, but that doesn't make sense to me.

        Ta

        Rich