none
what binding type for Android RRS feed

  • Question

  • I have a WCF service running in a WPF application (not web server) and client that currently run well on the Windows platform using the NetTcpBinding. My service need sessions, is duplex because it uses event callbacks, and needs no security.

    Now I need to make my service consumable from an Android client (LAN only). I am not an Android developer but I was wondering what binding should my WCF service provide that can maintain its features and be easily consumed by the most common tools for Android.

    Apparently they can't make heads or tails of the NetTcpBinding so I need something maybe in a more humanly readable format that is easier for them to descifer.


    • Edited by Perry Manole Saturday, February 23, 2013 8:45 AM
    • Moved by Lisa Zhu Wednesday, February 27, 2013 5:06 AM wcf related
    Saturday, February 23, 2013 1:52 AM

Answers

  • WSDualHttpBinding is the equivalent binding for supporting both sessions and duplex/callback communication with interoperability (Android/iOS/…).

    AFIK, Android does not support WSDualHttpBinding. Reason whatever library being developed for android are based on SOAP1.1 and that is the reason you can see people are using basichttpbinding of WCF which uses SOAP1.1 where as wsHttpBinding, ws2007HttpBinding, and wsDualHttpBinding uses SOAP1.2.

    You need to identify a corresponding library in android which got SOAP1.2. I know KSoap2 for Android claims to understand SOAP1.2 but not sure the capabilities towards enterprise integration.

    Try posting your question to Android Forum for prompt response. And a suggestion is to use WCF REST full Service with your own pooling mechanism (remove callback) inside Androids Apps, as this is the best-practices mobile industry is following for Integration.


    Lingaraj Mishra

    Wednesday, February 27, 2013 7:15 AM
  • Hi,

    It is relative simple to consume RESTful WCF services as Android bundled with org.apache.http and org.json packages, so you can consider webHttpBinding. Below is a tutorial.

    #Comsuming WCF Services With Android

    http://fszlin.dymetis.com/post/2010/05/10/Comsuming-WCF-Services-With-Android.aspx

    But it is not an easy job to make REST service support duplex communication, you may try to use WebHttpBinding and implement polling way duplex at application level. DualHttpBinding is choice to create duplex channel over HTTP protocol.

    Hope this helps.

    Best Regards.


    Haixia
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Wednesday, February 27, 2013 7:20 AM
    Moderator

All replies

  • Refer following link

    http://stackoverflow.com/questions/669764/how-to-consume-wcf-service-with-android


    Gaurav Khanna | Microsoft VB.NET MVP | Microsoft Community Contributor

    Saturday, February 23, 2013 4:13 PM
  • The binding used in that link uses basicHttpBinding which does not support sessions and duplex. I specifically stated that my service uses sessions and duplex and want to maintain these features. Again, what WCF binding is best consumed by Android with the requirements specified?
    Saturday, February 23, 2013 5:39 PM
  • Hi Perry,

    From your description, I ‘d like to move this post to  the most related forum--WCF forum.There are more  experts in this aspect, so you will get  better support and  may have more luck getting answers.

    Thanks for your understanding.

    Regards,


    Lisa Zhu [MSFT]
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Wednesday, February 27, 2013 5:05 AM
  • WSDualHttpBinding is the equivalent binding for supporting both sessions and duplex/callback communication with interoperability (Android/iOS/…).

    AFIK, Android does not support WSDualHttpBinding. Reason whatever library being developed for android are based on SOAP1.1 and that is the reason you can see people are using basichttpbinding of WCF which uses SOAP1.1 where as wsHttpBinding, ws2007HttpBinding, and wsDualHttpBinding uses SOAP1.2.

    You need to identify a corresponding library in android which got SOAP1.2. I know KSoap2 for Android claims to understand SOAP1.2 but not sure the capabilities towards enterprise integration.

    Try posting your question to Android Forum for prompt response. And a suggestion is to use WCF REST full Service with your own pooling mechanism (remove callback) inside Androids Apps, as this is the best-practices mobile industry is following for Integration.


    Lingaraj Mishra

    Wednesday, February 27, 2013 7:15 AM
  • Hi,

    It is relative simple to consume RESTful WCF services as Android bundled with org.apache.http and org.json packages, so you can consider webHttpBinding. Below is a tutorial.

    #Comsuming WCF Services With Android

    http://fszlin.dymetis.com/post/2010/05/10/Comsuming-WCF-Services-With-Android.aspx

    But it is not an easy job to make REST service support duplex communication, you may try to use WebHttpBinding and implement polling way duplex at application level. DualHttpBinding is choice to create duplex channel over HTTP protocol.

    Hope this helps.

    Best Regards.


    Haixia
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Wednesday, February 27, 2013 7:20 AM
    Moderator
  • What about SignalR. It has duplex and connection sessions. However documentation is poor and don't know how easy it is to consume this on android apps (not web with javascript).
    Wednesday, February 27, 2013 1:37 PM
  • Hi,

    For more information about SignalR, you may check https://github.com/SignalR/SignalR/wiki.

    #SignalR client on Mono for Android

    http://blog.rthand.com/post/2012/03/14/SignalR-client-on-Mono-for-Android.aspx

    Hope it helps.

    Best Regards.


    Haixia
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Saturday, March 2, 2013 10:20 AM
    Moderator