Maven wsdl2java <wsdllocation> tag </wsdllocation>

时间:2012-03-16 08:30:51

标签: java maven wsdl wsdl2java artifacts

我在maven项目中使用wsdl2java来生成一些工件。我没有从头开始,而是继承了我前任的工作。我有一个与我的pom文件中的标签有关的问题。

<plugin>
  <groupId>org.apache.cxf</groupId>
  <artifactId>cxf-codegen-plugin</artifactId>
  <version>2.1.4</version>
  <executions>
    <execution>
      <id>generate-sources</id>
      <phase>generate-sources</phase>
      <configuration>
        <sourceRoot>${project.build.directory}/generated/cxf</sourceRoot>
        <wsdlOptions>
          <wsdlOption>
            <wsdlLocation>http://localhost:8080/sunrise/sunrise?wsdl</wsdlLocation>
            <wsdl>${basedir}/src/main/webapp/WEB-INF/wsdl/sunrise/sunrise.wsdl</wsdl>
          </wsdlOption>
        </wsdlOptions>
      </configuration>
      <goals>
        <goal>wsdl2java</goal>
      </goals>
    </execution>
  </executions>
</plugin>

我特别感兴趣的是<wsdlOptions>内。 <wsdlLocation><wsdl>之间有什么区别?哪一个用于从?

生成工件

1 个答案:

答案 0 :(得分:6)

<wsdlLocation>指定@WebServiceClient注释的wsdlLocation属性的值。

<wsdl>指定项目目录中的WSDL位置。

相关问题