我用来从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>
我不需要关注部分,因为此链接无法使用我的网络服务:
<soap:address location="http://localhost:8080/axis2/services/MerchantWebService"/>
是否可以在插件配置中将位置指定为参数? locationUri不起作用:(
答案 0 :(得分:2)
添加
session_id
到你的
<locationUri>http://localhost:8080/AppRootContext/services/MerchantWebService</locationUri>