1

运行 wsdl2code maven 插件时,它只创建数组,而不是我们之前用于 ant 的 wsdl2java 插件。以下是配置。

谢谢,阿什

<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>
4

1 回答 1

1

通过设置java版本修复。默认情况下它使用版本 4。我使用以下设置将其设置为版本 1.5。现在它的生成列表。

<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>
于 2013-08-06T23:34:21.900 回答