Forum Discussion

DavidS's avatar
DavidS
Occasional Contributor
12 years ago

MockService: Call other service with dynamic request

Hi all,

following situation: I have a mock service in SOAPUI and before i return the response for this service, i want to execute another webservice (realised as a test case) which already works.
But i don't want to simply execute the other webservice (the test case), i would like to change the request of this service dynamically depending on some values in the request of my mock service.

To execute the test case i use this:
import com.eviware.soapui.impl.wsdl.*

WsdlProject proj = mockRunner.getMockService().getProject();
for(WsdlTestSuite suite : proj.getTestSuiteList())
{
log.info(suite.getLabel())
//use this runner
com.eviware.soapui.model.testsuite.TestSuiteRunner runner = suite.run((com.eviware.soapui.support.types.StringToObjectMap)context, true)
log.info(runner.getClass())
}


That's how i call the service, but how can i change some values in the request of this service??

Cheers,
DS
No RepliesBe the first to reply