use of org.xipki.ca.certprofile.x509.jaxb.ObjectFactory in project xipki by xipki.
the class ProfileConfCreatorDemo method marshall.
// method main
private static void marshall(Marshaller marshaller, X509ProfileType profile, String filename) throws Exception {
File file = new File("tmp", filename);
file.getParentFile().mkdirs();
JAXBElement<X509ProfileType> root = new ObjectFactory().createX509Profile(profile);
FileOutputStream out = new FileOutputStream(file);
try {
marshaller.marshal(root, out);
} catch (JAXBException ex) {
throw XmlUtil.convert(ex);
} finally {
out.close();
}
System.out.println("Generated certprofile in " + filename);
}
Aggregations