Issue: Unable to create java classes from cXML.dtd using java xjc
version I am using is 1.2.032
command used : xjc -dtd cXML.dtd
Error : parsing a schema... [ERROR] Property "Name" is already defined. Use <jaxb:property> to resolve th is conflict.
Issue 1 : Line number around 573 issue is with the "name" as its duplicate (element as well as attribute).
issue 2: ShippingPaymentMethod,TermsOfDeliveryCode,TransportTerms uses "value" which is causing duplicate definations.
Solution as I understand==
I need custom binding.xml .. I tried various ways but unable to create correct binding.xml to solve this issue. once I have correct xml I can use following command to create generated classes. xjc -b binding.xml -dtd cXML.dtd
What I help I need
Please suggest.
Issue Resolved by myself. did following steps.. may be useful for others
Renamed "name" element "ReturnData" in Cxml.dtd
Renamed "value" attr from TransportTerms,ShippingPaymentMethod,and TermsOfDeliveryCode in Cxml.dtd
Created java classes using
xjc -dtd cXML.dtd
4.in Generated java classes changed xml annotation back to original.
So method names will be different but it will read and write correct XML.