Forum Discussion

mu123's avatar
mu123
Occasional Contributor
2 years ago

Any idea why the result is in the form of a matrix

This is part of my SOAP response. I am trying to extract the value of given i.e Keely .

<v3:name use="L">
<v3:family partType="FAM" representation="TXT" mediaType="text/plain">Wiley</v3:family>
<v3:given partType="GIV" representation="TXT" mediaType="text/plain">Keely</v3:given>
<v3:given partType="GIV" representation="TXT" mediaType="text/plain"/>
</v3:name>

----------------------------------

I wrote this script to extract the value. But the result returned is [Keely,null] . Any help would be appreciated.

 

context.utils = new com.eviware.soapui.support.GroovyUtils(context)
def response = context.expand( '${SearchQuery#Response}' )
context.holder = context.utils.getXmlHolder(response)
// context.holder.getNodeValues("//Put the tagname as below")
context.Dueval = context.holder.getNodeValues("//v3:given")
//def sVal = context.Dueval.toString()
log.info(context.Dueval.toString())

 

1 Reply

  • They way I would explain an answer would be as this series has done, starting from the beginning and explaining WHY we do things the way we do. This video series is the best answer to your question, and for an hour of your time it will change your view and understanding of vectors and matrices completely.