How could I make the XSD schema string element(password) as type encrypted, This in turn would be used in XSD to java code generator encrypt and decrypt during Writing/Reading process of XML not just validation.
Does any XSD to java class generator provide this feature ??
Cheers, Reddy.
You can use an XmlAdapter to control how the data is converted between XML and Java. This XmlAdapter is used to hook in your own encryption logic.
Below is a link to an answer I gave that demonstrates how to create an XmlAdapter when generating the model from XML Schema.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With