Forum Discussion

tech607's avatar
tech607
Occasional Contributor
13 years ago

xquery assertion not working

HI All,

I am using SOAPUI 4.5.1. xquery assertion for validation but it fails..

I am expecting below result ...
Expect Result
<Result>
<value>enabled</value>
<Result>

But the test is throwing the following error . can anyone help me to identify the problem ...
XQuery Match Assertion failed for path [declare namespace ns2='http://asp.motorola.com/nbs/config/v1-0'; { for $z in //ns2:getPotsChannelsResponse/attrContainerList/strAttribute where $z/name = "ADMINSTATUS" or $z/name = "SIGNALCODE" order by $z/name return {$z/value/text()} } ] : ComparisonFailure:null expected: but was:


my xml content======>

<Body>
<getPotsChannelsResponse>
<attrContainerList>
<strAttribute>
<name>SIGNALCODE</name>
<value>loopstart</value>
</strAttribute>
<strAttribute>
<name>ADMINSTATUS</name>
<value>enabled</value>
</strAttribute>
</attrContainerList>
</getPotsChannelsResponse>
</Body>

my xquery==========>

declare namespace ns2='http://asp.motorola.com/nbs/config/v1-0';
<Result>
{
for $z in //ns2:getPotsChannelsResponse/attrContainerList/strAttribute


where $z/name = "ADMINSTATUS" or $z/name = "SIGNALCODE"
order by $z/name
return <value>{$z/value/text()}</value>
}
</Result>

Thank you
No RepliesBe the first to reply