91-9990449935 0120-4256464 |
Android Web Service TutorialCreating web service application in android is not a difficult task. We can easily create a restful web service application in android to authenticate or save information into the external database such as oracle, mysql, postgre sql, sql server using other application developed in java, .net, php etc languages. That is what we are going to do. Android Restful Web Service TutorialBefore developing web services application, you must have basic knowledge of SOAP and Restful web services. That is why, we are going to discuss basic points about web services such as what is web service and brief information about SOAP and Restful web services. What is Web Service?A web service is a standard for exchanging information between different types of applications irrespective of language and platform. For example, an android application can interact with java or .net application using web services. Android Restful Web Service ExampleFile: activity_main.xml
File: activity_register_user.xml
MainActivity classFile: MainActivity.java
RegisterUser classFile: RegisterUser.java
File: AndroidManifest.xml
You need to provide INTERNET permission in AndroidManifest.xml file. Output:Java Servlet Login and Register example using oracle databaseCreate table trainingtrains_user in the oracle database having three columns id, name and password. Id must be primary key and generated through SEQUENCE. New create two servlet classes to login and register user. Login Servlet classFile: Login.java
httpPostServlet Servlet classFile: httpPostServlet.java
index.jsp
Next TopicAndroid Interview Questions
|