cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Glen Mazza <>
Subject Re: wsdl2java duplicate generated classes
Date Mon, 27 Feb 2012 00:28:45 GMT
No information provided, so dunno.  CXF bundles an Antbuild sample 
whose build.xml you can leverage.  Alternatively, part of an Ant script 
I used for an old blog entry (no longer published) is below.

Note web services are a relatively easy way to learn about Maven if you 
haven't used it yet 
(, links #1 and #2).


<?xml version="1.0"?>
<project name="wsdl-first web service" default="compile" basedir=".">
<property environment="env"/>
<property name="target.classes.dir" location ="service-war/target/classes"/>
<property name="target.gen.dir" location 
<property name="service.src.dir" location="service-war/src/main"/>
<property name="client.src.dir" location="client/src/main"/>
<property name="wsdl.file" value="DoubleIt.wsdl"/>
<property name="" value="doubleit.war"/>
<property name="wsdl.location" 

<path id="mywebstack.classpath">
<path refid="cxf.classpath"/>

<path id="cxf.classpath">
<pathelement location="${target.classes.dir}"/>
<fileset dir="${env.CXF_HOME}/lib">
<include name="*.jar"/>

<target name="clean">
<delete includeEmptyDirs="true">
<fileset dir="${target.classes.dir}" includes="**/*"/>
<fileset dir="${target.gen.dir}" includes="**/*"/>

<target name="generate-CXF-jaxws">
<java classname="" fork="true">
<arg value="-compile"/>
<arg value="-d"/>
<arg value="${target.gen.dir}"/>
<arg value="-classdir"/>
<arg value="${target.classes.dir}"/>
<arg value="${wsdl.location}"/>
<path refid="cxf.classpath"/>

<target name="compile">
<javac destdir="${target.classes.dir}" debug="true">
<src path="${service.src.dir}"/>
<src path="${client.src.dir}"/>
<src path="${target.gen.dir}"/>
<classpath refid="mywebstack.classpath"/>
<fileset dir="${service.src.dir}/webapp/WEB-INF/lib">
<include name="*.jar"/>

<target name="run-client">
<java classname="com.mycompany.webservice.client.WSClient" fork="true">
<pathelement location="${target.classes.dir}"/>
<path refid="mywebstack.classpath"/>
<!-- Line below activates debug output.


On 02/26/2012 04:54 PM, dugfresh wrote:
> I'm using wsdl2java with an ANT task and I'm getting duplicate generated
> classes.  For example Foo, Foo2, Bar, Bar2, etc.  Why does this happen?
> --
> View this message in context:
> Sent from the cxf-user mailing list archive at

Glen Mazza
Talend Community Coders

View raw message