CommonMessageContext ctx = (CommonMessageContext)msgContext;
SOAPMessageImpl soapMessage = (SOAPMessageImpl)ctx.getSOAPMessage();
String user = (String)ctx.get(BindingProvider.USERNAME_PROPERTY);
String pass = (String)ctx.get(BindingProvider.PASSWORD_PROPERTY);
new WSSecurityDispatcher().encodeMessage(configuration, soapMessage, null, user, pass);
}
}
catch (SOAPException ex)
{
log.error("Cannot handle outbound ws-security", ex);