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

Request for adding Status Code Enum #34

Open
CHANist opened this issue Sep 28, 2021 · 2 comments
Open

Request for adding Status Code Enum #34

CHANist opened this issue Sep 28, 2021 · 2 comments

Comments

@CHANist
Copy link

CHANist commented Sep 28, 2021

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.

@pauljohe-dnb
Copy link

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.

@zubri
Copy link
Member

zubri commented Jan 5, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants