簡體   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