Contributions
Count number of node
How do I count tag highlighted in red appears how many times? <soapenv:Envelope xmlns:soapenv="http://../"> <soapenv:Header/> <soapenv:Body> <MIKESmiley TongueFU> <uId>?</uId> <p>?</p> <UFL> <MIKE:UFD> <MIKE:NVPFF> <MIKE:name>NULL</MIKE:name> <MIKE:value>NULL</MIKE:value> </MIKE:NVPFF> <MIKE:wII>105</MIKE:wII> <MIKE:b>659-458</MIKE:b> <MIKE:fT>P1B</MIKE:fT> <MIKE:action/> </MIKE:UFD> <MIKE:UFD> <MIKE:NVPFF> <MIKE:name>NULL</MIKE:name> <MIKE:value>NULL</MIKE:value> </MIKE:NVPFF> <MIKE:wII>363</MIKE:wII> <MIKE:b>756-124</MIKE:b> <MIKE:fT>P1B</MIKE:fT> <MIKE:action/> </MIKE:UFD> <MIKE:UFD> <MIKE:NVPFF> <MIKE:name>NULL</MIKE:name> <MIKE:value>NULL</MIKE:value> </MIKE:NVPFF> <MIKE:wII>354</MIKE:wII> <MIKE:b>741-652</MIKE:b> <MIKE:fT>P1B</MIKE:fT> <MIKE:action/> </MIKE:UFD> </UFL> </MIKESmiley TongueFU> </soapenv:Body> </soapenv:Envelope>7 years agoPlace ReadyAPI QuestionsReadyAPI Questions1.2KViews0likes1CommentRe: Read & Loop multiple requests and response
Sorry for not clearly asking the question. Here is the issue. 1) In Ready! API 1.9.0, under projects, I imported the wsdl then sending following request <soapenv:Envelope xmlns:soapenv="http://../"> <soapenv:Header/> <soapenv:Body> <MIKESmiley:TongueFU> <uId>?</uId> <p>?</p> <UFL> <MIKE:UFD> <MIKE:NVPFF> <MIKE:name>NULL</MIKE:name> <MIKE:value>NULL</MIKE:value> </MIKE:NVPFF> <MIKE:wII>105</MIKE:wII> <MIKE:b>659-458</MIKE:b> <MIKE:fT>P1B</MIKE:fT> <MIKE:action/> </MIKE:UFD> </UFL> </MIKESmiley:TongueFU> </soapenv:Body> </soapenv:Envelope> 2) Under ServiceV, I have following Script def blockValue="XX"; def groovyUtils=new com.eviware.soapui.support.GroovyUtils(context) def xml=new XmlSlurper().parseText(mockRequest.requestContent) xml.breadthFirst().each{ if(it.name()=="b"){ bValue=it.text(); context.setProperty("BVALUE", bValue); } if(it.name()=="wII"){ wIIValue=it.text(); context.setProperty("WII", wIIValue); } if(it.name()=="fT"){ fTValue=it.text(); context.setProperty("FT", fTValue); } } context.setProperty("STATUSMESSAGE1", "Updated for: ${bValue}; ${wIIValue};"); 3) Under Response, I have following <soapenv:Envelope xmlns:soapenv="http://..." xmlns:map="https://test.com/"> <soapenv:Header/> <soapenv:Body> <pas:pFUR> <RSL> <pas:RS> <pas:wII>${wIIValue}</pas:wII> <pas:b>${bValue}</pas:b> <pas:statusMessage>${STATUSMESSAGE1}</pas:statusMessage> </pas:RS> </RSL> </pas:pFUR> </soapenv:Body> </soapenv:Envelope> 4) I get correct response, no issues so far. 5) Now, I send following request <soapenv:Envelope xmlns:soapenv="http://../"> <soapenv:Header/> <soapenv:Body> <MIKESmiley:TongueFU> <uId>?</uId> <p>?</p> <UFL> <MIKE:UFD> <MIKE:NVPFF> <MIKE:name>NULL</MIKE:name> <MIKE:value>NULL</MIKE:value> </MIKE:NVPFF> <MIKE:wII>105</MIKE:wII> <MIKE:b>659-458</MIKE:b> <MIKE:fT>P1B</MIKE:fT> <MIKE:action/> </MIKE:UFD> <MIKE:UFD> <MIKE:NVPFF> <MIKE:name>NULL</MIKE:name> <MIKE:value>NULL</MIKE:value> </MIKE:NVPFF> <MIKE:wII>106</MIKE:wII> <MIKE:b>659-459</MIKE:b> <MIKE:fT>P1B</MIKE:fT> <MIKE:action/> </MIKE:UFD> </UFL> </MIKESmiley:TongueFU> </soapenv:Body> </soapenv:Envelope> 6) Issue: I only received a response that is highlighted in Red. I DO NOT get response for 105 and 106. Can someone please help?7 years agoPlace ReadyAPI QuestionsReadyAPI Questions1.2KViews0likes1CommentFailed to dispatch using script; groovy.lang.MissingPropertyException: No such property: orderFound
I am getting error at if(orderFound == "True"). Can someone please tell me what I am doing wrong here? def blockValue="XYZ"; def groovyUtils=new com.eviware.soapui.support.GroovyUtils(context) def xml=new XmlSlurper().parseText(mockRequest.requestContent) xml.breadthFirst().each{ def v=it.toString() if(it.name()=="order"){ def orderFound="True"; } if(orderFound == "True"){ log.info("WORKING....."); } }7 years agoPlace ReadyAPI QuestionsReadyAPI Questions1.9KViews0likes1CommentRead & Loop multiple requests and response
Multiple Request: <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"> <soapenv:Header/> <soapenv:Body> <MIKE:pFU> <uId>?</uId> <p>?</p> <UFL> <MIKE:UFD> <MIKE:NVPFF> <MIKE:name>NULL</MIKE:name> <MIKE:value>NULL</MIKE:value> </MIKE:NVPFF> <MIKE:wII>105</MIKE:wII> <MIKE:b>659-458</MIKE:b> <MIKE:fT>P1B</MIKE:fT> <MIKE:action/> </MIKE:UFD> <MIKE:UFD> <MIKE:NVPFF> <MIKE:name>NULL</MIKE:name> <MIKE:value>NULL</MIKE:value> </MIKE:NVPFF> <MIKE:wII>363</MIKE:wII> <MIKE:b>756-124</MIKE:b> <MIKE:fT>P1B</MIKE:fT> <MIKE:action/> </MIKE:UFD> <MIKE:UFD> <MIKE:NVPFF> <MIKE:name>NULL</MIKE:name> <MIKE:value>NULL</MIKE:value> </MIKE:NVPFF> <MIKE:wII>354</MIKE:wII> <MIKE:b>741-652</MIKE:b> <MIKE:fT>P1B</MIKE:fT> <MIKE:action/> </MIKE:UFD> </UFL> </MIKE:pFU> </soapenv:Body> </soapenv:Envelope> Response:Loop the request and for each UFD send Response with wII, b, s, and sM shown below. <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"> <soapenv:Header/> <soapenv:Body> <MIKE:pFUR> <RSL> <MIKE:RS> <MIKE:wII>105</MIKE:wII> <MIKE:b>659-458</MIKE:b> <MIKE:s>Success</MIKE:s> <MIKE:sM>Successfully updated for: 659-458; 105; P1B</MIKE:sM> </MIKE:RS> </RSL> </MIKE:pFUR> </soapenv:Body> </soapenv:Envelope>7 years agoPlace ReadyAPI QuestionsReadyAPI Questions1.4KViews0likes3CommentsBuild and Send Request from excel then build and send response from excel
Can someone please guide me to the right direction? I have two excel files. 1) Request 2) Response Request.xls file looks like this: UserId Password OrderId 1 XYZ1 XYZ LK567 2 VBG0 VBG ER989 Response.xls file looks like this: UserId Password OrderId CFName CLName Phone 1 XYZ1 XYZ LK567 John Smith 678-901-236 2 VBG0 VBG ER989 Rich Bread 234-67-0193 3 RTY3 RTY CA123 Carlos Gu 561-09-7777 4 K347Q K347 GRLQW Grant Shah 709-00-2314 Read data from Request.xls starting from first line then create and send XML request Search UserId and OrderId that were sent in step 1 within Response.xls file If found then create and send XML response Else send data not found response Execute step 1 and step 2 for all data set in Request.xls file.1KViews0likes1Comment