Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Creating Web Service for Android Application

I've been reading some info about Web Services for Android using SOAP or REST but I've never created a web service so I have many questions about this.

I'm developing an Android App where the users answer some questions and for each user an XML file is generated and saved in the device.

Here are my queries:

  1. What I would like to do is to send these XML files from the devices to the Web Service and also sometimes to retrieve all the files to any device.

  2. Do I need to convert these files into Byte or just send the XML?

  3. Are these actions possible with the Web Service or will you use Java Sockets? In case you prefer the Web Service, what would you use: REST, SOAP.

I would appreciate some links to tutorials and piece of advise.

like image 423
Katherine99 Avatar asked Mar 24 '13 16:03

Katherine99


1 Answers

Use SQL Server to manage the data on your desktop and create a web-service in .NET on Visual Studio.

Then connect to the web-service in your application and set/get data from the DB, using web-services. You can use either XML or JSON to transfer your data between the phone and the server.

There is no need for the use of Java Socket API for this.

Links which might be useful :

How to make a web-service in .NET (does not include the implementation in Android) : http://srikanthtechnologies.com/blog/dotnet/wsdaljava.aspx

How to connect your service with Android :

http://seesharpgears.blogspot.in/2010/11/basic-ksoap-android-tutorial.html

http://www.codeproject.com/Articles/304302/Calling-Asp-Net-Webservice-ASMX-From-an-Android-Ap

http://adrianandroid.blogspot.in/2012/05/access-c-net-web-service-in.html

Note: I have never worked on RESTful services. My work has always been on SOAP and hence it remains my preference.

like image 180
Swayam Avatar answered Sep 21 '22 12:09

Swayam