Re: SOAPAction Woes

Tech-Archive recommends: Fix windows errors by optimizing your registry



Gaurav Vaish (EduJini.IN) napsal(a):
should be possible to set .NET web service to not require SOAPAction.
It works fine for me, so what do you mean by "it still will"?

Surprisingly... because the documentation reads that "SOAPAction must be set to empty string" implies that a header:
SOAPAction: ""

must be sent. The same is provided in the sample as well.
If it does not expect SOAPAction header (HTTP Header), it is acting against the specifications.
IIRC, not provided SOAPAction in custom requests has always generated an error for me..

.. and hence my statement "It still will" -- meaning that ASMX requires a SOAPAction HTTP header. The value may be empty... that's a different story. But the header must still be present in the request.

I hope I am clear this time :)


Yes, you are clear, but I think that you are not true... :-)
Document which link I posted yesterday (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwebsrv/html/howwebmeth.asp) contains this text:

If you'd rather not rely on the SOAPAction header for method dispatching, you can instruct the .asmx handler to use the request element's name by annotating the class with the [SoapDocumentService] attribute's RoutingStyle property. If you do this, you should probably also indicate that the WebMethods don't require a SOAPAction value by setting their values to the empty string.
....
In this case, the handler doesn't even look at the SOAPAction value---it uses the name of the request element instead.

So how could be SOAPAction required when the handler doesn't even look for it for method dispatching?

Zdenek Drlik, MCAD
.



Relevant Pages

  • Re: SOAPACTIOn Missing!
    ... The SOAP 1.1 specification says this about the HTTP SOAPAction header; ... The SOAPAction HTTP request header field can be used to indicate the ...
    (microsoft.public.dotnet.framework.webservices)
  • Re: Posting SOAP messages with Msxml2.ServerXMLHTTP.4.0
    ... I found the SOAPAction element in the WSDL file and its only attribute was ... I am still unable to create a SOAPAction header using the ... >> to reach the server, however I am receiving a message saying "No SOAPAction ... but I am getting an error message besically saying "The requested ...
    (microsoft.public.scripting.jscript)
  • Re: Posting SOAP messages with Msxml2.ServerXMLHTTP.4.0
    ... soapAction attribute, set your SOAPAction to this value. ... > to reach the server, however I am receiving a message saying "No SOAPAction ... but I am getting an error message besically saying "The requested ... > header was not found": ...
    (microsoft.public.scripting.jscript)
  • Re: SOAPAction Woes
    ... What WS-R says is that there should be an 'Action' element in Header part in Message. ... And the value of this Action element must be same as that of SOAPAction provided in HTTP-Headers. ...
    (microsoft.public.dotnet.framework.aspnet.webservices)
  • Re: SOAPAction Woes
    ... because the documentation reads that "SOAPAction must be set ... to empty string" implies that a header: ... If it does not expect SOAPAction header, ... not provided SOAPAction in custom requests has always generated an ...
    (microsoft.public.dotnet.framework.aspnet.webservices)