Gajendrasinh Chauhan
Gajendrasinh Chauhan

Reputation: 3397

How do I call multiple web services in one project?

I am creating a login application. Most of data is generated using a web service. I've created a window based app. I would like to implement the rest of my project by placing all of my code in the AppDelegate.

I already have one web service running and now I would like to add another service in my AppDelegate.

Upvotes: 0

Views: 374

Answers (1)

tacos_tacos_tacos
tacos_tacos_tacos

Reputation: 10585

Your question is pretty unclear, but there is absolutely nothing stopping you from making multiple NSURLConnections to the web service(s) in question. I mean, for example if you are using SBJSON why not:

NSString *jsonOne = [NSURLConnection sendSynchronousRequest:requestOne returningResponse:&response error:&error];
NSString *jsonTwo = [NSURLConnection sendSynchronousRequest:requestTwo returningResponse:&response error:&error];

NSDictionary *wsDictOne = [self.jsonParser objectWithString:jsonOne error:NULL];
NSDictionary *wsDictTwo = [self.jsonParser objectWithString:jsonTwo error:NULL];

I think you need to expand your question, but no, there is nothing stopping you from calling all the web services you would like.

Upvotes: 5

Related Questions