Hello, I use the NOAA Soap Web Service (http://www.weather.gov/xml/) to access weather data using the System.Web.Services class. This has worked for a while up until a couple of weeks ago. A couple of weeks ago they changed to using a proxy servers in front of the actual server. Well, this change causes the Soap client to timeout waiting for a response.
You get this exception: Unhandled Exception: System.Net.WebException: Error getting response stream (Rea dDone2): ReceiveFailure ---> System.Exception: at System.Net.WebConnection.HandleError () at System.Net.WebConnection.ReadDone () at System.MulticastDelegate.invoke_void_IAsyncResult () at System.Net.Sockets.Socket+SocketAsyncResult.Complete () at System.Net.Sockets.Socket+Worker.Receive () at System.MulticastDelegate.invoke_void () in <0x000ad> System.Net.WebConnection:HandleError (WebExceptionStatus st, System.Exception e, System.String where)--- End of inner exception stack trace --- in <0x00158> System.Net.HttpWebRequest:EndGetResponse (IAsyncResult asyncResult)in <0x00047> System.Net.HttpWebRequest:GetResponse () in <0x0004d> System.Web.Services.Protocols.WebClientProtocol:GetWebResponse (Sys tem.Net.WebRequest request) I was not sure where the problem was so I tested using the MS WebClient. However, I get a different result : Http Protocol Violation exception. I did some packet captures, and I noticed something odd. It seems that the NOAA soap server is packaging up the soap response within another chunked HTTP response. Is this an allowed HTTP response? Maybe this is why the MS client throws an HTTP Protocol Violation exception? I did some debugging in /mcs/class/System/System.Net/WebConnection.cs to see what I can find, and I noticed that the code does not handle the case where an HTTP header is contained within a chunked response. Therefore, it never gets past the Transfer-Encoding: chunked line. Then it just continually loops until the response times out. I have enclosed a partial text output of my NOAA Soap client->server request (taken from an Ethereal capture) for reference: System.Web.Services request: POST /forecasts/xml/SOAP_server/ndfdXMLserver.php HTTP/1.1 User-Agent: Mono Web Services Client Protocol 1.1.4322.573 SOAPAction: "http://www.weather.gov/forecasts/xml/DWMLgen/wsdl/ndfdXML.wsdl#NDFDgenByDay" Content-Type: text/xml; charset=utf-8 Content-Length: 671 Expect: 100-continue Connection: keep-alive Host: www.weather.gov <?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><q1:NDFDgenByDay xmlns:q1="http://www.weather.gov/forecasts/xml/DWMLgen/wsdl/ndfdXML.wsdl"><latitude xsi:type="xsd:decimal">34.026099</latitude><longitude xsi:type="xsd:decimal">-84.311677</longitude><startDate xsi:type="xsd:date">2005-10-07</startDate><numDays xsi:type="xsd:integer">7</numDays><format xsi:type="xsd:string">24 hourly</format></q1:NDFDgenByDay></soap:Body></soap:Envelope> NOAA Soap Server Response: HTTP/1.1 100 Continue Via: 1.1 ics_server.xpc-mii.net (ICS 2.2.64.208) Connection: keep-alive Transfer-Encoding: chunked 5B4 HTTP/1.1 200 OK Date: Fri, 07 Oct 2005 19:20:42 GMT Accept-Ranges: bytes X-Powered-By: PHP/4.3.2 X-Soap-Server: NuSOAP/0.6.8 (1.82) Vary: Accept-Encoding,User-Agent Cache-Control: max-age=900 Expires: Fri, 07 Oct 2005 19:35:42 GMT Content-Type: text/xml;charset=ISO-8859-1 Server: Apache-Coyote/1.1 Connection: close ... The rest of the data is below in HTTP chunked format. . Any comments or questions are welcomed. Thanks, Jimmy _______________________________________________ Mono-list maillist - Mono-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-list