如何从iPhone访问SOAP服务 [英] How to access SOAP services from iPhone

查看:115
本文介绍了如何从iPhone访问SOAP服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我打算为iPhone开发一个应用程序,该应用程序必须访问几个SOAP服务。在iPhone SDK中进行一些基本检查时,我无法找到任何访问SOAP服务的支持,一点谷歌搜索得出的结论是iPhone SDK中不支持SOAP。

I'm planning to develop an app for the iPhone and that app would have to access a couple of SOAP services. While doing some basic checking in the iPhone SDK I was not able to find any support for accessing SOAP services, a bit of Googling lead to the conclusion that there is no support for SOAP in the iPhone SDK.

因此,如果我想构建该应用程序,我需要提出一种从iPhone访问SOAP服务的方法。什么是最好的方法?任何最佳做法?有人已经使用iPhone SDK中存在的功能来编写库以访问SOAP服务吗?

So if I do want to build that app I'll need to come up with a approach to access SOAP services from the iPhone. What would be the best approach? Any best practices? Did someone already write a library using the functionality that is present in the iPhone SDK to access SOAP services?

(因为我需要访问的服务是由另一方公开的它们只是将它暴露为SOAP,遗憾的是它不能切换到另一种类型的接口(例如基于REST的API)。

(Since the service I need to access is exposed by another party and they only expose it as SOAP, it's unfortunately not an option to switch to another type of interface (e.g. REST based API).

Gero

推荐答案

一个词:不要。

显然这不是一个真正的答案。但是应该不惜一切代价避免使用SOAP。;-)是否可以在iPhone和Web服务之间添加代理服务器?也许是什么东西可以将REST转换成SOAP?

OK obviously that isn't a real answer. But still SOAP should be avoided at all costs. ;-) Is it possible to add a proxy server between the iPhone and the web service? Perhaps something that converts REST into SOAP for you?

可以尝试 CSOAP ,一个依赖于libxml2的SOAP库(包含在iPhone SDK中)。

You could try CSOAP, a SOAP library that depends on libxml2 (which is included in the iPhone SDK).

我写了我的拥有OSX的 SOAP框架。但是它没有被主动维护,并且需要一些时间来移植到iPhone(您需要用 TouchXML 开始)

I've written my own SOAP framework for OSX. However it is not actively maintained and will require some time to port to the iPhone (you'll need to replace NSXML with TouchXML for a start)

这篇关于如何从iPhone访问SOAP服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆