dshookowsky
8 years agoNew Contributor
MockService out of heap memory when deployed as War
I created a mock service that reads large XML files, replaces a ${content} token and sends a response. Each file is about 6mb. I increased my heap size in SoapUI and it works fine in there. Mem...
- 8 years ago
Answering my own question. Analysis of the problem shows that property expansion is causing a memory leak. I modified the mockService moving the code from the mockOperations to the OnRequestStart event.
Instead of using property expansion with context.content = file.text, I did the following to return the file contents:
def result = new com.eviware.soapui.impl.wsdl.mock.WsdlMockResult(mockRequest) def file = new File(fileName) mockRequest.httpResponse.writer << file.text mockRequest.httpResponse.status = 200 return result