Package org.opensaml.xml.io

Examples of org.opensaml.xml.io.Marshaller


            }
           
            signableMessage.setSignature(signature);

            try {
                Marshaller marshaller = Configuration.getMarshallerFactory().getMarshaller(signableMessage);
                if (marshaller == null) {
                    throw new MessageEncodingException("No marshaller registered for "
                            + signableMessage.getElementQName() + ", unable to marshall in preperation for signing");
                }
                marshaller.marshall(signableMessage);

                Signer.signObject(signature);
            } catch (MarshallingException e) {
                log.error("Unable to marshall protocol message in preparation for signing", e);
                throw new MessageEncodingException("Unable to marshall protocol message in preparation for signing", e);
View Full Code Here


            throws MessageEncodingException {

        try {
            KeyInfo keyInfo = kiGenerator.generate(signingCredential);
            if (keyInfo != null) {
                Marshaller marshaller = Configuration.getMarshallerFactory().getMarshaller(keyInfo);
                if (marshaller == null) {
                    log.error("No KeyInfo marshaller available from configuration");
                    throw new MessageEncodingException("No KeyInfo marshaller was configured");
                }
                String kiXML = XMLHelper.nodeToString(marshaller.marshall(keyInfo));
                String kiBase64 = Base64.encodeBytes(kiXML.getBytes(), Base64.DONT_BREAK_LINES);
                return kiBase64;
            } else {
                return null;
            }
View Full Code Here

            this.issuer = issuer;
            this.relyingParty = relyingParty;
            expirationTime = new DateTime().plus(lifetime);

            StringWriter writer = new StringWriter();
            Marshaller marshaller = Configuration.getMarshallerFactory().getMarshaller(saml);
            XMLHelper.writeNode(marshaller.marshall(saml), writer);
            serializedMessage = writer.toString();
        }
View Full Code Here

            }

            signableMessage.setSignature(signature);

            try {
                Marshaller marshaller = Configuration.getMarshallerFactory().getMarshaller(signableMessage);
                marshaller.marshall(signableMessage);
                Signer.signObject(signature);
            } catch (MarshallingException e) {
                log.error("Unable to marshall protocol message in preparation for signing", e);
                throw new MessageEncodingException("Unable to marshall protocol message in preparation for signing", e);
            } catch (SignatureException e) {
View Full Code Here

            // The metadata object should still have its DOM
            // but we'll create it if it doesn't
            if (metadata.getDOM() != null) {
                metadataElement = metadata.getDOM();
            } else {
                Marshaller marshaller = Configuration.getMarshallerFactory().getMarshaller(metadata);
                metadataElement = marshaller.marshall(metadata);
            }

            if (log.isDebugEnabled()) {
                log.debug("Converting DOM to a string");
            }
View Full Code Here

TOP

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

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.