簡體   English   中英

為什么我的 SOAP 客戶端忽略 WSDL 位置的端口?

[英]Why my SOAP Client ignores port of the WSDL location?

我正在嘗試使用 WSDL_LOCATION 為 web 服務生成客戶端: http://localhost:8089/SWIStoZZZws/SWIStoZZZws.asmx?WSDL

我正在使用 Apache CXF 2.6.2。 機器。

但是,客戶端以某種方式忽略端口 8089 並將 HTTP 請求發送到http://localhost/SWIStoZZZws/SWIStoZZZws.asmx?WSDL結果如下錯誤:

Caused by: org.apache.cxf.transport.http.HTTPException: HTTP response '404: Not Found' when communicating with http://localhost/SWIStoZZZws/SWIStoZZZws.asmx
    at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:1619)
    at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1530)
    at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1438)
    at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56)
    at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:660)
    at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
    ... 54 more

任何想法? 請幫忙......我一直在為此苦苦掙扎。 干杯!

您可以遵循官方文檔,您將在其中找到該代碼:

<beans xmlns="http://www.springframework.org/schema/beans"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xmlns:jaxws="http://cxf.apache.org/jaxws"
     xsi:schemaLocation="
     http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
     http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd">

     <jaxws:endpoint id="classImpl"
          implementor="org.apache.cxf.jaxws.service.Hello"
          endpointName="e:HelloEndpointCustomized"
          serviceName="s:HelloServiceCustomized"
          address="http://localhost:8080/test"
          xmlns:e="http://service.jaxws.cxf.apache.org/endpoint"
          xmlns:s="http://service.jaxws.cxf.apache.org/service" />

 </beans>

你如何獲得端點地址? 也許您從 IDE 中自動生成的文件中獲取端點地址

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM