Forum Discussion
nmrao
Champion Level 3
Thank you for the code snippet. Found that few changes needed though :
1. 'in' is a groovy keyword
2. both in and out streams to be closed, otherwise content is not save and not allowed to open file.
Here is the updated script, using it as script assertion:
def response = messageExchange.response assert null != response, "response is null" def outFile = new FileOutputStream(new File(System.getProperty('java.io.tmpdir')+'/test.zip')) def ins = messageExchange.responseAttachments[0].inputStream if (ins) { com.eviware.soapui.support.Tools.writeAll( outFile, ins ) } ins.close() outFile.close()
bkbn16
9 years agoContributor
Hi guys,
I am complete newbie to this SOAPui. I am trying to get the same response MIME image/jpeg file as attachment. I have attached the jpeg file in the request area. Can you give me a detailed step on how to do this ?
Related Content
- 5 years ago
Recent Discussions
- 2 days ago