Java 8 XMLSignatureException - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Java 8 XMLSignatureException class.

This code example shows how to use the following methods:getCause
 
    private StringBuilder error;
 
    @Override 
    public Exception onXMLSignatureException(XMLSignatureException se) {
        if (se.getCause() instanceof InvalidKeyException) {
            return new XmlSignatureInvalidKeyException(se);
        } else { 
            return new XmlSignatureException(se);
        } 
    } 
 
    @Override 
    public void start() { 
        error = new StringBuilder();
        error.append("Signature validation failed. ");
    } 
 
    @Override 
    public void signatureValueValidationFailed(SignatureValue value) throws Exception { //NOPMD
6
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:
 
    } 
 
    protected void checkStringSarchValueNotEmpty(String searchValue, String outputNodeSearchType) throws Exception { //NOPMD
        if (searchValue.isEmpty()) {
            throw new XMLSignatureException(String.format("Wrong configruation: Value for output node search %s is empty.",
                    outputNodeSearchType));
        } 
    } 
 
    protected void checkSearchValueNotNull(Input input) throws Exception { //NOPMD
        LOG.debug("Searching for output element with search value '{}' and sarch type {}", input.getOutputNodeSearch(),
                input.getOutputNodeSearchType());
        if (input.getOutputNodeSearch() == null) {
            throw new XMLSignatureException(String.format("Wrong configruation: Value is missing for output node search %s.",
                    input.getOutputNodeSearchType()));
        } 
    } 
 
    protected Node getNodeForMessageBodyInEnvelopingCase(Input input) throws Exception { //NOPMD
4
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:
This code example shows how to use the following methods:
     * @throws XMLSignatureException 
     */ 
    public boolean validate(Document document) throws MarshalException, XMLSignatureException {
        NodeList nodes = document.getElementsByTagName("Signature");
        if(nodes.getLength() == 0) {
            throw  new XMLSignatureException("The document does not seem to contain an XmlSignature node.");
        } 
 
        Node signatureNode = nodes.item(0);
 
        DOMValidateContext validateContext = new DOMValidateContext(keySelector, signatureNode);
        return super.validate(validateContext);
    } 
} 
4
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:
     * @throws XMLSignatureException 
     */ 
    public boolean validate(Document document) throws MarshalException, XMLSignatureException {
        NodeList nodes = document.getElementsByTagName("Signature");
        if(nodes.getLength() == 0) {
            throw  new XMLSignatureException("The document does not seem to contain an XmlSignature node.");
        } 
 
        Node signatureNode = nodes.item(0);
        DOMValidateContext validateContext = new DOMValidateContext(publicKey, signatureNode);
        return super.validate(validateContext);
    } 
} 
4
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
See Code Examples for Java 8 XMLSignatureException Methods: