It's work.
I've write my own AbstractMarshallingPayLoadEndPoint, by copy/paste of the original class, and just modifiy the invokeInternal call (in invoke method) for forward the MessageContext.
The WSS4JInterceptor store the PrincipalName in the message context. The actor name can be retrieve like that :
Code:
@SuppressWarnings("unchecked")
protected String getWSS4JActorLogin(MessageContext context) {
if(context.containsProperty("RECV_RESULTS")) {
Vector<Object> results = (Vector<Object>)context.getProperty("RECV_RESULTS") ;
for(Object o : results) {
if(o instanceof WSHandlerResult) {
WSHandlerResult wsresult = (WSHandlerResult)o ;
for(Object y : wsresult.getResults()) {
if(y instanceof WSSecurityEngineResult) {
WSSecurityEngineResult wssResult = (WSSecurityEngineResult)y ;
if(wssResult.get(WSSecurityEngineResult.TAG_PRINCIPAL) != null) {
WSUsernameTokenPrincipal token_principal = (WSUsernameTokenPrincipal)wssResult.get(WSSecurityEngineResult.TAG_PRINCIPAL) ;
return token_principal.getName() ;
}
}
}
return wsresult.getActor() ;
}
}
}
return null ;
}
Thank's for your help.
MMZ