Is it possible to auto-generate a Java class from a DTD?

I have web service DTD files, now I need to map the database to these web services, and I need Java classes to create my objects. But doing it manually from DTD files would be a very difficult and lengthy process. Are there any tools for this?

+3
source share
3 answers

Isn't this work for JAXB ?

+2
source

xjc -dtd -d generatedsrc -p com.examples log4j.dtd

will generate classes in the generatesrc directory, and the package used will be com.examples.

You can find more information here: http://www.javaworld.com/community/node/7622

+3
source

, . ? "": SOAP Axis Ant/Maven - Eclipse. , .

0
source

Source: https://habr.com/ru/post/1787423/


All Articles