I have a case where it would be handy to call a SOAP service from MSBuild using the HttpWebRequest task. Unfortunately the service expects the SOAPAction header (it's common for SOAP services to expect the header). Unfortunately it's not possible to supply additional HTTP headers in the current HttpWebRequest implementation.
In order to verify my assumption about the necessity of SOAPAction header, I have experimented with curl. I have found an absolute minimum of overridden HTTP headers, which are sufficient for getting a valid response from the SOAP service:
Hello,
I have a case where it would be handy to call a SOAP service from MSBuild using the
HttpWebRequest
task. Unfortunately the service expects theSOAPAction
header (it's common for SOAP services to expect the header). Unfortunately it's not possible to supply additional HTTP headers in the currentHttpWebRequest
implementation.In order to verify my assumption about the necessity of
SOAPAction
header, I have experimented withcurl
. I have found an absolute minimum of overridden HTTP headers, which are sufficient for getting a valid response from the SOAP service: