2017-06-12 64 views
0

我有以下問題。有幾個wsdl文件應該被轉換成java類。cxf生成類的不同源根

<plugin> 
     <groupId>org.apache.cxf</groupId> 
     <artifactId>cxf-codegen-plugin</artifactId> 
     <version>${cxf.version}</version> 
     <executions> 
      <execution> 
       <id>generate-sources</id> 
       <phase>generate-sources</phase> 
       <configuration> 
        <sourceRoot>${project.build.directory}/generated/cxf</sourceRoot> 
        <wsdlOptions> 
         <wsdlOption> 
          <wsdl>${basedir}/src/main/resources/wsdl/configurationAndSecurityService.wsdl</wsdl> 
         </wsdlOption> 
         <wsdlOption> 
          <wsdl>${basedir}/src/main/resources/wsdl/ordersService.wsdl</wsdl> 
         </wsdlOption> 
        </wsdlOptions> 
       </configuration> 
       <goals> 
        <goal>wsdl2java</goal> 
       </goals> 
      </execution> 
     </executions> 
    </plugin> 

問題是當wsdls被轉換成java類我得到一個關於重複的錯誤消息(一些類具有相同的名稱)。最初,我想將每個wsdl放入其擁有的源根目錄(子包),但我不知道該怎麼做。有沒有辦法將每個wsdl綁定到它自己的源代碼根目錄?

回答