Simon Fell > Its just code > Compression with .NET 2.0

Wednesday, November 9, 2005

4 years on, .NET starts to catch up with PocketSOAP :), .NET 2.0 supports automatically unzipping a gzipped response, and advertises this fact by including the Accept-Encoding: gzip header in the request, good so far. But the docs are wrong, the docs indicate that this is on by default, but my testing shows that its off by default and you need to explicitly turn it on (by doing svc.EnableDecompression = true; where svc is an instance of your WS proxy class). It a pity that they didn't also support compressing the request, looks like if you want that, you'll still need to go this route.

I also see that some of the Indigo WSDL parsing bugs seem to have been back ported to VS.NET 2005, opening the sforce WSDL in the VS.NET ide gives ~100 warnings, all bogus, it seems like

  • the ide doesn't understand xsd:import correctly, it complains about undefined types, when in fact the type is declared in the imported schema.
  • it suffers from the indigo bug around claiming that namespace declarations are missing when the NS decl is on the wsdl:definition element rather than in the schema itself (looks like it take the schema element out and makes it a new document without adding in all the in scope namespaces, tsch tsch, someone their should know better than that)