以下を参照してください。前述のように、3つのプロジェクトがあります。
Common
Age.xsd (namespace: http://xmlns.common/age)
generated/common/xmlns/age/AgeType.java
pom.xml (cxf-xjc-plugin xsdtojava)
Person
PersonService.wsdl (imports Age.xsd in wsd:types)
generated/com/person/AgeType.java
pom.xml (cxf-codegen-plugin wsdl2java)
Animal
AnimalService.wsdl (imports Age.xsd in wsd:types)
generated/com/animal/AgeType.java
pom.xml (cxf-codegen-plugin wsdl2java)
以下に示すように、 Age.xsdスキーマAnimalService.wsdl
をインポートします。PersonService.wsdl
<wsdl:definitions xmlns:cn="http://xmlns.common/age"
<wsdl:types>
<xsd:schema>
<xsd:import
namespace="http://xmlns.common/age"
schemaLocation="classpath:/common/xmlns/age/Age.xsd" />
</xsd:import>
</xsd:schema>
<!-- cn:AgeType used in output message -->
<!-- ignored -->
</wsdl:definitions>
質問:
AgeType (名前空間http://xmlns.common/ageにあります)のコードを生成せずcxf-codegen wsdl2java
、それぞれのプロジェクトで com.person.AgeType および com.animal.AgeType の代わりに common.xmlns.age.AgeType を使用するように指示する方法プロジェクトを依存関係として提供することによって?Common