Not able to generate client code with wsdl2java and maven using CXF -


i'm using maven cxf-codegen-plugin generate client files wsdl not able so.

i want wsdl files in folder src/main/wsdl should scanned , corresponding clients should generated in separate folders. please help.

my pom.xml :

<build>     <finalname>somefilename</finalname>     <pluginmanagement>         <plugins>             <plugin>                  <groupid>org.apache.cxf</groupid>                  <artifactid>cxf-codegen-plugin</artifactid>                  <version>2.2.3</version>                  <executions>                      <execution>                         <id>generate-sources</id>                         <phase>process-resources</phase>                          <configuration>                              <sourceroot>src/main/java</sourceroot>                              <wsdlroot>${basedir}/src/main/wsdl</wsdlroot>                          </configuration>                          <goals>                              <goal>wsdl2java</goal>                          </goals>                      </execution>                  </executions>              </plugin>          </plugins>     </pluginmanagement> </build> 

here's how i'm doing version 2.7.4, , having generated code created in different packages :

<build>     <plugins>         <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/src/main/java</sourceroot>                         <wsdloptions>                             <wsdloption>                                 <wsdl>${basedir}/src/main/wsdl/mywsdl1.wsdl</wsdl>                                 <extraargs>                                     <extraarg>-client</extraarg>                                     <extraarg>-verbose</extraarg>                                     <extraarg>-p</extraarg>                                     <extraarg>urn:mycompany:myproduct1:v1_0=com.my.project.product1</extraarg>                                     <extraarg>-p</extraarg>                                     <extraarg>http://www.w3.org/2001/xmlschema=com.my.project.common</extraarg>                                 </extraargs>                             </wsdloption>                             <wsdloption>                                 <wsdl>${basedir}/src/main/wsdl/mywsdl2.wsdl</wsdl>                                 <extraargs>                                     <extraarg>-client</extraarg>                                     <extraarg>-verbose</extraarg>                                     <extraarg>-p</extraarg>                                     <extraarg>urn:mycompany:myproduct2:v1_0=com.my.project.product2</extraarg>                                     <extraarg>-p</extraarg>                                     <extraarg>http://www.w3.org/2001/xmlschema=com.my.project.common</extraarg>                                 </extraargs>                             </wsdloption>                         </wsdloptions>                     </configuration>                     <goals>                         <goal>wsdl2java</goal>                     </goals>                 </execution>             </executions>         </plugin>     </plugins> 

here's can find out more extra-args : http://cxf.apache.org/docs/wsdl-to-java.html

for automatic scan of wsdl folder, works :

<configuration>                         <sourceroot>${project.build.directory}/generated/src/main/java</sourceroot>                         <wsdlroot>${basedir}/src/main/wsdl</wsdlroot> <includes>     <include>**/*.wsdl</include> </includes> </configuration> 

hope helps!


Comments

Popular posts from this blog

.htaccess - First slash is removed after domain when entering a webpage in the browser -

Automatically create pages in phpfox -

c# - Farseer ContactListener is not working -