Search This Blog

Thursday

Java class to xsd file generation


By: Md Mahfuj Jia

Introduction: Today I will show u how to generate xsd (XML Schema Definition) from pure java class. As we know the data contact first approach is the industry oriented best practice in writing soap based web service so we need to determine data transformation object (dto) in xsd. xsd writing manually is a time consuming for a big enterprise application. We can easily save time by generating entity class to xsd file. xsd to java class (dto) generation will be done by your IDE (Netbeans, Eclipse, xjc compiler) but java class to xsd generation support is rare.

Project snapshots:

Image: 1 –log4j.properties file describes where your xsd file will be saved and set other necessary properties.
Image: 2 –In line number 38, you just give your java class to generate xsd.
























Download source from here:

Happy coding…..

1 comment:

  1. Very nice article
    Dear sir, for your attention please put zip file into dropbox Public folder.

    ReplyDelete

Thanks for your opinion