Enterprise Integration Zone is brought to you in partnership with:

I'm Singaram Subramanian, and I work with CSC India as a Software Developer. My blog is an attempt to share my learnings with all (mainly, for those who desperately mine google finding ways to solve problems, fix issues, learn about a Java/Open source software, or deciding on tough choices etc. during software development as I do). Singaram is a DZone MVB and is not an employee of DZone and has posted 36 posts at DZone. You can read more from them at their website. View Full User Profile

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

06.06.2013
| 2115 views |
  • submit to reddit

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 Singaram Subramanian, author and DZone MVB. (source)

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)