Sunday, September 30, 2018

WEB SERVICES


There is more than one way to answer: "What is a web service?", But essentially, Web services include any software, application or cloud technology that provides standardized Web protocols (HTTP or HTTPS) to interoperate, communicate and exchange data . Messages - generally XML (Extensible Markup Language) - throughout the Internet.

In other words, Web services are data exchange systems centered on XML that use the Internet for communication and the A2A interface (application to the application). These processes involve programs, messages, documents and / or objects.

An important feature of Web services is that applications can be recorded in several languages ​​and can still be communicated by exchanging data with each other through a Web service between clients and servers. A client invokes a Web service by sending a request through XML and the service responds to an XML response. Web services are also frequently associated with service-oriented architecture (SOA).

To break this, a Web service includes these essential functions:
• Available on the Internet or intranet networks
• Standardized XML messaging system
• Independent of a single operating system or programming language
• Self-description through the standard XML language
• Discovery using a simple location method

A Web service supports communication between several applications with HTML, XML, WSDL, SOAP and other open standards. XML marks the data, the SOAP transfers the message and the WSDL describes the accessibility of the service.

See an example of how it works: a Web service is placed between two sets of Java, .net or PHP applications, providing a way for these applications to communicate over the network. On the one hand, for example, a Java application interacts with java, .net and PHP applications at the other end, through the web service that communicates an independent language.

Web services offer different benefits in business operations. The technology helps IT professionals and Web architects to optimize connectivity, minimizing development time. And with this simplified infrastructure, the executives of the company begin to see a higher ROI (return on investment). In a B2B operation in which both parties understand how the process works, Web services provide efficient distribution of technology throughout the network.

web services

Different Types of Web Services

There are some central types of Web services: XML-RPC, UDDI, SOAP and REST

XML-RPC (Remote Procedure Call) is the most basic XML protocol for exchanging data between a wide variety of devices in a network. It uses HTTP to transfer data and communications quickly and easily to other client information for the server.

UDDI (Universal Description, Discovery, and Integration) is an XML-based standard for detailing, publishing and discovering Web services. It is basically an Internet registry for companies around the world. The objective is to simplify digital transactions and electronic commerce between the company's systems.

SOAP, which will be described in detail later in the blog, is an XML-based Web service protocol for exchanging data and documents over HTTP or SMTP (Simple Mail Transfer Protocol). It allows independent processes that operate in different systems to communicate using XML.

REST, which will also be described in detail at the end of the blog, provides communication and connectivity between devices and the Internet for API-based tasks. Most RESTful services use HTTP as the support protocol.

Here are some well-known Web services that use markup languages:
• Web Model
• JSON-RPC
• JSON-WSP
• WSDL (Web Services Description Language)
• Web Services Conversation Language (WSCL)
• Web Services Flow Language (WSFL)
• Exchange of Web services metadata (WS-MetadataExchange)
• XML interface for network services (XINS)

SOAP Web Services vs. REST

For years, IT professionals and web developers debated which web service is better and why. Well, there is no clear winner - it all depends. Web Services RESTful and SOAP offer different variations. For example, a REST Web service is generally a better option when time is a factor, but the SOAP wins when building a service with several non-CRUD methods. The specific requirements of a company determine the type of web service that a partner will implement, unless it has already been decided by the WS provider.

Then, there are times when both options are the correct answer. This is the case of two of the largest e-commerce companies in the world: Amazon and eBay use Web services for REST and SOAP. And as more organizations focus on services and exploit more features, they will not have the option of not supporting both types.

But what is the difference between REST web services and SOAP web services? We will detail each option as we explore some pros and cons.

RESTful Web Services

What is a RESTful web service? The acronym REST, or sometimes ReST, stands for Representational State Transfer and is an architectural style, which means that each unique URL represents an individual object of some kind. A REST Web service uses HTTP and supports / redirects several HTTP methods: GET, POST, PUT or DELETE. It also offers simple services oriented to CRUD. Curiosity: The original RESTful architecture was designed by one of the main authors of HTTP, Roy Fielding.

Pros: lightweight, readable for humans, easier to build
Cons: Point-to-point communication, lack of standards

SOAP Web Services

SOAP is established in the simple object access protocol. This web service protocol exchanges structured data using XML and generally HTTP and SMTP for transmission. The SOAP also uses WSDL (Web Services Description Language) documents to distribute a web service description model. This describes how SOAP requests (on the client side) and responses (on the server side) should appear. In addition, SOAP web services have security and addressing standards.

Pros: generally easier to consume, more standards (WSDL, etc.), distributed computing
Cons: difficult configuration, more complicated coding, more difficult to develop




No comments:

Post a Comment

From Java 8 to Java 11

Switching from Java 8 to Java 11 is more complicated than most updates. Here are some of my notes on the process. Modules Java 9 i...