org.apache.axis2 Maven插件,未获取正确的wsdlFile

时间:2019-01-09 10:50:50

标签: java maven wsdl axis2

使用 org.apache.axis2 Maven插件,我试图从两个WSDL文件中生成存根。我在<wsdlFile>My/WSDL/File</wsdlFile>中提到了wsdl文件名。该插件仍在使用默认的WSDL文件名/src/main/resources/service.wsdl。由于我的wsdlFile名称不是service.wsdl,因此我得到了 java.io.FileNotFoundException 。请帮助我将wsdlFile名称更改为所需的wsdlFile名称。

<plugin>
        <groupId>org.apache.axis2</groupId>
        <artifactId>axis2-wsdl2code-maven-plugin</artifactId>
        <version>1.7.9</version>
        <executions>
            <execution>
                <id>ws1</id>
                <goals>
                    <goal>wsdl2code</goal>
                </goals>
                <configuration>
                   <databindingName>xmlbeans</databindingName>
                   <wsdlFile>src/main/resources/service1.wsdl</wsdlFile>
                   <outputDirectory>target/generated-sources</outputDirectory>
                </configuration>
            </execution>
            <execution>
                <id>ws2</id>
                <goals>
                    <goal>wsdl2code</goal>
                </goals>
                <configuration>
                   <databindingName>xmlbeans</databindingName>
                   <wsdlFile>src/main/resources/service2.wsdl</wsdlFile>
                   <outputDirectory>target/generated-sources</outputDirectory>
                </configuration>
            </execution>
        </executions>
    </plugin>

0 个答案:

没有答案