* @param msgContext
* @throws Exception
*/
private void processSecConv(MessageContext msgContext) throws Exception {
// Parse the configuration
ConversationConfiguration config = ConversationConfiguration
.load(msgContext, false);
// check if there's an RSTR in the msg and process it if exists
SOAPEnvelope env = (SOAPEnvelope) config.getDocument()
.getDocumentElement();
SOAPHeader header = env.getHeader();
if (header != null
&& header
.getFirstChildWithName(new QName(
WSSHandlerConstants.WST_NS,
WSSHandlerConstants.REQUEST_SECURITY_TOKEN_RESPONSE_LN)) != null) {
OMElement elem = header
.getFirstChildWithName(new QName(
WSSHandlerConstants.WST_NS,
WSSHandlerConstants.REQUEST_SECURITY_TOKEN_RESPONSE_LN));
Util.processRSTR(elem, config);
}
secEngine.processSecurityHeader(config.getDocument(), null,
new ConversationCallbackHandler(config), config
.getCrypto());
// Convert back to llom since the inflow cannot use llom
msgContext.setEnvelope(Axis2Util
.getSOAPEnvelopeFromDOMDocument(config.getDocument(), true));
SOAPHeader soapHeader = null;
try {
soapHeader = msgContext.getEnvelope().getHeader();
} catch (OMException ex) {