Forum Discussion
Glad you got the data getting returned. It took me awhile to puzzle that piece out my first time. :) When you say store these pieces of data in an array, what do you mean and what is the intent? I may need some examples of what you are trying to do and some sample requests / responses / etc to figure this next part out. :)
I was trying to iterate specific xml node. I could get only the first node value only. Not able to iterate. Please help.
This is my script:
def WS_attributeNameList=[]
def WS_attributeNameList_Converted=[]
import com.eviware.soapui.support.XmlHolder
def response = context.expand( '${WS_GetAccountDetails#Response#declare namespace ....//ns4:GetAccountDetailsResponseMessage[1]}' )
def xml = new XmlHolder(response)
WS_attributeNameList = context.expand( '${WS_GetAccountDetails#Response#declare namespace ....//ns4:GetAccountDetailsResponseMessage/ns4:accounter/ns6:CustomerCustomAccounter/ns3:attributes/ns3:attributeName}' )
WS_attributeNameList_Converted=WS_attributeNameList.toString()
log.info (WS_attributeNameList_Converted)
I'm not sure how to use groovy for iterating specific node - say attributename and store them in array. If I can do this, I can then sort it and make the required validation. Please help.
Related Content
- 5 years agounderqualified
- 3 years agogoogleid_114550