Search in sources :

Example 1 with ObjectFactory

use of xades4j.xml.bind.xades.ObjectFactory in project xades4j by luisgoncalves.

the class ToXmlArchiveTimeStampConverter method insertIntoObjectTree.

@Override
protected void insertIntoObjectTree(XmlXAdESTimeStampType xmlTimeStamp, XmlUnsignedPropertiesType xmlProps, ArchiveTimeStampData propData) {
    JAXBElement<XmlXAdESTimeStampType> xmlArchTS = new ObjectFactory().createArchiveTimeStampV2(xmlTimeStamp);
    xmlProps.getUnsignedSignatureProperties().getAny().add(xmlArchTS);
}
Also used : ObjectFactory(xades4j.xml.bind.xades.ObjectFactory) XmlXAdESTimeStampType(xades4j.xml.bind.xades.XmlXAdESTimeStampType)

Example 2 with ObjectFactory

use of xades4j.xml.bind.xades.ObjectFactory in project xades4j by luisgoncalves.

the class BaseJAXBMarshaller method doJAXBMarshalling.

private void doJAXBMarshalling(Node qualifyingPropsNode, TXml xmlProps) throws MarshalException {
    try {
        // Create the JAXB marshaller.
        JAXBContext jaxbContext = jaxbContexts.get(xmlProps.getClass());
        Marshaller marshaller = jaxbContext.createMarshaller();
        // Create the root JAXBElement.
        Object propsElem = createPropsXmlElem(new ObjectFactory(), xmlProps);
        // Marshal the properties.
        marshaller.marshal(propsElem, qualifyingPropsNode);
    } catch (JAXBException ex) {
        throw new MarshalException("Error on JAXB marshalling", ex);
    }
}
Also used : Marshaller(javax.xml.bind.Marshaller) ObjectFactory(xades4j.xml.bind.xades.ObjectFactory) JAXBException(javax.xml.bind.JAXBException) JAXBContext(javax.xml.bind.JAXBContext) PropertyDataObject(xades4j.properties.data.PropertyDataObject)

Aggregations

ObjectFactory (xades4j.xml.bind.xades.ObjectFactory)2 JAXBContext (javax.xml.bind.JAXBContext)1 JAXBException (javax.xml.bind.JAXBException)1 Marshaller (javax.xml.bind.Marshaller)1 PropertyDataObject (xades4j.properties.data.PropertyDataObject)1 XmlXAdESTimeStampType (xades4j.xml.bind.xades.XmlXAdESTimeStampType)1