Server did not recognize the value of HTTP Header SOAPAction

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.

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.

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 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.

So basically the web service was moved from to but the “namespace” of the web service stayed as because no one changed it.

And that only took about 4 hours to work out!

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

70 Replies to “Server did not recognize the value of HTTP Header SOAPAction”

  1. You can also get this if you call the wrong method. For example, you get error if you call sites.asmx for method GetAllSubWebCollection, instead of calling webs.asmx. Server did not recognize the value of HTTP Header SOAPAction:

  2. I’ve to set mimeheaders to get rid of this error message. MimeHeaders mimeHeader = message.getMimeHeaders(); //change header’s attribute mimeHeader.setHeader(“Content-Type”, “text/xml”); mimeHeader.setHeader(“SOAPACTION”, “”);

  3. Pingback: Exactly What You Write Makes a Lot of Difference -
  4. Pingback: Server did not recognize the value of HTTP Header SOAPAction | siddi khadar vali pothuganti
  5. this worked for me: MimeHeaders mimeHeader = soapMessage.getMimeHeaders(); mimeHeader.setHeader(“SOAPACTION”, “”); mimeHeader.setHeader(“Content-Type”, “text/xml; charset=utf-8”); mimeHeader.setHeader(“Connection”, “keep-alive”);

  6. Pingback: Server did not recognize the value of HTTP Header SOAPAction - C# Solution - Developers Q & A
  7. I have the same problem on a template (.xsn) that opens in InfoPath, so it’s not a web form. The problem occurs after I have moved the whole sub site to a new place. What to do now? The SharePoint site data connections’ URLs seem ok, but if I try to modify them (to verify that they are connected), Infopath is unable to connect to the site – even though the URL seems to be quite ok…

  8. The problem I had was that I did not realise the namespace was case sensitive. Fixed this and this has resolved this error

Leave a Reply

Your email address will not be published.