Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
xml
xml
<configuration>
  <sourceRoot>${basedir}/target/generated/cxf</sourceRoot>
  <wsdlOptions>
      <defaultOptions>
          <bindingFiles>
              <bindingFile>${basedir}/src/main/jaxb/bindings.xml</bindingFile>
          </bindingFiles>
          <noAddressBinding>true</noAddressBinding>
      </defaultOptions>
  <wsdlOptions>
      <wsdlOption>
          <wsdl>${basedir}/src/main/wsdl/myService.wsdl</wsdl>
          <serviceName>MyWSDLService</serviceName>
      </wsdlOption>
      <wsdlOption>
          <wsdl>${basedir}/src/main/wsdl/myOtherService.wsdl</wsdl>
          <serviceName>MyOtherWSDLService</serviceName>
      </wsdlOption>
  </wsdlOptions>
</configuration>

<defaultOption> and <wsdlOption> correspond to the options outlined on the WSDL To Java page, you may look at http://svn.apache.org/repos/asf/cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/Option.java for a more detailled detailed description of thoses those parameters.

At least, you can declare a common wsdlRoot folder where you store your WSDL files and use includes/excludes patterns to select the files to get used by the code generator

...

Code Block
xml
xml
<configuration>
  <sourceRoot>${basedir}/target/generated/cxf</sourceRoot>
  <wsdlOptions>
      <defaultOptions>
          <bindingFiles>
              <bindingFile>${basedir}/src/main/jaxb/bindings.xml</bindingFile>
          </bindingFiles>
          <noAddressBinding>true</noAddressBinding>
      </defaultOptions>
      <wsdlRoot>${basedir}/src/main/resources/wsdl</wsdlRoot>
      <includes>
          <include>*Service.wsdl</include>
      </includes>
  </wsdlOptions>
</configuration>

wsdlRoot default value is src/main/resources/wsdl so you may omit this declaration.

...