Forum Discussion
2 Replies
- mkoronNew ContributorAssuming you have a soap request 'step1' and groovy step in the same test case.
And response looks like:
<Envelope>
<Header/>
<Body>
<Service>
<responseCode>1111</responseCode>
[...]
groovy:
def gu = new com.eviware.soapui.support.GroovyUtils(context);
def holder = gu.getXmlHolder('step1#Response');
def respEnvelope = new XmlSlurper().parseText(holder.getXml());
now you can get field valiue from response with:
def yourVariable = respEnvelope.Body.Service.responseCode; - NareshNayiniOccasional ContributorThank You