Re: SOAP authentication header
Re: SOAP authentication header
- Subject: Re: SOAP authentication header
- From: Ivan C Myrvold <email@hidden>
- Date: Tue, 2 Oct 2007 18:27:24 +0200
I found out how, from another source, that I can make it this way:
NSString *headerString = [NSString
stringWithFormat:@"<Authentication xmlns=\"%@\">\n<Username>%@</
Username>\n<Password>%@</Password>\n</Authentication>", @"http://
24sevenOffice.com/webservices", @"testuser",@"testpw"];
NSArray *loginHeaders = [NSArray arrayWithObject:headerString];
WSMethodInvocationSetProperty(soapCall, (CFStringRef)
kWSSOAPMessageHeaders, (CFArrayRef) loginHeaders);
This will make a SOAP envelope header.
Ivan
Den 2. okt. 2007 kl. 13:22 skrev Ivan C Myrvold:
I am unable to find any reference to how I can make a SOAP Envelope
Header. I would appreciate any pointers to documentation of how to
make this in Cocoa. I always end up with only the SOAP envelope body.
I have used SOAPClient to test this with, and that works
wondefully, but I am unable to do this myself in Cocoa.
The request should be something like this (the user and pw here is
not working).
-<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
>
-<SOAP-ENV:Header>
-<Authentication>
-<Username>testuser</Username>
-<Password>testpw</Password>
</Authentication>
</SOAP-ENV:Header>
-<SOAP-ENV:Body>
-<GetCompanyId xmlns="http://24sevenOffice.com/webservices">
-<consumerCompanyNo xsi:type="xsd:string">1</consumerCompanyNo>
</GetCompanyId>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Ivan
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please 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
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please 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