encoding:gzip and WebServices
encoding:gzip and WebServices
- Subject: encoding:gzip and WebServices
- From: Stephan Burlot <email@hidden>
- Date: Thu, 15 Feb 2007 14:36:05 +0100
Hi,
What is the way to handle gzip encoded responses from a SOAP server
using the WebServiceCore?
I add a Accept-Encoding;gzip to the headers of my request, I also do
WSMethodInvocationSetProperty(ref, kWSDebugIncomingHeaders,
kCFBooleanTrue);
to get the headers response and see if the result was gzip'd,
but it seems that as soon as I call
fResult = (NSMutableDictionary *)WSMethodInvocationInvoke(invocation);
I get this error printed to the console:
XML Parse error occurred: <CFDictionary 0x37c6b0 [0xa08071c0]>{type =
fixed-mutable, count = 4, capacity = 4, pairs = (
0 : <CFString 0xa080a2d8 [0xa08071c0]>{contents =
"kCFXMLTreeErrorStatusCode"} = <CFNumber 0x30c670 [0xa08071c0]>{value
= +10, type = kCFNumberSInt32Type}
1 : <CFString 0xa080a2e8 [0xa08071c0]>{contents =
"kCFXMLTreeErrorLocation"} = <CFNumber 0x37c630 [0xa08071c0]>{value =
+41, type = kCFNumberSInt32Type}
2 : <CFString 0xa080a2f8 [0xa08071c0]>{contents =
"kCFXMLTreeErrorLineNumber"} = <CFNumber 0x30c660 [0xa08071c0]>{value
= +2, type = kCFNumberSInt32Type}
3 : <CFString 0xa080a308 [0xa08071c0]>{contents =
"kCFXMLTreeErrorDescription"} = <CFString 0x37c5e0 [0xa08071c0]>
{contents = "Encountered unexpected character 0x1f ('') at top-level"}
)}
And I also have "/FaultCode" set in the result dictionary.
I can see in the headers that the result is encoded: "Content-
Encoding" = gzip;
Is there a way to pre-process the result returned by my method so I
can unzip it before the xml parser fire?
Thanks,
Stephan_______________________________________________
Cocoa-dev mailing list (email@hidden)
Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden