Android tutorial - web service android - android app development - android studio - android development tutorial
What Are Web Services?
- Web services are client & server applications that communicate over the (WWW) - World Wide Web’s (HTTP) - HyperText Transfer Protocol.
- As described by the (W3C) - World Wide Web Consortium, web services offer a standard means of interoperating between software applications running on a variety of platforms & frameworks.
- Web services are characterized by their great interoperability & extensibility, as well as their machine-processable descriptions, thanks to the use of XML.
- Web services can be joint in a lightly attached way to achieve complex operations.
- Programs providing simple services can interact with each other to deliver sophisticated added-value services.
Android Web Service
- Creating a web service application in android is not a tough 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.
Android Restful Web Service Tutorial
- Previously developing web services application, you must have the basic knowledge of SOAP & Restful web services.
- why, we are going to discuss basic points about web services such as what is web service & brief information about SOAP & also Restful web services.
What is Web Service?
- A web service is a standard for exchanging information between different types of applications irrespective of language & platform.
- For ex, Using web services, android application can interact with java or .net application.
Android Restful Web Service Example
- File: activity_main.xml
- File: activity_register_user.xml
- File: MainActivity.java
- File: RegisterUser.java
- You need to offer INTERNET approval in AndroidManifest.xml file.
Java Servlet Login and Register example using oracle database
- Create table wikitechy_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 class
- File: Login.java
httpPostServlet Servlet class
- File: httpPostServlet.java