Web Services (WS-I)
What is a Web Service?
It is an interface able to receive a request, make the process and return the results trough internet by network protocols (HTTP,FTP,SMTP).
Web Services different environments communicate themselves by XML language.
To keep a coherent dialog between the WSC (Web Service Client), that forwards the request and receives the response, and the WSS (Web Service Server), wich executes the process and forwards the response, a SOAP (Simple Object Acces Protocol), that is a codification based on XML, is used.
Instead of obtaining a request from a browser and return web pages as a response, a Web Service receives the request by means of a SOAP formatted message and, from other applications, makes the required process and returns a response message in a SOAP format too.
Web Services function schema
The use of SOAP messages involves:
| - Independently of the architecture and programming languages used in the Client Web Services and Server Web Services , both services should be able to send, receive and interpret SOAP. This is possible thanks to the different libraries or objects dedicated to Web Services and based on technologies such as NET,JAVA,PHP or PERL. |
| - The necessity to obtain or give information about what the Web Services does and where is placed (UDDI). |
| - The necessity to know how to question the Web Service (WSDL). |
Wich is the Web Service use?
From web applications or desktop, to access to remote information and processes.
It means, for example, that a Web Service can be called remotely as other functionality in the desktop SIG application, with the following advantages: it is totally invisible for the last end-user and, being a remote process, the resources consume is absorbed by the Web Services, and finally, the application can be developed in any language or platform.
The purpose of a Web Service is to offer, sell or rent, a process allowing to be invoked by other application without considering the programming language used.
Web Services and desktop application
Web Services vs. OGC Web Services
OGC Services integrate several OGC specifications, devoted to make geoprocessing (WMS, WFS, WCS, WTS, etc..).
Both types of services have the following features in common:
| - They use technologies as XML and HTTP. |
| - They make the process at the Server and return a known result previously specified. |
Anyhow, there are two basic differences:
| - OGC Web Services don't use the same communication languages (SOAP and WDSL), even though big efforts are being done to integrate them. |
| - Web Services, unlike OGC Web Services, have been generated in order to make business. First Web Services require some authentication and control devices to manage the transactions and the use of processes. |
SOAP (Simple Object Access Protocol)
On of the main reasons for its use is the great support received from the industry. SOAP is the first protocol of its type accepted by near all big software companies all over the world as Microsoft, IBM, SUN Microsystems, SAP, etc.
As mentioned before, SOAP will be used as a pattern for the requesting-responsing dialogue between WSC and WSS
SOAP defines how to pack (to organize), transmit and define the data.
A SOAP message is divided into three levels: ENVELOPE (obligatory), HEADER (optional), BODY (obligatory).
Therefore, SOAP is similar to a letter: it is an envelope with a header that contains the message receptor address and a set of different delivery options. Inside the envelope, there is the body or message content.
SOAP message structure:
| <ENVELOPE> <HEADER> </HEADER> <BODY> </BODY> </ENVELOPE> |
- ENVELOPE:
- Is the base of the document, inside it , with a HEADER element (or any) and a BODY element.
- It has to be identified by NAMESPACES.
- It can't be validated with DTD
- HEADERS:
- It is not an obligatory element.
- It allows us to introduce security variables in the message transmission: authentication, routing, etc.
- The HEADER element is processed before entering to the BODY.
- BODY:
- Here we find all Web Services information to be treated. Methods and data.
- To define data, SOAP uses XML Schema.
WSDL (Web Services Description Language)
Per tal de poder crear un WSC, necessitem saber com està constituït el WSS, es a dir, quins mètodes té implementat, quins tipus de dades espera rebre i quina serà la resposta.
WSDL és un document XML creat per el WSS i on es descriu tota aquest informació.
UDDI (Universal Description Discovery and Integration)
It is a centralized catalog to look for Web Services and register them.
