gpt4 book ai didi

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

转载 作者:塔克拉玛干 更新时间:2023-11-02 19:21:36 25 4
gpt4 key购买 nike

我使用从 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 服务无法通过此链接获得:

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

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

最佳答案

添加

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

给你的

<configuration> 

关于java - 如何在axis2-java2wsdl-maven-plugin中指定地址位置?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28404976/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com