我正在使用wso2esb 4.7.0,以下是我的消息:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<request xmlns="http://ws.apache.org/ns/synapse">
<user>sps</user>
<pwd>sps123</pwd>
</request>
</soapenv:Body>
</soapenv:Envelope>
我想检索用户信息,因为我已经这样做了
/soapenv:Envelope/soapenv:Body/request/user
但我没有得到任何东西。如果我尝试了
/soapenv:Envelope/soapenv:Body
然后我得到了
<soapenv:Body xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Envelope>
<soapenv:Body>
<request xmlns="http://ws.apache.org/ns/synapse">
<user>sps</user>
<pwd>sps123</pwd>
</request>
</soapenv:Body>
</soapenv:Envelope>
</soapenv:Body>
我应该如何获取用户信息?
答案 0 :(得分:0)
与
data(//*:Envelope/*:Body/*:request/*:user)
输出
sps
与
/*:Envelope/*:Body/*:request/*:user
输出
<user xmlns="http://ws.apache.org/ns/synapse"
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">sps</user>