繁体   English   中英

Apache CXF wsdl 响应问题

[英]Apache CXF wsdl response issue

我正在尝试做一个 POC,但我无法更改 soap 客户端获取 WSDL 定义的位置。 这个 soap 客户端在实例化我正在 POCing 的服务时,在其代码中硬编码了一个".wsdl" 首先,我有一个非常简单的服务,基本上是一个 hello world,可以在这里找到: https://github.com/apache/cxf/tree/master/distribution/src/main/release/samples/jaxws_spring_boot/src/主/java/sample/ws

The issue I am having is that I can't figure out how to configure jaxws or apache CXF to switch the WSDL URL response from http://localhost:8080/Service/Hello?wsdl to http://localhost:8080/Service /你好.wsdl

我从上面的示例中删除了指标部分,我的 WebServiceConfig 如下所示:

@Bean
public Endpoint endpoint() {
    EndpointImpl endpoint = new EndpointImpl(bus, new HelloPortImpl());
    endpoint.publish("/Hello");
    return endpoint;
}

Is there any way to get apache CXF to respond with the WSDL document from localhost/<myservice>.wsdl instead of localhost/<myservice>?wsdl

我觉得我错过了一些非常明显的东西。

最简单的事情可能是发出重定向,或者如果客户端不遵守该配置重写规则。

您还可以从代码优先方法切换到合同 (WSDL) 优先方法,并将 WSDL 文档保存在其他位置。

?wsdl在 CXF 内部的多个位置进行了硬编码,因此不仅仅是要更改的配置。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM