Multiple WSDLs for Generating JAX-WS artifacts w/ CXF’s Maven Plugin
Join the DZone community and get the full member experience.
Join For FreeEach element corresponds to a WSDL for which we need to generate artifacts. Check out my XML snippet below...
<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>
<!-- for myService1.wsdl -->
<wsdlOption>
<wsdl>${basedir}/src/main/wsdl/myService1.wsdl</wsdl>
</wsdlOption>
<!-- for myService2.wsdl -->
<wsdlOption>
<wsdl>${basedir}/src/main/wsdl/myService2.wsdl</wsdl>
</wsdlOption>
. . .
</wsdlOptions>
</configuration>
<goals>
<goal>wsdl2java</goal>
</goals>
</execution>
</executions>
</plugin>
Artifact (UML)
Published at DZone with permission of Singaram Subramanian. See the original article here.
Opinions expressed by DZone contributors are their own.
Comments