4 Replies - 1948 Views - Last Post: 27 June 2012 - 03:32 AM

#1 manoj2989  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 12
  • Joined: 14-December 11

I accessing soap webservice to Iphone application..But unfortunately i

Posted 25 June 2012 - 03:05 AM

I accessing soap webservice to iphone application..But unfortunately i receive invalid user credential detail.

While i access webservice i receive following error

HTTP Error 401.1 - Unauthorized: Access is denied due to invalid credentials.<br>Internet Information Services (IIS)

For that now i found username and password authentocation to login thai webservice...So how to pass username and apssword statically in objective c.

Is This A Good Question/Topic? 0
  • +

Replies To: I accessing soap webservice to Iphone application..But unfortunately i

#2 JackOfAllTrades  Icon User is offline

  • Saucy!
  • member icon

Reputation: 6033
  • View blog
  • Posts: 23,414
  • Joined: 23-August 08

Re: I accessing soap webservice to Iphone application..But unfortunately i

Posted 25 June 2012 - 03:32 AM

Why don't you get it? We can't tell you ANYTHING unless you post your code...IN CODE TAGS!! :code:

And we probably need to know the details of the SOAP service to which you're connecting. Have you READ the documentation for the service?
Was This Post Helpful? 0
  • +
  • -

#3 manoj2989  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 12
  • Joined: 14-December 11

Re: I accessing soap webservice to Iphone application..But unfortunately i

Posted 25 June 2012 - 03:35 AM


NSURLCredential *credential = [NSURLCredential credentialWithUser:@"user"
//                                                             password:@"pass"
//                                                          persistence:NSURLCredentialPersistenceForSession];
//    NSURLProtectionSpace *protectionSpace = [[NSURLProtectionSpace alloc]
//                                             initWithHost:@"http://amwayqa.vishwak.net/AmwayOfflineService/OfflineService.asmx"
//                                             port:0
//                                             protocol:@"http"
//                                             realm:nil
//                                             authenticationMethod:nil];
//    
//
//    [[NSURLCredentialStorage sharedCredentialStorage] setDefaultCredential:credential
//                                                        forProtectionSpace:protectionSpace];
//    [protectionSpace release];
//
//    NSURLRequest *request =
//    [NSURLRequest requestWithURL:[NSURL URLWithString:@"http://amwayqa.vishwak.net/AmwayOfflineService/OfflineService.asmx"]];
//    
//    [NSURLConnection sendSynchronousRequest:request returningResponse:NULL error:NULL];



Was This Post Helpful? 0
  • +
  • -

#4 manoj2989  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 12
  • Joined: 14-December 11

Re: I accessing soap webservice to Iphone application..But unfortunately i

Posted 26 June 2012 - 03:10 AM

Any one crack this and give idea to do

Thanks,
Manoj.M
Was This Post Helpful? 0
  • +
  • -

#5 JackOfAllTrades  Icon User is offline

  • Saucy!
  • member icon

Reputation: 6033
  • View blog
  • Posts: 23,414
  • Joined: 23-August 08

Re: I accessing soap webservice to Iphone application..But unfortunately i

Posted 27 June 2012 - 03:32 AM

Consult the documentation for the web service, or seek support from its provider.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1