How to return http 500 with soapUI

groovy, soapui

Solution

This can be achieved with the following Groovy code:

mockRequest.getHttpResponse().sendError(500)

Problem

I am mocking my web service using soapUI. Now, I also want to test fault. For this, the mock service (=soapUI) should return a HTTP 500. Does anyone know, how soapUI can do this? thanks

Original source