【问题标题】:.net webservice in soap. Server did not recognize the value of HTTP Header SOAPAction肥皂中的.net 网络服务。服务器无法识别 HTTP Header SOAPAction 的值
【发布时间】:2012-01-19 04:08:54
【问题描述】:

我正在编写一个将由 java 程序使用的 .net 网络服务。 我收到此错误:

System.Web.Services.Protocols.SoapException: 服务器无法识别 HTTP Header SOAPAction: 的值。 在 System.Web.Services.Protocols.Soap11ServerProtocolHelper.RouteRequest() 在 System.Web.Services.Protocols.SoapServerProtocol.RouteRequest(SoapServerMessage 消息) 在 System.Web.Services.Protocols.SoapServerProtocol.Initialize() 在 System.Web.Services.Protocols.ServerProtocol.SetContext(类型类型,HttpContext 上下文,HttpRequest 请求,HttpResponse 响应) 在 System.Web.Services.Protocols.ServerProtocolFactory.Create(类型类型、HttpContext 上下文、HttpRequest 请求、HttpResponse 响应、Boolean& abortProcessing)

你知道这是什么意思吗?找了好久都没找到解决办法!

【问题讨论】:

标签: .net web-services soap


【解决方案1】:

.Net WCF 将自动对标头和消息进行编码,而 java 不会对标头进行编码。标头不匹配,因为一个已编码而另一个未编码。

所以你必须打开

                Client prxy = new Client("BindingName");
            prxy.Endpoint.Contract.ProtectionLevel  =System.Net.Security.ProtectionLevel.Sign;
            prxy.Open();

我希望这会有所帮助,而且我认为您无法在配置文件中执行此操作,因此您必须在代码中执行此操作。哥!

这是针对 .Net 客户端的,抱歉。但你可能会从中得到一些东西!

Msdn, how to set the protectionlevel of a service

【讨论】:

    猜你喜欢
    • 2014-12-02
    • 2016-04-30
    • 2011-12-19
    • 1970-01-01
    • 2018-11-16
    • 1970-01-01
    • 1970-01-01
    • 2014-05-06
    • 1970-01-01
    相关资源
    最近更新 更多