prowide-iso20022 icon indicating copy to clipboard operation
prowide-iso20022 copied to clipboard

Request for adding Status Code Enum

Open CHANist opened this issue 3 years ago • 2 comments

As found in https://www.iso20022.org/milestone/12511/download, it lists all the available status codes. However, in the library, it just return a String instead.

So it may be better if a complete status code list is added in the library.

CHANist avatar Sep 28 '21 09:09 CHANist

The link is to a change request to the status codes back in Q2 2010 (12 years old). All ISO-20022 external codes are in the external code sets: https://www.iso20022.org/catalogue-messages/additional-content-messages/external-code-sets .

It should be possible to include the XSD version of the external code sets and then add some JAXB bindings to the JAXB generation to map add in the enums (must be done for all versions of the files as these are not specified to a given version).

I'd look into it and do a PR, but the source code is missing the JAXB code generation.

pauljohe-dnb avatar Jan 05 '22 12:01 pauljohe-dnb

Hi Paul, thanks for the input.

Since there are too many message types to cover the whole current and historic standard, the generated model is not the plain output from a xjc run. The actual code generation it is quite complex and we have it as a decoupled project driven by gradle tasks.

We first generate the default model with xjc, for all XSDs. And afterwards we run a custom Java process to merge model classes. Thus instead of having a package per namespace, we bundle all element classes in a single package removing duplicates. The duplicate rate of a default xjc generation is above 70%. Along this, we also use a custom jaxb plugin to include additional code in the model.

This custom process/model is the key feature of this library.

zubri avatar Jan 05 '22 15:01 zubri