Last post Sep 23, 2016 05:19 AM by Chris Zhao
Sep 21, 2016 02:37 PM|cerverojj|LINK
[SoapDocumentMethod(OneWay = true)]
public void newPriv(string username)
In my ASMX service, if my method gets called with SOAP v1.1 (text/xml) the response is 202 which is what I expect based on the OneWay tag. If it gets called with SOAP v1.2 (application/soap+xml) the response code is 200.
Sep 23, 2016 05:19 AM|Chris Zhao|LINK
SOAP Version 1.1 provides an HTTP binding for exchanging a request and a response. This binding provides a "request optional response" refinement that enables an HTTP response with status code 202 to have a SOAP envelope or to be empty.
4.7.9 One-Way Operations
There are differing interpretations of how HTTP is to be used when performing one-way operations.
R2714 For one-way operations, an INSTANCE MUST NOT return a HTTP response that contains an envelope. Specifically, the HTTP response entity-body must be empty.
R2750 A CONSUMER MUST ignore an envelope carried in a HTTP response message in a one-way operation.
R2727 For one-way operations, a CONSUMER MUST NOT interpret a successful HTTP response status code (i.e., 2xx) to mean the message is valid or that the receiver would process it.
One-way operations do not produce SOAP responses. Therefore, the Profile prohibits sending a SOAP envelope in response to a one-way operation. This means that transmission of one-way operations can not result in processing level responses or errors. For
example, a "500 Internal Server Error" HTTP response that contains a fault can not be returned in this situation.
The HTTP response to a one-way operation indicates the success or failure of the transmission of the message. Based on the semantics of the different response status codes supported by the HTTP protocol, the Profile specifies that "200" and "202" are
the preferred status codes that the sender should expect, signifying that the one-way message was received. A successful transmission does not indicate that the SOAP processing layer and the application logic has had a chance to validate the envelope or have
committed to processing it.
#HTTP status code dependent transitions