【发布时间】:2021-02-02 19:23:56
【问题描述】:
我正在尝试做一个 POC,但我无法更改肥皂客户端获取其 WSDL 定义的位置。当这个soap客户端实例化我正在POCing的服务时,他们的代码中有一个".wsdl"硬编码。首先,我有一个非常简单的服务,基本上是一个 hello world,可以在这里找到:https://github.com/apache/cxf/tree/master/distribution/src/main/release/samples/jaxws_spring_boot/src/main/java/sample/ws
我遇到的问题是我不知道如何配置 jaxws 或 apache CXF 以将 WSDL URL 响应从 http://localhost:8080/Service/Hello?wsdl 切换到 http://localhost: 8080/服务/Hello.wsdl
我从上面的示例中删除了指标部分,我的 WebServiceConfig 如下所示:
@Bean
public Endpoint endpoint() {
EndpointImpl endpoint = new EndpointImpl(bus, new HelloPortImpl());
endpoint.publish("/Hello");
return endpoint;
}
有没有办法让 apache CXF 响应来自 localhost/<myservice>.wsdl 而不是 localhost/<myservice>?wsdl 的 WSDL 文档
我觉得我错过了一些非常明显的东西。
【问题讨论】:
标签: java spring-boot web-services soap cxf