3

I have DTD files of web service, now I need to map database to this web services and I need Java classes to create my entities. But doing this manually from DTD files would be very hard and long process. Is there any tools for this?

newbie
  • 24,286
  • 80
  • 201
  • 301

3 Answers3

3

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

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

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

surya
  • 991
  • 1
  • 12
  • 22
2

Isn't it a job for JAXB ?

Riduidel
  • 22,052
  • 14
  • 85
  • 185
0

The problem is usually more than entity binding however. What about the transport or representing the services themselves? My preference depends on the 'flavor': for SOAP, I'd use the Axis Ant/Maven tasks or the Eclipse web service tools. REST, I wouldn't go past Jersey.

Danny Thomas
  • 1,879
  • 1
  • 18
  • 32