我正在使用jaxb从xml架构生成java类.模式导入XMLSchema.xsd,其内容用作文档中的元素.
如果我分别删除导入和对"xsd:schema"的引用,那么绑定编译器会成功生成类.如果我没有那么它会产生以下错误,如果我尝试仅从XMLSchema.xsd生成Java类,则会出现同样的错误!
> C:\Users\me>"%JAXB%/xjc" -extension -d tmp/uisocketdesc -p uis.jaxb uisocketdesc.xsd -b xml_binding_test.xml -b xml_binding_test_2.xml
-b xml_binding_test_3.xml
parsing a schema...
compiling a schema...
> [ERROR] A class/interface with the same name "uis.jaxb.ComplexType" is already in use. Use a class customization to resolve this conflict.
line 612 of "http://www.w3.org/2001/XMLSchema.xsd"
> [ERROR] (Relevant to above error) another "ComplexType" is generated from here.
line 440 of "http://www.w3.org/2001/XMLSchema.xsd"
> [ERROR] A class/interface with the same name "uis.jaxb.Attribute" is already in use. Use a class customization …Run Code Online (Sandbox Code Playgroud)