Forum Discussion
PaulDonny
11 years agoRegular Contributor
I forgot about all the issues I had ran into with the transition from XmlHolder to DOM. I rarely deal with returned values with SoapUI lately since the majority of my projects has been based on building the requests, not dealing with responses, for the last couple weeks.
This is a rather brutal way to go about it but it should lead you in the right direction hopefully. I extremely rarely deal with GroovyUtils since it requires context and my program bounces around a lot. I hope this helps, XmlUtils will likely be more along the lines of what you are wanting to use.
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
def XmlUtils = com.eviware.soapui.support.xml.XmlUtils;
for ( tests in testRunner.testCase.getTestStepsOfType(com.eviware.soapui.impl.wsdl.teststeps.WsdlTestRequestStep.class) ) {
def xml = XmlUtils.parseXml(tests.getPropertyValue("Request"));
def children = xml.getChildNodes();
def childNode = children.getChildNodes().item(0);
log.info childNode.getNodeName();
}
This is a rather brutal way to go about it but it should lead you in the right direction hopefully. I extremely rarely deal with GroovyUtils since it requires context and my program bounces around a lot. I hope this helps, XmlUtils will likely be more along the lines of what you are wanting to use.
Related Content
Recent Discussions
- 14 days agoemoya