Xpath SOAP响应处理

Xpath SOAP响应处理,xpath,wso2,wso2esb,Xpath,Wso2,Wso2esb,我有一个SOAP服务,我正试图通过WSO2 ESB中的API访问它 下面是来自该SOAP服务的方法的响应主体 <?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="wom"> <SOAP-ENV:Body> <ns

我有一个SOAP服务,我正试图通过WSO2 ESB中的API访问它

下面是来自该SOAP服务的方法的响应主体

<?xml version="1.0" encoding="UTF-8"?>
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="wom">
       <SOAP-ENV:Body>
          <ns1:OrderResponse>
             <return>
                <ResponseHeader>
                   <ResponseCode>1</ResponseCode>
                   <Description>CIR is already exists</Description>
                </ResponseHeader>
             </return>
          </ns1:OrderResponse>
       </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>

1.
CIR已存在
我按照以下链接访问上述xml响应的Body/OrderResponse

[$body][1]

下面是api中的outSequence标记,我试图记录属性值

<outSequence>
    <log level="custom">
       <property xmlns:ns="http://org.apache.synapse/xsd"
                 name="ErrorCode"
                 expression="$body/ns1:OrderResponse"
                 scope="default"
                 type="STRING"/>
    </log>
</outSequence>

我尝试了$body/ns1:OrderResponse$body/OrderResponse,但日志中的ErrorCode属性为空。
但是当我尝试$body时,可以获取整个响应(这与我前面提到的xml响应相同)。如何仅获取OrderResponse?

属性中未定义ns1,请尝试:

<property xmlns:ns="http://org.apache.synapse/xsd"
xmlns:ns1="wom"
name="ErrorCode"
expression="$body/ns1:OrderResponse"
scope="default"
type="STRING"/>


如果需要xml有效负载,请使用type=“OM”

定义属性。如果属性中未定义ns1,请尝试使用:

<property xmlns:ns="http://org.apache.synapse/xsd"
xmlns:ns1="wom"
name="ErrorCode"
expression="$body/ns1:OrderResponse"
scope="default"
type="STRING"/>

如果需要xml负载,请使用type=“OM”定义属性