Web Services Compression and the Compact Framework - Sample code from MEDC Oz
Tada, this is the tidied up Web Services Compression sample code from my Connectivity session at the MEDC Australia event.
The sample code was borrowed from https://www.businessanyplace.net/?p=wscompress2 :-) Thanks guys!!
I've posted my sample code on Darren's most excellent www.Projectdistributor.net at https://projectdistributor.net/Projects/Project.aspx?projectId=216 and it's dependent on the "SharpZipLib" from https://www.icsharpcode.net/OpenSource/SharpZipLib/Default.aspx
If you update the Web Reference then you must go back and tweak the associated Reference.cs proxy file and add back the [CompressionSoapExtension] attribute.
For example
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("https://tempuri.org/GetCompressedData", RequestNamespace="https://tempuri.org/", ResponseNamespace="https://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
[CompressionSoapExtension]
public System.Data.DataSet GetCompressedData() {
object[] results = this.Invoke("GetCompressedData", new object[0]);
return ((System.Data.DataSet)(results[0]));
}
Cheers Dave
PS, sorry have turned off anonymous comments on my blog as it's getting a ton of spam:(
That said I will post any comments that don't include the words "longer", "stronger" or "nasal delivery" :-)