WSO2 使用 属性 表达式获取请求正文

WSO2 get request body using property expression

我想提取作为文本返回的 API 调用的请求正文。

来自日志中介的响应。

<?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><text xmlns="http://ws.apache.org/commons/ns/payload">**1**</text></soapenv:Body></soapenv:Envelope>

我想提取正文中的 1。请看截图。

我试过跟不上

<property expression="$body" name="api_response_status" scope="default" type="STRING"/>

以下 属性 表达式对我有用。

<property expression="json-eval($.text)" name="api_response_status" scope="default" type="STRING"/>