yhkimingd
16 years agoNew Contributor
Script to traverse in response to get data, then insert data to a request
Hi, a newbie in soapUI Pro 3.0.2. I need to be able to parse through an XML response to check for a value, if true grab another value in the same type, and insert that data value in another request. I believe Groovy Script can help me do this, but I need some pointers on which methods to use and proper syntax. Here is what the response would look like:
162
Canceled
177
Approved
...[more data types]
If Status == "Approved", get the Number in DataType, else go to next Status. Once I get the first Number with Approved Status, I need to insert it into the next request. How would I get started to do this? I am thinking that I would start by using the XmlHolder object and use the get/setNodeValue methods, but I am not sure how to set up the for loop and/or if statements.
Appreciate your help.
...[more data types]
If Status == "Approved", get the Number in DataType, else go to next Status. Once I get the first Number with Approved Status, I need to insert it into the next request. How would I get started to do this? I am thinking that I would start by using the XmlHolder object and use the get/setNodeValue methods, but I am not sure how to set up the for loop and/or if statements.
Appreciate your help.