我正在尝试使用jaxbinding工具使用netbeans在Java中生成xsd的类,但是在这样做时,它会产生以下错误:
[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
CommonBasicComponents-2.0.xsd文件中的几乎所有组件都表示它们是重复的。
在文件DIAN_UBL.xsd中进行以下导入
<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"/>
在第四次导入中,在文件DIAN_UBL Structures.xsd中进行以下导入:
<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"/>
当我删除重复(UBL-CommonAggregateComponents-2.0.xsd)的导入时,会发生另一个错误,提示丢失了该导入,因此标记有效。
有帮助吗?我会非常感谢你。