Maven tag wsdl2java <wsdlLocation>

I am using wsdl2java in a maven project to create some artifacts. I did not start from scratch, but I inherited the work of my predecessors. I have a question related to a tag in my pom file.

<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>

What interests me most is inside <wsdlOptions>. What is the difference between <wsdlLocation>and <wsdl>? Which one is used to create artifacts from?

+5
source share
1 answer

<wsdlLocation> Defines the value of the @wsllLocation property for the @WebServiceClient annotation.

<wsdl> indicates the location of the WSDL in your project directories.

+6
source

All Articles