Package org.opensaml.xml.io

Examples of org.opensaml.xml.io.UnmarshallingException


            Unmarshaller unmarshaller = unmarshallerFactory.getUnmarshaller(mdDocument.getDocumentElement());
            if (unmarshaller == null) {
                String msg ="No unmarshaller registered for document element " + XMLHelper
                        .getNodeQName(mdDocument.getDocumentElement());
                log.error(msg);
                throw new UnmarshallingException(msg);
            }
            XMLObject metadata = unmarshaller.unmarshall(mdDocument.getDocumentElement());
            return metadata;
        } catch (Exception e) {
            throw new UnmarshallingException(e);
        } finally {
            try {
                metadataInput.close();
            } catch (IOException e) {
                // ignore
View Full Code Here


            Unmarshaller unmarshaller = unmarshallerFactory.getUnmarshaller(mdDocument.getDocumentElement());
            if (unmarshaller == null) {
                String msg ="No unmarshaller registered for document element " + XMLHelper
                        .getNodeQName(mdDocument.getDocumentElement());
                log.error(msg);
                throw new UnmarshallingException(msg);
            }
            XMLObject metadata = unmarshaller.unmarshall(mdDocument.getDocumentElement());
            return metadata;
        } catch (Exception e) {
            throw new UnmarshallingException(e);
        } finally {
            try {
                metadataInput.close();
            } catch (IOException e) {
                // ignore
View Full Code Here

        log.debug("Unmarshalling DOM parsed from InputStream");
        Unmarshaller unmarshaller = Configuration.getUnmarshallerFactory().getUnmarshaller(messageElem);
        if (unmarshaller == null) {
            log.error("Unable to unmarshall InputStream, no unmarshaller registered for element "
                    + XMLHelper.getNodeQName(messageElem));
            throw new UnmarshallingException(
                    "Unable to unmarshall InputStream, no unmarshaller registered for element "
                            + XMLHelper.getNodeQName(messageElem));
        }

        XMLObject message = unmarshaller.unmarshall(messageElem);
View Full Code Here

        log.debug("Unmarshalling DOM parsed from Reader");
        Unmarshaller unmarshaller = Configuration.getUnmarshallerFactory().getUnmarshaller(messageElem);
        if (unmarshaller == null) {
            log.error("Unable to unmarshall Reader, no unmarshaller registered for element "
                    + XMLHelper.getNodeQName(messageElem));
            throw new UnmarshallingException(
                    "Unable to unmarshall Reader, no unmarshaller registered for element "
                            + XMLHelper.getNodeQName(messageElem));
        }

        XMLObject message = unmarshaller.unmarshall(messageElem);
View Full Code Here

            signature.setXMLSignature(xmlSignature);
            signature.setDOM(signatureElement);
            return signature;
        } catch (XMLSecurityException e) {
            log.error("Error constructing Apache XMLSignature instance from Signature element: {}", e.getMessage());
            throw new UnmarshallingException("Unable to unmarshall Signature with Apache XMLSignature", e);
        }
    }
View Full Code Here

                request.getAssertionArtifacts().add((AssertionArtifact) childElement);
            } else {
                super.processChildElement(parentElement, childElement);
            }
        } catch (IllegalArgumentException e) {
            throw new UnmarshallingException(e);
        }
    }
View Full Code Here

            } else if (value.equals(DecisionTypeEnumeration.DENY.toString())) {
                authzDS.setDecision(DecisionTypeEnumeration.DENY);
            } else if (value.equals(DecisionTypeEnumeration.INDETERMINATE.toString())) {
                authzDS.setDecision(DecisionTypeEnumeration.INDETERMINATE);
            } else {
                throw new UnmarshallingException("Unknown value for DecisionType '" + value + "'");
            }
        } else {
            super.processAttribute(samlObject, attribute);
        }
    }
View Full Code Here

            int minor;
            try {
                minor = Integer.parseInt(attribute.getValue());
            } catch (NumberFormatException n) {
                log.error("Parsing minor version ", n);
                throw new UnmarshallingException(n);
            }
            if (minor == 0) {
                response.setVersion(SAMLVersion.VERSION_10);
            } else if (minor == 1) {
                response.setVersion(SAMLVersion.VERSION_11);
View Full Code Here

                authorizationDecisionStatement.setDecision(DecisionTypeEnumeration.DENY);
            } else if (value.equals(DecisionTypeEnumeration.INDETERMINATE.toString())) {
                authorizationDecisionStatement.setDecision(DecisionTypeEnumeration.INDETERMINATE);
            } else {
                log.error("Unknown value for DecisionType '" + value + "'");
                throw new UnmarshallingException("Unknown value for DecisionType '" + value + "'");
            }
        } else if (AuthorizationDecisionStatement.RESOURCE_ATTRIB_NAME.equals(attribute.getLocalName())) {
            authorizationDecisionStatement.setResource(attribute.getValue());
        } else {
            super.processAttribute(samlObject, attribute);
View Full Code Here

            Unmarshaller unmarshaller = unmarshallerFactory.getUnmarshaller(mdDocument.getDocumentElement());
            if (unmarshaller == null) {
                String msg ="No unmarshaller registered for document element " + XMLHelper
                        .getNodeQName(mdDocument.getDocumentElement());
                log.error(msg);
                throw new UnmarshallingException(msg);
            }
            XMLObject metadata = unmarshaller.unmarshall(mdDocument.getDocumentElement());
            return metadata;
        } catch (Exception e) {
            throw new UnmarshallingException(e);
        } finally {
            try {
                metadataInput.close();
            } catch (IOException e) {
                // ignore
View Full Code Here

TOP

Related Classes of org.opensaml.xml.io.UnmarshallingException

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.