ContributionsMost RecentMost LikesSolutionsRe: How to attach ssl certificates to response using Groovy script As this script was meant for the default mock responses which access actual web service in case we have requests other than the mocked ones, I created a keystore locally and imported the client certificates in cacerts in /java/jdk/jre/lib/security/. Then in preferences->ssl settings, I pointed my 'keystore', 'mock keystore' and 'mock truststore' to my local keystore. Also enabled mock ssl. Its not mandatory to use 8443 as mock port as advised everywhere on net, I just used port 9443 and it worked. Make sure to call your mock service over https instead http. Re: How to attach ssl certificates to response using Groovy script Thank you for quick response rupert_anderson. Our client webservices in test environment often go down which causes downtime for our test teams. To overcome this, and reduce overall traffic to our client webservices, we are creating soapui mock services, which will return mocked responses if requested, else our groovy script will redirect the request to the client webservices and return back the responses. However, now we are facing the exact same problems as described by @andsoulnd in this post here. Re: Cannot start mock service over https Hi All, I am facing the same problem and exactly the same as andsoulnd. Deos anybody have solution to it? andsoulnd? Regards, Amit How to attach ssl certificates to response using Groovy script Hi, I am trying to connect a web service using Groovy script which is happening successfuly and I am getting soap message back.However, I am not getting how to attach in incoming ssl certificates to in my response object. I am using following script. def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context ) def soapUrl = new URL("https://xxxxxxxxxxxxx") def connection = soapUrl.openConnection() connection.setRequestMethod("POST") connection.setRequestProperty("Accept-Encoding" ,"gzip,deflate") connection.setRequestProperty("Content-Type" ,"text/xml;charset=UTF-8") connection.setRequestProperty("SOAPAction", "xxxxxxxxxxxxxxxx") connection.doOutput = true def soapRequest = mockRequest.getRequestContent() writer.write(soapRequest) writer.flush() writer.close() connection.setConnected(true) connection.connect() def soapResponse = connection.content.text requestContext.responseMessage = soapResponse connection.disconnect() Solved