0
我运行下面的命令XJC逆包名称顺序
java -jar "C:\Program Files\eclipse\plugins\org.jvnet.jaxbw.eclipse_1.1.0\lib\jaxb-xjc.jar" -d src -catalog xsd\catalog.cat xsd\componentsData.xsd
XSD \ componentsData.xsd包含下列行:
xmlns:txtColor="com.my.company.product.jaxb.TextColor"
xmlns="com.my.company.product.jaxb.componentsData"
targetNamespace="com.my.company.product.jaxb.componentsData"
<xsd:import
schemaLocation="TextColor.xsd"
namespace="com.my.company.product.jaxb.TextColor"/>
XSD \ TextColor.xsd包含以下
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" jaxb:version="2.0"
xmlns="com.my.company.product.jaxb.TextColor"
targetNamespace="com.my.company.product.jaxb.TextColor"
>
这是我的目录:
<!DOCTYPE catalog
PUBLIC "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN"
"http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd">
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
<system
systemId="com.my.company.product.jaxb.TextColor.TextColor.xsd"
uri="TextColor"/>
和我的文件在以下路径得到产生 - 的顺序是倒立为什么?: componentsData.jaxb.product.company.my.com
和
TextColor.jaxb.product.company.my.com
如果我添加以下参数文件已经在正确的产生为了不过catalog.cat似乎并没有考虑采取
-p com.my.company.product.jaxb.componentsData
OK,我得到了答案,我需要使用绑定文件。 但这是可能的,它会抛出xjc eclipse插件。 我现在无法发布答案 - 所以我会在稍后发布。 – davidbobo