|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
100-continue status and HttpSoapClientProtocol (Webservice consumer)I'm writting a Webservice consumer in asp.net 2.0 and facing the following problem : 1. each time a request to a webservice method is made, a Expect: 100-continue header is sent (I'm ok with that) 2. My weblogic server (which host the webservices) handles that correctly and send back a 100-continue response. 3. Then my asp.net client send the data and every thing goes well. (I have the log of the traffic if you need) But, in some cases (heavy load,...) my WLS does NOT send back a 100-continue after it received the Expect: 100-continue header (sequence 2). The point is that despite not receiving the 100-continue response, my asp.net client send the data (sequence 3) and get stuck until the timeout because the WLS will not handle the posted data... My question is how to handle the fact that when I do not receive a 100-continue after posting the header i must abort the request or retry it ?? HttpSoapClientProtocol shouldn't do that for me ? Thanks for your reply Stephane When the WLS server fails to send back a CONTINUE, do you know what the delay
is before the client sends the body? Also, here is one important question: does this behavior happen only on the first request (the first for that particular client's process lifetime), or on any request. The following states that if a client has never received a 100-continue from a server (in this case, hasn't received it yet in that process lifetime), it should not wait for 100-continue before sending the body. This rule is in place for compatability with servers that incorrectly handle the 100-continue header. http://www.w3.org/Protocols/rfc2616/rfc2616-sec8.html#sec8.2.3 "Because of the presence of older implementations, the protocol allows ambiguous situations in which a client may send "Expect: 100- continue" without receiving either a 417 (Expectation Failed) status or a 100 (Continue) status. Therefore, when a client sends this header field to an origin server (possibly via a proxy) from which it has never seen a 100 (Continue) status, the client SHOULD NOT wait for an indefinite period before sending the request body. " Show quote > Hi, > > I'm writting a Webservice consumer in asp.net 2.0 and facing the > following problem : > > 1. each time a request to a webservice method is made, a Expect: > 100-continue header is sent (I'm ok with that) > 2. My weblogic server (which host the webservices) handles that > correctly and send back a 100-continue response. > 3. Then my asp.net client send the data and every thing goes well. > (I have the log of the traffic if you need) > > But, in some cases (heavy load,...) my WLS does NOT send back a > 100-continue after it received the Expect: 100-continue header > (sequence 2). > The point is that despite not receiving the 100-continue response, my > asp.net client send the data (sequence 3) and get stuck until the > timeout because the WLS will not handle the posted data... > My question is how to handle the fact that when I do not receive a > 100-continue after posting the header i must abort the request or > retry it ?? HttpSoapClientProtocol shouldn't do that for me ? > > Thanks for your reply > Stephane Thanks for your reply.
Here is a small extract from the traffic sniffed during an incident : 16:22:22.222620000 -> Header POST /ONYX WebServices HTTP /1.1..User-Agent : Mozilla/4.0(compatible; MSIE 6.0; MS Web Services Client Protocol 2.0.50727.42)..Content-Type: text/xml; charset=utf-8..SOAPAction: ""..Host:32.50.32.104:7031..Content-Length: 928..Expect:100-continue... 16:22:22.334617000 -> Ack (without 100-continue) 16:22:22.571806000 -> Body <?xml version="1.0" encoding="utf-8"?><soap:Envelope>.......</soap:Envelope> 16:22:22.684826000 -> Ack The problem appears after requesting many times the WLS from the asp.net (for me it seems random...) ASP.NET -> WLS : header Expect:100-continue WLS -> ASP.NET : Ack 100-continue ASP.NET -> WLS : Body call to the webservice method WLS -> ASP.NET : Ack WLS Processing time WLS -> ASP.NET : 200 data response from a webservice method call ASP.NET -> WLS : Ack WLS -> ASP.NET : data response from a webservice method call ASP.NET -> WLS : Ack WLS -> ASP.NET : data response from a webservice method call ASP.NET -> WLS : Ack ASP.NET -> WLS : header Expect:100-continue WLS -> ASP.NET : Ack (without 100-continue) ASP.NET -> WLS : Body call to the webservice method WLS -> ASP.NET : Ack And then asp.net is waiting for the timeout (I do not get any trace in my webservice logs neither in the WLS access.log for the last request). Stephane Thus wrote spapel***@wanadoo.fr,
Show quote > Hi, As a workaround, you could disable Expectations by setting > > I'm writting a Webservice consumer in asp.net 2.0 and facing the > following problem : > > 1. each time a request to a webservice method is made, a Expect: > 100-continue header is sent (I'm ok with that) > 2. My weblogic server (which host the webservices) handles that > correctly and send back a 100-continue response. > 3. Then my asp.net client send the data and every thing goes well. > (I have the log of the traffic if you need) > > But, in some cases (heavy load,...) my WLS does NOT send back a > 100-continue after it received the Expect: 100-continue header > (sequence 2). > The point is that despite not receiving the 100-continue response, my > asp.net client send the data (sequence 3) and get stuck until the > timeout because the WLS will not handle the posted data... > My question is how to handle the fact that when I do not receive a > 100-continue after posting the header i must abort the request or > retry it ?? HttpSoapClientProtocol shouldn't do that for me ? ServicePointManager.Expect100Continue = false; Cheers, -- Joerg Jooss news-re***@joergjooss.de |
|||||||||||||||||||||||