CFHTTPMessage authenticacion
CFHTTPMessage authenticacion
- Subject: CFHTTPMessage authenticacion
- From: Tackel <email@hidden>
- Date: Tue, 3 Feb 2004 17:29:36 +0100
Hi Guys,
Working with WebServices I'm trying to connect to a Secure web but
just in one step. I can connect to the web in two step.
1 step - Got 401 Unauthorized error
2 step - Using the response create a new message:
CFHTTPMessageAddAuthentication( newMessage,
response,
CFSTR("user"),
CFSTR("password"),
NULL, FALSE)
My question is : is there any way to do it in just one step?
I've tried three solutions with no result:
1 - Create a response manually
CFHTTPMessageCreateResponse(kCFAllocatorDefault,
401,CFSTR ("Unauthorized"),
kCFHTTPVersion1_1) ;
The problem here is that I cannot set up the url. The good response
would be:
<CFHTTPMessage 0x476190>{url =
https://myserver.com/icservice;
status = HTTP/1.1 401 Unauthorized}
And the one created by me is:
<CFHTTPMessage 0x4744d0>{url = (null); status = HTTP/1.1 401
Unauthorized}
2 - Archive the good CFHTTPMessage response in a file. Then put this
file in the app folder:
Using:
response = WSMethodInvocationInvoke(soapCall);
[NSArchiver archiveRootObject: response toFile: [@"/goodresponse"]];
But if fails
3- Also I used CFHTTPMessageCopySerializedMessage to archive a dataRef
but it's stupid because once you create a new message with this dataref
the URL is still null.
Thanks,
Tackel
_______________________________________________
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.