Consume ado.net data service from android 2.1

I have an ado.net data service created using VS 2008 sp 1 that is hosted, which I want to use via HTTP and JSON with Android 2.1? Does anyone have some sample code on how to do CRUD operations, is it easy to do this? I heard that Restlet makes it very simple, but it seems it cannot find a sample Android code for this. If someone can post a tutorial with some actual code that would be greatly appreciated.

+3
source share
3 answers

( ), - . ado.net( WCF) android, OData4j. xml json. , , RESTlet.
:

ODataConsumer c = ODataJerseyConsumer.create("http://url/WebService.svc");

List<OEntity> listEntities = c.getEntities("Movies").execute().toList();

if (listEntities.size() > 0 ) {

for(OEntity entity : listEntities) {

System.out.println(entity.getProperty("MovieID").getValue().toString());
   }
}

WCF OData4j .

0

Source: https://habr.com/ru/post/1734941/


All Articles