Package org.w3c.dom

Examples of org.w3c.dom.Element.cloneNode()


                             break;
                          }
                       }
                      
                       if (el != null) {
                          attrs.add(new Attribute(name, el.cloneNode(true)));
                       }
                       else {
                          attrs.add(new Attribute(name, null));
                       }
                   }
View Full Code Here


/* 472 */               el = (Element)n;
/* 473 */               break;
/*     */             }
/*     */
/* 477 */             if (el != null) {
/* 478 */               attrs.add(new Attribute(name, el.cloneNode(true)));
/*     */             }
/*     */             else {
/* 481 */               attrs.add(new Attribute(name, null));
/*     */             }
/*     */           }
View Full Code Here

                   
                    Element encDataElem =
                        WSSecurityUtil.findElementById(
                            document.getDocumentElement(), xencEncryptedDataId, null
                        );
                    Node clone = encDataElem.cloneNode(true);
                    elem.appendChild(clone);
                    encDataElem.getParentNode().appendChild(elem);
                    encDataElem.getParentNode().removeChild(encDataElem);
                } else {
                    xmlCipher.init(XMLCipher.ENCRYPT_MODE, secretKey);
View Full Code Here

    }

    protected void signAssertion(Document samlDocument) throws ProcessingException {
        Element originalAssertionElement = DocumentUtil.getChildElement(samlDocument.getDocumentElement(), new QName(JBossSAMLURIConstants.ASSERTION_NSURI.get(), JBossSAMLConstants.ASSERTION.get()));
        if (originalAssertionElement == null) return;
        Node clonedAssertionElement = originalAssertionElement.cloneNode(true);
        Document temporaryDocument;

        try {
            temporaryDocument = DocumentUtil.createDocument();
        } catch (ConfigurationException e) {
View Full Code Here

        soapOperation = requiresSOAP12 ? SOAP12_OPERATION : SOAP_OPERATION;
    }

    public Definition cloneDefinition(WSDLFactory factory, Definition definition) throws WSDLException {
        Element root = definition.getDocumentationElement();
        root = (Element)root.cloneNode(true);
        WSDLReader reader = factory.newWSDLReader();
        return reader.readWSDL(definition.getDocumentBaseURI(), root);
    }
   
    public Types createTypes(Definition definition) {
View Full Code Here

        }

        if (isSAMLResponse(samlDocument)) {
            if (isSignAssertionOnly() || isSignResponseAndAssertion()) {
                Element originalAssertionElement = DocumentUtil.getChildElement(samlDocument.getDocumentElement(), new QName(JBossSAMLURIConstants.ASSERTION_NSURI.get(), JBossSAMLConstants.ASSERTION.get()));
                Node clonedAssertionElement = originalAssertionElement.cloneNode(true);
                Document temporaryDocument;

                try {
                    temporaryDocument = DocumentUtil.createDocument();
                } catch (ConfigurationException e) {
View Full Code Here

                }
               
                //TODO: remove these expensive conversions
                Element imported = (Element)secureMessage.getSOAPPart().importNode(strElem,true);
                str = new SecurityTokenReference(
                        XMLUtil.convertToSoapElement(secureMessage.getSOAPPart(), (Element)imported.cloneNode(true)), false);
               
                if (origKey != null) {
                    SecurityUtil.updateSamlVsKeyCache(str, context, origKey);
                }
               
View Full Code Here

                        //TODO: remove these expensive conversions
                        Element imported = (Element)
                        secureMessage.getSOAPPart().importNode(strElem,true);
                        SecurityTokenReference str = new SecurityTokenReference(
                                XMLUtil.convertToSoapElement(secureMessage.getSOAPPart(),
                                (Element)imported.cloneNode(true)), false);
                       
                        if (tokenElem != null) {
                            if(includeToken) {
                                secureMessage.findOrCreateSecurityHeader().
                                        insertHeaderBlockElement(tokenElem);
View Full Code Here

                    //TODO: remove these expensive conversions
                    Element imported = (Element)
                    secureMessage.getSOAPPart().importNode(strElem,true);
                    SecurityTokenReference str = new SecurityTokenReference(
                            XMLUtil.convertToSoapElement(secureMessage.getSOAPPart(),
                            (Element)imported.cloneNode(true)), false);
                   
                    if (tokenElem != null) {
                        if(includeToken) {
                            secureMessage.findOrCreateSecurityHeader().
                                    insertHeaderBlockElement(tokenElem);
View Full Code Here

                }
               
                //TODO: remove these expensive conversions
                Element imported = (Element)secureMessage.getSOAPPart().importNode(strElem,true);
                str = new SecurityTokenReference(
                        XMLUtil.convertToSoapElement(secureMessage.getSOAPPart(), (Element)imported.cloneNode(true)), false);
               
                if (originalKey != null) {
                    SecurityUtil.updateSamlVsKeyCache(str, context, originalKey);
                }
               
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.