I had to adapt a bit the code but the solution that Rao gave, worked for me. If you use the script as a Test Step after the request, to use messageExchange I had to access it in the following way:
testStep.testRequest.messageExchange
Other than that, it is a valid solution. Cheers.
PS: I am using SoapUI 5.7.2