In the SOAP binding mechanism in the WSDL spec: The soapAction attribute specifies the value of the SOAPAction header for this operation. For the HTTP protocol binding of SOAP, this is value required (it has no default value). For other SOAP protocol bindings, it MUST NOT be specified, and the soap peration element MAY be omitted.
if binding to HTTP, there must be one HTTP head field called SOAPAction presented. but the value has two possibilities. the value must be matched with the declared value in the WSDL, if it is declared in WSDL. however, if there's no SOAPAction attribute declared or declared, but has empty value in WSDL, the value would be an empty value (indicated as "")
I apologize for digging out this old post, but thought of using this instead of creating a new one.
I understand that how soapAction is declared and how is it referred in HTTPHeaders. But what is the real purpose of this attribute, specially when it can have an empty string.
Hi!
Well, you are not the only one wondering about the validity of soapAction.
Also consider the fact that it has a kind of dependency on the HTTP protocol being used - what happens with it if you use SOAP over JMS or SOAP over TCP?!??
Best wishes!
Ivan Krizsan wrote:Hi!
Well, you are not the only one wondering about the validity of soapAction.
Also consider the fact that it has a kind of dependency on the HTTP protocol being used - what happens with it if you use SOAP over JMS or SOAP over TCP?!??
Best wishes!
So does it mean that the usage of soapAction for Non-HTTP will not have any impact. But does it actually generate any errors at runtime/compile time
However, there is another use of SOAP that can be made that demonstrates the value of SOAPAction. This use involves not putting the method name in the SOAP envelope, and instead using the method of the underlying application protocol (which is most commonly ignored by Web services). In the case of HTTP that means using the POST method.
But after all, SOAP over HTTP always uses the POST method. So, I guess the author says that the method name would be specified only in the HTTP header and not in the body of SOAP.
Regards,
Dan
William Butler Yeats: All life is a preparation for something that probably will never happen. Unless you make it happen.
Hi again!
One way of using the soapAction HTTP header field can be to duplicate some information from within the XML payload, for instance an operation name.
This would make it easier for communication intermediaries to examine SOAP messages without having to parse the XML payload.
It is relatively easy to set up a filter in a firewall that allows HTTP POST request with a soapAction header field value of "doIt" and discard all other requests.
It would be much more difficult to set up a filter that tries to determine something from the XML - elements in different packages can have different namespace prefixes but still be perfectly legal.
However, as soon as you decide on using soapAction, you have committed yourself to HTTP - where would you put the soapAction HTTP header in a JMS, SMTP or SOAP over TCP message? If you really know what you do, it is fine.
Best wishes!
Ivan Krizsan wrote:
One way of using the soapAction HTTP header field can be to duplicate some information from within the XML payload, for instance an operation name.
This would make it easier for communication intermediaries to examine SOAP messages without having to parse the XML payload.
It is relatively easy to set up a filter in a firewall that allows HTTP POST request with a soapAction header field value of "doIt" and discard all other requests.
Not sure about this. Many complain that SOAP simply uses HTTP just as a transport protocol. So, now when it's convenient somehow, SOAP uses an HTTP feature in isolation. doesn't sound right.
Regards,
Dan
William Butler Yeats: All life is a preparation for something that probably will never happen. Unless you make it happen.
One more thing that I find peculiar, is the fact that the soapAction specifies the full url, while the binding to the actual address is done only one step later at the service definition.
Regards,
Dan
William Butler Yeats: All life is a preparation for something that probably will never happen. Unless you make it happen.
The SOAPAction HTTP request header field can be used to indicate the intent of the SOAP HTTP request. The value is a URI identifying the intent. SOAP places no restrictions on the format or specificity of the URI or that it is resolvable.
Thus, soapAction contains an URI, but it can be any URI.
Best wishes!