BA_Service_Haus
15 years agoRegular Contributor
QUERY_MATCH Mock Dispatch Mode - wrong expected value
Hi,
this problem was found with soapUI Pro 3.6.1.
When trying to create a Mock-Operation, using the dispatch mode "XQUERY" we met a problem.
First we let soapUI generate the XPath automatically.
After that we inserted the expected value.
But when running tests against this mock, all of them failed because the conditions never met.
During investigation I found out that soapUI generates an expected value different from the one I would expect (by clicking "Extract" in the "QUERY_MATCH" dialog). It always contains the whole xml-node (we would just expect its content).
e.g.:
expected: John
actual: <name xsi:type="xsd:string" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:def="http://DefaultNamespace">John</name>
We have seen this behaviour only for a certain service. For others, soapUI works correct.
Is this a problem of a (maybe bad implemented) service/wsdl or a problem of soapUI?
Best regards
Nico
this problem was found with soapUI Pro 3.6.1.
When trying to create a Mock-Operation, using the dispatch mode "XQUERY" we met a problem.
First we let soapUI generate the XPath automatically.
After that we inserted the expected value.
But when running tests against this mock, all of them failed because the conditions never met.
During investigation I found out that soapUI generates an expected value different from the one I would expect (by clicking "Extract" in the "QUERY_MATCH" dialog). It always contains the whole xml-node (we would just expect its content).
e.g.:
expected: John
actual: <name xsi:type="xsd:string" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:def="http://DefaultNamespace">John</name>
We have seen this behaviour only for a certain service. For others, soapUI works correct.
Is this a problem of a (maybe bad implemented) service/wsdl or a problem of soapUI?
Best regards
Nico