14 years ago
XPath Query for Response Dispatch
Hi all I am new to SoapUI, so please accept my apology in case my question is really basic, I have got multiple responses and I am using Query-Match for reposnse dispatch.
I need to return response based on value in the repsonse and for that I am using XPath match but cant seems to get it to work, it always returns default response, below are the quries and request
data, please ignore the tag names they just been renamed before posting:
Query:
1 - //d
2 - //DataSection/b/c/d
3 - //TestElement/RequestData/DataSection/b/c/d
4 - declare namespace ns = 'http://test3';
//ns:DataSection/b/c/d
Value to Match:
testuser1
Request:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ser="http://test1.com" xmlns:ser1="http://test2.com">
<soapenv:Header/>
<soapenv:Body>
<ser:TestElement>
<ser1:TestData>
<a1>qwe</a1>
<a2>qwe</a2>
<a3>we</a3>
<a4>we</a4>
<a5>12425f34-434c09a</a5>
</ser1:TestData>
<RequestData>
<DataSection xmlns="http://test3">
<b>
<c>
<d>testuser1</d>
</c>
</b>
</DataSection>
</RequestData>
</ser:TestElement>
</soapenv:Body>
</soapenv:Envelope>
Any help woule be really appreciated. Thanks.
I need to return response based on value in the repsonse and for that I am using XPath match but cant seems to get it to work, it always returns default response, below are the quries and request
data, please ignore the tag names they just been renamed before posting:
Query:
1 - //d
2 - //DataSection/b/c/d
3 - //TestElement/RequestData/DataSection/b/c/d
4 - declare namespace ns = 'http://test3';
//ns:DataSection/b/c/d
Value to Match:
testuser1
Request:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ser="http://test1.com" xmlns:ser1="http://test2.com">
<soapenv:Header/>
<soapenv:Body>
<ser:TestElement>
<ser1:TestData>
<a1>qwe</a1>
<a2>qwe</a2>
<a3>we</a3>
<a4>we</a4>
<a5>12425f34-434c09a</a5>
</ser1:TestData>
<RequestData>
<DataSection xmlns="http://test3">
<b>
<c>
<d>testuser1</d>
</c>
</b>
</DataSection>
</RequestData>
</ser:TestElement>
</soapenv:Body>
</soapenv:Envelope>
Any help woule be really appreciated. Thanks.