Android Development

Web Service

Web services are a collection of open-source protocols and standards (xml, http, etc.) that are useful for the exchange of data between systems or applications. A web service is fundamentally needed to give interoperability, for example associating different applications. It permits distinctive applications to speak with one another and divide the information and services between themselves. Web services give a norm to every one of the sorts of customer applications to conjure capacities on each kind of application server. 

Android Web Services Components 

  • Publisher 

The publisher can be understood as a Service provider. The publisher is responsible for creating the web service and making it available for the Clients. 

  • Subscriber 

The Subscriber is nothing but, the service requester. The Service requester is the one that needs to contact the web service. The client application will contact through a client application. This Client application can be based on .Net or any language based language. 

  • Broker 

The broker here is the application that provides access to the UDDI. The UDDI stands for User descriptive, discovery and integration. It enables the client application to locate the web service exactly. 

Characteristics of Web Services in Android 

Before knowing more about web-services, we’ll understand some of the behavioral characteristics. 

1. Web services are XML – based. They use it at its data representational layer and its transportational layer as it removes networking, operating system or even the platform binding. These services are highly interoperable at their core level. 

2. Web services are loosely coupled. That means the consumer web services and providers of web service are not tied together directly. 

3. Web services have the ability to be either Synchronous or Asynchronous. Here Synchronous can be understood as binding the client to the execution of the service. On the other hand, Asynchronous refers to allowing the client to invoke a service first and later executing the other functions. 

4. Web Services supports Remote Procedure Calls. Remote Procedure calls can often be referred to as RPCs. These RPCs let the clients invoke various functions, methods, and services on remote objects using XML. 

5. There is support to Document exchange in Web Services. In fact, XML has a very generic way to represent data as well as complex documents. Along with that, it has got various ways to represent these documents. 

Types of Web Services in Android 

1. XML-RPC 

In XML-RPC, RPC stands for remote procedure calls. It is an XML based protocol for the exchange of data between a huge range of devices over the internet. 

2. UDDI 

UDDI stands for Universal Descriptive, discovery, and integration. It is an XML- based standard used for detailing, publishing and discovering new web services. 

3. SOAP 

SOAP here stands for Simple object access protocol. It is an XML based web service protocol used for the exchange of data or documents over HTTP(Hypertext transfer protocol) or SMTP(Simple Message Transfer Protocol). It allows the communication of independent processes that operate on disparate systems. 

4. REST 

Here, REST is Representational State Transfer. It provides communication and connectivity between devices and the internet. 

Android Web Services Limitations 

1. Web services do not access from the browser. 

2. They don’t leverage emerging Web developments 

3. The HTTP protocol used by web services is not reliable and is insecure. 

Introduction to JSON (Prev Lesson)
(Next Lesson) MySQL Databases
Back to Android Development

No Comments

Give a comment