I see the problem in the code.   :-(

You can workaround it with:
<configuration>
   <sourceRoot> ${basedir}/target/generated </sourceRoot>
   <defaultOptions>
       <options>
            <extraargs>
            <extraarg>-client</extraarg>
            <extraarg>-server</extraarg>
            <extraarg>-verbose</extraarg>
            <extraarg>-b</extraarg>
 <extraarg>${basedir}/src/main/resources/wsdl/subscribe-binding.xml</extraarg>
            </extraargs>
         </option>
</defaultOptions>
</configuration>

I'll get a fix committed for 2.1.3-SNAPSHOT.

Dan



On Tuesday 09 September 2008 9:03:28 am pawel.jasinski wrote:
> hi,
>
> i am unable to pass correctly arguments from pom.xml to wsdl2java
> codegenerator
> The relevant pom.xml part:
>
>  <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> ${basedir}/target/generated </sourceRoot>
>               <wsdlOptions>
>                 <wsdlOption>
>
> <wsdl>${basedir}/src/main/resources/wsdl/subscribe_v1_0.wsdl</wsdl>
>                   <extraargs>
>                     <extraarg>-client</extraarg>
>                     <extraarg>-server</extraarg>
>                     <extraarg>-verbose</extraarg>
>                     <extraarg>-b</extraarg>
>
> <extraarg>${basedir}/src/main/resources/wsdl/subscribe-binding.xml</extraar
>g> </extraargs>
>                 </wsdlOption>
>               </wsdlOptions>
>             </configuration>
>             <goals>
>               <goal>wsdl2java</goal>
>             </goals>
>           </execution>
>         </executions>
>       </plugin>
>
> The client, server and binding option disappear.
> When invoke with mvn -X I can get the following:
>
> [DEBUG] Configuring mojo
> 'org.apache.cxf:cxf-codegen-plugin:2.1.2:wsdl2java' -->
> [DEBUG]   (f) classesDirectory = /home/rejap/w34/didatu.esb/target/classes
> [DEBUG]   (f) markerDirectory =
> /home/rejap/w34/didatu.esb/target/cxf-codegen-plugin-markers
> [DEBUG]   (f) project = MavenProject:
> com.ruag.poc:didatu.esb:0.0.1-SNAPSHOT @ /home/rejap/w34/didatu.esb/pom.xml
> [DEBUG]   (f) sourceRoot = /home/rejap/w34/didatu.esb/target/generated
> [DEBUG]   (f) testWsdlRoot =
> /home/rejap/w34/didatu.esb/src/test/resources/wsdl
> [DEBUG]   (f) useCompileClasspath = false
> [DEBUG]   (s) wsdl =
> /home/rejap/w34/didatu.esb/src/main/resources/wsdl/subscribe_v1_0.wsdl
> [DEBUG]   (s) extraargs = [-client, -server, -verbose, -b,
> /home/rejap/w34/didatu.esb/src/main/resources/wsdl/subscribe-binding.xml]
> [DEBUG]   (f) wsdlOptions =
> [Lorg.apache.cxf.maven_plugin.WsdlOption;@13a0212
> [DEBUG]   (f) wsdlRoot = /home/rejap/w34/didatu.esb/src/main/resources/wsdl
> [DEBUG] -- end configuration --
> [INFO] [cxf-codegen:wsdl2java {execution: generate-sources}]
> [DEBUG] Calling wsdl2java with args: [-verbose, -d,
> /home/rejap/w34/didatu.esb/target/generated,
> file:/home/rejap/w34/didatu.esb/src/main/resources/wsdl/subscribe_v1_0.wsdl
>] Loading FrontEnd jaxws ...
> Loading DataBinding jaxb ...
> wsdl2java -verbose -d /home/rejap/w34/didatu.esb/target/generated
> file:/home/rejap/w34/didatu.esb/src/main/resources/wsdl/subscribe_v1_0.wsdl
> wsdl2java - Apache CXF 2.1.2
>
> I also tried to change cxf version to 2.1, the problem persist.
> Version 2.0.8 appears to do the job.
>
> Can anybody see any fundamental problem with my pom file?
> Can I mix code from code-gen 2.0.8 with the cxf 2.1.1 or cxf 2.1.2?
>
>
> Thanks
> Pawel



-- 
Daniel Kulp
[EMAIL PROTECTED]
http://www.dankulp.com/blog

Reply via email to