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. ThisXmlAdapter
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.