Hi

Following is the declaration for the two pluging:


1:


<plugin>
                                <groupId>org.apache.cxf</groupId>
                                <artifactId>cxf-codegen-plugin</artifactId>
                                <version>2.0.6</version>
                                <executions>
                                        <execution>
                                                <id>generate-sources</id>
                                                <phase>generate-sources</phase> 
                                                                                
        
                                                <configuration>
                                                        <!-- 
<sourceRoot>${basedir}/target/generated/src/main/java</sourceRoot> -->
                                                        
<sourceRoot>${basedir}/src/main/java/</sourceRoot>                              
                        
                                                        <wsdlOptions>
                                                                <wsdlOption>
                                                                        
<wsdl>${basedir}/src/main/resources/wsdl/CustomerProfileManagementService.wsdl</wsdl>
                                                                   
                                                                        <!--
                                                                                
<extraargs> <extraarg>-b</extraarg>
                                                                                
<extraarg>src/main/resources/trade-binding.xml</extraarg>
                                                                                
</extraargs>
                                                                        -->
                                                                </wsdlOption>
                                                                <wsdlOption>
                                                                
<wsdl>${basedir}/src/main/resources/wsdl/customerNetworkProfileManagementService.wsdl</wsdl>
                                                                        <!--
                                                                                
<extraargs> <extraarg>-b</extraarg>
                                                                                
<extraarg>src/main/resources/trade-binding.xml</extraarg>
                                                                                
</extraargs>
                                                                        -->
                                                                </wsdlOption>

                                                        </wsdlOptions>
                                                </configuration>
                                                <goals>
                                                        <goal>wsdl2java</goal>
                                                </goals>
                                        </execution>
                                </executions>
                        </plugin>

#####################################################################

2:


<plugin>
     <groupId>org.apache.axis2</groupId> 
    <artifactId>axis2-wsdl2code-maven-plugin</artifactId>
         <version>1.3</version> 
    <executions>
                 <execution>                    
                        <goals>
                        <goal>wsdl2code</goal>
                        </goals>
                                        <configuration>
                                        <!-- 
<sourceRoot>${basedir}/target/generated/src/main/java</sourceRoot> -->
                <!--            
<outputDirectory>${basedir}/src/main/java/</outputDirectory>            -->
                                        
<outputDirectory>${basedir}/main/java/</outputDirectory>

                                        
<packageName>com.be.portal</packageName> 
                                        
<generateServerSide>true</generateServerSide>
                                        
<generateServerSideInterface>true</generateServerSideInterface> 
                                        
<generateAllClasses>true</generateAllClasses>   
                                        
<wsdlFile>src/main/resources/wsdl/CustomerProfileManagementService.wsdl</wsdlFile>
      
                                        
<wsdlFile>src/main/resources/wsdl/customerNetworkProfileManagementService.wsdl</wsdlFile>
       

                                </configuration>
                        </execution>
    </executions>

    </plugin> 

Here in the second plugin though it is creating java files in the required 
format but the only issue is it creates one default directory src inside the 
outputDirectory specified above which I don't want.

Regards

Vishal

-----Original Message-----
From: Tobias Gierke [mailto:[email protected]] 
Sent: Wednesday, March 04, 2009 2:23 PM
To: Maven Users List
Subject: Re: Wsdl2java code generation

Hi Vishal,
> Maven of "Maven" build technology,
> Greetings !!
>
> I need some help with the maven plugin to generate code from wsdl file.
> If you have tried the same earlier please email me separately.
>
> What has been tried:
>
> Option 1
> "wsdl2java" plugin (CXF WSDL-to-Java code generation)
> This generates the code from wsdl file but the java files it generates are 
> not proper. For instance, the java files (VO) are not implementing 
> Serializable interface, and other classes which needs to implement Remote 
> interface are not doing so, etc. Thus we are not able to use the java code 
> which this plugin generates.
>
> Option 2
> "wsdl2code" plugin (axis2-wsdl2code-maven-plugin)
> The java classes generated by this plugin does not create the correct package 
> structure, thus compilation fails.
>   
Could you post the <plugin/> declarations you used ? Is there anything 
special about the WSDL you're using ? Last year I used a (now definitely 
outdated) version of the CXF plugin to generate code from a 
document/literal WSDL and didn't notice any broken generated code. I 
first tried to use axis2 as well but wasn't even able to get the plugin 
up and running (maybe my fault but I remember the documentation being 
kind of  ...uhm...lacking).

Regards,

Tobias
> What we want?
> 1) Any pointers around any argument or property etc which can be set so as to 
> properly generate the java files using wsdl2java.
> 2) Pointers to generate the correct package structure for java files using 
> wsdl2code.
>
> Please let me know in case you require more information.
>
> Regards,
> Vishal
>
>
>
>   


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to