Package org.opensaml.xml.io

Examples of org.opensaml.xml.io.Marshaller.marshall()


                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.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();
        }

        /** {@inheritDoc} */
        public String getArtifact() {
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

            // 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
Copyright © 2018 www.massapi.com. 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.