Package javax.xml.datatype

Examples of javax.xml.datatype.XMLGregorianCalendar.toXMLFormat()


    public void testFutureCreated() throws Exception {
        GregorianCalendar createdCalendar = new GregorianCalendar();
        createdCalendar.add(Calendar.SECOND, 120);
        XMLGregorianCalendar created =
            WSSConstants.datatypeFactory.newXMLGregorianCalendar(createdCalendar);
        String createdString = created.toXMLFormat();
       
        String digest =
            org.apache.wss4j.dom.message.token.UsernameToken.doPasswordDigest(
                "Ex2YEKVvsa1Qne1m6TM8XA==", createdString, "default"
            );
View Full Code Here


            DatatypeFactory datatypeFactory = DatatypeFactory.newInstance();
            GregorianCalendar gregorianCalendarCreated = new GregorianCalendar();
            gregorianCalendarCreated.add(Calendar.SECOND, 40);
            XMLGregorianCalendar xmlGregorianCalendarCreated = datatypeFactory.newXMLGregorianCalendar(gregorianCalendarCreated);
            created.setTextContent(xmlGregorianCalendarCreated.toXMLFormat());

            GregorianCalendar gregorianCalendarExpires = new GregorianCalendar();
            gregorianCalendarExpires.add(Calendar.SECOND, 300);
            XMLGregorianCalendar xmlGregorianCalendarExpires = datatypeFactory.newXMLGregorianCalendar(gregorianCalendarExpires);
View Full Code Here

            GregorianCalendar gregorianCalendarExpires = new GregorianCalendar();
            gregorianCalendarExpires.add(Calendar.SECOND, 300);
            XMLGregorianCalendar xmlGregorianCalendarExpires = datatypeFactory.newXMLGregorianCalendar(gregorianCalendarExpires);

            expires.setTextContent(xmlGregorianCalendarExpires.toXMLFormat());

            javax.xml.transform.Transformer transformer = TRANSFORMER_FACTORY.newTransformer();
            transformer.transform(new DOMSource(securedDocument), new StreamResult(baos));
        }
View Full Code Here

            DatatypeFactory datatypeFactory = DatatypeFactory.newInstance();
            GregorianCalendar gregorianCalendarCreated = new GregorianCalendar();
            gregorianCalendarCreated.add(Calendar.HOUR, 2);
            XMLGregorianCalendar xmlGregorianCalendarCreated = datatypeFactory.newXMLGregorianCalendar(gregorianCalendarCreated);
            created.setTextContent(xmlGregorianCalendarCreated.toXMLFormat());

            GregorianCalendar gregorianCalendarExpires = new GregorianCalendar();
            gregorianCalendarExpires.add(Calendar.HOUR, 2);
            gregorianCalendarExpires.add(Calendar.SECOND, 300);
            XMLGregorianCalendar xmlGregorianCalendarExpires = datatypeFactory.newXMLGregorianCalendar(gregorianCalendarExpires);
View Full Code Here

            GregorianCalendar gregorianCalendarExpires = new GregorianCalendar();
            gregorianCalendarExpires.add(Calendar.HOUR, 2);
            gregorianCalendarExpires.add(Calendar.SECOND, 300);
            XMLGregorianCalendar xmlGregorianCalendarExpires = datatypeFactory.newXMLGregorianCalendar(gregorianCalendarExpires);

            expires.setTextContent(xmlGregorianCalendarExpires.toXMLFormat());

            javax.xml.transform.Transformer transformer = TRANSFORMER_FACTORY.newTransformer();
            transformer.transform(new DOMSource(securedDocument), new StreamResult(baos));
        }
View Full Code Here

    @Test
    public void testReusedNonce() throws Exception {
       
        XMLGregorianCalendar created =
            WSSConstants.datatypeFactory.newXMLGregorianCalendar(new GregorianCalendar());
        String createdString = created.toXMLFormat();
        String digest =
            org.apache.wss4j.dom.message.token.UsernameToken.doPasswordDigest(
                "Ex2YESUvsa1qne1m6TM8XA==", createdString, "default"
            );
       
View Full Code Here

       
        GregorianCalendar createdCalendar = new GregorianCalendar();
        createdCalendar.add(Calendar.SECOND, -301);
        XMLGregorianCalendar created =
            WSSConstants.datatypeFactory.newXMLGregorianCalendar(createdCalendar);
        String createdString = created.toXMLFormat();
       
        String digest =
            org.apache.wss4j.dom.message.token.UsernameToken.doPasswordDigest(
                "Ex2YEKVvsa1qne1m6TM8XA==", createdString, "default"
            );
View Full Code Here

    public void testNearFutureCreated() throws Exception {
        GregorianCalendar createdCalendar = new GregorianCalendar();
        createdCalendar.add(Calendar.SECOND, 30);
        XMLGregorianCalendar created =
            WSSConstants.datatypeFactory.newXMLGregorianCalendar(createdCalendar);
        String createdString = created.toXMLFormat();
       
        String digest =
            org.apache.wss4j.dom.message.token.UsernameToken.doPasswordDigest(
                "Ex2YEKVvSa1qne1m6TM8XA==", createdString, "default"
            );
View Full Code Here

    public void testFutureCreated() throws Exception {
        GregorianCalendar createdCalendar = new GregorianCalendar();
        createdCalendar.add(Calendar.SECOND, 120);
        XMLGregorianCalendar created =
            WSSConstants.datatypeFactory.newXMLGregorianCalendar(createdCalendar);
        String createdString = created.toXMLFormat();
       
        String digest =
            org.apache.wss4j.dom.message.token.UsernameToken.doPasswordDigest(
                "Ex2YEKVvsa1Qne1m6TM8XA==", createdString, "default"
            );
View Full Code Here

            XMLGregorianCalendar created = null;
            String createdStr = "";
            if (usernameTokenPasswordType == WSSConstants.UsernameTokenPasswordType.PASSWORD_DIGEST
                || ((WSSSecurityProperties) getSecurityProperties()).isAddUsernameTokenCreated()) {
                created = WSSConstants.datatypeFactory.newXMLGregorianCalendar(new GregorianCalendar());
                createdStr = created.toXMLFormat();
            }

            final OutputProcessor outputProcessor = this;

            final OutboundUsernameSecurityToken usernameSecurityToken =
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.