Contributions
Re: Sometimes the UI drives me nuts!
I've seen the maximising window many times myself, there is away to stop it for a while though. Double click the title bar of the window you are closing and then you can close them without them maximising. It seems to stop it for a while. Another one for me is when you expand a test suite or test case to check it's contents and then pretty soon after you want collapse the list again and instead it registers it as a double click and opens up the properties in a window for you....arrghhh...1.1KViews0likes0CommentsRe: Looping through a resultset
Hi, I'm afraid I can't post the response for that as it contains confidential data. It has nothing to do with the problem at hand, that is a call I'm making for another piece of information I'll need later, it's just a call to one of our API's to retrieve some data back in the form of JSON. I can remove that line and it has no bearing on the problem. The problem I have is with the call to the database and getting back XML, I want to be able to loop through each row that's returned and add to a map. Thanks, Premier2k837Views0likes1CommentRe: Looping through a resultset
There is no response. It just shows as constantly running, it doesn't finish. The green bar in the bottom right (next to line and letter number) just continues to run back and forth and nothing happens. The problem is with this line:def results = new XmlSlurper().parseText(responseXML)2.5KViews0likes3CommentsRe: Looping through a resultset
So I've implemented this like below but when I run it, nothing happens, it's just constantly 'running'... def groovyUtils = new com.eviware.soapui.support.GroovyUtils(context) import com.eviware.soapui.support.XmlHolder import groovy.json.* import groovy.xml.* def responseJSON = testRunner.testCase.testSteps["Retrieve case data from GW"].testRequest.response.responseContent def response = new JsonSlurper().parseText(responseJSON) def responseXML = new XmlHolder (testRunner.testCase.testSteps["Retrieve household data from staging"].testRequest.response.responseContent) def results = new XmlSlurper().parseText(responseXML) def stagingMap = [:] results.ResultSet.Row.each { map[it.EXPENDITUREAMOUNT] = it.EXPENDITURETYPE } Nothing gets output from log.info as it appears to be just constantly running.2.5KViews0likes5CommentsLooping through a resultset
Hi all, I'm trying to loop through a result set and add the results to a map, I have done this already with some JSON output and I'm trying to do the same for the database resultset but it's only returning the first row in the results. This is what I have so far; def groovyUtils = new com.eviware.soapui.support.GroovyUtils(context) import com.eviware.soapui.support.XmlHolder import groovy.json.* def responseJSON = testRunner.testCase.testSteps["Retrieve case data from GW"].testRequest.response.responseContent def response = new JsonSlurper().parseText(responseJSON) def responseXML = new XmlHolder (testRunner.testCase.testSteps["Retrieve household data from staging"].testRequest.response.responseContent) def gatewayMap = [ (response.householdExpenditure.expenditureType.each{}) : response.householdExpenditure.expenditureAmount.each{} ] def stagingMap = [ (responseXML.getNodeValue("//Results/ResultSet/Row/EXPENDITURETYPE").each{}) : Math.round(responseXML.getNodeValue("//Results/ResultSet/Row/EXPENDITUREAMOUNT").each{}.toFloat()) ] log.info gatewayMap log.info stagingMap The output from the log shows only the first row, it doesn't seem to be iterating through the rows. I believe I'm missing something after /Row[something here?]/EXPENDITURETYPE but I'm not sure what? The gatewayMap works as expected, it's just the stagingMap that's causing me problems. Premier2k2.8KViews0likes12CommentsPulling a value from SOAP response into a property
Hi all, I'm really struggling with this and must have tried a 100 ways now all resulting in failure. I'm trying to pull out a value from a SOAP response message. This is part of the response: <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"> <s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <OTPAddRs xmlns="http://www.fnf.com/xes"> <Status xmlns="urn:ifxforum-org:XSD:1"> <StatusCode>0</StatusCode> <Severity>Info</Severity> <StatusDesc>Success</StatusDesc> <AdditionalStatus> <ServerStatusCode>0</ServerStatusCode> <Severity>Info</Severity> <StatusDesc>TRANSACTION PROCESSING COMPLETE.</StatusDesc> </AdditionalStatus> </Status> <OTPRec> <OTPKeys> <OTPCode>123456782</OTPCode> </OTPKeys> I'm trying to get at the <OTPCode>. I've tried several different ways and each time it ends up as null. This was my latest attempt: declare namespace s='http://schemas.xmlsoap.org/soap/envelope/'; //s:Envelope/s:Body/OTPAddRs/OTPRec/OTPKeys/OTPCode How on earth do I do this? Premier2k764Views0likes1Comment