Examples of toDOM()


Examples of com.esri.gpt.catalog.search.SearchCriteria.toDom()

  //  throw new SearchException("catalog.search.error.maxSavedSearchesReached");
  //}
  if (LOG.isLoggable(Level.FINE)) {
    LOG.log(Level.FINE, "Search Criteria Object being saved = \n{0}", criteria.toString());
  }
  criteria = new SearchCriteria(criteria.toDom());
  criteria.getSearchFilterPageCursor().setCurrentPage(1);
  SavedSearchCriteria savedSearchCriteria =
    new SavedSearchCriteria(this.getSearchCriteria().getSavedSearchName(),
        criteria, this.extractRequestContext().getUser());
View Full Code Here

Examples of org.apache.ws.security.saml.ext.AssertionWrapper.toDOM()

                    addEncryptedKeyElement(cloneElement(secTok.getToken()));
                }
            } else if (token instanceof SamlToken) {
                AssertionWrapper assertionWrapper = addSamlToken((SamlToken)token);
                if (assertionWrapper != null) {
                    addSupportingElement(assertionWrapper.toDOM(saaj.getSOAPPart()));
                }
            } else {
                //REVISIT - not supported for signed.  Exception?
            }
        }
View Full Code Here

Examples of org.apache.ws.security.saml.ext.AssertionWrapper.toDOM()

        } else if (token instanceof X509Token
            || token instanceof KeyValueToken) {
            addSig(doX509TokenSignature(token, wrapper));
        } else if (token instanceof SamlToken) {
            AssertionWrapper assertionWrapper = addSamlToken((SamlToken)token);
            assertionWrapper.toDOM(saaj.getSOAPPart());
            storeAssertionAsSecurityToken(assertionWrapper);
            addSig(doIssuedTokenSignature(token, wrapper));
        } else if (token instanceof UsernameToken) {
            // Create a UsernameToken object for derived keys and store the security token
            WSSecUsernameToken usernameToken = addDKUsernameToken((UsernameToken)token, true);
View Full Code Here

Examples of org.apache.ws.security.saml.ext.AssertionWrapper.toDOM()

                    }
                } else if (initiatorToken instanceof SamlToken) {
                    AssertionWrapper assertionWrapper = addSamlToken((SamlToken)initiatorToken);
                    if (assertionWrapper != null) {
                        if (includeToken(initiatorToken.getInclusion())) {
                            addSupportingElement(assertionWrapper.toDOM(saaj.getSOAPPart()));
                            storeAssertionAsSecurityToken(assertionWrapper);
                        }
                        policyAsserted(initiatorToken);
                    }
                }
View Full Code Here

Examples of org.apache.ws.security.saml.ext.AssertionWrapper.toDOM()

            } else if (initiatorToken instanceof SamlToken) {
                try {
                    AssertionWrapper assertionWrapper = addSamlToken((SamlToken)initiatorToken);
                    if (assertionWrapper != null) {
                        if (includeToken(initiatorToken.getInclusion())) {
                            addSupportingElement(assertionWrapper.toDOM(saaj.getSOAPPart()));
                            storeAssertionAsSecurityToken(assertionWrapper);
                        }
                        policyAsserted(initiatorToken);
                    }
                } catch (Exception e) {
View Full Code Here

Examples of org.apache.ws.security.saml.ext.AssertionWrapper.toDOM()

                }
                ret.put(token, sig);               
            } else if (token instanceof SamlToken) {
                AssertionWrapper assertionWrapper = addSamlToken((SamlToken)token);
                if (assertionWrapper != null) {
                    Element assertionElement = assertionWrapper.toDOM(saaj.getSOAPPart());
                    addSupportingElement(assertionElement);
                    ret.put(token, assertionWrapper);
                    if (suppTokens.isEncryptedToken()) {
                        WSEncryptionPart part = new WSEncryptionPart(assertionWrapper.getId(), "Element");
                        part.setElement(assertionElement);
View Full Code Here

Examples of org.apache.ws.security.saml.ext.AssertionWrapper.toDOM()

        SAMLParms samlParms = new SAMLParms();
        samlParms.setCallbackHandler(new SamlCallbackHandler());
        try {
            AssertionWrapper assertion = new AssertionWrapper(samlParms);
            Document doc = DOMUtils.createDocument();
            Element token = assertion.toDOM(doc);
            message.setContextualProperty(SAMLConstants.SAML_TOKEN_ELEMENT, token);
        } catch (WSSecurityException ex) {
            StringWriter sw = new StringWriter();
            ex.printStackTrace(new PrintWriter(sw));
            throw new Fault(new RuntimeException(ex.getMessage() + ", stacktrace: " + sw.toString()));
View Full Code Here

Examples of org.apache.ws.security.saml.ext.AssertionWrapper.toDOM()

        samlParms.setCallbackHandler(new Saml2CallbackHandler());
        AssertionWrapper assertion = new AssertionWrapper(samlParms);
        DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
        dbf.setNamespaceAware(true);
        DocumentBuilder db = dbf.newDocumentBuilder();
        Element assertionElement = assertion.toDOM(db.newDocument());
       
        SecurityToken tok = new SecurityToken(id);
        tok.setTokenType(WSConstants.WSS_SAML2_TOKEN_TYPE);
        tok.setToken(assertionElement);
        store.add(tok);
View Full Code Here

Examples of org.apache.ws.security.saml.ext.AssertionWrapper.toDOM()

        Element docEl = payloadDoc.getDocumentElement();
        AssertionWrapper assertion = SAMLUtils.createAssertion(message);
       
        QName rootName = DOMUtils.getElementQName(payloadDoc.getDocumentElement());
        if (rootName.equals(envelopeQName)) {
            docEl.appendChild(assertion.toDOM(payloadDoc));
            return payloadDoc;
        }
       
        Document newDoc = DOMUtils.createDocument();
       
View Full Code Here

Examples of org.apache.ws.security.saml.ext.AssertionWrapper.toDOM()

        Element root =
            newDoc.createElementNS(envelopeQName.getNamespaceURI(),
                    envelopeQName.getPrefix() + ":" + envelopeQName.getLocalPart());
        newDoc.appendChild(root);
       
        Element assertionEl = assertion.toDOM(newDoc);
        root.appendChild(assertionEl);
       
        payloadDoc.removeChild(docEl);
        newDoc.adoptNode(docEl);
        root.appendChild(docEl);
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.