13 years ago
Return String instead of file in WsdlMockResult
Hi,
I want to create a mock for a RESTful service. In the examples I have found a file, either html or xml, is returned. (see below)
mockRunner.returnFile(mockRequest.httpResponse, new File("file.html"))
return com.eviware.soapui.impl.wsdl.mock.WsdlMockResult(mockRequest)
Is it possible to instead return a String? What I would like to do is to return a groovy object serialized to an XML to simulate a valid RESTful service response (or JSON if that's is better).
I want to create a mock for a RESTful service. In the examples I have found a file, either html or xml, is returned. (see below)
mockRunner.returnFile(mockRequest.httpResponse, new File("file.html"))
return com.eviware.soapui.impl.wsdl.mock.WsdlMockResult(mockRequest)
Is it possible to instead return a String? What I would like to do is to return a groovy object serialized to an XML to simulate a valid RESTful service response (or JSON if that's is better).