0

I try to extract value from xml in Property Transfer I use xPath:

declare namespace S="http://www.w3.org/2003/05/soap-envelope"
declare namespace ns7="http://schemas.BIGBANK.pl/" xmlns="http://schemas.BIGBANK.pl/"

/S:Envelope/S:Body/ns7:Document/ns7:QueryIPR/ns7:IPIList/ns7:PI/ns7:PI/ns7:cId/

and i get error:

cId [net.sf.saxon.trans.XPathException: Required item type of first operand of '/' is node(); supplied value has item type xs:string]

I set source of transfer as previous step (that return valid XML), property Response and path language XPath

have no idea how to fix it in SoapUI (in pure java it is much more easier)

4
  • What does the source XML look like (minimal example) ?
    – zx485
    May 4, 2018 at 13:48
  • Remove the trailing slash from your XPath. The error is telling you that the expression is unfinished.
    – LMC
    May 4, 2018 at 15:43
  • Did you try above solution? otherwise provide sample xml.
    – Rao
    May 5, 2018 at 0:44
  • My mistake. In second line I have xmlns="http://schemas.BIGBANK.pl/" and that was interpreted. After remove it works fine.
    – Koziołek
    May 7, 2018 at 10:46

1 Answer 1

0

Ok, my mistake At the second line I have:

declare namespace ns7="http://schemas.BIGBANK.pl/" xmlns="http://schemas.BIGBANK.pl/"

And if you work with pure XML it is OK attribute set. But in SoapUI it should be:

declare namespace ns7="http://schemas.BIGBANK.pl/" 

An now it works fine.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.