Package org.picketlink.identity.federation.ws.trust

Examples of org.picketlink.identity.federation.ws.trust.RenewingType


    }
   


    public static RenewingType parseRenewingType(XMLEventReader xmlEventReader) throws ParsingException {
        RenewingType renewingType = new RenewingType();

        StartElement startElement = StaxParserUtil.getNextStartElement(xmlEventReader);
        StaxParserUtil.validate(startElement, WSTrustConstants.RENEWING);

        Attribute allowAttribute = startElement.getAttributeByName(new QName(WSTrustConstants.ALLOW));
        if (allowAttribute != null) {
            renewingType.setAllow(Boolean.parseBoolean(StaxParserUtil.getAttributeValue(allowAttribute)));
        }

        Attribute okAttribute = startElement.getAttributeByName(new QName(WSTrustConstants.OK));
        if (allowAttribute != null) {
            renewingType.setOK(Boolean.parseBoolean(StaxParserUtil.getAttributeValue(okAttribute)));
        }

        EndElement endElement = StaxParserUtil.getNextEndElement(xmlEventReader);
        StaxParserUtil.validate(endElement, WSTrustConstants.RENEWING);
        return renewingType;
View Full Code Here


                    WSTrustConstants.BASE_NAMESPACE);
            StaxUtil.writeEndElement(this.writer);
        }

        if (response.getRenewing() != null) {
            RenewingType renewingType = response.getRenewing();
            StaxUtil.writeStartElement(this.writer, WSTrustConstants.PREFIX, WSTrustConstants.RENEWING,
                    WSTrustConstants.BASE_NAMESPACE);

            StaxUtil.writeAttribute(this.writer, WSTrustConstants.ALLOW, "" + renewingType.isAllow());
            StaxUtil.writeAttribute(this.writer, WSTrustConstants.OK, "" + renewingType.isOK());
            StaxUtil.writeEndElement(this.writer);
        }

        // write the response end element.
        StaxUtil.writeEndElement(this.writer);
View Full Code Here

        assertEquals("testcontext", requestToken.getContext());
        assertEquals(WSTrustConstants.ISSUE_REQUEST, requestToken.getRequestType().toASCIIString());
        assertEquals(SAMLUtil.SAML2_TOKEN_TYPE, requestToken.getTokenType().toASCIIString());
       
        RenewingType renewingType = requestToken.getRenewing();
        assertNotNull(renewingType);
        assertTrue(renewingType.isAllow());
        assertFalse(renewingType.isOK());
       
        // Now for the writing part
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        WSTrustRequestWriter rstWriter = new WSTrustRequestWriter(baos);
View Full Code Here

TOP

Related Classes of org.picketlink.identity.federation.ws.trust.RenewingType

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.