WS question
WS question
- Subject: WS question
- From: Arthur Roolfs <email@hidden>
- Date: Mon, 29 Dec 2003 13:24:04 -0500
From "WebServicesCore/WSMethodInvocation.h":
/*
For HTTP[S] based invocations, you can specify a CFHTTPMessageRef
as a property which will be used instead of creating a new
outgoing message. The CFHTTPMessageRef can contain header, proxy
and authentication information. The body of the message will be
ignored and replaced with the outgoing, serialized invocation.
After the invocation has executed, you can retrieve a copy of the
actual CFHTTPMessageRef, containing the details of the invocation
using kWSHTTPResponseMessage. Attempting to retrieve the response
message property before the invocation completes will result
return NULL.
See: <CFNetwork/CFHTTPMessage.h> for more information.
*/
extern CFStringRef kWSHTTPMessage; /* CFHTTPMessageRef
*/
extern CFStringRef kWSHTTPResponseMessage; /* CFHTTPMessageRef
*/
/*
To avoid having to create an entire CFHTTPMessageRef, these
properties are
individually settable. If they are set, they will override any
CFHTTPMessageRef
previously specified.
*/
As I need to do basic authentication to hit my web service, I wanted to
try this out.
My code:
// add authentication
CFHTTPMessageRef reqRef, respRef;
CFMutableDictionaryRef params;
reqRef = CFHTTPMessageCreateEmpty(kCFAllocatorDefault, YES);
respRef = CFHTTPMessageCreateEmpty(kCFAllocatorDefault, NO);
CFHTTPMessageAddAuthentication(reqRef, respRef,
CFSTR("Administrator"), CFSTR("iterated"),
kCFHTTPAuthenticationSchemeBasic, NO);
params = CFDictionaryCreateMutable(kCFAllocatorDefault,1,nil,nil);
CFDictionaryAddValue(params, kWSHTTPMessage, reqRef); // causes
a link error @ runtime
WSMethodInvocationSetParameters([self getRef], params, nil);
fResult = (NSDictionary*) WSMethodInvocationInvoke([self getRef]);
=============
It builds fine, but on running, it dies with:
ZeroLink: unknown symbol '_kWSHTTPMessage'
I *suspect* that the problem is with "kWSHTTPMessage", because if I
switch this to another constant, even "kWSHTTPResponseMessage"
(declared on the NEXT line) I do not have this problem.
Any help would be appreciated.
Arthur
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.