Forum Discussion

dchester11's avatar
dchester11
Occasional Contributor
14 years ago

SoapUI Api - programatically calling project service method?

Hey all,
I am trying to call a service method defined in my project programmatically from a test step script. I am at a blocker and can't seem to figure how to set the request fields and make the call. The method will getMore() results of the call being tested. So I want to call this method while there are more results to fetch and store them in the test step script. Here's what I have so far:


profileInterface = testRunner.testCase.testSuite.project.getInterfaceByName("profileSoapBinding");
proGetMore = profileInterface.getOperationByName("getMore");
proGetMoreReq = proGetMore.requests[0];

// proGetMoreReq.setPropertyValue("sessionToken", testRunner.testCase.testSuite.getPropertyValue("SessionToken")); // - Doesn't Work
// submitResult = proGetMoreReq.submit(new com.eviware.soapui.impl.wsdl.WsdlSubmitContext(proGetMoreReq), false); // - Returns NULL


Can someone point me in the right direction on how to do this? Can you also let me know if I've been looking in the wrong place to try and figure this out. I have been pouring over the API doc for a WSDLRequest in the SoapUI API docs
No RepliesBe the first to reply