Getting HTTP headers from a WSMethodInvocationRef
Getting HTTP headers from a WSMethodInvocationRef
- Subject: Getting HTTP headers from a WSMethodInvocationRef
- From: Simone Manganelli <email@hidden>
- Date: Wed, 6 Sep 2006 03:40:21 -0700
I'm trying to create a Cocoa application that uses Web Services Core
to communicate with a XML-RPC web app. The problem I'm having is
regarding setting and getting the HTTP headers for the request and
the result. The Web Services Core documentation says that I can set
additional HTTP headers using a call such as:
WSMethodInvocationSetProperty(theNewRPCCall, (CFStringRef)
kWSHTTPExtraHeaders, (CFTypeRef) headers);
where the headers variable is an NSDictionary with objects and keys
for the extra HTTP headers that need to be transmitted.
The documentation also seems to imply that I should be able to
retrieve the header information by getting the message property
kWSHTTPResponseMessage after the invocation completes. I'm
attempting to do so like so:
CFHTTPMessageRef testProp = WSMethodInvocationCopyProperty
(theRPCCall, (CFStringRef) kWSHTTPResponseMessage);
This testProp variable always seems to return NULL, however. Is this
the correct way to retrieve HTTP headers that are transmitted with
the response to the invocation, or is there an easier/better way to
do it?
-- Simone
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden