我尝试从我使用 xPath 的Property Transfer 中的xml 中提取值:
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/
我得到错误:
cId [net.sf.saxon.trans.XPathException: Required item type of first operand of '/' is node(); supplied value has item type xs:string]
我将传输源设置为上一步(返回有效的 XML)、属性响应和路径语言XPath
不知道如何在 SoapUI 中修复它(在纯 Java 中更容易)
好的,我的错误在第二行我有:
declare namespace ns7="http://schemas.BIGBANK.pl/" xmlns="http://schemas.BIGBANK.pl/"
如果您使用纯 XML,则可以设置属性。但在 SoapUI 中它应该是:
declare namespace ns7="http://schemas.BIGBANK.pl/"
现在它工作正常。
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句