android和iphone 调用 WCF的一段说明

Consume REST services from iPhone: Use CFNetwork, as described inhttp://developer.apple.com/library/ios/#documentation/Networking/Conceptual/CFNetwork/Introduction/Introduction.html#//apple_ref/doc/uid/TP30001132.

You can find a sample onhttp://developer.apple.com/library/ios/#documentation/Networking/Conceptual/CFNetwork/CFHTTPTasks/CFHTTPTasks.html#//apple_ref/doc/uid/TP30001132-CH5-SW2.

 

Consume SOAP services from iPhone: I'm not aware of a good solution. iPhone SDK doesn't seem to provide out-of-box support for SOAP services. You can refer tohttp://www.icodeblog.com/2008/11/03/iphone-programming-tutorial-intro-to-soap-web-services/ for a sample on how to construct a SOAP message manually.

 

Consume REST services from Android: Use the AndroidHttpClient class, as described inhttp://developer.android.com/reference/android/net/http/AndroidHttpClient.html.

 

Consume SOAP services from Android: Once again, Android doesn't provide any out-of-box support for SOAP services. But you can find some third party open source libraries. For example, according to the tutorial onhttp://www.codeproject.com/KB/android/webservice-from-android.aspx, you can use thekSOAP 2 library.

 

Anyway, I recommend you to use REST services, which are supported by almost all platforms, because it is simply HTTP. Most devices do not have built-in support for SOAP services (although Windows Phone has some basic support). So if you use SOAP, you may have a difficult time to work with your devices, as you have to search from a lot of open source libraries and try to make one work.


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值