在 iOS 上使用 SOAP 网络服务

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/6388930/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-30 20:24:20  来源:igfitidea点击:

Consuming SOAP web services on iOS

ioscocoa-touchweb-services

提问by Saro Khatchatourian

I am trying to write applications for iPad which take advantage of web services. I know the concept of a web service and have used it in C#/.NET. I need to know how to do this on an iPad. Can anyone recommend a good book or reading material on webservices for iOS?

我正在尝试为 iPad 编写利用网络服务的应用程序。我知道 Web 服务的概念并在 C#/.NET 中使用过它。我需要知道如何在 iPad 上执行此操作。谁能推荐一本关于 iOS 网络服务的好书或阅读材料?

回答by retrodrone

If you're using iOS frameworks, your solution will involve using NSURLConnectionor NSRLRequest. In-depth Apple documentation can be found here. In my experience, you want to wrap those API calls in your own client request that can build data transfer objects your application logic understands.

如果您使用的是 iOS 框架,您的解决方案将涉及使用NSURLConnectionNSRLRequest。可以在此处找到深入的 Apple 文档。根据我的经验,你想包装在自己的客户端请求的API调用,可以建立数据传输对象应用程序逻辑的理解。

If you're looking at 3rd party frameworks to access a RESTful web service, take a peek at this answerfor a number of iOS framework options.

如果您正在查看 3rd 方框架来访问 RESTful Web 服务,请查看此答案以了解许多 iOS 框架选项。

For SOAP services, take a look here.

对于 SOAP 服务,请查看此处

As for processing the data, it depends what kind of data your web service produces. There are several frameworks and libraries that can make it easy to consume XML or JSON.

至于处理数据,这取决于您的 Web 服务生成的数据类型。有几个框架和库可以使使用 XML 或JSON变得容易。

In my experience, the best book on the subject is Advanced iOS Programming.

根据我的经验,关于该主题的最佳书籍是Advanced iOS Programming