As Freeman mentioned, if they are both in the same namespace, there isn't 
anything to do from Maven.   They would both always be mapped to the same 
package.

If they are in separate namespaces, you can use:

<packagename>http://my.name.space.com=a.b.c.service</packagename>

to map individual namespaces to different pacakges.

Outside of maven, you could create a JAX-WS binding file that would map just 
the wsdl parts to a particular namespace.   That should also work.

Dan


On Monday 28 February 2011 6:15:13 PM 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

-- 
Daniel Kulp
[email protected]
http://dankulp.com/blog
Talend - http://www.talend.com

Reply via email to