在C#应用程序中使用Java Web服务

问题描述:

我将开发一个使用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,所以它不能转换为读取和处理结果。

如何使用成功的服务,我该怎么做?

谢谢你们!

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

这篇文章中描述如果Axis2引擎找不到服务和消息的操作时,它立即失败,发送错误给发件人。

如果没有找到服务 - “服务找不到EPR是” 如果服务中找到,但不是一个操作 - “操作找不到EPR是和WSA行动=”

+0

服务被发现,但操作不。 据我所知,该操作必须是一种服务方法。检查了资源链接,但没有任何线索是否有机会如何在.Net中使用它。 –