我有这样的响应消息:
<message>
<header>
<TransactionID>1</TransactionID>
<Timestamp>2012-05-22 10:10:36</Timestamp>
<OpCode>BOSS_DELETE_USER_SME.CD</OpCode>
<MsgType>RESP</MsgType>
<ReturnCode>1016</ReturnCode>
<ErrorMessage>uif return error message!</ErrorMessage>
</header>
</message>
我需要在扩展类中将 RetuenCode“1016”转换为“0”。如何在调解中获得 OMElement“ReturnCode”?我的代码失败了。
SOAPEnvelope envelope = context.getEnvelope();
SOAPBody soapBody = envelope.getBody();
QName ReturnCode = new QName(null, "ReturnCode");
OMElement response = soapBody.getFirstChildWithName(ReturnCode);