mangat sharma
mangat sharma

Reputation: 11

How to use WCF in Android

I provide a remote tool to other websites through web service in WCF. Now I want to provide same remote tool to Android Apps. My question is: Can Android apps consume my WCF web services (hosted on webserver) or do I need to change something.

Upvotes: 1

Views: 1619

Answers (1)

Ladislav Mrnka
Ladislav Mrnka

Reputation: 364269

You have WCF service and you want to consume it from Android application. First of all your service must be interoperable. In case of Android client you should use either basicHttpBinding (SOAP service) or webHttpBinding (REST service).

  • To consume SOAP service use kSoap2 - here is some description how to call the service
  • To consume REST service use use DefaultHttpClient and call the serivice as any other HTTP resource (for REST service it is better to use JSON as a transport format) - here is some example.

Upvotes: 3

Related Questions