https://kotlinlang.org logo
#ktor
Title
# ktor
p

Paul Meshkovsky

11/02/2023, 8:55 PM
Any approaches for KTOR Client to ser/der XML data utilizing JAXB java based framework ?
e

e5l

11/03/2023, 12:03 PM
Hey, you can write a custom serializer for ContentNegotiation plugin: https://ktor.io/docs/serialization.html#implement_custom_serializer
1
🙌 1
h

hfhbd

11/03/2023, 3:24 PM
I have a similar usecase, we used Apache cfx to create Jaxb classes from wsdl files in the past. But instead using jaxb I wrote a wsdl Ktor/Kotlinx code generator.
p

Paul Meshkovsky

11/06/2023, 12:48 AM
Cool I take it it's not OSS right thats from a WSDL we only have XSD.
Also for CXF you could have implemented all your Services Impl in Kotlin as other generated stubs could have been JAVA 👍. As all generated code should never been in source code. That's Just how I typically approach this :)
Thank you @e5l
h

hfhbd

11/06/2023, 6:30 AM
It’s not yet open source but I plan to release it. While we could rely on the generated service we don’t want to use the generated Java classes but Kotlin to reuse them on other Kotlin platforms, mostly JS.
👍 1
6 Views