views:

31

answers:

1

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

A: 

You can do with Groovy script. IT is almost like java and you create a class and place Pro.jar and add lib folder of SOAPUI to your classpath. Does this help you ?

karthi