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