简体   繁体   English

将iPhone连接到Web服务?

[英]Connect iPhone to a Web Service?

New to iPhone development and working through exercises and examples to get me up to speed. iPhone开发的新手,并通过练习和示例使我快速入门。 Does anyone have a good reference for connecting an iPhone app to a website/webservice and push/pull data? 有没有人将iPhone应用程序连接到网站/网络服务以及推/拉数据方面有很好的参考?

I have not used Core Resource yet, but it may be what you're looking for. 我尚未使用Core Resource ,但它可能正是您想要的。 It claims to provide (from the project's front page): 它声称提供(从项目的首页):

  1. Easy querying into a webservice, eg: 轻松查询Web服务,例如:

     [Note findAll:$D(@"Buster", @"author", @"createdAt DESC", @"$sort")]; 
  2. Automatic serialization of returned results into a Core Data context 将返回结果自动序列化到Core Data上下文中

  3. Easy resource-based tables using CoreTableController , eg: 使用CoreTableController轻松基于资源的表,例如:

     [self fetchForRelatedResource:parent withSort:@"lastName ASC"]; 

这对我有用SOAP / Web服务

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. 如果您拥有该服务的wsdl文件,则可以使用自动工具来构建服务代理以及所有所需的代码(以秒为单位)。

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];

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM