axis2 wsdl2code plugin only creates Arrays

790 Views Asked by At

When running wsdl2code maven plugin it only creates Arrays as opposed to wsdl2java plugin we were earlier using for ant. Following is the configuration.

Thanks, Ash

<build> 
    <plugins> 
        <plugin> 
            <groupId>org.apache.axis2</groupId> 
            <artifactId>axis2-wsdl2code-maven-plugin</artifactId> 
            <version>${axis2.version}</version> 
            <executions> 
                <execution> 
                    <goals> 
                        <goal>wsdl2code</goal> 
                    </goals> 
                    <configuration> 
                        <packageName>net.flitech.faregate.api</packageName> 
                        <wsdlFile>${project.basedir}/src/main/resources/wsdl/faregate.wsdl</wsdlFile> 
                        <namespaceToPackages>http://faregate.flitech.net=net.flitech.faregate.api&lt;/namespaceToPackages> 
                        <databindingName>xmlbeans</databindingName> 
                        <generateServerSide>true</generateServerSide> 
                        <generateServerSideInterface>true</generateServerSideInterface> 
                        <generateAllClasses>true</generateAllClasses> 
                        <language> 
                            java 
                        </language> 
                    </configuration> 
                </execution> 
            </executions> 
        </plugin> 
    </plugins> 
</build>
1

There are 1 best solutions below

0
On

Fixed by setting java version. By default it was using version 4. I set it to version 1.5 using following settings. Its generating lists now.

<build>
        <plugins>
            <plugin>
                <groupId>org.apache.axis2</groupId>
                <artifactId>axis2-wsdl2code-maven-plugin</artifactId>
                <version>${axis2.version}</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>wsdl2code</goal>
                        </goals>
                        <configuration>
                            <options><javaversion>1.5</javaversion></options>
                            <packageName>net.flitech.faregate.api</packageName>
                            <wsdlFile>${project.basedir}/src/main/resources/wsdl/faregate.wsdl</wsdlFile>
                            <namespaceToPackages>http://faregate.flitech.net=net.flitech.faregate.api</namespaceToPackages>
                            <databindingName>xmlbeans</databindingName>
                            <generateServerSide>true</generateServerSide>
                            <generateServerSideInterface>true</generateServerSideInterface>
                            <generateAllClasses>true</generateAllClasses>
                            <language>
                                java
                            </language>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>