How to get OMElement by name in mediate?
Posted
by
luohao
on Stack Overflow
See other posts from Stack Overflow
or by luohao
Published on 2012-05-22T03:40:10Z
Indexed on
2012/09/13
9:38 UTC
Read the original article
Hit count: 184
I have a response message like this:
<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>
I need convert RetuenCode "1016" to "0" in extension class. How to get OMElement "ReturnCode" in mediate? My code is failed.
SOAPEnvelope envelope = context.getEnvelope();
SOAPBody soapBody = envelope.getBody();
QName ReturnCode = new QName(null, "ReturnCode");
OMElement response = soapBody.getFirstChildWithName(ReturnCode);
© Stack Overflow or respective owner