I am trying to generate the classes of the xsd that the dian provides in java with netbeans using the jaxbinding tool, but at the time of doing so, it generates the following errors,
[ERROR] 'AcceptedIndicator' is already defined
línea 21 de file:///C:/Users/usuario/Documents/Facturacion%20Electronica/XSD/UBL2/common/UBL-CommonBasicComponents-2.0.xsd
[ERROR] (related to above error) the first definition appears here
línea 21 de file:/C:/Users/usuario/Documents/Facturacion%20Electronica/XSD/UBL2/common/UBL-CommonBasicComponents-2.0.xsd
Practically all the components of the CommonBasicComponents-2.0.xsd file say that they are repeated, this is the xml file that I am trying to transform:
in the file DIAN_UBL.xsd makes the following imports
<import namespace="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2" schemaLocation="C:/Users/usuario/Documents/Facturacion Electronica/XSD/UBL2/common/UBL-CommonAggregateComponents-2.0.xsd"/>
<import namespace="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2" schemaLocation="C:/Users/usuario/Documents/Facturacion Electronica/XSD/UBL2/common/UBL-CommonBasicComponents-2.0.xsd"/>
<import namespace="urn:oasis:names:specification:ubl:schema:xsd:CommonExtensionComponents-2" schemaLocation="C:/Users/usuario/Documents/Facturacion Electronica/XSD/UBL2/common/UBL-CommonExtensionComponents-2.0.xsd"/>
<import namespace="http://www.dian.gov.co/contratos/facturaelectronica/v1/Structures" schemaLocation="DIAN_UBL_Structures.xsd"/>
In the import port, in the file DIAN_UBL_Structures.xsd it makes the following imports
<import namespace="http://www.w3.org/2000/09/xmldsig#" schemaLocation="xmldsig-core-schema.xsd"/>
<import namespace="urn:un:unece:uncefact:data:specification:UnqualifiedDataTypesSchemaModule:2" schemaLocation="http://www.dian.gov.co/micrositios/fac_electronica/documentos/common/UnqualifiedDataTypeSchemaModule-2.0.xsd"/>
<import namespace="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2" schemaLocation="http://www.dian.gov.co/micrositios/fac_electronica/documentos/common/UBL-CommonAggregateComponents-2.0.xsd"/>
When I remove the import that is (UBL-CommonAggregateComponents-2.0.xsd) repeating, another error occurs that says that it lacks that import so that the tags are valid.
Any help? I would appreciate it very much.