Forum Discussion
Thanks for your reply!
As you mentioned, I have soap request and jdbcc step and I have assertions added to both. I am quite new to groovy, so I am not familiar to calling test steps within the script and do a compare.
Here is a sample script I tried to obtain my node values from soap request . The X path mentioned in the GetNodeValues works only when I give the path upto the node . This does not work for me since the response is pretty huge and i can validate every single node separately
def groovyUtils = new com.eviware.soapui.support.GroovyUtils(context)
def holder= groovyUtils.getXmlHolder("Max -UpdateAccountShipTo#Response")
holder.namespaces["ns1"]="http://tigerpaw.com/service/"
holder.namespaces["a"]="http://tigerpaw.com/contract/"
for (item in holder.getNodeValues("//ns1:UpdateAccountShipToResponse/ns1:UpdateAccountShipToResult/a:ShipTo"))
log.info "item/:[$item]"
This outputs item:[]
Howvere if I i modify getNodeValues ("//ns1:UpdateAccountShipToResponse/ns1:UpdateAccountShipToResult/a:ShipTo/a:Name"
outputs item [Name]
In order to transform an xml into other format, you need to write an xslt file.
Related Content
- 2 years agojerry91
Recent Discussions
- 3 days agoemoya
- 3 days agoMyBalanceNow