soapui - Extracting Multiple Value from SOAP Response -


i have xml response in soap has below format

<diffgr:diffgram xmlns:diffgr="urn:schemas-microsoft-com:xml-diffgram-v1" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">     <newdataset xmlns="">     <status diffgr:id="status12" msdata:roworder="11">     <id>28</id>     <name>review</name>     <categoryid>3</categoryid>     <assignrule>p</assignrule>     <ismoveassign>0</ismoveassign>     <isactive>1</isactive>     </status>     </newdataset> </diffgr:diffgram> 

the following xpath shown below if execute same in xpath match configuration of soapui please find screen shot attached

//*[local-name() = 'newdataset']/*[local-name()='status'][12]/*[local-name()='name'] 

but have many such values need extracted writing xquery.

enter image description here

<result> {     $x in //*[local-name() = 'newdataset']/*[local-name()='status']/*    [local-name()='name']      return <name> string ($x) </name> } </result> 

the above result gives invalid xpath.

can me going wrong? information sufficient?

the problem you're using xpath match assertion xquery expression. if check soapui execution log see:

22:19:20,008 error [soapui] error occurred [net.sf.saxon.trans.xpathexception: xpath syntax error @ char 0 in {<} : node constructor expressions allowed in xquery, not in xpath]. 

there specific assertion of xquery math, use instead:

enter image description here

hope helps,


Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -