Hi,

Are the wsdl and referenced xsd using same target namespace?
If so, generated code with same specified package name is expected behavior.
If not, IMO it's a bug.

Freeman
On 2011-3-1, at 上午7:15, Sonam Nepali wrote:

Hi

I am trying to generate Java artifacts from a WSDL using cxf-codegen- plugin with a specific package-name for the WSDL. When I give the following option in my pom.xml,

..<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>
<wsdlOptions>
                 <wsdlOption>
<wsdl>${basedir}/src/main/resources/META-INF/ MyWsdl.wsdl</wsdl>
                       <packagenames>
                             <packagename>a.b.c.service</packagename>
                       </packagenames>
                 </wsdlOption>


It is generating the Java artifacts in one 'a.b.c.service' package for the WSDL and also for the schema (XSD) files that are referenced within the WSDL. Is there a way to just generate the Java artifacts for the 'MyWsdl.wsdl' in 'a.b.c.service' package and the rest referenced(XSD) in the WSDL in their own default package?

Thanks

Sonam Nepali



--
Freeman Fang

------------------------

FuseSource: http://fusesource.com
blog: http://freemanfang.blogspot.com
twitter: http://twitter.com/freemanfang
Apache Servicemix:http://servicemix.apache.org
Apache Cxf: http://cxf.apache.org
Apache Karaf: http://karaf.apache.org
Apache Felix: http://felix.apache.org

Reply via email to