2017-04-14 172 views
0

我將開發一個使用Web服務的C#應用​​程序,但該服務由Apache Axis2開發,我無法處理該服務以在C#中添加服務引用。我沒有得到任何迴應,只格式化異常。 我沒有服務代碼,它就像即時可用的Web服務,只是提供服務參考並開始使用它。在C#應用程序中使用Java Web服務

Web服務的WSDL地址是: https://pttws.ptt.gov.tr/PttBilgi/services/Sorgu?wsdl

我也試着運行與SOAP UI服務,但XML響應我得到的是象下面這樣:

<faultstring>The endpoint reference (EPR) for the Operation not found is /PttBilgi/services/Sorgu.SorguHttpSoap11Endpoint/ and the WSA Action = null. If this EPR was previously reachable, please contact the server administrator.</faultstring> 

的原始響應就像下面,這也是一些技術細節:

HTTP/1.1 500 Internal Server Error 
Date: Fri, 14 Apr 2017 07:20:28 GMT 
Server: gizli gizli gizli gizli 
X-OPNET-Transaction-Trace: a2_5cc44d1b-0e0c-48a5-a44f-942377e9ab70 
X-Powered-By: Servlet/2.5 JSP/2.1 
Vary: Accept-Encoding,User-Agent 
Connection: close 
Transfer-Encoding: chunked 
Content-Type: application/xml; charset=UTF-8 

<faultstring>The endpoint reference (EPR) for the Operation not found is /PttBilgi/services/Sorgu.SorguHttpSoap11Endpoint/ and the WSA Action = null. If this EPR was previously reachable, please contact the server administrator.</faultstring> 

看來,內容類型必須是文本/ HTML使用它在C#但是作爲服務內容類型的應用程序是application/xml,所以它不能轉換爲讀取和處理結果。

如何使用成功的服務,我該怎麼做?

謝謝你們!

回答

0

截至http://wso2.com/library/176/

這篇文章中描述如果Axis2引擎找不到服務和消息的操作時,它立即失敗,發送錯誤給發件人。

如果沒有找到服務 - 「服務找不到EPR是」 如果服務中找到,但不是一個操作 - 「操作找不到EPR是和WSA行動=」

+0

服務被發現,但操作不。 據我所知,該操作必須是一種服務方法。檢查了資源鏈接,但沒有任何線索是否有機會如何在.Net中使用它。 –

相關問題