Code example for DatatypeFactory

Methods: newXMLGregorianCalendar

0
        } catch (DatatypeConfigurationException dce) {
            throw logger.wsTrustUnableToGetDataTypeFactory(dce);
        } 
 
        // normalize the parameters (convert to UTC). 
        this.created = factory.newXMLGregorianCalendar(created).normalize();
        this.expires = factory.newXMLGregorianCalendar(expires).normalize();
 
        // set the delegate fields. 
        this.delegate = new LifetimeType();
        AttributedDateTime dateTime = new AttributedDateTime();
        dateTime.setValue(this.created.toXMLFormat());
        this.delegate.setCreated(dateTime);
        dateTime = new AttributedDateTime();
        dateTime.setValue(this.expires.toXMLFormat());
        this.delegate.setExpires(dateTime);
 
    } 
 
    /** 
Experience pair programming with AI  Get Codota for Java