Closed artjomsk closed 6 years ago
DocumentTypeIdentifier.parse(String) expects the parsed identifier to contain scheme as presented in the SMP. To me it looks like the scheme is not provided, thus is it "magically" "fixed" by using the toString() method, however it breaks lookup in SMP.
Also building the Header object yourself should not be done. Header information should be provided by the sniffer itself or the provided SBDH. Any other way may result in transmissions not compatible with OpenPEPPOL.
Sorry, don't completely understand first paragraph.
DocumentTypeIdentifier.parse(String) expects the parsed identifier to contain scheme
Yes, so scheme is provided, but not used in transforming DocumentTypeIdentifier to PeppolDocumentTypeId. Maybe not related to the issue, but you can see in opposite conversion PeppolDocumentTypeId.toVefa() that toString() is used there:
public DocumentTypeIdentifier toVefa() {
return DocumentTypeIdentifier.of(toString());
}
So why not to use toString() where I've updated in commit 78e146e ?
About building the Header object yourself. We want to have more control over sending process. It's clear, that Oxalis is made to work simply and correctly out of the box. Overriding values with TransmissionRequestBuilder still results in parsing document (possibly large) to create SBDH. But we have those values in system and don't need extra parsing.
Ok, now it's clear what did you mean by scheme :) Added prefix "cenbii-procid-ubl::" to DocumentTypeIdentifier.parse argument and the change is not needed.
Thank you!
Hi! Getting following error with oxalis-4.0.0-RC3:
What I'm doing is building SBDH header manually like:
I suppose scheme is missing during conversion from DocumentTypeIdentifier to PeppolDocumentTypeId