Hi,
I found this topic few days ago because I had similar problem.
Now I'm happy to have solution for this kind of case, but with some req. like:
- you also recived your response as a JSON, and it is encoded in Base64 then you can use this kind of script in assertion for your request:
import org.apache.commons.codec.binary.Base64;
import groovy.json.JsonSlurper
//grab the response
def content = messageExchange.response.responseContent
def jsonSlurper = new JsonSlurper().parseText(content)
assert !(jsonSlurper.isEmpty())
document_content = jsonSlurper.fileContent
def fileName = messageExchange.modelItem.testStep.testCase.getPropertyValue("DOC") + '_.pdf'
new File( "F:\\Testing\\Testing1\\$fileName").bytes = document_content.decodeBase64()
log.info fileName
as a result you should recive ready pdf file.