我無法爲soapui中的下面的xml獲取xpath值「MatchFound」。 我正在嘗試屬性傳遞功能。無法從soapui獲取xpath值
我嘗試以下XPath:
declare namespace ns0='http://KYC/';
declare namespace soapenv='http://schemas.xmlsoap.org/soap/envelope/';
/soapenv:Envelope/soapenv:Body/BarclaysCustomerValidationResponse/oCasaDetailByRefNoDetails/oCasaStatusByRefNoDetails/oRiskProfileClientData/oGetFraudInformationData/oAddressVerificationDetails/ns0:matchedFound
XML:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<BarclsCustomerValidationResponse xmlns="http://BHKYC/BarclaysCustomerValidation.tws">
<oCasaByIdNoDetails>
<ns0:casaByIdNoResults xmlns:ns0="http://KYC">
<ns0:item/>
</ns0:casaByIdNoResults>
</oCasaByIdNoDetails>
<oCasaDetailByRefNoDetails/>
<oCasaStatusByRefNoDetails/>
<oRiskProfileClientData/>
<oGetFraudInformationData/>
<oAddressVerificationDetails>
<ns0:enquiryid xmlns:ns0="http://KYC">51644325</ns0:enquiryid>
<ns0:enquiryresultid xmlns:ns0="http://KYC">52146422</ns0:enquiryresultid>
<ns0:matchedFound xmlns:ns0="http://KYC">false</ns0:matchedFound>
<ns0:numberOfMatches xmlns:ns0="http://KYC">1</ns0:numberOfMatches>
<ns0:firstMatchUpdatedDate xmlns:ns0="http://KYC">2016-03-31</ns0:firstMatchUpdatedDate>
<ns0:secondMatchUpdatedDate xmlns:ns0="http://KYC"/>
<ns0:mostRecentAddressIsMatched xmlns:ns0="http://KYC">false</ns0:mostRecentAddressIsMatched>
</oAddressVerificationDetails>
<oCasaPS/>
<pid>21691</pid>
</BarclsCustomerValidationResponse>
</soapenv:Body>
</soapenv:Envelope>
你申報NS0命名空間URI包含一個結尾'/',該文檔中命名空間不 –
以下可以成爲你的XPath 「// BarclsCustomerValidationResponse/oAddressVerificationDetails/NS0:matchedFound」。最佳做法是屏蔽名稱空間。現在看起來像「// BarclsCustomerValidationResponse/oAddressVerificationDetails/*:matchedFound」 – Ramu