Forum Discussion
stevieoh
8 months agoNew Contributor
Apologies for the malformed code above.
Repasted here:
// create XmlHolder for request content
def holder = new com.eviware.soapui.support.XmlHolder( mockRequest.requestContent )
def config = holder.getEndpoint
log.info (config)
I know believe below to be the correct solution, saves it to a project level at least.
Other options would be to save to a test case or even to the MockService itself but I'm not aware of the exact commands are to do that (i.e. is it mockRunner.mockService.setPropertyValue('propName',variable) ).
// create XmlHolder for request content
def holder = new com.eviware.soapui.support.XmlHolder( mockRequest.requestContent )
def tempURL = "http://" + mockRequest.requestHeaders.get("Host")[0]
def tempAction = mockRequest.requestHeaders.get("SOAP-Action")[0]
mockRunner.mockService.project.setPropertyValue('requestURL',tempURL)
Related Content
- 4 years ago
Recent Discussions
- 3 days ago