SOAP& C#中的Web服务:SOAP版本不匹配 [英] SOAP & webservice in C#: the version of SOAP does not match

查看:1114
本文介绍了SOAP& C#中的Web服务:SOAP版本不匹配的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经实现了对外部Web服务的查询,但是,我遇到以下错误:SOAP的版本可能不匹配:was not expected the protected namespace "http://schemas.xmlsoap.org/wsdl/" , "http://www.w3.org/2003/05/soap-envelope" expected.
下一个是我的代码:

Hi, I''ve implemented a query to an external Web service, but, I have the following error: It is possible that the version of SOAP does not match: was not expected the protected namespace "http://schemas.xmlsoap.org/wsdl/" , "http://www.w3.org/2003/05/soap-envelope" expected.
My code is the next:

try
  {
      Service ws = new Service();
      ws.SoapVersion = System.Web.Services.Protocols.SoapProtocolVersion.Soap12;

      ws.RequestEncoding = System.Text.Encoding.UTF8;
      result = ws.Method();
  }
  catch (Exception ex)
  {
       etc.....
  }


预先感谢您的回答


Thanks in advance for the answer

推荐答案



要解决问题,请访问以下网站,

SoapProtocolVersion枚举
Hi,

To solve problem refer below website,

SoapProtocolVersion Enumeration
Add or remove SOAP 1.2 for ASMX services



I hope you will find solution, If not then please add wsdl code and web.config code to question


这篇关于SOAP& C#中的Web服务:SOAP版本不匹配的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆