如何在肥皂UI槽中提取body标签内的肥皂响应



我有这样的回应。

<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<ns3:ResponseElement xmlns:ns2="http://www.example.com/services/common/example/xsd" xmlns:ns3="http://www.example.com/example/xsd">
<Info>
<Data>
<Site>OneValue</Site>
</Data>
<OtherData>
<Code>56789</Code>
<Time>2017-07-30</Time>
<SecondCode>ThirdValue</SecondCode>
<Number>111</Number>
</OtherData>
</Info>
</ns3:ResponseElement>
</S:Body>
</S:Envelope>

在 groovy 中,如何在<S:Body>标签内将响应提取为 XML?

我想出了答案。如果寻找这个,可能会对其他人有所帮助

def body = context.expand('${TestStepName#Response#//soap:Body}')
log.info body

最新更新