Code example for DatatypeFactory

Methods: newXMLGregorianCalendar

0
            throw logger.wsTrustUnableToGetDataTypeFactory(dce);
        } 
        this.delegate = lifetime;
 
        // construct the created and expires instances from the lifetime object. 
        this.created = factory.newXMLGregorianCalendar(lifetime.getCreated().getValue());
        this.expires = factory.newXMLGregorianCalendar(lifetime.getExpires().getValue());
 
        // check if the supplied lifetime needs to be normalized. 
        if (this.created.getTimezone() != 0) {
            this.created = this.created.normalize();
            this.delegate.getCreated().setValue(this.created.toXMLFormat());
        } 
        if (this.expires.getTimezone() != 0) {
            this.expires = this.expires.normalize();
            this.delegate.getExpires().setValue(this.expires.toXMLFormat());
        } 
    } 
 
    /**