[英]wiremock soapXpath attribute
I'm trying to get an xml attribute thoug soapXpath with wiremock but i can't doit, this is my SoapRequest.我正在尝试使用带有wiremock的soapXpath获取xml属性,但我做不到,这是我的SoapRequest。
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Header/>
<SOAP-ENV:Body>
<ns2:Element>
<ns2:InnerElement attribute="value"></ns2:InnerElement>
</ns2:Element>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
And this is how i'm trying to get the value of attribute.这就是我试图获取属性值的方式。
{{soapXPath request.body '/Element/InnerElement[@RatePlanCode]/text()'}}
response does not show errors, but it does not show the value, i can't figured out what i'm doing wrong.响应没有显示错误,但没有显示值,我无法弄清楚我做错了什么。
I keept trying and find the solution我不断尝试并找到解决方案
{{soapXPath request.body '/Element/InnerElement/@attribute/'}}
with this i can get the attribute value有了这个我可以得到属性值
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.