服务器无法识别的HTTP标头的SOAPAction值 [英] Server did not recognize the value of HTTP Header SOAPAction

查看:1628
本文介绍了服务器无法识别的HTTP标头的SOAPAction值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

   [SoapRpcMethod(Action = "http://cyberindigo/TempWebService/InsertXML",
    RequestNamespace = "http://cyberindigo/TempWebService/Request",
    RequestElementName = "InsertXMLRequest",
    ResponseNamespace = "http://cyberindigo/TempWebService/Response",
    ResponseElementName = "InsertXMLResponse",
    Use = System.Web.Services.Description.SoapBindingUse.Literal)]

    [WebMethod]
    public string InsertXML(string Jobs)
    {
        return "Hi";
    }

当我使用XMLHtt prequest它提供了以下错误访问它的问题
服务器无法识别的HTTP标头的SOAPAction的值:<一个href=\"http://Cyberindigo/TempWebService/InsertXML\">http://Cyberindigo/TempWebService/InsertXML

The Problem when I am accessing it using XMLHttpRequest it gives following error Server did not recognize the value of HTTP Header SOAPAction: http://Cyberindigo/TempWebService/InsertXML

推荐答案

这篇文章的下一部分的来源是:

The source of the next part of this post is:

<一个href=\"http://bluebones.net/2003/07/server-did-not-recognize-http-header-soapaction/\">http://bluebones.net/2003/07/server-did-not-recognize-http-header-soapaction/

(因为OP不想给归属,并感谢Peter)

(since the OP didn't want to give attribution, and thanks to Peter)

请注意,bakert是文本的原作者,而不是OP。

Please note that bakert is the original author of the text, not the OP.

看到,因为无处在互联网上我能找到这样的错误,我想我会分享我的长搜索水果这个错误的解释。

Seeing as nowhere on the internet can I find an explanation of this error I thought I’d share the fruits of my long search for this bug.

这意味着(至少在我的情况),您的访问与SOAP的Web服务,并传递一个SOAPAction的参数不匹配什么服务期待的HTTP请求。​​

It means (at least in my case) that you are accessing a web service with SOAP and passing a SOAPAction parameter in the HTTP request that does not match what the service is expecting.

我处于困境了,因为我们从一台服务器移到一个Web服务到另一个,因此我改变了空间(不要Web服务的命名空间和.NET命名空间之间混淆)在调用C#文件,以匹配新的服务器。但服务器不关心的http实际的Web现实//yournamespace.com/blah只在乎你发送你说你在服务器上期待。实际上,如果有什么事,还有与否并不在意。

I got in a pickle because we moved a web service from one server to another and thus I changed the "namespace" (don’t get confused between web service namespaces and .net namespaces) in the calling C# file to match the new server. But the server doesn’t care about the actual web reality of http //yournamespace.com/blah it only cares that you send it what you have said you are expecting on the server. It doesn’t care if there’s actually anything there or not.

所以基本上web服务是从http感动://foo.com/servicename到http://bar.com/servicename但Web服务的命名空间留为http://foo.com/servicename因为没有人改变了它。

So basically the web service was moved from http ://foo.com/servicename to http ://bar.com/servicename but the "namespace" of the web service stayed as http ://foo.com/servicename because no one changed it.

而这仅仅用了大约4个小时的工作了!

And that only took about 4 hours to work out!

如果您遇到了类似的问题,但不能工作我在说什么在这里,随时给我邮寄对bakert+web@gmail.com - !我不希望任何人我4小时

If you’re having a similar problem but can’t work what I’m saying here, feel free to mail me on bakert+web@gmail.com – I wouldn’t wish my four hours on anyone!

这篇关于服务器无法识别的HTTP标头的SOAPAction值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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