Platinum Partner
java,architects,enterprise-integration,xml,apache,tips and tricks,apache cxf

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

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>



Published at DZone with permission of {{ articles[0].authors[0].realName }}, DZone MVB. (source)

Opinions expressed by DZone contributors are their own.

{{ tag }}, {{tag}},

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

{{ parent.tldr }}

{{ parent.urlSource.name }}
{{ parent.authors[0].realName || parent.author}}

{{ parent.authors[0].tagline || parent.tagline }}

{{ parent.views }} ViewsClicks
Tweet

{{parent.nComments}}