Examples of insertAttributeWithValue()


Examples of org.apache.xmlbeans.XmlCursor.insertAttributeWithValue()

    protected static void preserveSpaces(STXstring xs) {
        String text = xs.getStringValue();
        if (text != null && (text.startsWith(" ") || text.endsWith(" "))) {
            XmlCursor c = xs.newCursor();
            c.toNextToken();
            c.insertAttributeWithValue(new QName("http://www.w3.org/XML/1998/namespace", "space"), "preserve");
            c.dispose();
        }
    }

    /**
 
View Full Code Here

Examples of org.apache.xmlbeans.XmlCursor.insertAttributeWithValue()

    static void preserveSpaces(XmlString xs) {
        String text = xs.getStringValue();
        if (text != null && (text.startsWith(" ") || text.endsWith(" "))) {
            XmlCursor c = xs.newCursor();
            c.toNextToken();
            c.insertAttributeWithValue(new QName("http://www.w3.org/XML/1998/namespace", "space"), "preserve");
            c.dispose();
        }
    }

    /**
 
View Full Code Here

Examples of org.apache.xmlbeans.XmlCursor.insertAttributeWithValue()

        }
       
        cur.toFirstContentToken();
        if (hashAlgo == null) {
            int hash = CryptoFunctions.createXorVerifier1(password);
            cur.insertAttributeWithValue(getAttrName(prefix, "password"), Integer.toHexString(hash).toUpperCase());
        } else {
            SecureRandom random = new SecureRandom();
            byte salt[] = random.generateSeed(16);
   
            // Iterations specifies the number of times the hashing function shall be iteratively run (using each
View Full Code Here

Examples of org.apache.xmlbeans.XmlCursor.insertAttributeWithValue()

            // Implementation Notes List:
            // --> In this third stage, the reversed byte order legacy hash from the second stage shall
            //     be converted to Unicode hex string representation
            byte hash[] = CryptoFunctions.hashPassword(password, hashAlgo, salt, spinCount, false);
           
            cur.insertAttributeWithValue(getAttrName(prefix, "algorithmName"), hashAlgo.jceId);
            cur.insertAttributeWithValue(getAttrName(prefix, "hashValue"), DatatypeConverter.printBase64Binary(hash));
            cur.insertAttributeWithValue(getAttrName(prefix, "saltValue"), DatatypeConverter.printBase64Binary(salt));
            cur.insertAttributeWithValue(getAttrName(prefix, "spinCount"), ""+spinCount);
        }
        cur.dispose();
View Full Code Here

Examples of org.apache.xmlbeans.XmlCursor.insertAttributeWithValue()

            // --> In this third stage, the reversed byte order legacy hash from the second stage shall
            //     be converted to Unicode hex string representation
            byte hash[] = CryptoFunctions.hashPassword(password, hashAlgo, salt, spinCount, false);
           
            cur.insertAttributeWithValue(getAttrName(prefix, "algorithmName"), hashAlgo.jceId);
            cur.insertAttributeWithValue(getAttrName(prefix, "hashValue"), DatatypeConverter.printBase64Binary(hash));
            cur.insertAttributeWithValue(getAttrName(prefix, "saltValue"), DatatypeConverter.printBase64Binary(salt));
            cur.insertAttributeWithValue(getAttrName(prefix, "spinCount"), ""+spinCount);
        }
        cur.dispose();
    }
View Full Code Here

Examples of org.apache.xmlbeans.XmlCursor.insertAttributeWithValue()

            //     be converted to Unicode hex string representation
            byte hash[] = CryptoFunctions.hashPassword(password, hashAlgo, salt, spinCount, false);
           
            cur.insertAttributeWithValue(getAttrName(prefix, "algorithmName"), hashAlgo.jceId);
            cur.insertAttributeWithValue(getAttrName(prefix, "hashValue"), DatatypeConverter.printBase64Binary(hash));
            cur.insertAttributeWithValue(getAttrName(prefix, "saltValue"), DatatypeConverter.printBase64Binary(salt));
            cur.insertAttributeWithValue(getAttrName(prefix, "spinCount"), ""+spinCount);
        }
        cur.dispose();
    }
View Full Code Here

Examples of org.apache.xmlbeans.XmlCursor.insertAttributeWithValue()

            byte hash[] = CryptoFunctions.hashPassword(password, hashAlgo, salt, spinCount, false);
           
            cur.insertAttributeWithValue(getAttrName(prefix, "algorithmName"), hashAlgo.jceId);
            cur.insertAttributeWithValue(getAttrName(prefix, "hashValue"), DatatypeConverter.printBase64Binary(hash));
            cur.insertAttributeWithValue(getAttrName(prefix, "saltValue"), DatatypeConverter.printBase64Binary(salt));
            cur.insertAttributeWithValue(getAttrName(prefix, "spinCount"), ""+spinCount);
        }
        cur.dispose();
    }

    /**
 
View Full Code Here

Examples of org.apache.xmlbeans.XmlCursor.insertAttributeWithValue()

        XmlObject xo = XmlObject.Factory.newInstance();

        XmlCursor cursor = xo.newCursor();
        cursor.toNextToken();
        cursor.beginElement("a");
        cursor.insertAttributeWithValue("a", text);
        cursor.dispose();

        String elementText = xo.toString();
        int begin = elementText.indexOf('"');
        int end = elementText.lastIndexOf('"');
View Full Code Here

Examples of org.apache.xmlbeans.XmlCursor.insertAttributeWithValue()

            if (WsdlUtils.isAttachmentInputPart(part, bindingOperation)) {
                if (iface.getSettings().getBoolean(WsdlSettings.ATTACHMENT_PARTS)) {
                    XmlCursor c = cursor.newCursor();
                    c.toLastChild();
                    c.beginElement(part.getName());
                    c.insertAttributeWithValue("href", part.getName() + "Attachment");
                    c.dispose();
                }
            } else {
                if (wsdlContext.hasSchemaTypes()) {
                    QName typeName = part.getTypeName();
View Full Code Here

Examples of org.apache.xmlbeans.XmlCursor.insertAttributeWithValue()

            if (WsdlUtils.isAttachmentOutputPart(part, bindingOperation)) {
                if (iface.getSettings().getBoolean(WsdlSettings.ATTACHMENT_PARTS)) {
                    XmlCursor c = cursor.newCursor();
                    c.toLastChild();
                    c.beginElement(part.getName());
                    c.insertAttributeWithValue("href", part.getName() + "Attachment");
                    c.dispose();
                }
            } else {
                if (wsdlContext.hasSchemaTypes()) {
                    QName typeName = part.getTypeName();
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.