Package org.apache.ws.security.policy

Examples of org.apache.ws.security.policy.WSSPolicyException


                Constants.LAYOUT_STRICT.equals(value) ||
                Constants.LAYOUT_LAX_TIMESTAMP_FIRST.equals(value) ||
                Constants.LAYOUT_LAX_TIMESTAMP_LAST.equals(value)) {
                 this.value = value;
             } else {
                 throw new WSSPolicyException("Incorrect layout value : " + value);
             }
    }
View Full Code Here


           Constants.INCLUDE_ALWAYS_TO_RECIPIENT.equals(inclusion) ||
           Constants.INCLUDE_NEVER.equals(inclusion) ||
           Constants.INCLUDE_ONCE.equals(inclusion)) {
            this.inclusion = inclusion;
        } else {
            throw new WSSPolicyException("Incorrect inclusion value: " + inclusion);
        }
    }
View Full Code Here

            return new InitiatorToken();
        } else if (name.getLocalPart().equals(SecurityPolicy.recipientToken.getTokenName())) {
            return new RecipientToken();
        } else {
            log.error("Unsuppotred: " + name.getLocalPart());
            throw new WSSPolicyException("Unsuppotred complex assertion :" + name.getLocalPart());
        }
    }
View Full Code Here

    /**
     * @param encryptionToken The encryptionToken to set.
     */
    public void setEncryptionToken(EncryptionToken encryptionToken) throws WSSPolicyException {
        if(this.protectionToken != null) {
            throw new WSSPolicyException("Cannot use an EncryptionToken in a " +
                    "SymmetricBinding when there is a ProtectionToken");
        }
        this.encryptionToken = encryptionToken;
    }
View Full Code Here

    /**
     * @param protectionToken The protectionToken to set.
     */
    public void setProtectionToken(ProtectionToken protectionToken) throws WSSPolicyException {
        if(this.encryptionToken != null || this.signatureToken != null) {
            throw new WSSPolicyException("Cannot use a ProtectionToken in a " +
            "SymmetricBinding when there is a SignatureToken or an" +
            "EncryptionToken");
        }
        this.protectionToken = protectionToken;
    }
View Full Code Here

    /**
     * @param signatureToken The signatureToken to set.
     */
    public void setSignatureToken(SignatureToken signatureToken) throws WSSPolicyException {
        if(this.protectionToken != null) {
            throw new WSSPolicyException("Cannot use a SignatureToken in a " +
                    "SymmetricBinding when there is a ProtectionToken");
        }
        this.signatureToken = signatureToken;
    }
View Full Code Here

            throws WSSPolicyException {
        if(Constants.ENCRYPT_BEFORE_SIGNING.equals(protectionOrder) ||
           Constants.SIGN_BEFORE_ENCRYPTING.equals(protectionOrder)) {
            this.protectionOrder = protectionOrder;
        } else {
            throw new WSSPolicyException("Incorrect protection order value : "
                    + protectionOrder);
        }
    }
View Full Code Here

            this.asymmetricKeyWrap = Constants.KW_RSA15;
            this.encryptionKeyDerivation = Constants.P_SHA1_L192;
            this.signatureKeyDerivation = Constants.P_SHA1_L192;
            this.minimumSymmetricKeyLength = 192;
        } else {
            throw new WSSPolicyException("Invalid algorithm suite : " + algoSuite);
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.ws.security.policy.WSSPolicyException

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.