ยฉ 2026 Hedgehog Software, LLC
java.lang.ClassNotFoundException: lt.mycompany.myapp.service.XmlParserUtil
XmlParserUtil
@Service public class XmlParserUtil { private StatementDocumentWrapper convertToV053s02(InputStream is) throws JAXBException { JAXBContext jaxbContext = JAXBContext.newInstance(ObjectFactory.class); Unmarshaller jaxbUnmarshaller = jaxbContext.createUnmarshaller(); Document doc = ((JAXBElement<Document>) jaxbUnmarshaller.unmarshal(is)).getValue(); StatementDocumentWrapper sDoc = new StatementV053S02DocumentWrapper(doc); return sDoc; } private StatementDocumentWrapper convertToV052s02(InputStream is) throws JAXBException { JAXBContext jaxbContext = JAXBContext.newInstance(lt.mycompany.iso20022.camt.v052s02.ObjectFactory.class); Unmarshaller jaxbUnmarshaller = jaxbContext.createUnmarshaller(); lt.mycompany.iso20022.camt.v052s02.Document doc = ((JAXBElement<lt.mycompany.iso20022.camt.v052s02.Document>) jaxbUnmarshaller.unmarshal(is)).getValue(); StatementDocumentWrapper sDoc = new StatementV052S02DocumentWrapper(doc); return sDoc; } public StatementDocumentWrapper InputStreamToDocument(InputStream is) throws JAXBException, IOException { byte[] bytes = is.readAllBytes(); StatementDocumentWrapper sd; try { sd = convertToV053s02(new ByteArrayInputStream(bytes)); } catch (UnmarshalException e) { sd = convertToV052s02(new ByteArrayInputStream(bytes)); } return sd; } }