我试图将一个WS调用的响应中的值传递给另一个使用SoapUI的Transfer Property TestStep的请求。如何让SoapUI测试用例中的物业转移工作?
首先WS响应:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Header/>
<soapenv:Body>
<ns5:PSResponse xmlns:ns5="http://www.ab.com/abonline/service/PaymentService/1.0/" xmlns:ns6="http://www.ab.com/abonline/service/CustomerCard/1.0/" xmlns:ns7="https://secure.incab.se/DTServerModuleService/v1">
<ns5:abTransactionReference>1085-0</ns5:abTransactionReference>
<ns5:status>0</ns5:status>
</ns5:PSResponse>
</soapenv:Body>
</soapenv:Envelope>
解析属性工作正常使用类似的表达式:
declare namespace ns5="http://www.ab.com/abnline/service/PaymentService/1.0/" //ns5:abTransactionReference
下一个请求:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns="http://www.ab.com/abonline/service/PaymentService/1.0/">
<soapenv:Header/>
<soapenv:Body>
<UpdatePaymentRequest>
<abTransactionReference>30</abTransactionReference>
... ...
我尝试将所述属性进下一个请求使用:
//abTransactionReference
给我:[Missing match for Target XPath [//abTransactionReference]]
我也尝试了完整的XPath:
declare namespace soapenv="http://schemas.xmlsoap.org/soap/envelope/" //soapenv:Envelope/soapenv:Body/UpdatePaymentRequest/abTransactionReference
...造成类似的错误。
仅链接答案不是SO的方式。请详细说明您的答案。 – jogo