Package com.sun.xml.wss

Examples of com.sun.xml.wss.XWSSecurityException


   
    public Key getDecipheredOtherPartyEntropy(Key privKey) throws XWSSecurityException {
        try {
            return getDecipheredOtherPartyEntropy(getOtherPartyEntropy(), privKey);
        } catch ( XMLEncryptionException xee) {
            throw new XWSSecurityException(xee);
        }
    }
View Full Code Here


                   nspac.equals(WSTrustConstants.WST_NAMESPACE)) {
                if (res == index) {
                    try {
                        return WSTrustElementFactory.newInstance().createBinarySecret((SOAPElement) current);
                    }catch (WSTrustException ex) {
                        throw new XWSSecurityException(ex);
                    }
                }
                res++;
              }
            }
View Full Code Here

     *     If owner soap document is not set.
     * @see #setDocument(Document)
     */
    public SOAPElement getAsSoapElement() throws XWSSecurityException {
        if (document == null) {
            throw new XWSSecurityException("Document not set");
        }
        if (dirty) {
            setSOAPElement(convertToSoapElement(delegateKeyInfo));
            dirty = false;
        }
View Full Code Here

        } catch (XMLSecurityException e) {
            log.log(
                Level.SEVERE,
                "WSS0318.exception.while.creating.keyinfoblock",
                e);
          throw new XWSSecurityException(e);
        }
    }
View Full Code Here

        } catch (Exception e) {
            log.log(
                Level.SEVERE,
                "WSS0321.exception.converting.keyinfo.tosoapelem",
                e);
            throw new XWSSecurityException(e);
        }
    }
View Full Code Here

        try {
            delegateKeyInfo.add(x509Data);
            dirty = true;
        } catch (Exception e) {
            log.log(Level.SEVERE, "WSS0359.error.adding.x509data", e.getMessage());
            throw new XWSSecurityException(e);
        }
    }
View Full Code Here

            if (userName == null || "".equals(userName)) {
                userName = context.getSecurityEnvironment().getUsername(context.getExtraneousProperties());
            }           
            if (userName == null || "".equals(userName)) {
                log.log(Level.SEVERE, LogStringsMessages.WSS_1409_INVALID_USERNAME_TOKEN());
                throw new XWSSecurityException("Username has not been set");
            }
            unToken.setUsernameValue(userName);
            String password = untBinding.getPassword();
            if (!untBinding.hasNoPassword() && (password == null || "".equals(password))) {
                password = context.getSecurityEnvironment().getPassword(context.getExtraneousProperties());
            }
            if (!untBinding.hasNoPassword()) {
                if (password == null) {
                    log.log(Level.SEVERE, LogStringsMessages.WSS_1424_INVALID_USERNAME_TOKEN());
                    throw new XWSSecurityException("Password for the username has not been set");
                }
            }
            //Setting iterations in UsernameToken;
            AttributedString as =  new AttributedString();
            String iterate = Integer.toString(iterations);
View Full Code Here

        if (userName == null || "".equals(userName)) {
            userName = context.getSecurityEnvironment().getUsername(context.getExtraneousProperties());
        }
        if (userName == null || "".equals(userName)) {
            log.log(Level.SEVERE, LogStringsMessages.WSS_1409_INVALID_USERNAME_TOKEN());
            throw new XWSSecurityException("Username has not been set");
        }
        unToken.setUsernameValue(userName);
        //Retrieving password ;
        String password = untBinding.getPassword();
        if (!untBinding.hasNoPassword() && (password == null || "".equals(password))) {
            password = context.getSecurityEnvironment().getPassword(context.getExtraneousProperties());
        }
        if (!untBinding.hasNoPassword()) {
            if (password == null) {
                log.log(Level.SEVERE, LogStringsMessages.WSS_1424_INVALID_USERNAME_TOKEN());
                throw new XWSSecurityException("Password for the username has not been set");
            }
        }
        //Setting iterations in UsernameToken;
        AttributedString as =  new AttributedString();
        String iterate = Integer.toString(iterations);
View Full Code Here

            if (userName == null || "".equals(userName)) {
                userName = context.getSecurityEnvironment().getUsername(context.getExtraneousProperties());
            }
            if (userName == null || "".equals(userName)) {
                log.log(Level.SEVERE, LogStringsMessages.WSS_1409_INVALID_USERNAME_TOKEN());
                throw new XWSSecurityException("Username has not been set");
            }
            if (token != null) {
            token.setUsername(userName);
            } else {
            unToken.setUsernameValue(userName);
            }    
            if (!userNamePolicy.hasNoPassword() && (password == null || "".equals(password))) {
                password = context.getSecurityEnvironment().getPassword(context.getExtraneousProperties());
            }
            if (!userNamePolicy.hasNoPassword()) {
                if (password == null) {
                    log.log(Level.SEVERE, LogStringsMessages.WSS_1424_INVALID_USERNAME_TOKEN());
                    throw new XWSSecurityException("Password for the username has not been set");
                }
                if (token != null) {
                token.setPassword(password);
                } else {
                unToken.setPasswordValue(password);
View Full Code Here

                    "EncryptionMethod",
                    MessageConstants.XENC_PREFIX,
                    MessageConstants.XENC_NS);
        } catch (SOAPException e) {
            log.log(Level.SEVERE, "WSS0351.error.setting.encryption.method", e.getMessage());
            throw new XWSSecurityException(e);
        }
        encryptionMethod.setAttribute("Algorithm", algorithmURI);
        updateRequired = true;
    }
View Full Code Here

TOP

Related Classes of com.sun.xml.wss.XWSSecurityException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.