Forum Discussion
Jasper175
13 years agoFrequent Contributor
If I do
println "aa" and click run nothing happens... anyway back to this code. Correct me if I'm wrong but I have in complete of what you sent me:
Correct?
The Error I get now is "org.apache.xmlbeans.XmlException: error: Unexpected element: CDATA error at line: 4
println "aa" and click run nothing happens... anyway back to this code. Correct me if I'm wrong but I have in complete of what you sent me:
def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
def response = context.expand( '${getServiceDidMap#Response}' )
def holderResponse = groovyUtils.getXmlHolder( response )
for(int i = 1; i <= didTargetCount; i++){
def did = null;
didType = holderResponse.getNodeValue( "//*[local-name()='didTargets' and namespace-uri()='http://cleveland.vonage.com/services/servicelayer'][" + i + "]"+
"//*[local-name()='didType' and namespace-uri()='http://cleveland.vonage.com/services/servicelayer']")
if (didType.equals("PHYS")){
did = holderResponse.getNodeValue( "//*[local-name()='didTargets' and namespace-uri()='http://cleveland.vonage.com/services/servicelayer'][" + i + "]"+
"//*[local-name()='did' and namespace-uri()='http://cleveland.vonage.com/services/servicelayer']")
}
println did
}
Correct?
The Error I get now is "org.apache.xmlbeans.XmlException: error: Unexpected element: CDATA error at line: 4