tg2007
tg2007

Reputation: 833

consuming web services in IOS app and caching

I am working on an app that consumes web services for authentication. Once authenticated I request several other methods via soap calls to retrieve this data. All of this is working fine with the exception of logging in the second time.

The first time the app is run I can login with sending user/pass from my textfields. When logging out of the app I load the login screen again. This time I put in the same username but instead of the correct password, I enter in a bogus password and I am still able to login. I have created a series of NSLog statements to track down whats going on and I do see the new user/pass variables being sent but its as if this connection has been cached and it doesn't matter what I'm sending in the password field this time.

Are there tmp files stored in the apps sandbox that could be deleted to see if this would correct the problem? I think things are being cached and at this point I am beginning to look server side and/or to local tmp files.

I also tried sending changing up my soap header to include no-cache directives but I need to do more research on that.

thanks in advance!

Upvotes: 1

Views: 728

Answers (1)

tg2007
tg2007

Reputation: 833

Turns out that since I was using HTTP authentication method to pass soap calls my authentication was being cached. No matter what I was sending in my NSURLMutableRequest was ignored because of caching. I came across this article that fixes the problem.

Thanks to Johannes Fahrenkrug for writing this article here: http://www.springenwerk.com/2008/11/i-am-currently-building-iphone.html

Upvotes: 1

Related Questions