Do I have a way to find out if a request is a soap request in an AuthenticateRequest event for HttpApplication? Checking ServerVariables ["HTTP_SOAPACTION"] does not seem to work all the time.
public void Init(HttpApplication context) {
context.AuthenticateRequest += new EventHandler(AuthenticateRequest);
}
protected void AuthenticateRequest(object sender, EventArgs e) {
app = sender as HttpApplication;
if (app.Request.ServerVariables["HTTP_SOAPACTION"] != null) {
}
}
I disabled HTTP POST and HTTP GET for web services in my web.config file.
<webServices>
<protocols>
<remove name="HttpGet" />
<remove name="HttpPost" />
<add name="AnyHttpSoap" />
</protocols>
</webServices>
Finding ContentType for soap + xml only partially solves my problem. For instance,
Cache-Control: no-cache
Connection: Keep-Alive
Content-Length: 1131
Content-Type: text/xml
Accept: *
SOAPAction: " http://www.wsnamespace.com/myservice/mymethod", , . "mymethod" - [WebMethod], " http://www.wsnamespace.com/myservice" - -, .
(NuSOAP PHP,.NET, Java ..).