application/xml attachments not working
tze opened this issue ยท 10 comments
Hi,
attachments of type application/xml
do not work as expected for me.
Using java -jar validationtool-1.4.0/validationtool-1.4.0-standalone.jar -s validator-configuration-xrechnung_2.0.0_2020-07-31/scenarios.xml
with the attached files yields the following results.
XRechnung-UBL-2020-12-17-with-xml-attachment-and-extension-urn.xml
Rejected but expected to be valid.
--------------------------------------------------------------------------------------------------------------------------------------------------------------
|filename |Schema |Schematron|Acceptance|Error/Description |
| XRechnung-UBL-2020-12-17-with-xml-attachment-and-extension-urn.xml | Y | N | REJECT | [BR-CL-24]-For Mime code in attribute use MIMEMediaType. |
--------------------------------------------------------------------------------------------------------------------------------------------------------------
Acceptable: 0 Rejected: 1
XRechnung-CEFACT-2020-12-17-with-xml-attachment-and-extension-urn.xml
Rejected but expected to be valid.
---------------------------------------------------------------------------------------------------------------------------
|filename |Schema |Schematron|Acceptance|Error/Description |
| XRechnung-CEFACT-2020-12-17-with-xml-attachment-and-extension-urn.xml | N | Y | REJECT | |
---------------------------------------------------------------------------------------------------------------------------
Acceptable: 0 Rejected: 1
XRechnung-CEFACT-2020-12-17-with-xml-attachment-without-extension-urn.xml
Accepted but expected to be invalid.
-------------------------------------------------------------------------------------------------------------------------------
|filename |Schema |Schematron|Acceptance|Error/Description |
| XRechnung-CEFACT-2020-12-17-with-xml-attachment-without-extension-urn.xml | Y | Y |ACCEPTABLE| |
-------------------------------------------------------------------------------------------------------------------------------
Acceptable: 1 Rejected: 0
XRechnung-CEFACT-2020-12-17-with-invalid-attachment-without-extension-urn.xml
Accepted but expected to be invalid. I think this hints at #20 being unresolved for CEFACT.
---------------------------------------------------------------------------------------------------------------------------------------
|filename |Schema |Schematron|Acceptance|Error/Description |
| XRechnung-CEFACT-2020-12-17-with-invalid-attachment-without-extension-urn.xml | Y | Y |ACCEPTABLE| |
---------------------------------------------------------------------------------------------------------------------------------------
Acceptable: 1 Rejected: 0
Github-KoSIT-Validator-Configuration-Issue-40-XML-test-files.zip
Originally posted by @tze in #40 (comment)
Still an issue with the new 2.0.1 config from today https://github.com/itplr-kosit/validator-configuration-xrechnung/releases/tag/release-2020-12-31
Now, I see it. Indeed I did not fix it. Will fix it now.
@rkottmann Eventually <customLevel level="info">BR-CL-24</customLevel>
is missing in the scenario.xml?
@phax think so too (site remark: why is /Invoice/cac:AdditionalDocumentReference/cac:Attachment/cbc:EmbeddedDocumentBinaryObject not listed here https://docs.peppol.eu/poacc/billing/3.0/codelist/ICD/ ?)
solving this issues, raised a little bug in the validator itself. Also fixing this right now.
@rkottmann The correct code list would be https://docs.peppol.eu/poacc/billing/3.0/codelist/MimeCode/ - it's not an ISO6523 value here. Or what am I missing?
I missed it and looked at error message BR-CL-21 ๐
OK,
First, let me say that application/xml mime type is an XRechnung Extension to the EN 16931 which we currently implemented for UBL Invoice only. Hence, you can not use this mime type in CII Syntax (we are working on this, but there are many corner stones on the road...).
Therefore, for this commit fbb42f5 the configuration only accepts application/xml in UBL Invoice and rejects it in CreditNote and CEFACT.
Currently, this fix only works with the soon to be released validator 1.4.1. After the newest validator has been released within the next working days, we will also release a new version of this configuration.
Thank you very much for fast testing and supply of test invoices!! That was super helpful (altough I still overlooked the main issue for quiet some time...)
BTW. although CEN rules, do not check for this, the date in CII should be without -
<udt:DateTimeString format="102">2020-12-17</udt:DateTimeString> e.g. in XRechnung-CEFACT-2020-12-17-with-invalid-attachment-without-extension-urn.xml
in case somone wants to use this fix already now, needs to compile this version of the validator https://github.com/itplr-kosit/validator/tree/72-allow-more-than-3-customlevel-elements-in-scenarios