Contributions
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 docs960Views0likes0Commentssoapui 3.6 beta 2 XmlHolder bug??
Hi. I have an XmlHolder object that does not seem to be executing my XPath correctly. Calling returnHolder.getPrettyXml() yields <result> <length>1</length> <event intEvtFrnAccId="19" dteEvtDateCreated="2010-08-20 02:41:48" bitEvtIsActive="1" dteEvtDateModified="2010-08-20 13:46:00.546" evtEncodedId="0x70120001"> <txtEvtStatus readonly="true"/> <dteEvtDateClosed readonly="true"/> <txtEvtLocation readonly="true"/> <intEvtNumberComplete readonly="true"/> <intEvtNumberIncomplete readonly="true"/> <intEvtNumberRegistered readonly="true"/> <bitEvtIsTest>0</bitEvtIsTest> <dteEvtEndDate>2010-08-28 14:41:46</dteEvtEndDate> <dteEvtStartDate>2010-08-21 14:41:46</dteEvtStartDate> <dteEvtTrvArrDate/> <dteEvtTrvDepDate/> <intEvtFrnTimeZoneId/> <txtEvtAnsField01/> <txtEvtAnsField02/> <txtEvtAnsField03/> <txtEvtAnsField04/> <txtEvtAnsField05/> <txtEvtCode>APITest100820144139698</txtEvtCode> <txtEvtExternalFrnKey/> <txtEvtGoogleAnalyticsToken/> <txtEvtName>api test event 100820144139698</txtEvtName> <txtEvtNotes/> </event> </result> But calling returnHolder.getNodeValue("//event"); yields null. I have tested the script in standard Groovy and it evaluates correctly. Am I missing something here?14 years agoPlace ReadyAPI QuestionsReadyAPI Questions3.7KViews0likes4CommentsRe: soapui model questions
haha. nm. I'm seeing what a ridiculously difficult question that is to answer. What I did not seem to understand is that Groovy exposes properties without needing the getXX() method... is that correct? Maybe someone could tell me if there is an easier way of doing this but basically I am logging the object in the script step and running it to see what concrete implementation it is and traversing through the API that way. I am also using testRunner.properties.each { log.info it } but that doesn't seem to output all properties available when i look at the API. Any clue there as to why that returns some but not all properties?383Views0likes0Commentssoapui model questions
This may be more of a Java or Groovy API question. I am relatively new to both. I see a couple places in the documentation where the testRunner variable is expanded in a script step. One example is def tc = testRunner.testCase.testSuite.project.testSuites["Sample Simple TestSuite"].testCases["Simple Login and Logout w. Properties Steps"]. I see in the soapui api docs the entry for the testRunner interface, but I do not see where it is documented to expand each property like that. How can I figure out what properties are available to each of the variables available to me in the scripting steps? Thank you.638Views0likes1Comment