Connect iPhone to a Web Service?
New to iPhone develo开发者_StackOverflow中文版pment and working through exercises and examples to get me up to speed. Does anyone have a good reference for connecting an iPhone app to a website/webservice and push/pull data?
I have not used Core Resource yet, but it may be what you're looking for. It claims to provide (from the project's front page):
Easy querying into a webservice, e.g.:
[Note findAll:$D(@"Buster", @"author", @"createdAt DESC", @"$sort")];
Automatic serialization of returned results into a Core Data context
Easy resource-based tables using
CoreTableController
, e.g.:[self fetchForRelatedResource:parent withSort:@"lastName ASC"];
This one worked for me: SOAP/web services
If you have a wsdl file of the service you can use an automatic tool to build your service proxy and all the needed code in seconds.
SampleServiceProxy *proxy = [[SampleServiceProxy alloc]initWithUrl:@"YOUR
URL" AndDelegate:self];
[proxy GetDouble];
[proxy GetEnum];
[proxy getEnum:kTestEnumTestEnum2];
[proxy GetInt16];
[proxy GetInt32];
[proxy GetInt64];
[proxy GetString];
[proxy getListStrings];
精彩评论