I’m working with SOAP web services which needs Windows authentication to access WSDL file.
For sample web services(which don’t require any authentication) my code snippet is working fine.But, if i am trying to connect with the other web services which needs credentials to access WSDL file, i m getting this error,
2012-01-19 13:43:19.381 SampleHTTP[2627:f803] Error = Error Domain=ASIHTTPRequestErrorDomain Code=3 "Authentication needed" UserInfo=0x68917a0 {NSLocalizedDescription=Authentication needed}
I am passing the correct username and password, below is my code snippet
NSURL *url = [NSURL URLWithString:@"http://path.Export"];
ASIHTTPRequest *request = [ASIHTTPRequest requestWithURL:url];
[request setUsername:@"Test"];
[request setPassword:@"Test123"];
[request setDelegate:self];
[request startSynchronous];
NSError *error = [request error];
if (!error) {
response = [request responseString];
}
else
NSLog(@"Error = %@",error);
Please, help me here.
Any help would be greatly appreciated.
Check Sudzc, it generates Xcode project for you
1: Type the web address of the WSDL to convert (if Protected, then enter username and password )
2: Choose the type of code bundle to create (Objective c) and download.
Just drag and drop the ‘Generated’ folder to your project and access all the SOAP messages.