zoukankan      html  css  js  c++  java
  • 服务器未能识别 HTTP 标头 SOAPAction 的值

    SOAPAction HTTP request header被用来标识SOAP HTTP请求的目的地,其值是个URI地址。SOAP发送并不限制格式、URI特征或其必须可解析,那么在这种情况下,发送一个HTTP SOAP请求时,其HTTP客户端必须使用/指明SOAPAction HTTP request header。

    SOAPAction header的内容可以被用在服务端,诸如:防火墙适当的过滤基于HTTP的SOAP请求消息等场景。SOAPAction header的值为空串("")表示SOAP消息的目的地由HTTP请求的URI标识;无值则表示没有指定这条消息的目的地。

    跨平台调用Web Service出现:"服务器未能识别 HTTP 标头 SOAPAction 的值"的解决办法:

    症状一:

    Web Service + ASP.NET 应用程序部署到服务器默认目录中,在IE中用http://<服务器地址>/<程序目录名>/<默认启动页面名>发生“服务器未能识别 HTTP 标头 SOAPAction 的值”错误。

    症状二:

    在通过WCF 客户端ChannelFactory<> 上调用.NET Web Service的服务时,出现"服务器未能识别 HTTP 标头 SOAPAction 的值"。

    解决对策:

    给.NET的WebService类(即.asmx文件下的类)添加属性[SoapDocumentService(RoutingStyle=SoapServiceRoutingStyle.RequestElement)]

        /// <summary>
        /// Summary description for Service1
        /// </summary>
        [WebService(Namespace = "http://tempuri.org/")]
        [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
        [SoapDocumentService(RoutingStyle= SoapServiceRoutingStyle.RequestElement)]
        [System.ComponentModel.ToolboxItem(false)]
        // To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line.
        // [System.Web.Script.Services.ScriptService]
        public class SubmitFormTestService : System.Web.Services.WebService

    欢迎大家扫描下面二维码成为我的客户,为你服务和上云

  • 相关阅读:
    基于网络监听方式的电子邮件实现基础
    在一个存储过程里面执行另一个存储过程的应用
    Vim复制单个字符
    Linux下fsck修复文件系统
    (转载)2011年金山软件C++开发工程师笔试题 关于逆序输出
    (转载)C++ string详解
    (转载)Linux下网络API
    (转载)软中断和硬中断
    (转载)找工作经历总结百度offer
    (转载)Vim入门图解说明
  • 原文地址:https://www.cnblogs.com/shanyou/p/1832086.html
Copyright © 2011-2022 走看看