[Mono-list] NOAA Soap Server and System.Web.Services problems

Gonzalo Paniagua Javier gonzalo at ximian.com
Sun Oct 9 16:36:10 EDT 2005

On Fri, 2005-10-07 at 16:48 -0400, Jimmy wrote:
> 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 (ReadDone2): ReceiveFailure ---> System.Exception:

Right. The server is sending back a chunk header followed by a full
response. We should be throwing the same exception that MS.

Anyway, as a hack to make this work if they don't fix their server, you
can add these few lines to the wsdl generated file:
protected override WebRequest GetWebRequest (Uri uri)
HttpWebRequest request = (HttpWebRequest) base.GetWebRequest (uri);
request.ProtocolVersion = HttpVersion.Version10;
return request;

To force HTTP/1.0 protocol which prevents the server from using chunked

I tried that with the NOAA service and I'm getting a '502 Bad Gateway'
error right now.


More information about the Mono-list mailing list