Web Services

Web services are the computer revolution of the new generation of applications that work collaboratively in which the software is distributed on different servers. How they work in .NET.

Web services are the computer revolution of the new generation of applications that work collaboratively in which the software is distributed on different servers.

Computer science began with single-user programs implanted in large computers. Subsequently, these first applications reached the capacity to serve different users. Years passed and the client-server architecture arrived, thanks to this development model, the application was divided into a part that interacted with the user and another part for information processing. In this approach it was achieved that each of the parts that constituted the application could reside in different computers. With the passage of time, computing increased and the era of distributed applications arrived in which processes were carried out in different units. From this step, Internet technology arose to solve the problems associated with centralized application failure. See documentation about Internet origins.

As a final point to this chronology, web services are a step forward in computing since in this way a computer is no longer considered as a computing core but as a repository of services for n applications distributed over the Internet. To understand this concept we will use the following example:

Let us imagine the assumption of a server X that provides 2 services, service A and service B. We are also given the case that we have another server Y that offers service C and service D. Finally, we also analyze server Z that provides 2 services service E and service F.

See also  How to make a SQL to subtract inventory quantity when generating the sale

Imagine that the server W offers an online application that is made up of its main service G and the interoperation with A, B, C, D, therefore it is given that the services A, B, C, D serve G independent of their location in G but they are also available to the rest of the internet if it has been designed that way. Therefore, looking at the previous data we see that the combinatory possibilities are great and especially for the first time and in a more transparent way than with the use of components, the use of software becomes more reusable since different services can be used as components in an application.

To achieve this purpose, with its .NET technology, Microsoft uses an XML application, called SOAP, as a communication protocol.

What is SOAP? It stands for Simple Object Access Protocol. This protocol derives from a protocol created by David Winer, XML-RPC in 1998. On his website, Userland, http://ww.userland.com you can find a multitude of documentation about this first communication protocol under http via XML. With this protocol, RPC or remote procedure calls could be carried out, that is, we could either make requests on the client or server via http to a web server. The messages had to have a certain format using XML to encapsulate the request parameters. Over time, the project started by David Winer interested important multinationals including IBM and Microsoft and from this interest in XML-RPC SOAP was developed.

SOAP is a more complete protocol than XML-RPC but it can be said that it is more complex.

See also  Wait for an HTTP response in Angular

The following comparative table shows the differences between both protocols:

Characteristics XML-RPC SOAP Basic scalars. yes yes Structures. yes yes Arrays. yes yes Named Structures and Arrays. no yes Fault handling. yes yes Learning curve. yes no Character set. no yes (US-ASCII, UTF-8, UTF-16) User-defined data types. no yes Requires client understanding. no yes Specific Processing Instructions. no yes

Here is an example of SOAP: POST /StockQuote HTTP/1.1

Host: stockquoteserver.com

Content-Type: text/xml; charset=”utf-8″

Content-Length: nnnn

SOAPAction: “http://example.org/2001/06/quotes”

env:encodingStyle=”http://www.w3.org/2001/06/soap-encoding”

xmlns:m=”http://example.org/2001/06/quotes”>

DIS

In future articles we will show the construction of web services using Microsoft .NET technology.

Loading Facebook Comments ...
Loading Disqus Comments ...