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
XmlAdapterto control how the data is converted between XML and Java. ThisXmlAdapteris used to hook in your own encryption logic.Below is a link to an answer I gave that demonstrates how to create an
XmlAdapterwhen generating the model from XML Schema.