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);
}
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);
}
}
Aggregations