更新时间:2022-11-28 12:38:17
这是实现此目的的方法:
Here is a way to achieve this :
使用 Spring-WS,可以从以下位置自动生成 WSDL:
Using Spring-WS, the WSDL can be generated automatically from :
<sws:dynamic-wsdl id="holiday" portTypeName="HumanResource" **locationUri="/holidayService/"** targetNamespace="http://mycompany.com/hr/definitions">
<sws:xsd location="/WEB-INF/hr.xsd"/>
</sws:dynamic-wsdl>
来源:http://static.springsource.org/spring-ws/site/reference/html/tutorial.html#tutorial-publishing-wsdl
这样,主机、端口和上下文路径不需要在 WSDL 中指定.
This way, the host, port and context path don't need to be specified inside the WSDL.