Saturday, July 3, 2010

JAXB generate Java classes from xsd

Using Excel, I have mapped a MFL to a XSD; now I want to generate the Java classes corresponding to the XSDs. JAX-WS uses JAXB as data binding, so:

http://java.sun.com/webservices/docs/1.6/jaxb/xjc.html

I use xjc.bat to generate the Java classes.

The alternative is: create a WebLogic WebService project, copy there your XSD, right click and "WebLogic WebServices / generate JAXB types", which internally invokes the XJC2Task Ant task.



No comments: