Creates wrapper klasses in Kotlin for CXF java classes generated from WSDL specifications.
- Data classes for all DTO's
- Even for inheritance
- Enforces nullability in spec, with Kotlin nullability
- Eliminates JAXBElement bonanza
How it works
It does some enhancements in the conversion:
required=trueannotations on fields, and sets the nullability of the fields in the Kotlin version accordingly
- Eliminates XMLElement bonanza
- Converts inheritance to interfaces and data classes, so that every DTO have the data class abilities (automatic .equals, .copy-methods etc.)
This in written in Rust, and can be cross-compiled to binaries that can be included in a gradle/maven plugin. This can be set up to be run after Apache CXF wsdl2java.
A more automatic setup would be to use the cxf-codegen-plugin, and have a similar gradle/maven plugin for this repo run after that.
TODO: add gradle/maven plugin
This setup requires some installs, but does not require running in a docker-container, and is as a result dramatically faster.
brew uninstall rust # conflicts with rustup curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
- Install linux target
rustup target add x86_64-unknown-linux-musl
- Install MUSL based CCC
brew install filosottile/musl-cross/musl-cross ln -s /usr/local/opt/musl-cross/bin/x86_64-linux-musl-gcc /usr/local/bin/musl-gcc
Download this, unpack, put somewhere logical, and update the path in