Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

application/xml attachments not working #49

Closed
tze opened this issue Dec 18, 2020 · 10 comments
Closed

application/xml attachments not working #49

tze opened this issue Dec 18, 2020 · 10 comments
Assignees
Labels
bug Something isn't working

Comments

@tze
Copy link

tze commented Dec 18, 2020

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)

@tze
Copy link
Author

tze commented Dec 18, 2020

@rkottmann
Copy link
Member

rkottmann commented Dec 18, 2020

@lkumai may I ask you to also have a look at this one here?

@rkottmann
Copy link
Member

Now, I see it. Indeed I did not fix it. Will fix it now.

@phax
Copy link
Collaborator

phax commented Dec 18, 2020

@rkottmann Eventually <customLevel level="info">BR-CL-24</customLevel> is missing in the scenario.xml?

@rkottmann
Copy link
Member

@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.

@phax
Copy link
Collaborator

phax commented Dec 18, 2020

@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?

@rkottmann
Copy link
Member

I missed it and looked at error message BR-CL-21 🙄

@rkottmann rkottmann added the bug Something isn't working label Dec 18, 2020
@rkottmann
Copy link
Member

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

@rkottmann
Copy link
Member

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

@lkumai
Copy link
Contributor

lkumai commented Dec 21, 2020

@tze This should be fixed now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants