Search This Blog

Lets go..




Manage your Inventory | Grow your restaurant business | Manage your Employee | Control your accounts
Showing posts with label Java XML Schema Definition. Show all posts
Showing posts with label Java XML Schema Definition. Show all posts

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