quinta-feira, 22 de dezembro de 2016

A simple text about Web Service

Web Service is defined as the provision of a service that can be accessed through the Internet. It represents a well-defined business logic allowing interaction with clients.

These clients send well-defined requests and receive:
- synchronous responses, in which the client is blocked waiting for the service to complete its execution, and
- asynchronous, with no need to wait for the execution to end.

Services exposed as Web Services have business logic that must encapsulate rules or functionalities that represent business rules. They must be published and accessed through a standard language of publication and a specific communication protocol.

A Web Service has a weakly coupled internal structure, that is, the implementation of the service can change at any time without affecting its use by the client.

By adopting this type of technology we can make the systems better modularized and reach Levels of integration. It supports remote procedure calls (RPC), which allows the client to invoke remote object operations using an XML-based protocol. Each operation must optionally expose input parameters and set its return type.

Components of a Web Service

HTTP protocol: standard protocol for transmission of data over the Internet.

XML: standard format for information exchange. It has strict syntax and lightness in the data storage. Main element of the Web Services technology.

Simple Object Access Protocol (SOAP): Provides a standard packaging framework for transporting XML documents over the Internet.

Web Service Description Language (WSDL): XML technology that describes in a standardized way the interface of a Web Service. It determines:
- how the parameters of the external call input and output,
-the structure of the functions,
-the nature of the call (input / output and output only),
- the connection protocol with the service are represented, and
- how clients interact and execute services.

Universal Description, Discovery, and Integration (UDDI): describes a worldwide registry of services and serves as integration, advertisement, and service discovery. You can use this registry to discover services available on the Internet.

Introduction to tecnologies Web Services: SOA, SOAP, WSDL and UDDI - Part I

In the year 2000, the World Wide Web Consortium (W3C) accepted the submission of the Simple Object Access Protocol (SOAP). This XML-based message format has established a transmission structure for communication among applications (or among services) via HTTP. As a vendor-free technology, SOAP has provided an attractive alternative over traditional proprietary protocols such as CORBA and DCOM.

During the following year, the W3C published the WSDL specification. A new XML implementation, this standard provided a language for describing the web services interface. Subsequently supplemented by the Universal Description, Discovery and Integration (UDDI) specification, which provided a standard mechanism for dynamic discovery (dynamic discovery) of service descriptions, the first generation of the Web services platform was established.

The concept of services in an application has been around for some time. Services, as well as components, are considered independent building blocks, which collectively represent an application environment. However, unlike traditional components, services have some unique features that allow them to participate as part of a service-oriented architecture.

One of these characteristics is the complete autonomy in relation to other services. This means that each service is responsible for its own domain, which typically means limiting its scope to a specific business function (or group of related functions).

This design approach results in the creation of isolated units of business features weakly linked to each other. This is possible because of the definition of a standard communication structure. Because of the independence these services enjoy within this framework, the programming logic they encapsulate need not obey any other platform or set of technologies.

XML Web services

The most widely accepted and successful type of service is the XML Web service, which will henceforth be called Web Service only, or simply service. This type of service has two fundamental requirements:

  • Communicates via internet protocols (usually HTTP);  and
  • Sends and receives data formatted as XML documents.


The widespread acceptance of web service has resulted in the emergence of a set of supplementary technologies that have become a standard. So when developing web services, the use of technologies must consider:

  • Provide a service description that, at a minimum, consists of a WSDL document; and 
  • Be able to carry XML documents using SOAP over HTTP.


These technologies do not modify the core functionality of a web service, much as it does its ability to represent and communicate in a standard mode. Many of the architecture conventions expressed in this article assume that SOAP and WSDL are part of the described web services framework.

In addition, it is normal for a Web service to be:

  • Able to act as the requester and provider of a service;
  • Registered with a discovery agent through which they can be located.

In a typical conversation with a web service, the request initiator client is a web service as well. Any interface exposed by this client service also qualifies it as a service from which other services may request information. That said, web services do not fit into the classic client-server model. In fact, they tend to establish a point-to-point system, where each service can act as client or server.