When I use the UBL Marshaller, the XML is not generated completely; it always gets cut off at line 74. Does anyone know where my mistake is? Here is the code snippet:
private static InputStream invoiceToXmlAsInputStream(InvoiceType invoice) throws ReformException {
InputStream inputStream;
try {
UBL21Marshaller.UBL21JAXBMarshaller<InvoiceType> marshaller = UBL21Marshaller.invoice();
ByteBufferOutputStream byteBufferOutputStream = new ByteBufferOutputStream();
marshaller.setCharset(StandardCharsets.UTF_8);
marshaller.setFormattedOutput(true);
marshaller.write(invoice, byteBufferOutputStream);
inputStream = new ByteArrayInputStream(byteBufferOutputStream.getAsByteArray());
}
catch (Exception ex) {
LOGGER.error("UBL/XRechnung konnte nicht erstellt werden", ex);
throw new ReformException(
Translator.tr("UBL/XRechnung konnte nicht erstellt werden, bitte kontaktieren Sie den Support.", ReformHttpSession.getLocale()));
}
return inputStream;
}
Hello, I have a question,
When I use the UBL Marshaller, the XML is not generated completely; it always gets cut off at line 74. Does anyone know where my mistake is? Here is the code snippet: