Because I have been looking for this a long time, I will post it here.
In Soapui you have assertions. One of the types is XQuery. An example can be found here.
What it does not explain, you need to add the XML elements around. So this:
declare namespace ns1='http://what/a/namespace/it/is';
{
for $e in //ns1:ValidationFault/ns1:ValidationErrors/ns1:ValidationError
return {$e/ns1:Error/text()}
}
should be:
declare namespace ns1='http://what/a/namespace/it/is';
<errors>
{
for $e in //ns1:ValidationFault/ns1:ValidationErrors/ns1:ValidationError
return <error>{$e/ns1:Error/text()}</errors>
}
</errors>
The related and not so helpfull error message:
XQuery Match Assertion failed for path [declare namespace ns1='http://what/a/namespace/it/is'; { for $e in //ns1:ValidationFault/ns1:ValidationErrors/ns1:ValidationError return {$e/ns1:Error/text()} }] : RuntimeException:java.lang.reflect.InvocationTargetException
My problem was very simple, but I had a hard time finding an answer. So to put it here, will make sure I never forget.
This was almost helpful… still you’re “so this” and “should be” look exactly the same. Is this even a solution?
It should be. I didn’t notice the error, thanks for pointing it out!
Thank you for the info.
Glad I could help!
Thanks for the tip buddy
Thanks!!!