Over a million developers have joined DZone.
Silver Partner

Multiple WSDLs for Generating JAX-WS artifacts w/ CXF’s Maven Plugin

· Java Zone

The Java Zone is brought to you in partnership with DCHQ.  Discover how to deploy & monitor multi-tier Java applications on any cloud in seconds.

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



The Java Zone is brought to you in partnership with DCHQ. Learn more about best practices for automating the deployment and management of your Java application on any cloud.

Topics:

Published at DZone with permission of Singaram Subramanian , DZone MVB .

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}