- File file = new File(fileInfo.getFinalname());
- unmarshalled = ((ConfigSnapshot) um.unmarshal(file));
+ XMLInputFactory xif = XMLInputFactory.newFactory();
+ xif.setProperty(XMLInputFactory.IS_SUPPORTING_EXTERNAL_ENTITIES, false);
+ xif.setProperty(XMLInputFactory.SUPPORT_DTD, false);
+ try {
+ XMLStreamReader xsr = xif.createXMLStreamReader(new StreamSource(new File(fileInfo.getFinalname())));
+ unmarshalled = ((ConfigSnapshot) um.unmarshal(xsr));
+ } catch (final XMLStreamException e) {
+ throw new JAXBException(e);
+ }