Dear Wiki user, You have subscribed to a wiki page or wiki category on "Ws Wiki" for change notification.
The following page has been changed by UlfDittmer: http://wiki.apache.org/ws/FrontPage/WsFx/wss4jFAQ The comment on the change is: fleshed out WSSecurityEngineResult handling ------------------------------------------------------------------------------ Vector hResults = hResult.getResults(); for (int j = 0; j < hResults.size(); j++) { WSSecurityEngineResult eResult = (WSSecurityEngineResult) hResults.get(j); - // An encryption or timestamp action does not have an associated principal + // An encryption or timestamp action does not have an associated principal, // only Signature and UsernameToken actions return a principal - if (eResult.getAction() != WSConstants.ENCR && + if ((eResult.getAction() == WSConstants.SIGN) - eResult.getAction() != WSConstants.TS) { + || (eResult.getAction() == WSConstants.UT)) { + // Signature and UsernameToken actions return a principal System.out.println("Principal's name: " + eResult.getPrincipal().getName()); - } + } else if (eResult.getAction() == WSConstants.ENCR) { + // Encryption action returns what ? + } else if (eResult.getAction() == WSConstants.TS) { + // Timestamp action returns a Timestamp + System.out.println("Timestamp created: " + eResult.getTimestamp().getCreated()); + System.out.println("Timestamp expires: " + eResult.getTimestamp().getExpires()); + } } } }}}
