Answered by:
WCF service with Android or IPhone Client

Question
-
Hi all,
Is it possible to call WCF service in Android or IPhone mobiles?
If possible provide some links or tutorials for it..
Thanks
Monday, June 27, 2011 6:15 AM
Answers
-
Hello, darnold924 has pointed out how to cosume REST services from Android. In addtion:
Consume REST services from iPhone: Use CFNetwork, as described in http://developer.apple.com/library/ios/#documentation/Networking/Conceptual/CFNetwork/Introduction/Introduction.html#//apple_ref/doc/uid/TP30001132.
You can find a sample on http://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 to http://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 in http://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 on http://www.codeproject.com/KB/android/webservice-from-android.aspx, you can use the kSOAP 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.
Lante, shanaolanxing This posting is provided "AS IS" with no warranties, and confers no rights.
Windows Azure Technical Forum Support Team Blog- Marked as answer by RajeshKumar1989 Wednesday, June 29, 2011 12:32 AM
Tuesday, June 28, 2011 2:10 AM
All replies
-
On 6/27/2011 2:15 AM, RajeshKumar1989 wrote:> Hi all,>> Is it possible to call WCF service in Android or IPhone mobiles?>> If possible provide some links or tutorials for it..>> Thanks>I'll assume you have heard of MonoDroid and Monotouch on IPad.You should be able to use Bing or Google to find tutorials.Monday, June 27, 2011 1:42 PM
-
Hello, darnold924 has pointed out how to cosume REST services from Android. In addtion:
Consume REST services from iPhone: Use CFNetwork, as described in http://developer.apple.com/library/ios/#documentation/Networking/Conceptual/CFNetwork/Introduction/Introduction.html#//apple_ref/doc/uid/TP30001132.
You can find a sample on http://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 to http://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 in http://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 on http://www.codeproject.com/KB/android/webservice-from-android.aspx, you can use the kSOAP 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.
Lante, shanaolanxing This posting is provided "AS IS" with no warranties, and confers no rights.
Windows Azure Technical Forum Support Team Blog- Marked as answer by RajeshKumar1989 Wednesday, June 29, 2011 12:32 AM
Tuesday, June 28, 2011 2:10 AM