Fog Creek Software
Discussion Board

Welcome! and rules

Joel on Software

SOAPAction for web services - interoperability

I am building a web service so our client can send us orders. We are using .NET, they are using MSXML, ASP, and VB to manually build their SOAP envelope.

When using MSXML, if I don't include the following line,
xmlRequest.setRequestHeader "SOAPAction", "insert something here"

I get this SOAPFault error (with a faultcode of soap:Client):
Unable to handle request without a valid action parameter. Please supply a valid soap action.

The attributes for my web service are as follows:

and for each method:
[WebMethod] [SoapDocumentMethod(Action="")]

The SOAPAction header can be anything (except null string), but it has to be there. Two questions:
1. Is needing a SOAPAction header part of w3c specifications? The client is saying that they send to dozens of web services, and never heard of SOAPAction or modifying the header. And I couldn't find it in w3c. Is this a MS quirk?
2. Is there a way to not require the SOAPAction header? It doesn't seem to be used for anything, because I changed the routing style to RequestElement.

Bryan Jonker
Friday, November 12, 2004

the first hit on google seems to explain it

it's listed in the TOC of the spec

note that Google indexes all of the w3c at, not, even though you can use either in the browser. (i don't know why they don't redirect to the 'official' one when you enter the 'wrong' one)

Saturday, November 13, 2004

After doing research, yep, that makes sense. That's the answer to question #1. Bad for me for not doing proper research.

However, it's been depreciated in SOAP 1.2 ( ).  And I couldn't find a question to #2 - is there a way to not require the SOAPAction header?

Bryan Jonker
Monday, November 15, 2004

you could re-write the server side proxy.
here's where reflector comes in handy, disassemble whatever the server-side proxy code is and look for soapaction, and you'll get your answer.

Monday, November 15, 2004

mb is right. There are ways to do it, but they all require you rewriting or modifying the standard code that was written to the original W3C spec. In fact, the only time I can think that a client would *not* send the SOAPAction header is if they were writing their own (like your client).

If your client isn't sending that now, and aren't willing to change it, you might be able to write some sort of proxy that adds the header and passes along the request as a stopgap solution. Might be easier than rewriting the server-side handler.

Cory Foy (
Saturday, November 20, 2004

*  Recent Topics

*  Fog Creek Home