Package org.opensaml.xml

Examples of org.opensaml.xml.XMLObject


     * @return
     * @throws UnmarshallingException
     */
    public static XMLObject axisUnmarshall(Element element) throws UnmarshallingException {
        synchronized (lock) {
            XMLObject xmlObject;
            UnmarshallerFactory unmarshallerFactory = Configuration.getUnmarshallerFactory();
            Unmarshaller unmarshaller = unmarshallerFactory.getUnmarshaller(element);

            XMLObject xmlObjectDOM = unmarshaller.unmarshall(element);

            if (xmlObjectDOM instanceof PolicyType) {

                xmlObject = new PolicyTypeString((PolicyType) xmlObjectDOM);
                xmlObject.releaseDOM();
View Full Code Here


     * @return the given element as an OpenSAML <code>XMLObject</code>.
     *
     * @throws XMLObjectUnmarshallingException if unmarshalling fails.
     */
    public static XMLObject buildXMLObject(Element element) {
        XMLObject xmlObject;

        try {
            xmlObject = unmarshall(element);
        } catch (UnmarshallingException e) {
            throw new XMLObjectUnmarshallingException(e);
View Full Code Here

     */
    public static XMLObject unmarshall(Element element) throws UnmarshallingException {
        synchronized (lock) {
            UnmarshallerFactory unmarshallerFactory = Configuration.getUnmarshallerFactory();
            Unmarshaller unmarshaller = unmarshallerFactory.getUnmarshaller(element);
            XMLObject xmlObject = unmarshaller.unmarshall(element);
            return xmlObject;
        }
    }
View Full Code Here

    try {

        MessageElement messageElement = context.getCurElement();
        Element element = messageElement.getAsDOM();

        XMLObject xmlObject = XMLObjectHelper.axisUnmarshall(element);

        setValue(xmlObject);
    }

    catch (Exception exception) {
View Full Code Here

        elementAsString = ((PolicySetTypeString) value).getPolicySetString();

      } else {

        XMLObject xmlObject = (XMLObject) value;

        Element element = XMLObjectHelper.marshall(xmlObject);

        if (attributes != null) {
          for (int i = 0; i < attributes.getLength(); i++) {
            element.setAttributeNS(attributes.getURI(i), attributes.getQName(i), attributes
                .getValue(i));
          }
        }

        elementAsString = XMLObjectHelper.toString(element);

        xmlObject.releaseChildrenDOM(true);
        xmlObject.releaseDOM();
      }

      String element;
      int index = elementAsString.indexOf("?>");
      if (index != -1) {
View Full Code Here

        }

        signMessage(samlMsgCtx);

        // Contains the entire envelope with any specified headers, but no body
        XMLObject outboundEnveloppe = samlMsgCtx.getOutboundMessage();

        Envelope envelope = buildPAOSMessage(samlMessage, outboundEnveloppe);
        Element envelopeElem = marshallMessage(envelope);

        try {
View Full Code Here

        // Get appropriate unmarshaller
        UnmarshallerFactory unmarshallerFactory = Configuration.getUnmarshallerFactory();
        Unmarshaller unmarshaller = unmarshallerFactory.getUnmarshaller(element);

        // Unmarshall using the document root element, an keyInfo element in this case
        XMLObject keyInfoElement = null;
        try {
            keyInfoElement = unmarshaller.unmarshall(element);
        } catch (UnmarshallingException e) {
            throw new TrustException("Error unmarshalling KeyInfo Element", e);
        }
View Full Code Here

                    throw new WSSecurityException(WSSecurityException.FAILURE,
                            "invalidSAML2Token", new Object[]{"for Signature (no Subject Confirmation Data)"});
                }

                // Get the SAML specific XML representation of the keyInfo object
                XMLObject KIElem = null;
                List<XMLObject> scDataElements = scData.getOrderedChildren();
                Iterator<XMLObject> iterator = scDataElements.iterator();
                while (iterator.hasNext()) {
                    XMLObject xmlObj = iterator.next();
                    if (xmlObj instanceof org.opensaml.xml.signature.KeyInfo) {
                        KIElem = xmlObj;
                        break;
                    }
                }
View Full Code Here

        }
        List<XMLObject> attributeValues = attribute.getAttributeValues();
        if (attributeValues == null || attributeValues.size() == 0) {
            return null;
        }
        XMLObject xmlValue = attributeValues.iterator().next();
        return getString(xmlValue);
    }
View Full Code Here

            for (SubjectStatement subjectStatement : subjectStatements) {
                Subject subject = subjectStatement.getSubject();
                if (subject != null) {
                    SubjectConfirmation confirmation = subject.getSubjectConfirmation();
                    if (confirmation != null) {
                        XMLObject data = confirmation.getSubjectConfirmationData();
                        if (data instanceof ConfirmationMethod) {
                            ConfirmationMethod method = (ConfirmationMethod) data;
                            methods.add(method.getConfirmationMethod());
                        }
                        List<ConfirmationMethod> confirmationMethods =
View Full Code Here

TOP

Related Classes of org.opensaml.xml.XMLObject

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.