开发者

How to use WCF in Android

I provid开发者_运维百科e 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.


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.
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜