AdiSoap123
13 years agoOccasional Contributor
Help with xpath assertion please
Hi,
I am not very technically inclined so excuse me for the basic question.
I am trying to get an assertion working with an xpath and getting nowhere. I have the below xml message and want to use the bold text as me assertion:
I have come up with the below:
But when I click "Select from current" I get an "Invalid XPath expression" error.
Running the text script gives the below error:
Anybody have any ideas?
I am not very technically inclined so excuse me for the basic question.
I am trying to get an assertion working with an xpath and getting nowhere. I have the below xml message and want to use the bold text as me assertion:
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Header>
<SyncovaSoapHeader xmlns="http://syncova.com/optima/webservices">
<AuthenticationString>?</AuthenticationString>
</SyncovaSoapHeader>
</soap:Header>
<soap:Body>
<GetTaskStatusResponse xmlns="http://syncova.com/optima/webservices">
[b]<GetTaskStatusResult>Failed</GetTaskStatusResult>[/b]
</GetTaskStatusResponse>
</soap:Body>
</soap:Envelope>
I have come up with the below:
declare namespace xmlns="http://syncova.com/optima/webservices"
/soap:Envelope/soap:Body/GetTaskStatusResponse/GetTaskStatusResult
But when I click "Select from current" I get an "Invalid XPath expression" error.
Running the text script gives the below error:
XPathContains assertion failed for path [declare namespace xmlns="http://syncova.com/optima/webservices"
/soap:Envelope/soap:Body/GetTaskStatusResponse/GetTaskStatusResult] : RuntimeException:net.sf.saxon.trans.XPathException: XPath syntax error at char 15 on line 2 in {\n/soap:Envelope/soap:Body}:
Prefix soap has not been declared
Anybody have any ideas?