如何在axis2-java2wsdl-maven-plugin中指定地址位置?

How to specify address location in axis2-java2wsdl-maven-plugin?

我使用从 java calss axis2-java2wsdl-maven-plugin 生成 wsdl。下面我引用了一段pom.xml:

<plugin>
                <groupId>org.apache.axis2</groupId>
                <artifactId>axis2-java2wsdl-maven-plugin</artifactId>
                <version>1.6.2</version>
                <configuration>
                    <className>Path_to_ws_class</className>
                <outputFileName>src/main/webapp/webservice.wsdl</outputFileName>
        <schemaTargetNamespace>http://test.test/xsd</schemaTargetNamespace>
                    <wsdlVersion>${project.version}</wsdlVersion>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>java2wsdl</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

但是它在wsdl文件的底部生成:

<wsdl:port name="WebServiceHttpSoap11Endpoint" binding="axis2:WebServiceSoap11Binding">
<soap:address location="http://localhost:8080/axis2/services/MerchantWebService"/>
</wsdl:port>

我不需要以下部分,因为我的 Web 服务不可用 link:

<soap:address location="http://localhost:8080/axis2/services/MerchantWebService"/>

是否可以在插件配置中将位置指定为参数? locationUri 不起作用:(

添加

<locationUri>http://localhost:8080/AppRootContext/services/MerchantWebService</locationUri>

给你的

<configuration>