Hi there,
I ask for your help here, i'm having a trouble (maybe it's conceptual too). I'm using some webservices to get data, but first there's a webservice to login, that returns a sessionId when successful. I've been using the code from icodeblog's tutorial about SOAP web services (this one), but my problem is that i need this SOAP login thing to lock the application (like running on the main thread).
I've tried the performSelectorOnMainThread method, but my class doesn't recognize my selector ("[MainData login:]: unrecognized selector sent to instance 0x529f60'"). My code is something like this:
Login is declared on the interface, so i don't know what's wrong ;( I think i can use the Synchronous request, but i think this is a better way to do this. Any ideas?
I ask for your help here, i'm having a trouble (maybe it's conceptual too). I'm using some webservices to get data, but first there's a webservice to login, that returns a sessionId when successful. I've been using the code from icodeblog's tutorial about SOAP web services (this one), but my problem is that i need this SOAP login thing to lock the application (like running on the main thread).
I've tried the performSelectorOnMainThread method, but my class doesn't recognize my selector ("[MainData login:]: unrecognized selector sent to instance 0x529f60'"). My code is something like this:
Code:
- (void) init {
// some code ...
lg = [[LoginWebServiceData alloc] init];
[self performSelectorOnMainThread:@selector(login:) withObject:nil waitUntilDone:YES];
// After login, we check what's on LoginWebServiceData's sessionId to see if there's a valid response
sessionId = lg.sessionId;
}
- (void)login {
[lg loginWithUsernameAndPassword:@"asdf" :@"asdf"];
}
Login is declared on the interface, so i don't know what's wrong ;( I think i can use the Synchronous request, but i think this is a better way to do this. Any ideas?